@dss-kit/ui-kit 0.2.19 → 0.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -21
- package/dist/components/controls/Input/Input.d.ts +2 -1
- package/dist/components/controls/Input/Input.d.ts.map +1 -1
- package/dist/components/controls/Select/Select.d.ts +4 -1
- package/dist/components/controls/Select/Select.d.ts.map +1 -1
- package/dist/styles/utils/breakpoints/base.scss +11 -11
- package/dist/styles/utils/breakpoints/index.scss +3 -3
- package/dist/styles/utils/breakpoints/screen.scss +61 -61
- package/dist/styles/utils/breakpoints/semantic.scss +31 -31
- package/dist/styles/utils/fonts/font-family.scss +3 -3
- package/dist/styles/utils/fonts/index.scss +1 -1
- package/dist/styles/utils/index.scss +5 -5
- package/dist/styles/utils/size/index.scss +1 -1
- package/dist/styles/utils/size/modifiers.scss +40 -40
- package/dist/styles/utils/style/index.scss +1 -1
- package/dist/styles/utils/style/variants.scss +34 -34
- package/dist/styles/utils/typography/_font-weight.scss +33 -33
- package/dist/styles/utils/typography/_variants.scss +85 -85
- package/dist/styles/utils/typography/index.scss +2 -2
- package/dist/ui-kit.cjs.js +19 -19
- package/dist/ui-kit.cjs.js.map +1 -1
- package/dist/ui-kit.css +1 -1
- package/dist/ui-kit.es.js +1669 -1661
- package/dist/ui-kit.es.js.map +1 -1
- package/package.json +92 -92
package/dist/ui-kit.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),C=require("react"),V=require("@emotion/css"),wi=require("react-dom"),Vn=require("@highcharts/react");function wa(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const R=wa(C),su=wa(wi);function ru(e){const{h:t,w:n,m:o,mx:i,my:s,mt:r,mr:a,mb:l,ml:c,p:u,px:f,py:d,pt:h,pr:m,pb:g,pl:y,gap:x,xGap:w,yGap:v,row:S,flex:b,relative:M,absolute:T,display:E,overflow:D,absoluteFill:F,center:$,justifyContent:O,alignItems:j,alignSelf:k,borderWidth:N,borderBottomWidth:B,borderColor:P,borderRadius:_,borderStyle:A,border:I,zIndex:X,minWidth:U,minHeight:q,maxWidth:Q,maxHeight:Z,flexWrap:ne,flexGrow:le,flexShrink:Ce,flexBasis:me,backgroundColor:je,position:z,top:J,right:re,bottom:ue,left:Ae,...Ve}=e;return{spacers:{h:t,w:n,m:o,mx:i,my:s,mt:r,mr:a,mb:l,ml:c,p:u,px:f,py:d,pt:h,pr:m,pb:g,pl:y,gap:x,xGap:w,yGap:v,row:S,flex:b,relative:M,absolute:T,display:E,overflow:D,absoluteFill:F,center:$,justifyContent:O,alignItems:j,alignSelf:k,borderWidth:N,borderBottomWidth:B,borderColor:P,borderRadius:_,borderStyle:A,border:I,zIndex:X,minWidth:U,minHeight:q,maxWidth:Q,maxHeight:Z,flexWrap:ne,flexGrow:le,flexShrink:Ce,flexBasis:me,backgroundColor:je,position:z,top:J,right:re,bottom:ue,left:Ae},rest:Ve}}const au=e=>V.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,borderStyle:e.borderStyle,border:e.border,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?.position?e?.position:e?.absolute?"absolute":e?.relative?"relative":void 0,...e.absoluteFill&&{position:"absolute",top:0,right:0,bottom:0,left:0},top:e?.top,right:e?.right,bottom:e?.bottom,left:e?.left}),L=C.forwardRef(({className:e,children:t,...n},o)=>{const{spacers:i,rest:s}=ru(n),r=C.useMemo(()=>au(i),[i]);return p.jsx("div",{ref:o,className:V.cx(r,e),...s,children:t})});L.displayName="Box";const lu="_loader_1qleq_8",cu={loader:lu},Ca=({color:e="var(--text-accent)"})=>p.jsx("span",{className:V.cx(cu.loader,V.css({"--loader-color":e}))}),ba=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));function uu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var oo={exports:{}};var bs;function du(){return bs||(bs=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",r=0;r<arguments.length;r++){var a=arguments[r];a&&(s=i(s,o(a)))}return s}function o(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var r="";for(var a in s)t.call(s,a)&&s[a]&&(r=i(r,a));return r}function i(s,r){return r?s?s+" "+r:s+r:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(oo)),oo.exports}var fu=du();const wt=uu(fu),hu="_rippleOverlay_s2kim_8",gu="_ripple_s2kim_8",Ss={rippleOverlay:hu,ripple:gu},io="button, a, input, label, [role='button'], [data-ripple]";function mu(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 gt=C.forwardRef(({color:e="rgba(0,0,0,0.18)",duration:t=1e3,radius:n="auto",className:o},i)=>{const s=C.useRef(null),[r,a]=C.useState([]),l=C.useRef([]),c=C.useRef(1),u=C.useRef(null),f=()=>{l.current.map(g=>clearTimeout(g)),l.current=[]},d=C.useCallback((g,y,x,w)=>{if(typeof window>"u")return;const v=x.getBoundingClientRect(),S=n==="auto"?Math.max(v.width,v.height)*2:n,b=g-w.left,M=y-w.top,T=Math.max(0,v.top-w.top),E=Math.max(0,v.left-w.left),D=Math.max(0,w.right-v.right),F=Math.max(0,w.bottom-v.bottom),O=window.getComputedStyle(x).borderRadius||"0px",j=c.current++,k={id:j,left:b-S/2,top:M-S/2,size:Math.ceil(S),clip:{top:Math.round(T),right:Math.round(D),bottom:Math.round(F),left:Math.round(E)},borderRadius:O};a(B=>[...B,k]);const N=window.setTimeout(()=>{a(B=>B.filter(P=>P.id!==j))},t+80);l.current.push(N)},[t,n]),h=C.useCallback(g=>{try{if(!s.current)return;const y=s.current,x=y.parentElement;if(!x)return;const w=mu(g);let v=null;for(const E of w)if(E instanceof Element){if(E===x)break;if(E.matches&&E.matches(io)){v=E;break}}if(v||(v=x),v.closest&&(v.closest("[disabled]")||v.getAttribute("aria-disabled")==="true"||v.classList.contains("ripple-disabled")))return;const S=g.target;if(S?.closest&&(S.closest("[disabled]")||S.getAttribute?.("aria-disabled")==="true"))return;const b=y.getBoundingClientRect(),{clientX:M}=g,{clientY:T}=g;d(M,T,v,b)}catch{}},[d]),m=C.useCallback(g=>{if(!s.current||!(g.key==="Enter"||g.key===" "))return;const y=s.current,x=y.parentElement;if(!x)return;const w=document.activeElement;let v=null;if(w instanceof Element&&w.matches(io)&&(v=w),v||(v=x),v.closest&&(v.closest("[disabled]")||v.getAttribute("aria-disabled")==="true"))return;const S=y.getBoundingClientRect(),b=v.getBoundingClientRect().left+v.getBoundingClientRect().width/2,M=v.getBoundingClientRect().top+v.getBoundingClientRect().height/2;d(b,M,v,S)},[d]);return C.useImperativeHandle(i,()=>({trigger:({center:g=!0,x:y,y:x}={})=>{const w=s.current;if(!w)return;const v=w.parentElement;if(!v)return;const S=w.getBoundingClientRect(),b=document.activeElement instanceof Element&&document.activeElement.matches(io)?document.activeElement:v,M=g?b.getBoundingClientRect().left+b.getBoundingClientRect().width/2:y??S.left+S.width/2,T=g?b.getBoundingClientRect().top+b.getBoundingClientRect().height/2:x??S.top+S.height/2;d(M,T,b,S)}}),[d]),C.useEffect(()=>{const g=s.current;if(!g)return;const y=g.parentElement;if(!y||typeof window>"u")return;const x=window.getComputedStyle(y);let w=!1;return x.position==="static"&&(y.style.position="relative",w=!0,u.current=y),y.addEventListener("pointerdown",h,!0),y.addEventListener("keydown",m),()=>{y.removeEventListener("pointerdown",h,!0),y.removeEventListener("keydown",m),w&&u.current&&(u.current.style.position="",u.current=null),f()}},[h,m]),C.useEffect(()=>()=>f(),[]),p.jsx("div",{ref:s,className:`${Ss.rippleOverlay} ${o??""}`,"aria-hidden":!0,children:r.map(g=>p.jsx("span",{className:Ss.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 mt(e,t){const{current:n}=C.useRef(e!==void 0),[o,i]=C.useState(t),s=n?e:o,r=C.useCallback(a=>{n||i(a)},[]);return[s,r]}function Ci(e,t,n,o=""){if(n)return e[`${t}_${n}${o}`]}function Dn(e,t,n){return Ci(e,t,n,"Size")}const pu="_button_11ykb_8",vu="_button_primary_11ykb_19",yu="_button_secondary_11ykb_22",xu="_button_negative_11ykb_25",wu="_button_positive_11ykb_28",Cu="_button_warning_11ykb_31",bu="_button_neutral_11ykb_34",Su="_button_mdSize_11ykb_118",Ru="_button_smSize_11ykb_128",_u="_button_xsSize_11ykb_138",so={button:pu,button_primary:vu,button_secondary:yu,button_negative:xu,button_positive:wu,button_warning:Cu,button_neutral:bu,"button_neutral-white":"_button_neutral-white_11ykb_37","button_no-bg":"_button_no-bg_11ykb_40",button_mdSize:Su,button_smSize:Ru,button_xsSize:_u};function Xt({attr:e,children:t,className:n,type:o="button",color:i="primary",size:s="md",...r}){const a="button";return p.jsxs("button",{...e,...r,type:o,className:wt(so[a],n,Dn(so,a,s),Ci(so,a,i)),children:[p.jsx(gt,{}),t]})}const Sa=C.createContext({isOpen:!1,onClose:()=>{}}),Pu=()=>C.useContext(Sa),Eu="_overlay_1gnp0_8",Mu="_modal_1gnp0_12",Tu="_closeButton_1gnp0_28",Au="_size_lg_1gnp0_35",Vu="_size_md_1gnp0_38",Du="_size_sm_1gnp0_41",dn={overlay:Eu,modal:Mu,"modal-animation":"_modal-animation_1gnp0_1",closeButton:Tu,size_lg:Au,size_md:Vu,size_sm:Du},Ra=C.forwardRef(({isOpen:e,onClose:t,overlayClassName:n,modalClassName:o,size:i="md",closeOnBackdropClick:s=!0,closeOnEsc:r=!0,disableBodyScroll:a=!0,showAbsoluteCloseButton:l,children:c},u)=>{C.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 f=C.useCallback(h=>{h.key==="Escape"&&t()},[t]);C.useEffect(()=>{if(typeof window<"u"&&typeof document<"u"&&r&&e)return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[e,r,f]);const d=C.useCallback(h=>{s&&h.target===h.currentTarget&&t()},[s,t]);return e?p.jsx(cn,{children:p.jsx(Sa.Provider,{value:{isOpen:e,onClose:t},children:p.jsx(L,{position:"fixed",top:0,right:0,bottom:0,left:0,row:!0,center:!0,flex:1,onClick:d,backgroundColor:"var(--fill-bg-overlay-primary)",className:V.cx(dn.overlay,n),zIndex:1,children:p.jsxs(L,{ref:u,className:V.cx(dn.modal,dn[`size_${i}`],o),relative:!0,children:[l&&p.jsx(Xt,{className:dn.closeButton,onClick:t,color:"neutral",children:p.jsx(ba,{})}),c]})})})}):null});Ra.displayName="Modal";const ku="_footer_1bo08_8",Fu={footer:ku},_a=C.forwardRef(({children:e,row:t=!0,flex:n=!0,gap:o="var(--spacing-lg)",p:i="var(--spacing-2xl)",className:s,...r},a)=>p.jsx(L,{flex:n,row:t,gap:o,p:i,className:V.cx(Fu.footer,s),ref:a,...r,children:e}));_a.displayName="ModalFooter";const bi=C.createContext({});function Si(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ri=typeof window<"u",Pa=Ri?C.useLayoutEffect:C.useEffect,Hn=C.createContext(null);function _i(e,t){e.indexOf(t)===-1&&e.push(t)}function Pi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ue=(e,t,n)=>n>t?t:n<e?e:n;function Oo(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Dt=()=>{},Ke=()=>{};process.env.NODE_ENV!=="production"&&(Dt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Oo(t,n))},Ke=(e,t,n)=>{if(!e)throw new Error(Oo(t,n))});const qe={},Ea=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Ma(e){return typeof e=="object"&&e!==null}const Ta=e=>/^0[^.\s]+$/u.test(e);function Ei(e){let t;return()=>(t===void 0&&(t=e()),t)}const Me=e=>e,Lu=(e,t)=>n=>t(e(n)),on=(...e)=>e.reduce(Lu),Yt=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o};class Mi{constructor(){this.subscriptions=[]}add(t){return _i(this.subscriptions,t),()=>Pi(this.subscriptions,t)}notify(t,n,o){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,o);else for(let s=0;s<i;s++){const r=this.subscriptions[s];r&&r(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Le=e=>e*1e3,Ee=e=>e/1e3;function Aa(e,t){return t?e*(1e3/t):0}const Rs=new Set;function Ti(e,t,n){e||Rs.has(t)||(console.warn(Oo(t,n)),Rs.add(t))}const Va=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Iu=1e-7,ju=12;function $u(e,t,n,o,i){let s,r,a=0;do r=t+(n-t)/2,s=Va(r,o,i)-e,s>0?n=r:t=r;while(Math.abs(s)>Iu&&++a<ju);return r}function sn(e,t,n,o){if(e===t&&n===o)return Me;const i=s=>$u(s,0,1,e,n);return s=>s===0||s===1?s:Va(i(s),t,o)}const Da=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ka=e=>t=>1-e(1-t),Fa=sn(.33,1.53,.69,.99),Ai=ka(Fa),La=Da(Ai),Ia=e=>(e*=2)<1?.5*Ai(e):.5*(2-Math.pow(2,-10*(e-1))),Vi=e=>1-Math.sin(Math.acos(e)),ja=ka(Vi),$a=Da(Vi),Ou=sn(.42,0,1,1),Nu=sn(0,0,.58,1),Oa=sn(.42,0,.58,1),zu=e=>Array.isArray(e)&&typeof e[0]!="number",Na=e=>Array.isArray(e)&&typeof e[0]=="number",_s={linear:Me,easeIn:Ou,easeInOut:Oa,easeOut:Nu,circIn:Vi,circInOut:$a,circOut:ja,backIn:Ai,backInOut:La,backOut:Fa,anticipate:Ia},Bu=e=>typeof e=="string",Ps=e=>{if(Na(e)){Ke(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,o,i]=e;return sn(t,n,o,i)}else if(Bu(e))return Ke(_s[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),_s[e];return e},fn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Hu(e,t){let n=new Set,o=new Set,i=!1,s=!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,f=!1,d=!1)=>{const m=d&&i?n:o;return f&&r.add(u),m.has(u)||m.add(u),u},cancel:u=>{o.delete(u),r.delete(u)},process:u=>{if(a=u,i){s=!0;return}i=!0,[n,o]=[o,n],n.forEach(l),n.clear(),i=!1,s&&(s=!1,c.process(u))}};return c}const Wu=40;function za(e,t){let n=!1,o=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,r=fn.reduce((v,S)=>(v[S]=Hu(s),v),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:f,preRender:d,render:h,postRender:m}=r,g=()=>{const v=qe.useManualTiming?i.timestamp:performance.now();n=!1,qe.useManualTiming||(i.delta=o?1e3/60:Math.max(Math.min(v-i.timestamp,Wu),1)),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),f.process(i),d.process(i),h.process(i),m.process(i),i.isProcessing=!1,n&&t&&(o=!1,e(g))},y=()=>{n=!0,o=!0,i.isProcessing||e(g)};return{schedule:fn.reduce((v,S)=>{const b=r[S];return v[S]=(M,T=!1,E=!1)=>(n||y(),b.schedule(M,T,E)),v},{}),cancel:v=>{for(let S=0;S<fn.length;S++)r[fn[S]].cancel(v)},state:i,steps:r}}const{schedule:oe,cancel:et,state:fe,steps:ro}=za(typeof requestAnimationFrame<"u"?requestAnimationFrame:Me,!0);let Rn;function Gu(){Rn=void 0}const xe={now:()=>(Rn===void 0&&xe.set(fe.isProcessing||qe.useManualTiming?fe.timestamp:performance.now()),Rn),set:e=>{Rn=e,queueMicrotask(Gu)}},Ba=e=>t=>typeof t=="string"&&t.startsWith(e),Ha=Ba("--"),Uu=Ba("var(--"),Di=e=>Uu(e)?Ku.test(e.split("/*")[0].trim()):!1,Ku=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,kt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Zt={...kt,transform:e=>Ue(0,1,e)},hn={...kt,default:1},Gt=e=>Math.round(e*1e5)/1e5,ki=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function qu(e){return e==null}const Xu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Fi=(e,t)=>n=>!!(typeof n=="string"&&Xu.test(n)&&n.startsWith(e)||t&&!qu(n)&&Object.prototype.hasOwnProperty.call(n,t)),Wa=(e,t,n)=>o=>{if(typeof o!="string")return o;const[i,s,r,a]=o.match(ki);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Yu=e=>Ue(0,255,e),ao={...kt,transform:e=>Math.round(Yu(e))},lt={test:Fi("rgb","red"),parse:Wa("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+ao.transform(e)+", "+ao.transform(t)+", "+ao.transform(n)+", "+Gt(Zt.transform(o))+")"};function Zu(e){let t="",n="",o="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,o+=o,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:i?parseInt(i,16)/255:1}}const No={test:Fi("#"),parse:Zu,transform:lt.transform},rn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ze=rn("deg"),Oe=rn("%"),G=rn("px"),Ju=rn("vh"),Qu=rn("vw"),Es={...Oe,parse:e=>Oe.parse(e)/100,transform:e=>Oe.transform(e*100)},Ct={test:Fi("hsl","hue"),parse:Wa("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+Oe.transform(Gt(t))+", "+Oe.transform(Gt(n))+", "+Gt(Zt.transform(o))+")"},ae={test:e=>lt.test(e)||No.test(e)||Ct.test(e),parse:e=>lt.test(e)?lt.parse(e):Ct.test(e)?Ct.parse(e):No.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?lt.transform(e):Ct.transform(e),getAnimatableNone:e=>{const t=ae.parse(e);return t.alpha=0,ae.transform(t)}},ed=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function td(e){return isNaN(e)&&typeof e=="string"&&(e.match(ki)?.length||0)+(e.match(ed)?.length||0)>0}const Ga="number",Ua="color",nd="var",od="var(",Ms="${}",id=/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 Jt(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(id,l=>(ae.test(l)?(o.color.push(s),i.push(Ua),n.push(ae.parse(l))):l.startsWith(od)?(o.var.push(s),i.push(nd),n.push(l)):(o.number.push(s),i.push(Ga),n.push(parseFloat(l))),++s,Ms)).split(Ms);return{values:n,split:a,indexes:o,types:i}}function Ka(e){return Jt(e).values}function qa(e){const{split:t,types:n}=Jt(e),o=t.length;return i=>{let s="";for(let r=0;r<o;r++)if(s+=t[r],i[r]!==void 0){const a=n[r];a===Ga?s+=Gt(i[r]):a===Ua?s+=ae.transform(i[r]):s+=i[r]}return s}}const sd=e=>typeof e=="number"?0:ae.test(e)?ae.getAnimatableNone(e):e;function rd(e){const t=Ka(e);return qa(e)(t.map(sd))}const tt={test:td,parse:Ka,createTransformer:qa,getAnimatableNone:rd};function lo(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 ad({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let i=0,s=0,r=0;if(!t)i=s=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=lo(l,a,e+1/3),s=lo(l,a,e),r=lo(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(r*255),alpha:o}}function kn(e,t){return n=>n>0?t:e}const se=(e,t,n)=>e+(t-e)*n,co=(e,t,n)=>{const o=e*e,i=n*(t*t-o)+o;return i<0?0:Math.sqrt(i)},ld=[No,lt,Ct],cd=e=>ld.find(t=>t.test(e));function Ts(e){const t=cd(e);if(Dt(!!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===Ct&&(n=ad(n)),n}const As=(e,t)=>{const n=Ts(e),o=Ts(t);if(!n||!o)return kn(e,t);const i={...n};return s=>(i.red=co(n.red,o.red,s),i.green=co(n.green,o.green,s),i.blue=co(n.blue,o.blue,s),i.alpha=se(n.alpha,o.alpha,s),lt.transform(i))},zo=new Set(["none","hidden"]);function ud(e,t){return zo.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function dd(e,t){return n=>se(e,t,n)}function Li(e){return typeof e=="number"?dd:typeof e=="string"?Di(e)?kn:ae.test(e)?As:gd:Array.isArray(e)?Xa:typeof e=="object"?ae.test(e)?As:fd:kn}function Xa(e,t){const n=[...e],o=n.length,i=e.map((s,r)=>Li(s)(s,t[r]));return s=>{for(let r=0;r<o;r++)n[r]=i[r](s);return n}}function fd(e,t){const n={...e,...t},o={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(o[i]=Li(e[i])(e[i],t[i]));return i=>{for(const s in o)n[s]=o[s](i);return n}}function hd(e,t){const n=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],r=e.indexes[s][o[s]],a=e.values[r]??0;n[i]=a,o[s]++}return n}const gd=(e,t)=>{const n=tt.createTransformer(t),o=Jt(e),i=Jt(t);return o.indexes.var.length===i.indexes.var.length&&o.indexes.color.length===i.indexes.color.length&&o.indexes.number.length>=i.indexes.number.length?zo.has(e)&&!i.values.length||zo.has(t)&&!o.values.length?ud(e,t):on(Xa(hd(o,i),i.values),n):(Dt(!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"),kn(e,t))};function Ya(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?se(e,t,n):Li(e)(e,t)}const md=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>oe.update(t,n),stop:()=>et(t),now:()=>fe.isProcessing?fe.timestamp:xe.now()}},Za=(e,t,n=10)=>{let o="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)o+=Math.round(e(s/(i-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},Fn=2e4;function Ii(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<Fn;)t+=n,o=e.next(t);return t>=Fn?1/0:t}function pd(e,t=100,n){const o=n({...e,keyframes:[0,t]}),i=Math.min(Ii(o),Fn);return{type:"keyframes",ease:s=>o.next(i*s).value/t,duration:Ee(i)}}const vd=5;function Ja(e,t,n){const o=Math.max(t-vd,0);return Aa(n-e(o),t-o)}const ie={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},uo=.001;function yd({duration:e=ie.duration,bounce:t=ie.bounce,velocity:n=ie.velocity,mass:o=ie.mass}){let i,s;Dt(e<=Le(ie.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=Ue(ie.minDamping,ie.maxDamping,r),e=Ue(ie.minDuration,ie.maxDuration,Ee(e)),r<1?(i=c=>{const u=c*r,f=u*e,d=u-n,h=Bo(c,r),m=Math.exp(-f);return uo-d/h*m},s=c=>{const f=c*r*e,d=f*n+n,h=Math.pow(r,2)*Math.pow(c,2)*e,m=Math.exp(-f),g=Bo(Math.pow(c,2),r);return(-i(c)+uo>0?-1:1)*((d-h)*m)/g}):(i=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-uo+u*f},s=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const a=5/e,l=wd(i,s,a);if(e=Le(e),isNaN(l))return{stiffness:ie.stiffness,damping:ie.damping,duration:e};{const c=Math.pow(l,2)*o;return{stiffness:c,damping:r*2*Math.sqrt(o*c),duration:e}}}const xd=12;function wd(e,t,n){let o=n;for(let i=1;i<xd;i++)o=o-e(o)/t(o);return o}function Bo(e,t){return e*Math.sqrt(1-t*t)}const Cd=["duration","bounce"],bd=["stiffness","damping","mass"];function Vs(e,t){return t.some(n=>e[n]!==void 0)}function Sd(e){let t={velocity:ie.velocity,stiffness:ie.stiffness,damping:ie.damping,mass:ie.mass,isResolvedFromDuration:!1,...e};if(!Vs(e,bd)&&Vs(e,Cd))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),i=o*o,s=2*Ue(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:ie.mass,stiffness:i,damping:s}}else{const n=yd(e);t={...t,...n,mass:ie.mass},t.isResolvedFromDuration=!0}return t}function Ln(e=ie.visualDuration,t=ie.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:i}=n;const s=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:f,velocity:d,isResolvedFromDuration:h}=Sd({...n,velocity:-Ee(n.velocity||0)}),m=d||0,g=c/(2*Math.sqrt(l*u)),y=r-s,x=Ee(Math.sqrt(l/u)),w=Math.abs(y)<5;o||(o=w?ie.restSpeed.granular:ie.restSpeed.default),i||(i=w?ie.restDelta.granular:ie.restDelta.default);let v;if(g<1){const b=Bo(x,g);v=M=>{const T=Math.exp(-g*x*M);return r-T*((m+g*x*y)/b*Math.sin(b*M)+y*Math.cos(b*M))}}else if(g===1)v=b=>r-Math.exp(-x*b)*(y+(m+x*y)*b);else{const b=x*Math.sqrt(g*g-1);v=M=>{const T=Math.exp(-g*x*M),E=Math.min(b*M,300);return r-T*((m+g*x*y)*Math.sinh(E)+b*y*Math.cosh(E))/b}}const S={calculatedDuration:h&&f||null,next:b=>{const M=v(b);if(h)a.done=b>=f;else{let T=b===0?m:0;g<1&&(T=b===0?Le(m):Ja(v,b,M));const E=Math.abs(T)<=o,D=Math.abs(r-M)<=i;a.done=E&&D}return a.value=a.done?r:M,a},toString:()=>{const b=Math.min(Ii(S),Fn),M=Za(T=>S.next(b*T).value,b,30);return b+"ms "+M},toTransition:()=>{}};return S}Ln.applyToOptions=e=>{const t=pd(e,100,Ln);return e.ease=t.ease,e.duration=Le(t.duration),e.type="keyframes",e};function Ho({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=e[0],d={done:!1,value:f},h=E=>a!==void 0&&E<a||l!==void 0&&E>l,m=E=>a===void 0?l:l===void 0||Math.abs(a-E)<Math.abs(l-E)?a:l;let g=n*t;const y=f+g,x=r===void 0?y:r(y);x!==y&&(g=x-f);const w=E=>-g*Math.exp(-E/o),v=E=>x+w(E),S=E=>{const D=w(E),F=v(E);d.done=Math.abs(D)<=c,d.value=d.done?x:F};let b,M;const T=E=>{h(d.value)&&(b=E,M=Ln({keyframes:[d.value,m(d.value)],velocity:Ja(v,E,d.value),damping:i,stiffness:s,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:E=>{let D=!1;return!M&&b===void 0&&(D=!0,S(E),T(E)),b!==void 0&&E>=b?M.next(E-b):(!D&&S(E),d)}}}function Rd(e,t,n){const o=[],i=n||qe.mix||Ya,s=e.length-1;for(let r=0;r<s;r++){let a=i(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||Me:t;a=on(l,a)}o.push(a)}return o}function _d(e,t,{clamp:n=!0,ease:o,mixer:i}={}){const s=e.length;if(Ke(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Rd(t,o,i),l=a.length,c=u=>{if(r&&u<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(u<e[f+1]);f++);const d=Yt(e[f],e[f+1],u);return a[f](d)};return n?u=>c(Ue(e[0],e[s-1],u)):c}function Pd(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const i=Yt(0,t,o);e.push(se(n,1,i))}}function Ed(e){const t=[0];return Pd(t,e.length-1),t}function Md(e,t){return e.map(n=>n*t)}function Td(e,t){return e.map(()=>t||Oa).splice(0,e.length-1)}function bt({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const i=zu(o)?o.map(Ps):Ps(o),s={done:!1,value:t[0]},r=Md(n&&n.length===t.length?n:Ed(t),e),a=_d(r,t,{ease:Array.isArray(i)?i:Td(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Ad=e=>e!==null;function ji(e,{repeat:t,repeatType:n="loop"},o,i=1){const s=e.filter(Ad),a=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||o===void 0?s[a]:o}const Vd={decay:Ho,inertia:Ho,tween:bt,keyframes:bt,spring:Ln};function Qa(e){typeof e.type=="string"&&(e.type=Vd[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 Dd=e=>e/100;class Oi 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!==xe.now()&&this.tick(xe.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;Qa(t);const{type:n=bt,repeat:o=0,repeatDelay:i=0,repeatType:s,velocity:r=0}=t;let{keyframes:a}=t;const l=n||bt;process.env.NODE_ENV!=="production"&&l!==bt&&Ke(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==bt&&typeof a[0]!="number"&&(this.mixKeyframes=on(Dd,Ya(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=Ii(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(o+1)-i,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:o,totalDuration:i,mixKeyframes:s,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return o.next(0);const{delay:c=0,keyframes:u,repeat:f,repeatType:d,repeatDelay:h,type:m,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const x=this.currentTime-c*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?x<0:x>i;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,S=o;if(f){const E=Math.min(this.currentTime,i)/a;let D=Math.floor(E),F=E%1;!F&&E>=1&&(F=1),F===1&&D--,D=Math.min(D,f+1),D%2&&(d==="reverse"?(F=1-F,h&&(F-=h/a)):d==="mirror"&&(S=r)),v=Ue(0,1,F)*a}const b=w?{done:!1,value:u[0]}:S.next(v);s&&(b.value=s(b.value));let{done:M}=b;!w&&l!==null&&(M=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return T&&m!==Ho&&(b.value=ji(u,this.options,y,this.speed)),g&&g(b.value),T&&this.finish(),b}then(t,n){return this.finished.then(t,n)}get duration(){return Ee(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ee(t)}get time(){return Ee(this.currentTime)}set time(t){t=Le(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(xe.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ee(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=md,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=n??o),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(xe.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 kd(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ct=e=>e*180/Math.PI,Wo=e=>{const t=ct(Math.atan2(e[1],e[0]));return Go(t)},Fd={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Wo,rotateZ:Wo,skewX:e=>ct(Math.atan(e[1])),skewY:e=>ct(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Go=e=>(e=e%360,e<0&&(e+=360),e),Ds=Wo,ks=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Fs=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Ld={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ks,scaleY:Fs,scale:e=>(ks(e)+Fs(e))/2,rotateX:e=>Go(ct(Math.atan2(e[6],e[5]))),rotateY:e=>Go(ct(Math.atan2(-e[2],e[0]))),rotateZ:Ds,rotate:Ds,skewX:e=>ct(Math.atan(e[4])),skewY:e=>ct(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Uo(e){return e.includes("scale")?1:0}function Ko(e,t){if(!e||e==="none")return Uo(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,i;if(n)o=Ld,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=Fd,i=a}if(!i)return Uo(t);const s=o[t],r=i[1].split(",").map(jd);return typeof s=="function"?s(r):r[s]}const Id=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ko(n,t)};function jd(e){return parseFloat(e.trim())}const Ft=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Lt=new Set(Ft),Ls=e=>e===kt||e===G,$d=new Set(["x","y","z"]),Od=Ft.filter(e=>!$d.has(e));function Nd(e){const t=[];return Od.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const dt={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})=>Ko(t,"x"),y:(e,{transform:t})=>Ko(t,"y")};dt.translateX=dt.x;dt.translateY=dt.y;const ft=new Set;let qo=!1,Xo=!1,Yo=!1;function el(){if(Xo){const e=Array.from(ft).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const i=Nd(o);i.length&&(n.set(o,i),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const i=n.get(o);i&&i.forEach(([s,r])=>{o.getValue(s)?.set(r)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}Xo=!1,qo=!1,ft.forEach(e=>e.complete(Yo)),ft.clear()}function tl(){ft.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Xo=!0)})}function zd(){Yo=!0,tl(),el(),Yo=!1}class Ni{constructor(t,n,o,i,s,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=i,this.element=s,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(ft.add(this),qo||(qo=!0,oe.read(tl),oe.resolveKeyframes(el))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:i}=this;if(t[0]===null){const s=i?.get(),r=t[t.length-1];if(s!==void 0)t[0]=s;else if(o&&n){const a=o.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),i&&s===void 0&&i.set(t[0])}kd(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ft.delete(this)}cancel(){this.state==="scheduled"&&(ft.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Bd=e=>e.startsWith("--");function Hd(e,t,n){Bd(t)?e.style.setProperty(t,n):e.style[t]=n}const Wd=Ei(()=>window.ScrollTimeline!==void 0),Gd={};function Ud(e,t){const n=Ei(e);return()=>Gd[t]??n()}const nl=Ud(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Wt=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,Is={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wt([0,.65,.55,1]),circOut:Wt([.55,0,1,.45]),backIn:Wt([.31,.01,.66,-.59]),backOut:Wt([.33,1.53,.69,.99])};function ol(e,t){if(e)return typeof e=="function"?nl()?Za(e,t):"ease-out":Na(e)?Wt(e):Array.isArray(e)?e.map(n=>ol(n,t)||Is.easeOut):Is[e]}function Kd(e,t,n,{delay:o=0,duration:i=300,repeat:s=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const f=ol(a,i);Array.isArray(f)&&(u.easing=f);const d={delay:o,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:r==="reverse"?"alternate":"normal"};return c&&(d.pseudoElement=c),e.animate(u,d)}function il(e){return typeof e=="function"&&"applyToOptions"in e}function qd({type:e,...t}){return il(e)&&nl()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Xd extends $i{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:o,keyframes:i,pseudoElement:s,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=r,this.options=t,Ke(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=qd(t);this.animation=Kd(n,o,i,c,s),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const u=ji(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):Hd(n,o,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 Ee(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ee(t)}get time(){return Ee(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Le(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&&Wd()?(this.animation.timeline=t,Me):n(this)}}const sl={anticipate:Ia,backInOut:La,circInOut:$a};function Yd(e){return e in sl}function Zd(e){typeof e.ease=="string"&&Yd(e.ease)&&(e.ease=sl[e.ease])}const js=10;class Jd extends Xd{constructor(t){Zd(t),Qa(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:o,onComplete:i,element:s,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Oi({...r,autoplay:!1}),l=Le(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-js).value,a.sample(l).value,js),a.stop()}}const $s=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(tt.test(e)||e==="0")&&!e.startsWith("url("));function Qd(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 ef(e,t,n,o){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],r=$s(i,t),a=$s(s,t);return Dt(r===a,`You are trying to animate ${t} from "${i}" to "${s}". "${r?s:i}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:Qd(e)||(n==="spring"||il(n))&&o}function Zo(e){e.duration=0,e.type="keyframes"}const tf=new Set(["opacity","clipPath","filter","transform"]),nf=Ei(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function of(e){const{motionValue:t,name:n,repeatDelay:o,repeatType:i,damping:s,type:r}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return nf()&&n&&tf.has(n)&&(n!=="transform"||!c)&&!l&&!o&&i!=="mirror"&&s!==0&&r!=="inertia"}const sf=40;class rf extends $i{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:r="loop",keyframes:a,name:l,motionValue:c,element:u,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=xe.now();const d={autoplay:t,delay:n,type:o,repeat:i,repeatDelay:s,repeatType:r,name:l,motionValue:c,element:u,...f},h=u?.KeyframeResolver||Ni;this.keyframeResolver=new h(a,(m,g,y)=>this.onKeyframesResolved(m,g,d,!y),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,o,i){this.keyframeResolver=void 0;const{name:s,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=o;this.resolvedAt=xe.now(),ef(t,s,r,a)||((qe.instantAnimations||!l)&&u?.(ji(t,o,n)),t[0]=t[t.length-1],Zo(o),o.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>sf?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...o,keyframes:t},h=!c&&of(d)?new Jd({...d,element:d.motionValue.owner.current}):new Oi(d);h.finished.then(()=>this.notifyFinished()).catch(Me),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(),zd()),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 af=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function lf(e){const t=af.exec(e);if(!t)return[,];const[,n,o,i]=t;return[`--${n??o}`,i]}const cf=4;function rl(e,t,n=1){Ke(n<=cf,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[o,i]=lf(e);if(!o)return;const s=window.getComputedStyle(t).getPropertyValue(o);if(s){const r=s.trim();return Ea(r)?parseFloat(r):r}return Di(i)?rl(i,t,n+1):i}function zi(e,t){return e?.[t]??e?.default??e}const al=new Set(["width","height","top","left","right","bottom",...Ft]),uf={test:e=>e==="auto",parse:e=>e},ll=e=>t=>t.test(e),cl=[kt,G,Oe,Ze,Qu,Ju,uf],Os=e=>cl.find(ll(e));function df(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ta(e):!0}const ff=new Set(["brightness","contrast","saturate","opacity"]);function hf(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(ki)||[];if(!o)return e;const i=n.replace(o,"");let s=ff.has(t)?1:0;return o!==n&&(s*=100),t+"("+s+i+")"}const gf=/\b([a-z-]*)\(.*?\)/gu,Jo={...tt,getAnimatableNone:e=>{const t=e.match(gf);return t?t.map(hf).join(" "):e}},Ns={...kt,transform:Math.round},mf={rotate:Ze,rotateX:Ze,rotateY:Ze,rotateZ:Ze,scale:hn,scaleX:hn,scaleY:hn,scaleZ:hn,skew:Ze,skewX:Ze,skewY:Ze,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:Zt,originX:Es,originY:Es,originZ:G},Bi={borderWidth:G,borderTopWidth:G,borderRightWidth:G,borderBottomWidth:G,borderLeftWidth:G,borderRadius:G,radius:G,borderTopLeftRadius:G,borderTopRightRadius:G,borderBottomRightRadius:G,borderBottomLeftRadius:G,width:G,maxWidth:G,height:G,maxHeight:G,top:G,right:G,bottom:G,left:G,padding:G,paddingTop:G,paddingRight:G,paddingBottom:G,paddingLeft:G,margin:G,marginTop:G,marginRight:G,marginBottom:G,marginLeft:G,backgroundPositionX:G,backgroundPositionY:G,...mf,zIndex:Ns,fillOpacity:Zt,strokeOpacity:Zt,numOctaves:Ns},pf={...Bi,color:ae,backgroundColor:ae,outlineColor:ae,fill:ae,stroke:ae,borderColor:ae,borderTopColor:ae,borderRightColor:ae,borderBottomColor:ae,borderLeftColor:ae,filter:Jo,WebkitFilter:Jo},ul=e=>pf[e];function dl(e,t){let n=ul(e);return n!==Jo&&(n=tt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const vf=new Set(["auto","none","0"]);function yf(e,t,n){let o=0,i;for(;o<e.length&&!i;){const s=e[o];typeof s=="string"&&!vf.has(s)&&Jt(s).values.length&&(i=e[o]),o++}if(i&&n)for(const s of t)e[s]=dl(n,i)}class xf extends Ni{constructor(t,n,o,i,s){super(t,n,o,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=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(),Di(c))){const u=rl(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!al.has(o)||t.length!==2)return;const[i,s]=t,r=Os(i),a=Os(s);if(r!==a)if(Ls(r)&&Ls(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else dt[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let i=0;i<t.length;i++)(t[i]===null||df(t[i]))&&o.push(i);o.length&&yf(t,o,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=dt[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(o,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:o}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=o.length-1,r=o[s];o[s]=dt[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 wf(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const i=n?.[e]??o.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const fl=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function hl(e){return Ma(e)&&"offsetHeight"in e}const zs=30,Cf=e=>!isNaN(parseFloat(e));class bf{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{const i=xe.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=xe.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Cf(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ti(!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 Mi);const o=this.events[t].add(n);return t==="change"?()=>{o(),oe.read(()=>{this.events.change.getSize()||this.stop()})}:o}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,o){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}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=xe.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>zs)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,zs);return Aa(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 Tt(e,t){return new bf(e,t)}const{schedule:Hi}=za(queueMicrotask,!1),Fe={x:!1,y:!1};function gl(){return Fe.x||Fe.y}function Sf(e){return e==="x"||e==="y"?Fe[e]?null:(Fe[e]=!0,()=>{Fe[e]=!1}):Fe.x||Fe.y?null:(Fe.x=Fe.y=!0,()=>{Fe.x=Fe.y=!1})}function ml(e,t){const n=wf(e),o=new AbortController,i={passive:!0,...t,signal:o.signal};return[n,i,()=>o.abort()]}function Bs(e){return!(e.pointerType==="touch"||gl())}function Rf(e,t,n={}){const[o,i,s]=ml(e,n),r=a=>{if(!Bs(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=f=>{Bs(f)&&(c(f),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,i)};return o.forEach(a=>{a.addEventListener("pointerenter",r,i)}),s}const pl=(e,t)=>t?e===t?!0:pl(e,t.parentElement):!1,Wi=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,_f=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Pf(e){return _f.has(e.tagName)||e.tabIndex!==-1}const _n=new WeakSet;function Hs(e){return t=>{t.key==="Enter"&&e(t)}}function fo(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Ef=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=Hs(()=>{if(_n.has(n))return;fo(n,"down");const i=Hs(()=>{fo(n,"up")}),s=()=>fo(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function Ws(e){return Wi(e)&&!gl()}function Mf(e,t,n={}){const[o,i,s]=ml(e,n),r=a=>{const l=a.currentTarget;if(!Ws(a))return;_n.add(l);const c=t(l,a),u=(h,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),_n.has(l)&&_n.delete(l),Ws(h)&&typeof c=="function"&&c(h,{success:m})},f=h=>{u(h,l===window||l===document||n.useGlobalTarget||pl(l,h.target))},d=h=>{u(h,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return o.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),hl(a)&&(a.addEventListener("focus",c=>Ef(c,i)),!Pf(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function vl(e){return Ma(e)&&"ownerSVGElement"in e}function Tf(e){return vl(e)&&e.tagName==="svg"}const ge=e=>!!(e&&e.getVelocity),Af=[...cl,ae,tt],Vf=e=>Af.find(ll(e)),Gi=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Gs(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Df(...e){return t=>{let n=!1;const o=e.map(i=>{const s=Gs(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<o.length;i++){const s=o[i];typeof s=="function"?s():Gs(e[i],null)}}}}function kf(...e){return R.useCallback(Df(...e),e)}class Ff extends R.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const o=n.offsetParent,i=hl(o)&&o.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Lf({children:e,isPresent:t,anchorX:n,root:o}){const i=C.useId(),s=C.useRef(null),r=C.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=C.useContext(Gi),l=kf(s,e?.ref);return C.useInsertionEffect(()=>{const{width:c,height:u,top:f,left:d,right:h}=r.current;if(t||!s.current||!c||!u)return;const m=n==="left"?`left: ${d}`:`right: ${h}`;s.current.dataset.motionPopId=i;const g=document.createElement("style");a&&(g.nonce=a);const y=o??document.head;return y.appendChild(g),g.sheet&&g.sheet.insertRule(`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),C=require("react"),V=require("@emotion/css"),Ci=require("react-dom"),kn=require("@highcharts/react");function wa(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const R=wa(C),su=wa(Ci);function ru(e){const{h:t,w:n,m:o,mx:i,my:s,mt:r,mr:a,mb:l,ml:c,p:u,px:f,py:d,pt:h,pr:m,pb:g,pl:y,gap:x,xGap:w,yGap:v,row:b,flex:S,relative:M,absolute:A,display:E,overflow:k,absoluteFill:F,center:$,justifyContent:N,alignItems:j,alignSelf:D,borderWidth:O,borderBottomWidth:B,borderColor:P,borderRadius:_,borderStyle:T,border:I,zIndex:q,minWidth:U,minHeight:X,maxWidth:te,maxHeight:Y,flexWrap:ne,flexGrow:le,flexShrink:_e,flexBasis:fe,backgroundColor:je,position:pe,top:z,right:J,bottom:re,left:he,...ve}=e;return{spacers:{h:t,w:n,m:o,mx:i,my:s,mt:r,mr:a,mb:l,ml:c,p:u,px:f,py:d,pt:h,pr:m,pb:g,pl:y,gap:x,xGap:w,yGap:v,row:b,flex:S,relative:M,absolute:A,display:E,overflow:k,absoluteFill:F,center:$,justifyContent:N,alignItems:j,alignSelf:D,borderWidth:O,borderBottomWidth:B,borderColor:P,borderRadius:_,borderStyle:T,border:I,zIndex:q,minWidth:U,minHeight:X,maxWidth:te,maxHeight:Y,flexWrap:ne,flexGrow:le,flexShrink:_e,flexBasis:fe,backgroundColor:je,position:pe,top:z,right:J,bottom:re,left:he},rest:ve}}const au=e=>V.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,borderStyle:e.borderStyle,border:e.border,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?.position?e?.position:e?.absolute?"absolute":e?.relative?"relative":void 0,...e.absoluteFill&&{position:"absolute",top:0,right:0,bottom:0,left:0},top:e?.top,right:e?.right,bottom:e?.bottom,left:e?.left}),L=C.forwardRef(({className:e,children:t,...n},o)=>{const{spacers:i,rest:s}=ru(n),r=C.useMemo(()=>au(i),[i]);return p.jsx("div",{ref:o,className:V.cx(r,e),...s,children:t})});L.displayName="Box";const lu="_loader_1qleq_8",cu={loader:lu},Ca=({color:e="var(--text-accent)"})=>p.jsx("span",{className:V.cx(cu.loader,V.css({"--loader-color":e}))}),Sa=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));function uu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var io={exports:{}};var Ss;function du(){return Ss||(Ss=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",r=0;r<arguments.length;r++){var a=arguments[r];a&&(s=i(s,o(a)))}return s}function o(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var r="";for(var a in s)t.call(s,a)&&s[a]&&(r=i(r,a));return r}function i(s,r){return r?s?s+" "+r:s+r:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(io)),io.exports}var fu=du();const wt=uu(fu),hu="_rippleOverlay_s2kim_8",gu="_ripple_s2kim_8",bs={rippleOverlay:hu,ripple:gu},so="button, a, input, label, [role='button'], [data-ripple]";function mu(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 gt=C.forwardRef(({color:e="rgba(0,0,0,0.18)",duration:t=1e3,radius:n="auto",className:o},i)=>{const s=C.useRef(null),[r,a]=C.useState([]),l=C.useRef([]),c=C.useRef(1),u=C.useRef(null),f=()=>{l.current.map(g=>clearTimeout(g)),l.current=[]},d=C.useCallback((g,y,x,w)=>{if(typeof window>"u")return;const v=x.getBoundingClientRect(),b=n==="auto"?Math.max(v.width,v.height)*2:n,S=g-w.left,M=y-w.top,A=Math.max(0,v.top-w.top),E=Math.max(0,v.left-w.left),k=Math.max(0,w.right-v.right),F=Math.max(0,w.bottom-v.bottom),N=window.getComputedStyle(x).borderRadius||"0px",j=c.current++,D={id:j,left:S-b/2,top:M-b/2,size:Math.ceil(b),clip:{top:Math.round(A),right:Math.round(k),bottom:Math.round(F),left:Math.round(E)},borderRadius:N};a(B=>[...B,D]);const O=window.setTimeout(()=>{a(B=>B.filter(P=>P.id!==j))},t+80);l.current.push(O)},[t,n]),h=C.useCallback(g=>{try{if(!s.current)return;const y=s.current,x=y.parentElement;if(!x)return;const w=mu(g);let v=null;for(const E of w)if(E instanceof Element){if(E===x)break;if(E.matches&&E.matches(so)){v=E;break}}if(v||(v=x),v.closest&&(v.closest("[disabled]")||v.getAttribute("aria-disabled")==="true"||v.classList.contains("ripple-disabled")))return;const b=g.target;if(b?.closest&&(b.closest("[disabled]")||b.getAttribute?.("aria-disabled")==="true"))return;const S=y.getBoundingClientRect(),{clientX:M}=g,{clientY:A}=g;d(M,A,v,S)}catch{}},[d]),m=C.useCallback(g=>{if(!s.current||!(g.key==="Enter"||g.key===" "))return;const y=s.current,x=y.parentElement;if(!x)return;const w=document.activeElement;let v=null;if(w instanceof Element&&w.matches(so)&&(v=w),v||(v=x),v.closest&&(v.closest("[disabled]")||v.getAttribute("aria-disabled")==="true"))return;const b=y.getBoundingClientRect(),S=v.getBoundingClientRect().left+v.getBoundingClientRect().width/2,M=v.getBoundingClientRect().top+v.getBoundingClientRect().height/2;d(S,M,v,b)},[d]);return C.useImperativeHandle(i,()=>({trigger:({center:g=!0,x:y,y:x}={})=>{const w=s.current;if(!w)return;const v=w.parentElement;if(!v)return;const b=w.getBoundingClientRect(),S=document.activeElement instanceof Element&&document.activeElement.matches(so)?document.activeElement:v,M=g?S.getBoundingClientRect().left+S.getBoundingClientRect().width/2:y??b.left+b.width/2,A=g?S.getBoundingClientRect().top+S.getBoundingClientRect().height/2:x??b.top+b.height/2;d(M,A,S,b)}}),[d]),C.useEffect(()=>{const g=s.current;if(!g)return;const y=g.parentElement;if(!y||typeof window>"u")return;const x=window.getComputedStyle(y);let w=!1;return x.position==="static"&&(y.style.position="relative",w=!0,u.current=y),y.addEventListener("pointerdown",h,!0),y.addEventListener("keydown",m),()=>{y.removeEventListener("pointerdown",h,!0),y.removeEventListener("keydown",m),w&&u.current&&(u.current.style.position="",u.current=null),f()}},[h,m]),C.useEffect(()=>()=>f(),[]),p.jsx("div",{ref:s,className:`${bs.rippleOverlay} ${o??""}`,"aria-hidden":!0,children:r.map(g=>p.jsx("span",{className:bs.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 mt(e,t){const{current:n}=C.useRef(e!==void 0),[o,i]=C.useState(t),s=n?e:o,r=C.useCallback(a=>{n||i(a)},[]);return[s,r]}function Si(e,t,n,o=""){if(n)return e[`${t}_${n}${o}`]}function Dn(e,t,n){return Si(e,t,n,"Size")}const pu="_button_l3j6j_8",vu="_button_primary_l3j6j_19",yu="_button_secondary_l3j6j_22",xu="_button_negative_l3j6j_25",wu="_button_positive_l3j6j_28",Cu="_button_warning_l3j6j_31",Su="_button_neutral_l3j6j_34",bu="_button_mdSize_l3j6j_118",Ru="_button_smSize_l3j6j_127",_u="_button_xsSize_l3j6j_136",ro={button:pu,button_primary:vu,button_secondary:yu,button_negative:xu,button_positive:wu,button_warning:Cu,button_neutral:Su,"button_neutral-white":"_button_neutral-white_l3j6j_37","button_no-bg":"_button_no-bg_l3j6j_40",button_mdSize:bu,button_smSize:Ru,button_xsSize:_u};function Xt({attr:e,children:t,className:n,type:o="button",color:i="primary",size:s="md",...r}){const a="button";return p.jsxs("button",{...e,...r,type:o,className:wt(ro[a],n,Dn(ro,a,s),Si(ro,a,i)),children:[p.jsx(gt,{}),t]})}const ba=C.createContext({isOpen:!1,onClose:()=>{}}),Pu=()=>C.useContext(ba),Eu="_overlay_1gnp0_8",Mu="_modal_1gnp0_12",Tu="_closeButton_1gnp0_28",Au="_size_lg_1gnp0_35",Vu="_size_md_1gnp0_38",ku="_size_sm_1gnp0_41",fn={overlay:Eu,modal:Mu,"modal-animation":"_modal-animation_1gnp0_1",closeButton:Tu,size_lg:Au,size_md:Vu,size_sm:ku},Ra=C.forwardRef(({isOpen:e,onClose:t,overlayClassName:n,modalClassName:o,size:i="md",closeOnBackdropClick:s=!0,closeOnEsc:r=!0,disableBodyScroll:a=!0,showAbsoluteCloseButton:l,children:c},u)=>{C.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 f=C.useCallback(h=>{h.key==="Escape"&&t()},[t]);C.useEffect(()=>{if(typeof window<"u"&&typeof document<"u"&&r&&e)return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[e,r,f]);const d=C.useCallback(h=>{s&&h.target===h.currentTarget&&t()},[s,t]);return e?p.jsx(cn,{children:p.jsx(ba.Provider,{value:{isOpen:e,onClose:t},children:p.jsx(L,{position:"fixed",top:0,right:0,bottom:0,left:0,row:!0,center:!0,flex:1,onClick:d,backgroundColor:"var(--fill-bg-overlay-primary)",className:V.cx(fn.overlay,n),zIndex:1,children:p.jsxs(L,{ref:u,className:V.cx(fn.modal,fn[`size_${i}`],o),relative:!0,children:[l&&p.jsx(Xt,{className:fn.closeButton,onClick:t,color:"neutral",children:p.jsx(Sa,{})}),c]})})})}):null});Ra.displayName="Modal";const Du="_footer_1bo08_8",Fu={footer:Du},_a=C.forwardRef(({children:e,row:t=!0,flex:n=!0,gap:o="var(--spacing-lg)",p:i="var(--spacing-2xl)",className:s,...r},a)=>p.jsx(L,{flex:n,row:t,gap:o,p:i,className:V.cx(Fu.footer,s),ref:a,...r,children:e}));_a.displayName="ModalFooter";const bi=C.createContext({});function Ri(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const _i=typeof window<"u",Pa=_i?C.useLayoutEffect:C.useEffect,Wn=C.createContext(null);function Pi(e,t){e.indexOf(t)===-1&&e.push(t)}function Ei(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ue=(e,t,n)=>n>t?t:n<e?e:n;function No(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let kt=()=>{},Ke=()=>{};process.env.NODE_ENV!=="production"&&(kt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(No(t,n))},Ke=(e,t,n)=>{if(!e)throw new Error(No(t,n))});const qe={},Ea=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Ma(e){return typeof e=="object"&&e!==null}const Ta=e=>/^0[^.\s]+$/u.test(e);function Mi(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ae=e=>e,Lu=(e,t)=>n=>t(e(n)),on=(...e)=>e.reduce(Lu),Yt=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o};class Ti{constructor(){this.subscriptions=[]}add(t){return Pi(this.subscriptions,t),()=>Ei(this.subscriptions,t)}notify(t,n,o){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,o);else for(let s=0;s<i;s++){const r=this.subscriptions[s];r&&r(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Le=e=>e*1e3,Te=e=>e/1e3;function Aa(e,t){return t?e*(1e3/t):0}const Rs=new Set;function Ai(e,t,n){e||Rs.has(t)||(console.warn(No(t,n)),Rs.add(t))}const Va=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Iu=1e-7,ju=12;function $u(e,t,n,o,i){let s,r,a=0;do r=t+(n-t)/2,s=Va(r,o,i)-e,s>0?n=r:t=r;while(Math.abs(s)>Iu&&++a<ju);return r}function sn(e,t,n,o){if(e===t&&n===o)return Ae;const i=s=>$u(s,0,1,e,n);return s=>s===0||s===1?s:Va(i(s),t,o)}const ka=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Da=e=>t=>1-e(1-t),Fa=sn(.33,1.53,.69,.99),Vi=Da(Fa),La=ka(Vi),Ia=e=>(e*=2)<1?.5*Vi(e):.5*(2-Math.pow(2,-10*(e-1))),ki=e=>1-Math.sin(Math.acos(e)),ja=Da(ki),$a=ka(ki),Ou=sn(.42,0,1,1),Nu=sn(0,0,.58,1),Oa=sn(.42,0,.58,1),Bu=e=>Array.isArray(e)&&typeof e[0]!="number",Na=e=>Array.isArray(e)&&typeof e[0]=="number",_s={linear:Ae,easeIn:Ou,easeInOut:Oa,easeOut:Nu,circIn:ki,circInOut:$a,circOut:ja,backIn:Vi,backInOut:La,backOut:Fa,anticipate:Ia},zu=e=>typeof e=="string",Ps=e=>{if(Na(e)){Ke(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,o,i]=e;return sn(t,n,o,i)}else if(zu(e))return Ke(_s[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),_s[e];return e},hn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Hu(e,t){let n=new Set,o=new Set,i=!1,s=!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,f=!1,d=!1)=>{const m=d&&i?n:o;return f&&r.add(u),m.has(u)||m.add(u),u},cancel:u=>{o.delete(u),r.delete(u)},process:u=>{if(a=u,i){s=!0;return}i=!0,[n,o]=[o,n],n.forEach(l),n.clear(),i=!1,s&&(s=!1,c.process(u))}};return c}const Wu=40;function Ba(e,t){let n=!1,o=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,r=hn.reduce((v,b)=>(v[b]=Hu(s),v),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:f,preRender:d,render:h,postRender:m}=r,g=()=>{const v=qe.useManualTiming?i.timestamp:performance.now();n=!1,qe.useManualTiming||(i.delta=o?1e3/60:Math.max(Math.min(v-i.timestamp,Wu),1)),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),f.process(i),d.process(i),h.process(i),m.process(i),i.isProcessing=!1,n&&t&&(o=!1,e(g))},y=()=>{n=!0,o=!0,i.isProcessing||e(g)};return{schedule:hn.reduce((v,b)=>{const S=r[b];return v[b]=(M,A=!1,E=!1)=>(n||y(),S.schedule(M,A,E)),v},{}),cancel:v=>{for(let b=0;b<hn.length;b++)r[hn[b]].cancel(v)},state:i,steps:r}}const{schedule:oe,cancel:et,state:de,steps:ao}=Ba(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ae,!0);let _n;function Gu(){_n=void 0}const Ce={now:()=>(_n===void 0&&Ce.set(de.isProcessing||qe.useManualTiming?de.timestamp:performance.now()),_n),set:e=>{_n=e,queueMicrotask(Gu)}},za=e=>t=>typeof t=="string"&&t.startsWith(e),Ha=za("--"),Uu=za("var(--"),Di=e=>Uu(e)?Ku.test(e.split("/*")[0].trim()):!1,Ku=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Dt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Zt={...Dt,transform:e=>Ue(0,1,e)},gn={...Dt,default:1},Gt=e=>Math.round(e*1e5)/1e5,Fi=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function qu(e){return e==null}const Xu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Li=(e,t)=>n=>!!(typeof n=="string"&&Xu.test(n)&&n.startsWith(e)||t&&!qu(n)&&Object.prototype.hasOwnProperty.call(n,t)),Wa=(e,t,n)=>o=>{if(typeof o!="string")return o;const[i,s,r,a]=o.match(Fi);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Yu=e=>Ue(0,255,e),lo={...Dt,transform:e=>Math.round(Yu(e))},lt={test:Li("rgb","red"),parse:Wa("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+lo.transform(e)+", "+lo.transform(t)+", "+lo.transform(n)+", "+Gt(Zt.transform(o))+")"};function Zu(e){let t="",n="",o="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,o+=o,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:i?parseInt(i,16)/255:1}}const Bo={test:Li("#"),parse:Zu,transform:lt.transform},rn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ze=rn("deg"),Oe=rn("%"),G=rn("px"),Ju=rn("vh"),Qu=rn("vw"),Es={...Oe,parse:e=>Oe.parse(e)/100,transform:e=>Oe.transform(e*100)},Ct={test:Li("hsl","hue"),parse:Wa("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+Oe.transform(Gt(t))+", "+Oe.transform(Gt(n))+", "+Gt(Zt.transform(o))+")"},ae={test:e=>lt.test(e)||Bo.test(e)||Ct.test(e),parse:e=>lt.test(e)?lt.parse(e):Ct.test(e)?Ct.parse(e):Bo.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?lt.transform(e):Ct.transform(e),getAnimatableNone:e=>{const t=ae.parse(e);return t.alpha=0,ae.transform(t)}},ed=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function td(e){return isNaN(e)&&typeof e=="string"&&(e.match(Fi)?.length||0)+(e.match(ed)?.length||0)>0}const Ga="number",Ua="color",nd="var",od="var(",Ms="${}",id=/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 Jt(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(id,l=>(ae.test(l)?(o.color.push(s),i.push(Ua),n.push(ae.parse(l))):l.startsWith(od)?(o.var.push(s),i.push(nd),n.push(l)):(o.number.push(s),i.push(Ga),n.push(parseFloat(l))),++s,Ms)).split(Ms);return{values:n,split:a,indexes:o,types:i}}function Ka(e){return Jt(e).values}function qa(e){const{split:t,types:n}=Jt(e),o=t.length;return i=>{let s="";for(let r=0;r<o;r++)if(s+=t[r],i[r]!==void 0){const a=n[r];a===Ga?s+=Gt(i[r]):a===Ua?s+=ae.transform(i[r]):s+=i[r]}return s}}const sd=e=>typeof e=="number"?0:ae.test(e)?ae.getAnimatableNone(e):e;function rd(e){const t=Ka(e);return qa(e)(t.map(sd))}const tt={test:td,parse:Ka,createTransformer:qa,getAnimatableNone:rd};function co(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 ad({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let i=0,s=0,r=0;if(!t)i=s=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=co(l,a,e+1/3),s=co(l,a,e),r=co(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(r*255),alpha:o}}function Fn(e,t){return n=>n>0?t:e}const se=(e,t,n)=>e+(t-e)*n,uo=(e,t,n)=>{const o=e*e,i=n*(t*t-o)+o;return i<0?0:Math.sqrt(i)},ld=[Bo,lt,Ct],cd=e=>ld.find(t=>t.test(e));function Ts(e){const t=cd(e);if(kt(!!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===Ct&&(n=ad(n)),n}const As=(e,t)=>{const n=Ts(e),o=Ts(t);if(!n||!o)return Fn(e,t);const i={...n};return s=>(i.red=uo(n.red,o.red,s),i.green=uo(n.green,o.green,s),i.blue=uo(n.blue,o.blue,s),i.alpha=se(n.alpha,o.alpha,s),lt.transform(i))},zo=new Set(["none","hidden"]);function ud(e,t){return zo.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function dd(e,t){return n=>se(e,t,n)}function Ii(e){return typeof e=="number"?dd:typeof e=="string"?Di(e)?Fn:ae.test(e)?As:gd:Array.isArray(e)?Xa:typeof e=="object"?ae.test(e)?As:fd:Fn}function Xa(e,t){const n=[...e],o=n.length,i=e.map((s,r)=>Ii(s)(s,t[r]));return s=>{for(let r=0;r<o;r++)n[r]=i[r](s);return n}}function fd(e,t){const n={...e,...t},o={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(o[i]=Ii(e[i])(e[i],t[i]));return i=>{for(const s in o)n[s]=o[s](i);return n}}function hd(e,t){const n=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],r=e.indexes[s][o[s]],a=e.values[r]??0;n[i]=a,o[s]++}return n}const gd=(e,t)=>{const n=tt.createTransformer(t),o=Jt(e),i=Jt(t);return o.indexes.var.length===i.indexes.var.length&&o.indexes.color.length===i.indexes.color.length&&o.indexes.number.length>=i.indexes.number.length?zo.has(e)&&!i.values.length||zo.has(t)&&!o.values.length?ud(e,t):on(Xa(hd(o,i),i.values),n):(kt(!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"),Fn(e,t))};function Ya(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?se(e,t,n):Ii(e)(e,t)}const md=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>oe.update(t,n),stop:()=>et(t),now:()=>de.isProcessing?de.timestamp:Ce.now()}},Za=(e,t,n=10)=>{let o="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)o+=Math.round(e(s/(i-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},Ln=2e4;function ji(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<Ln;)t+=n,o=e.next(t);return t>=Ln?1/0:t}function pd(e,t=100,n){const o=n({...e,keyframes:[0,t]}),i=Math.min(ji(o),Ln);return{type:"keyframes",ease:s=>o.next(i*s).value/t,duration:Te(i)}}const vd=5;function Ja(e,t,n){const o=Math.max(t-vd,0);return Aa(n-e(o),t-o)}const ie={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},fo=.001;function yd({duration:e=ie.duration,bounce:t=ie.bounce,velocity:n=ie.velocity,mass:o=ie.mass}){let i,s;kt(e<=Le(ie.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=Ue(ie.minDamping,ie.maxDamping,r),e=Ue(ie.minDuration,ie.maxDuration,Te(e)),r<1?(i=c=>{const u=c*r,f=u*e,d=u-n,h=Ho(c,r),m=Math.exp(-f);return fo-d/h*m},s=c=>{const f=c*r*e,d=f*n+n,h=Math.pow(r,2)*Math.pow(c,2)*e,m=Math.exp(-f),g=Ho(Math.pow(c,2),r);return(-i(c)+fo>0?-1:1)*((d-h)*m)/g}):(i=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-fo+u*f},s=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const a=5/e,l=wd(i,s,a);if(e=Le(e),isNaN(l))return{stiffness:ie.stiffness,damping:ie.damping,duration:e};{const c=Math.pow(l,2)*o;return{stiffness:c,damping:r*2*Math.sqrt(o*c),duration:e}}}const xd=12;function wd(e,t,n){let o=n;for(let i=1;i<xd;i++)o=o-e(o)/t(o);return o}function Ho(e,t){return e*Math.sqrt(1-t*t)}const Cd=["duration","bounce"],Sd=["stiffness","damping","mass"];function Vs(e,t){return t.some(n=>e[n]!==void 0)}function bd(e){let t={velocity:ie.velocity,stiffness:ie.stiffness,damping:ie.damping,mass:ie.mass,isResolvedFromDuration:!1,...e};if(!Vs(e,Sd)&&Vs(e,Cd))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),i=o*o,s=2*Ue(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:ie.mass,stiffness:i,damping:s}}else{const n=yd(e);t={...t,...n,mass:ie.mass},t.isResolvedFromDuration=!0}return t}function In(e=ie.visualDuration,t=ie.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:i}=n;const s=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:f,velocity:d,isResolvedFromDuration:h}=bd({...n,velocity:-Te(n.velocity||0)}),m=d||0,g=c/(2*Math.sqrt(l*u)),y=r-s,x=Te(Math.sqrt(l/u)),w=Math.abs(y)<5;o||(o=w?ie.restSpeed.granular:ie.restSpeed.default),i||(i=w?ie.restDelta.granular:ie.restDelta.default);let v;if(g<1){const S=Ho(x,g);v=M=>{const A=Math.exp(-g*x*M);return r-A*((m+g*x*y)/S*Math.sin(S*M)+y*Math.cos(S*M))}}else if(g===1)v=S=>r-Math.exp(-x*S)*(y+(m+x*y)*S);else{const S=x*Math.sqrt(g*g-1);v=M=>{const A=Math.exp(-g*x*M),E=Math.min(S*M,300);return r-A*((m+g*x*y)*Math.sinh(E)+S*y*Math.cosh(E))/S}}const b={calculatedDuration:h&&f||null,next:S=>{const M=v(S);if(h)a.done=S>=f;else{let A=S===0?m:0;g<1&&(A=S===0?Le(m):Ja(v,S,M));const E=Math.abs(A)<=o,k=Math.abs(r-M)<=i;a.done=E&&k}return a.value=a.done?r:M,a},toString:()=>{const S=Math.min(ji(b),Ln),M=Za(A=>b.next(S*A).value,S,30);return S+"ms "+M},toTransition:()=>{}};return b}In.applyToOptions=e=>{const t=pd(e,100,In);return e.ease=t.ease,e.duration=Le(t.duration),e.type="keyframes",e};function Wo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=e[0],d={done:!1,value:f},h=E=>a!==void 0&&E<a||l!==void 0&&E>l,m=E=>a===void 0?l:l===void 0||Math.abs(a-E)<Math.abs(l-E)?a:l;let g=n*t;const y=f+g,x=r===void 0?y:r(y);x!==y&&(g=x-f);const w=E=>-g*Math.exp(-E/o),v=E=>x+w(E),b=E=>{const k=w(E),F=v(E);d.done=Math.abs(k)<=c,d.value=d.done?x:F};let S,M;const A=E=>{h(d.value)&&(S=E,M=In({keyframes:[d.value,m(d.value)],velocity:Ja(v,E,d.value),damping:i,stiffness:s,restDelta:c,restSpeed:u}))};return A(0),{calculatedDuration:null,next:E=>{let k=!1;return!M&&S===void 0&&(k=!0,b(E),A(E)),S!==void 0&&E>=S?M.next(E-S):(!k&&b(E),d)}}}function Rd(e,t,n){const o=[],i=n||qe.mix||Ya,s=e.length-1;for(let r=0;r<s;r++){let a=i(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||Ae:t;a=on(l,a)}o.push(a)}return o}function _d(e,t,{clamp:n=!0,ease:o,mixer:i}={}){const s=e.length;if(Ke(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Rd(t,o,i),l=a.length,c=u=>{if(r&&u<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(u<e[f+1]);f++);const d=Yt(e[f],e[f+1],u);return a[f](d)};return n?u=>c(Ue(e[0],e[s-1],u)):c}function Pd(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const i=Yt(0,t,o);e.push(se(n,1,i))}}function Ed(e){const t=[0];return Pd(t,e.length-1),t}function Md(e,t){return e.map(n=>n*t)}function Td(e,t){return e.map(()=>t||Oa).splice(0,e.length-1)}function St({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const i=Bu(o)?o.map(Ps):Ps(o),s={done:!1,value:t[0]},r=Md(n&&n.length===t.length?n:Ed(t),e),a=_d(r,t,{ease:Array.isArray(i)?i:Td(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Ad=e=>e!==null;function $i(e,{repeat:t,repeatType:n="loop"},o,i=1){const s=e.filter(Ad),a=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||o===void 0?s[a]:o}const Vd={decay:Wo,inertia:Wo,tween:St,keyframes:St,spring:In};function Qa(e){typeof e.type=="string"&&(e.type=Vd[e.type])}class Oi{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 kd=e=>e/100;class Ni extends Oi{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!==Ce.now()&&this.tick(Ce.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;Qa(t);const{type:n=St,repeat:o=0,repeatDelay:i=0,repeatType:s,velocity:r=0}=t;let{keyframes:a}=t;const l=n||St;process.env.NODE_ENV!=="production"&&l!==St&&Ke(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==St&&typeof a[0]!="number"&&(this.mixKeyframes=on(kd,Ya(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=ji(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(o+1)-i,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:o,totalDuration:i,mixKeyframes:s,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return o.next(0);const{delay:c=0,keyframes:u,repeat:f,repeatType:d,repeatDelay:h,type:m,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const x=this.currentTime-c*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?x<0:x>i;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,b=o;if(f){const E=Math.min(this.currentTime,i)/a;let k=Math.floor(E),F=E%1;!F&&E>=1&&(F=1),F===1&&k--,k=Math.min(k,f+1),k%2&&(d==="reverse"?(F=1-F,h&&(F-=h/a)):d==="mirror"&&(b=r)),v=Ue(0,1,F)*a}const S=w?{done:!1,value:u[0]}:b.next(v);s&&(S.value=s(S.value));let{done:M}=S;!w&&l!==null&&(M=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return A&&m!==Wo&&(S.value=$i(u,this.options,y,this.speed)),g&&g(S.value),A&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return Te(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Te(t)}get time(){return Te(this.currentTime)}set time(t){t=Le(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(Ce.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Te(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=md,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=n??o),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(Ce.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 Dd(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ct=e=>e*180/Math.PI,Go=e=>{const t=ct(Math.atan2(e[1],e[0]));return Uo(t)},Fd={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Go,rotateZ:Go,skewX:e=>ct(Math.atan(e[1])),skewY:e=>ct(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Uo=e=>(e=e%360,e<0&&(e+=360),e),ks=Go,Ds=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Fs=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Ld={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ds,scaleY:Fs,scale:e=>(Ds(e)+Fs(e))/2,rotateX:e=>Uo(ct(Math.atan2(e[6],e[5]))),rotateY:e=>Uo(ct(Math.atan2(-e[2],e[0]))),rotateZ:ks,rotate:ks,skewX:e=>ct(Math.atan(e[4])),skewY:e=>ct(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ko(e){return e.includes("scale")?1:0}function qo(e,t){if(!e||e==="none")return Ko(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,i;if(n)o=Ld,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=Fd,i=a}if(!i)return Ko(t);const s=o[t],r=i[1].split(",").map(jd);return typeof s=="function"?s(r):r[s]}const Id=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return qo(n,t)};function jd(e){return parseFloat(e.trim())}const Ft=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Lt=new Set(Ft),Ls=e=>e===Dt||e===G,$d=new Set(["x","y","z"]),Od=Ft.filter(e=>!$d.has(e));function Nd(e){const t=[];return Od.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const dt={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})=>qo(t,"x"),y:(e,{transform:t})=>qo(t,"y")};dt.translateX=dt.x;dt.translateY=dt.y;const ft=new Set;let Xo=!1,Yo=!1,Zo=!1;function el(){if(Yo){const e=Array.from(ft).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const i=Nd(o);i.length&&(n.set(o,i),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const i=n.get(o);i&&i.forEach(([s,r])=>{o.getValue(s)?.set(r)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}Yo=!1,Xo=!1,ft.forEach(e=>e.complete(Zo)),ft.clear()}function tl(){ft.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Yo=!0)})}function Bd(){Zo=!0,tl(),el(),Zo=!1}class Bi{constructor(t,n,o,i,s,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=i,this.element=s,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(ft.add(this),Xo||(Xo=!0,oe.read(tl),oe.resolveKeyframes(el))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:i}=this;if(t[0]===null){const s=i?.get(),r=t[t.length-1];if(s!==void 0)t[0]=s;else if(o&&n){const a=o.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),i&&s===void 0&&i.set(t[0])}Dd(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ft.delete(this)}cancel(){this.state==="scheduled"&&(ft.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const zd=e=>e.startsWith("--");function Hd(e,t,n){zd(t)?e.style.setProperty(t,n):e.style[t]=n}const Wd=Mi(()=>window.ScrollTimeline!==void 0),Gd={};function Ud(e,t){const n=Mi(e);return()=>Gd[t]??n()}const nl=Ud(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Wt=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,Is={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wt([0,.65,.55,1]),circOut:Wt([.55,0,1,.45]),backIn:Wt([.31,.01,.66,-.59]),backOut:Wt([.33,1.53,.69,.99])};function ol(e,t){if(e)return typeof e=="function"?nl()?Za(e,t):"ease-out":Na(e)?Wt(e):Array.isArray(e)?e.map(n=>ol(n,t)||Is.easeOut):Is[e]}function Kd(e,t,n,{delay:o=0,duration:i=300,repeat:s=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const f=ol(a,i);Array.isArray(f)&&(u.easing=f);const d={delay:o,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:r==="reverse"?"alternate":"normal"};return c&&(d.pseudoElement=c),e.animate(u,d)}function il(e){return typeof e=="function"&&"applyToOptions"in e}function qd({type:e,...t}){return il(e)&&nl()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Xd extends Oi{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:o,keyframes:i,pseudoElement:s,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=r,this.options=t,Ke(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=qd(t);this.animation=Kd(n,o,i,c,s),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const u=$i(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):Hd(n,o,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 Te(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Te(t)}get time(){return Te(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Le(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&&Wd()?(this.animation.timeline=t,Ae):n(this)}}const sl={anticipate:Ia,backInOut:La,circInOut:$a};function Yd(e){return e in sl}function Zd(e){typeof e.ease=="string"&&Yd(e.ease)&&(e.ease=sl[e.ease])}const js=10;class Jd extends Xd{constructor(t){Zd(t),Qa(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:o,onComplete:i,element:s,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Ni({...r,autoplay:!1}),l=Le(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-js).value,a.sample(l).value,js),a.stop()}}const $s=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(tt.test(e)||e==="0")&&!e.startsWith("url("));function Qd(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 ef(e,t,n,o){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],r=$s(i,t),a=$s(s,t);return kt(r===a,`You are trying to animate ${t} from "${i}" to "${s}". "${r?s:i}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:Qd(e)||(n==="spring"||il(n))&&o}function Jo(e){e.duration=0,e.type="keyframes"}const tf=new Set(["opacity","clipPath","filter","transform"]),nf=Mi(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function of(e){const{motionValue:t,name:n,repeatDelay:o,repeatType:i,damping:s,type:r}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return nf()&&n&&tf.has(n)&&(n!=="transform"||!c)&&!l&&!o&&i!=="mirror"&&s!==0&&r!=="inertia"}const sf=40;class rf extends Oi{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:r="loop",keyframes:a,name:l,motionValue:c,element:u,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ce.now();const d={autoplay:t,delay:n,type:o,repeat:i,repeatDelay:s,repeatType:r,name:l,motionValue:c,element:u,...f},h=u?.KeyframeResolver||Bi;this.keyframeResolver=new h(a,(m,g,y)=>this.onKeyframesResolved(m,g,d,!y),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,o,i){this.keyframeResolver=void 0;const{name:s,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=o;this.resolvedAt=Ce.now(),ef(t,s,r,a)||((qe.instantAnimations||!l)&&u?.($i(t,o,n)),t[0]=t[t.length-1],Jo(o),o.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>sf?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...o,keyframes:t},h=!c&&of(d)?new Jd({...d,element:d.motionValue.owner.current}):new Ni(d);h.finished.then(()=>this.notifyFinished()).catch(Ae),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(),Bd()),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 af=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function lf(e){const t=af.exec(e);if(!t)return[,];const[,n,o,i]=t;return[`--${n??o}`,i]}const cf=4;function rl(e,t,n=1){Ke(n<=cf,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[o,i]=lf(e);if(!o)return;const s=window.getComputedStyle(t).getPropertyValue(o);if(s){const r=s.trim();return Ea(r)?parseFloat(r):r}return Di(i)?rl(i,t,n+1):i}function zi(e,t){return e?.[t]??e?.default??e}const al=new Set(["width","height","top","left","right","bottom",...Ft]),uf={test:e=>e==="auto",parse:e=>e},ll=e=>t=>t.test(e),cl=[Dt,G,Oe,Ze,Qu,Ju,uf],Os=e=>cl.find(ll(e));function df(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ta(e):!0}const ff=new Set(["brightness","contrast","saturate","opacity"]);function hf(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(Fi)||[];if(!o)return e;const i=n.replace(o,"");let s=ff.has(t)?1:0;return o!==n&&(s*=100),t+"("+s+i+")"}const gf=/\b([a-z-]*)\(.*?\)/gu,Qo={...tt,getAnimatableNone:e=>{const t=e.match(gf);return t?t.map(hf).join(" "):e}},Ns={...Dt,transform:Math.round},mf={rotate:Ze,rotateX:Ze,rotateY:Ze,rotateZ:Ze,scale:gn,scaleX:gn,scaleY:gn,scaleZ:gn,skew:Ze,skewX:Ze,skewY:Ze,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:Zt,originX:Es,originY:Es,originZ:G},Hi={borderWidth:G,borderTopWidth:G,borderRightWidth:G,borderBottomWidth:G,borderLeftWidth:G,borderRadius:G,radius:G,borderTopLeftRadius:G,borderTopRightRadius:G,borderBottomRightRadius:G,borderBottomLeftRadius:G,width:G,maxWidth:G,height:G,maxHeight:G,top:G,right:G,bottom:G,left:G,padding:G,paddingTop:G,paddingRight:G,paddingBottom:G,paddingLeft:G,margin:G,marginTop:G,marginRight:G,marginBottom:G,marginLeft:G,backgroundPositionX:G,backgroundPositionY:G,...mf,zIndex:Ns,fillOpacity:Zt,strokeOpacity:Zt,numOctaves:Ns},pf={...Hi,color:ae,backgroundColor:ae,outlineColor:ae,fill:ae,stroke:ae,borderColor:ae,borderTopColor:ae,borderRightColor:ae,borderBottomColor:ae,borderLeftColor:ae,filter:Qo,WebkitFilter:Qo},ul=e=>pf[e];function dl(e,t){let n=ul(e);return n!==Qo&&(n=tt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const vf=new Set(["auto","none","0"]);function yf(e,t,n){let o=0,i;for(;o<e.length&&!i;){const s=e[o];typeof s=="string"&&!vf.has(s)&&Jt(s).values.length&&(i=e[o]),o++}if(i&&n)for(const s of t)e[s]=dl(n,i)}class xf extends Bi{constructor(t,n,o,i,s){super(t,n,o,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=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(),Di(c))){const u=rl(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!al.has(o)||t.length!==2)return;const[i,s]=t,r=Os(i),a=Os(s);if(r!==a)if(Ls(r)&&Ls(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else dt[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let i=0;i<t.length;i++)(t[i]===null||df(t[i]))&&o.push(i);o.length&&yf(t,o,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=dt[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(o,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:o}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=o.length-1,r=o[s];o[s]=dt[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 wf(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const i=n?.[e]??o.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const fl=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function hl(e){return Ma(e)&&"offsetHeight"in e}const Bs=30,Cf=e=>!isNaN(parseFloat(e));class Sf{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{const i=Ce.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ce.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Cf(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ai(!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 Ti);const o=this.events[t].add(n);return t==="change"?()=>{o(),oe.read(()=>{this.events.change.getSize()||this.stop()})}:o}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,o){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}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=Ce.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Bs)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Bs);return Aa(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 Tt(e,t){return new Sf(e,t)}const{schedule:Wi}=Ba(queueMicrotask,!1),Fe={x:!1,y:!1};function gl(){return Fe.x||Fe.y}function bf(e){return e==="x"||e==="y"?Fe[e]?null:(Fe[e]=!0,()=>{Fe[e]=!1}):Fe.x||Fe.y?null:(Fe.x=Fe.y=!0,()=>{Fe.x=Fe.y=!1})}function ml(e,t){const n=wf(e),o=new AbortController,i={passive:!0,...t,signal:o.signal};return[n,i,()=>o.abort()]}function zs(e){return!(e.pointerType==="touch"||gl())}function Rf(e,t,n={}){const[o,i,s]=ml(e,n),r=a=>{if(!zs(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=f=>{zs(f)&&(c(f),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,i)};return o.forEach(a=>{a.addEventListener("pointerenter",r,i)}),s}const pl=(e,t)=>t?e===t?!0:pl(e,t.parentElement):!1,Gi=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,_f=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Pf(e){return _f.has(e.tagName)||e.tabIndex!==-1}const Pn=new WeakSet;function Hs(e){return t=>{t.key==="Enter"&&e(t)}}function ho(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Ef=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=Hs(()=>{if(Pn.has(n))return;ho(n,"down");const i=Hs(()=>{ho(n,"up")}),s=()=>ho(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function Ws(e){return Gi(e)&&!gl()}function Mf(e,t,n={}){const[o,i,s]=ml(e,n),r=a=>{const l=a.currentTarget;if(!Ws(a))return;Pn.add(l);const c=t(l,a),u=(h,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),Pn.has(l)&&Pn.delete(l),Ws(h)&&typeof c=="function"&&c(h,{success:m})},f=h=>{u(h,l===window||l===document||n.useGlobalTarget||pl(l,h.target))},d=h=>{u(h,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return o.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),hl(a)&&(a.addEventListener("focus",c=>Ef(c,i)),!Pf(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function vl(e){return Ma(e)&&"ownerSVGElement"in e}function Tf(e){return vl(e)&&e.tagName==="svg"}const me=e=>!!(e&&e.getVelocity),Af=[...cl,ae,tt],Vf=e=>Af.find(ll(e)),Ui=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Gs(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function kf(...e){return t=>{let n=!1;const o=e.map(i=>{const s=Gs(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<o.length;i++){const s=o[i];typeof s=="function"?s():Gs(e[i],null)}}}}function Df(...e){return R.useCallback(kf(...e),e)}class Ff extends R.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const o=n.offsetParent,i=hl(o)&&o.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Lf({children:e,isPresent:t,anchorX:n,root:o}){const i=C.useId(),s=C.useRef(null),r=C.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=C.useContext(Ui),l=Df(s,e?.ref);return C.useInsertionEffect(()=>{const{width:c,height:u,top:f,left:d,right:h}=r.current;if(t||!s.current||!c||!u)return;const m=n==="left"?`left: ${d}`:`right: ${h}`;s.current.dataset.motionPopId=i;const g=document.createElement("style");a&&(g.nonce=a);const y=o??document.head;return y.appendChild(g),g.sheet&&g.sheet.insertRule(`
|
|
2
2
|
[data-motion-pop-id="${i}"] {
|
|
3
3
|
position: absolute !important;
|
|
4
4
|
width: ${c}px !important;
|
|
@@ -6,34 +6,34 @@
|
|
|
6
6
|
${m}px !important;
|
|
7
7
|
top: ${f}px !important;
|
|
8
8
|
}
|
|
9
|
-
`),()=>{y.contains(g)&&y.removeChild(g)}},[t]),p.jsx(Ff,{isPresent:t,childRef:s,sizeRef:r,children:R.cloneElement(e,{ref:l})})}const If=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:i,presenceAffectsLayout:s,mode:r,anchorX:a,root:l})=>{const c=Si(jf),u=C.useId();let f=!0,d=C.useMemo(()=>(f=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:h=>{c.set(h,!0);for(const m of c.values())if(!m)return;o&&o()},register:h=>(c.set(h,!1),()=>c.delete(h))}),[n,c,o]);return s&&f&&(d={...d}),C.useMemo(()=>{c.forEach((h,m)=>c.set(m,!1))},[n]),R.useEffect(()=>{!n&&!c.size&&o&&o()},[n]),r==="popLayout"&&(e=p.jsx(Lf,{isPresent:n,anchorX:a,root:l,children:e})),p.jsx(Hn.Provider,{value:d,children:e})};function jf(){return new Map}function yl(e=!0){const t=C.useContext(Hn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:i}=t,s=C.useId();C.useEffect(()=>{if(e)return i(s)},[e]);const r=C.useCallback(()=>e&&o&&o(s),[s,o,e]);return!n&&o?[!1,r]:[!0]}const gn=e=>e.key||"";function Us(e){const t=[];return C.Children.forEach(e,n=>{C.isValidElement(n)&&t.push(n)}),t}const $f=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:i=!0,mode:s="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[c,u]=yl(r),f=C.useMemo(()=>Us(e),[e]),d=r&&!c?[]:f.map(gn),h=C.useRef(!0),m=C.useRef(f),g=Si(()=>new Map),[y,x]=C.useState(f),[w,v]=C.useState(f);Pa(()=>{h.current=!1,m.current=f;for(let M=0;M<w.length;M++){const T=gn(w[M]);d.includes(T)?g.delete(T):g.get(T)!==!0&&g.set(T,!1)}},[w,d.length,d.join("-")]);const S=[];if(f!==y){let M=[...f];for(let T=0;T<w.length;T++){const E=w[T],D=gn(E);d.includes(D)||(M.splice(T,0,E),S.push(E))}return s==="wait"&&S.length&&(M=S),v(Us(M)),x(f),null}process.env.NODE_ENV!=="production"&&s==="wait"&&w.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:b}=C.useContext(bi);return p.jsx(p.Fragment,{children:w.map(M=>{const T=gn(M),E=r&&!c?!1:f===w||d.includes(T),D=()=>{if(g.has(T))g.set(T,!0);else return;let F=!0;g.forEach($=>{$||(F=!1)}),F&&(b?.(),v(m.current),r&&u?.(),o&&o())};return p.jsx(If,{isPresent:E,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:l,onExitComplete:E?void 0:D,anchorX:a,children:M},T)})})},xl=C.createContext({strict:!1}),Ks={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"]},At={};for(const e in Ks)At[e]={isEnabled:t=>Ks[e].some(n=>!!t[n])};function Of(e){for(const t in e)At[t]={...At[t],...e[t]}}const Nf=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 In(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Nf.has(e)}let wl=e=>!In(e);function zf(e){typeof e=="function"&&(wl=t=>t.startsWith("on")?!In(t):e(t))}try{zf(require("@emotion/is-prop-valid").default)}catch{}function Bf(e,t,n){const o={};for(const i in e)i==="values"&&typeof e.values=="object"||(wl(i)||n===!0&&In(i)||!t&&!In(i)||e.draggable&&i.startsWith("onDrag"))&&(o[i]=e[i]);return o}const Wn=C.createContext({});function Gn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Qt(e){return typeof e=="string"||Array.isArray(e)}const Ui=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ki=["initial",...Ui];function Un(e){return Gn(e.animate)||Ki.some(t=>Qt(e[t]))}function Cl(e){return!!(Un(e)||e.variants)}function Hf(e,t){if(Un(e)){const{initial:n,animate:o}=e;return{initial:n===!1||Qt(n)?n:void 0,animate:Qt(o)?o:void 0}}return e.inherit!==!1?t:{}}function Wf(e){const{initial:t,animate:n}=Hf(e,C.useContext(Wn));return C.useMemo(()=>({initial:t,animate:n}),[qs(t),qs(n)])}function qs(e){return Array.isArray(e)?e.join(" "):e}function Xs(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Nt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(G.test(e))e=parseFloat(e);else return e;const n=Xs(e,t.target.x),o=Xs(e,t.target.y);return`${n}% ${o}%`}},Gf={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,i=tt.parse(e);if(i.length>5)return o;const s=tt.createTransformer(e),r=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+r]/=a,i[1+r]/=l;const c=se(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=c),typeof i[3+r]=="number"&&(i[3+r]/=c),s(i)}},Qo={borderRadius:{...Nt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Nt,borderTopRightRadius:Nt,borderBottomLeftRadius:Nt,borderBottomRightRadius:Nt,boxShadow:Gf};function bl(e,{layout:t,layoutId:n}){return Lt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Qo[e]||e==="opacity")}const Uf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Kf=Ft.length;function qf(e,t,n){let o="",i=!0;for(let s=0;s<Kf;s++){const r=Ft[s],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=fl(a,Bi[r]);if(!l){i=!1;const u=Uf[r]||r;o+=`${u}(${c}) `}n&&(t[r]=c)}}return o=o.trim(),n?o=n(t,i?"":o):i&&(o="none"),o}function qi(e,t,n){const{style:o,vars:i,transformOrigin:s}=e;let r=!1,a=!1;for(const l in t){const c=t[l];if(Lt.has(l)){r=!0;continue}else if(Ha(l)){i[l]=c;continue}else{const u=fl(c,Bi[l]);l.startsWith("origin")?(a=!0,s[l]=u):o[l]=u}}if(t.transform||(r||n?o.transform=qf(t,e.transform,n):o.transform&&(o.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;o.transformOrigin=`${l} ${c} ${u}`}}const Xi=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Sl(e,t,n){for(const o in t)!ge(t[o])&&!bl(o,n)&&(e[o]=t[o])}function Xf({transformTemplate:e},t){return C.useMemo(()=>{const n=Xi();return qi(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Yf(e,t){const n=e.style||{},o={};return Sl(o,n,e),Object.assign(o,Xf(e,t)),o}function Zf(e,t){const n={},o=Yf(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.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=o,n}const Jf={offset:"stroke-dashoffset",array:"stroke-dasharray"},Qf={offset:"strokeDashoffset",array:"strokeDasharray"};function eh(e,t,n=1,o=0,i=!0){e.pathLength=1;const s=i?Jf:Qf;e[s.offset]=G.transform(-o);const r=G.transform(t),a=G.transform(n);e[s.array]=`${r} ${a}`}function Rl(e,{attrX:t,attrY:n,attrScale:o,pathLength:i,pathSpacing:s=1,pathOffset:r=0,...a},l,c,u){if(qi(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:d}=e;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),o!==void 0&&(f.scale=o),i!==void 0&&eh(f,i,s,r,!1)}const _l=()=>({...Xi(),attrs:{}}),Pl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function th(e,t,n,o){const i=C.useMemo(()=>{const s=_l();return Rl(s,t,Pl(o),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Sl(s,e.style,e),i.style={...s,...i.style}}return i}const nh=["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 Yi(e){return typeof e!="string"||e.includes("-")?!1:!!(nh.indexOf(e)>-1||/[A-Z]/u.test(e))}function oh(e,t,n,{latestValues:o},i,s=!1){const a=(Yi(e)?th:Zf)(t,o,i,e),l=Bf(t,typeof e=="string",s),c=e!==C.Fragment?{...l,...a,ref:n}:{},{children:u}=t,f=C.useMemo(()=>ge(u)?u.get():u,[u]);return C.createElement(e,{...c,children:f})}function Ys(e){const t=[{},{}];return e?.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function Zi(e,t,n,o){if(typeof t=="function"){const[i,s]=Ys(o);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=Ys(o);t=t(n!==void 0?n:e.custom,i,s)}return t}function Pn(e){return ge(e)?e.get():e}function ih({scrapeMotionValuesFromProps:e,createRenderState:t},n,o,i){return{latestValues:sh(n,o,i,e),renderState:t()}}function sh(e,t,n,o){const i={},s=o(e,{});for(const d in s)i[d]=Pn(s[d]);let{initial:r,animate:a}=e;const l=Un(e),c=Cl(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 f=u?a:r;if(f&&typeof f!="boolean"&&!Gn(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const m=Zi(e,d[h]);if(m){const{transitionEnd:g,transition:y,...x}=m;for(const w in x){let v=x[w];if(Array.isArray(v)){const S=u?v.length-1:0;v=v[S]}v!==null&&(i[w]=v)}for(const w in g)i[w]=g[w]}}}return i}const El=e=>(t,n)=>{const o=C.useContext(Wn),i=C.useContext(Hn),s=()=>ih(e,t,o,i);return n?s():Si(s)};function Ji(e,t,n){const{style:o}=e,i={};for(const s in o)(ge(o[s])||t.style&&ge(t.style[s])||bl(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(i[s]=o[s]);return i}const rh=El({scrapeMotionValuesFromProps:Ji,createRenderState:Xi});function Ml(e,t,n){const o=Ji(e,t,n);for(const i in e)if(ge(e[i])||ge(t[i])){const s=Ft.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;o[s]=e[i]}return o}const ah=El({scrapeMotionValuesFromProps:Ml,createRenderState:_l}),lh=Symbol.for("motionComponentSymbol");function St(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function ch(e,t,n){return C.useCallback(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),n&&(typeof n=="function"?n(o):St(n)&&(n.current=o))},[t])}const Qi=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),uh="framerAppearId",Tl="data-"+Qi(uh),Al=C.createContext({});function dh(e,t,n,o,i){const{visualElement:s}=C.useContext(Wn),r=C.useContext(xl),a=C.useContext(Hn),l=C.useContext(Gi).reducedMotion,c=C.useRef(null);o=o||r.renderer,!c.current&&o&&(c.current=o(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=C.useContext(Al);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&fh(c.current,n,i,f);const d=C.useRef(!1);C.useInsertionEffect(()=>{u&&d.current&&u.update(n,a)});const h=n[Tl],m=C.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return Pa(()=>{u&&(d.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),m.current&&u.animationState&&u.animationState.animateChanges())}),C.useEffect(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),m.current=!1),u.enteringChildren=void 0)}),u}function fh(e,t,n,o){const{layoutId:i,layout:s,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Vl(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!r||a&&St(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:o,crossfade:u,layoutScroll:l,layoutRoot:c})}function Vl(e){if(e)return e.options.allowProjection!==!1?e.projection:Vl(e.parent)}function ho(e,{forwardMotionProps:t=!1}={},n,o){n&&Of(n);const i=Yi(e)?ah:rh;function s(a,l){let c;const u={...C.useContext(Gi),...a,layoutId:hh(a)},{isStatic:f}=u,d=Wf(a),h=i(a,f);if(!f&&Ri){gh(u,n);const m=mh(u);c=m.MeasureLayout,d.visualElement=dh(e,h,u,o,m.ProjectionNode)}return p.jsxs(Wn.Provider,{value:d,children:[c&&d.visualElement?p.jsx(c,{visualElement:d.visualElement,...u}):null,oh(e,a,ch(h,d.visualElement,l),h,f,t)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const r=C.forwardRef(s);return r[lh]=e,r}function hh({layoutId:e}){const t=C.useContext(bi).id;return t&&e!==void 0?t+"-"+e:e}function gh(e,t){const n=C.useContext(xl).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Dt(!1,o,"lazy-strict-mode"):Ke(!1,o,"lazy-strict-mode")}}function mh(e){const{drag:t,layout:n}=At;if(!t&&!n)return{};const o={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function ph(e,t){if(typeof Proxy>"u")return ho;const n=new Map,o=(s,r)=>ho(s,r,e,t),i=(s,r)=>(process.env.NODE_ENV!=="production"&&Ti(!1,"motion() is deprecated. Use motion.create() instead."),o(s,r));return new Proxy(i,{get:(s,r)=>r==="create"?o:(n.has(r)||n.set(r,ho(r,void 0,e,t)),n.get(r))})}function Dl({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function vh({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function yh(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}function go(e){return e===void 0||e===1}function ei({scale:e,scaleX:t,scaleY:n}){return!go(e)||!go(t)||!go(n)}function at(e){return ei(e)||kl(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function kl(e){return Zs(e.x)||Zs(e.y)}function Zs(e){return e&&e!=="0%"}function jn(e,t,n){const o=e-n,i=t*o;return n+i}function Js(e,t,n,o,i){return i!==void 0&&(e=jn(e,i,o)),jn(e,n,o)+t}function ti(e,t=0,n=1,o,i){e.min=Js(e.min,t,n,o,i),e.max=Js(e.max,t,n,o,i)}function Fl(e,{x:t,y:n}){ti(e.x,t.translate,t.scale,t.originPoint),ti(e.y,n.translate,n.scale,n.originPoint)}const Qs=.999999999999,er=1.0000000000001;function xh(e,t,n,o=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,r;for(let a=0;a<i;a++){s=n[a],r=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&s.options.layoutScroll&&s.scroll&&s!==s.root&&_t(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,Fl(e,r)),o&&at(s.latestValues)&&_t(e,s.latestValues))}t.x<er&&t.x>Qs&&(t.x=1),t.y<er&&t.y>Qs&&(t.y=1)}function Rt(e,t){e.min=e.min+t,e.max=e.max+t}function tr(e,t,n,o,i=.5){const s=se(e.min,e.max,i);ti(e,t,n,s,o)}function _t(e,t){tr(e.x,t.x,t.scaleX,t.scale,t.originX),tr(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ll(e,t){return Dl(yh(e.getBoundingClientRect(),t))}function wh(e,t,n){const o=Ll(e,n),{scroll:i}=t;return i&&(Rt(o.x,i.offset.x),Rt(o.y,i.offset.y)),o}const nr=()=>({translate:0,scale:1,origin:0,originPoint:0}),Pt=()=>({x:nr(),y:nr()}),or=()=>({min:0,max:0}),ce=()=>({x:or(),y:or()}),ni={current:null},Il={current:!1};function Ch(){if(Il.current=!0,!!Ri)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ni.current=e.matches;e.addEventListener("change",t),t()}else ni.current=!1}const bh=new WeakMap;function Sh(e,t,n){for(const o in t){const i=t[o],s=n[o];if(ge(i))e.addValue(o,i);else if(ge(s))e.addValue(o,Tt(i,{owner:e}));else if(s!==i)if(e.hasValue(o)){const r=e.getValue(o);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=e.getStaticValue(o);e.addValue(o,Tt(r!==void 0?r:i,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const ir=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Rh{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:i,blockInitialAnimation:s,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=Ni,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 d=xe.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,oe.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=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Un(n),this.isVariantNode=Cl(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&ge(h)&&h.set(l[d])}}mount(t){this.current=t,bh.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,o)=>this.bindToMotionValue(o,n)),Il.current||Ch(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ni.current,process.env.NODE_ENV!=="production"&&Ti(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(),et(this.notifyUpdate),et(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 o=Lt.has(t);o&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&oe.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),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 At){const n=At[t];if(!n)continue;const{isEnabled:o,Feature:i}=n;if(!this.features[t]&&i&&o(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ce()}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 o=0;o<ir.length;o++){const i=ir[o];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,r=t[s];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Sh(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 o=this.values.get(t);n!==o&&(o&&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 o=this.values.get(t);return o===void 0&&n!==void 0&&(o=Tt(n===null?void 0:n,{owner:this}),this.addValue(t,o)),o}readValue(t,n){let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(Ea(o)||Ta(o))?o=parseFloat(o):!Vf(o)&&tt.test(n)&&(o=dl(t,n)),this.setBaseTarget(t,ge(o)?o.get():o)),ge(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let o;if(typeof n=="string"||typeof n=="object"){const s=Zi(this.props,n,this.presenceContext?.custom);s&&(o=s[t])}if(n&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!ge(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Mi),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Hi.render(this.render)}}class jl extends Rh{constructor(){super(...arguments),this.KeyframeResolver=xf}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:o}){delete n[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ge(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function $l(e,{style:t,vars:n},o,i){const s=e.style;let r;for(r in t)s[r]=t[r];i?.applyProjectionStyles(s,o);for(r in n)s.setProperty(r,n[r])}function _h(e){return window.getComputedStyle(e)}class Ph extends jl{constructor(){super(...arguments),this.type="html",this.renderInstance=$l}readValueFromInstance(t,n){if(Lt.has(n))return this.projection?.isProjecting?Uo(n):Id(t,n);{const o=_h(t),i=(Ha(n)?o.getPropertyValue(n):o[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ll(t,n)}build(t,n,o){qi(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return Ji(t,n,o)}}const Ol=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 Eh(e,t,n,o){$l(e,t,void 0,o);for(const i in t.attrs)e.setAttribute(Ol.has(i)?i:Qi(i),t.attrs[i])}class Mh extends jl{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ce}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Lt.has(n)){const o=ul(n);return o&&o.default||0}return n=Ol.has(n)?n:Qi(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return Ml(t,n,o)}build(t,n,o){Rl(t,n,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,n,o,i){Eh(t,n,o,i)}mount(t){this.isSVGTag=Pl(t.tagName),super.mount(t)}}const Th=(e,t)=>Yi(e)?new Mh(t):new Ph(t,{allowProjection:e!==C.Fragment});function Et(e,t,n){const o=e.getProps();return Zi(o,t,n!==void 0?n:o.custom,e)}const oi=e=>Array.isArray(e);function Ah(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Tt(n))}function Vh(e){return oi(e)?e[e.length-1]||0:e}function Dh(e,t){const n=Et(e,t);let{transitionEnd:o={},transition:i={},...s}=n||{};s={...s,...o};for(const r in s){const a=Vh(s[r]);Ah(e,r,a)}}function kh(e){return!!(ge(e)&&e.add)}function ii(e,t){const n=e.getValue("willChange");if(kh(n))return n.add(t);if(!n&&qe.WillChange){const o=new qe.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function Nl(e){return e.props[Tl]}const Fh=e=>e!==null;function Lh(e,{repeat:t,repeatType:n="loop"},o){const i=e.filter(Fh),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[s]}const Ih={type:"spring",stiffness:500,damping:25,restSpeed:10},jh=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),$h={type:"keyframes",duration:.8},Oh={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Nh=(e,{keyframes:t})=>t.length>2?$h:Lt.has(e)?e.startsWith("scale")?jh(t[1]):Ih:Oh;function zh({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:i,repeat:s,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const es=(e,t,n,o={},i,s)=>r=>{const a=zi(o,e)||{},l=a.delay||o.delay||0;let{elapsed:c=0}=o;c=c-Le(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};zh(a)||Object.assign(u,Nh(e,u)),u.duration&&(u.duration=Le(u.duration)),u.repeatDelay&&(u.repeatDelay=Le(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Zo(u),u.delay===0&&(f=!0)),(qe.instantAnimations||qe.skipAnimations)&&(f=!0,Zo(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!s&&t.get()!==void 0){const d=Lh(u.keyframes,a);if(d!==void 0){oe.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new Oi(u):new rf(u)};function Bh({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function zl(e,t,{delay:n=0,transitionOverride:o,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:r,...a}=t;o&&(s=o);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const u in a){const f=e.getValue(u,e.latestValues[u]??null),d=a[u];if(d===void 0||c&&Bh(c,u))continue;const h={delay:n,...zi(s||{},u)},m=f.get();if(m!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===m&&!h.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const x=Nl(e);if(x){const w=window.MotionHandoffAnimation(x,u,oe);w!==null&&(h.startTime=w,g=!0)}}ii(e,u),f.start(es(u,f,d,e.shouldReduceMotion&&al.has(u)?{type:!1}:h,e,g));const y=f.animation;y&&l.push(y)}return r&&Promise.all(l).then(()=>{oe.update(()=>{r&&Dh(e,r)})}),l}function Bl(e,t,n,o=0,i=1){const s=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),r=e.size,a=(r-1)*o;return typeof n=="function"?n(s,r):i===1?s*o:a-s*o}function si(e,t,n={}){const o=Et(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(zl(e,o,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:f}=i;return Hh(e,t,l,c,u,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,c]=a==="beforeChildren"?[s,r]:[r,s];return l().then(()=>c())}else return Promise.all([s(),r(n.delay)])}function Hh(e,t,n=0,o=0,i=0,s=1,r){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(si(l,t,{...r,delay:n+(typeof o=="function"?0:o)+Bl(e.variantChildren,l,o,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function Wh(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const i=t.map(s=>si(e,s,n));o=Promise.all(i)}else if(typeof t=="string")o=si(e,t,n);else{const i=typeof t=="function"?Et(e,t,n.custom):t;o=Promise.all(zl(e,i,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}function Hl(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}const Gh=Ki.length;function Wl(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Wl(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Gh;n++){const o=Ki[n],i=e.props[o];(Qt(i)||i===!1)&&(t[o]=i)}return t}const Uh=[...Ui].reverse(),Kh=Ui.length;function qh(e){return t=>Promise.all(t.map(({animation:n,options:o})=>Wh(e,n,o)))}function Xh(e){let t=qh(e),n=sr(),o=!0;const i=l=>(c,u)=>{const f=Et(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:h,...m}=f;c={...c,...m,...h}}return c};function s(l){t=l(e)}function r(l){const{props:c}=e,u=Wl(e.parent)||{},f=[],d=new Set;let h={},m=1/0;for(let y=0;y<Kh;y++){const x=Uh[y],w=n[x],v=c[x]!==void 0?c[x]:u[x],S=Qt(v),b=x===l?w.isActive:null;b===!1&&(m=y);let M=v===u[x]&&v!==c[x]&&S;if(M&&o&&e.manuallyAnimateOnMount&&(M=!1),w.protectedKeys={...h},!w.isActive&&b===null||!v&&!w.prevProp||Gn(v)||typeof v=="boolean")continue;const T=Yh(w.prevProp,v);let E=T||x===l&&w.isActive&&!M&&S||y>m&&S,D=!1;const F=Array.isArray(v)?v:[v];let $=F.reduce(i(x),{});b===!1&&($={});const{prevResolvedValues:O={}}=w,j={...O,...$},k=P=>{E=!0,d.has(P)&&(D=!0,d.delete(P)),w.needsAnimating[P]=!0;const _=e.getValue(P);_&&(_.liveStyle=!1)};for(const P in j){const _=$[P],A=O[P];if(h.hasOwnProperty(P))continue;let I=!1;oi(_)&&oi(A)?I=!Hl(_,A):I=_!==A,I?_!=null?k(P):d.add(P):_!==void 0&&d.has(P)?k(P):w.protectedKeys[P]=!0}w.prevProp=v,w.prevResolvedValues=$,w.isActive&&(h={...h,...$}),o&&e.blockInitialAnimation&&(E=!1);const N=M&&T;E&&(!N||D)&&f.push(...F.map(P=>{const _={type:x};if(typeof P=="string"&&o&&!N&&e.manuallyAnimateOnMount&&e.parent){const{parent:A}=e,I=Et(A,P);if(A.enteringChildren&&I){const{delayChildren:X}=I.transition||{};_.delay=Bl(A.enteringChildren,e,X)}}return{animation:P,options:_}}))}if(d.size){const y={};if(typeof c.initial!="boolean"){const x=Et(e,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(y.transition=x.transition)}d.forEach(x=>{const w=e.getBaseTarget(x),v=e.getValue(x);v&&(v.liveStyle=!0),y[x]=w??null}),f.push({animation:y})}let g=!!f.length;return o&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),o=!1,g?t(f):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(l,c)),n[l].isActive=c;const u=r(l);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=sr()}}}function Yh(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Hl(t,e):!1}function rt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function sr(){return{animate:rt(!0),whileInView:rt(),whileHover:rt(),whileTap:rt(),whileDrag:rt(),whileFocus:rt(),exit:rt()}}class st{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Zh extends st{constructor(t){super(t),t.animationState||(t.animationState=Xh(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Gn(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 Jh=0;class Qh extends st{constructor(){super(...arguments),this.id=Jh++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.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 eg={animation:{Feature:Zh},exit:{Feature:Qh}};function en(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function an(e){return{point:{x:e.pageX,y:e.pageY}}}const tg=e=>t=>Wi(t)&&e(t,an(t));function Ut(e,t,n,o){return en(e,t,tg(n),o)}const Gl=1e-4,ng=1-Gl,og=1+Gl,Ul=.01,ig=0-Ul,sg=0+Ul;function pe(e){return e.max-e.min}function rg(e,t,n){return Math.abs(e-t)<=n}function rr(e,t,n,o=.5){e.origin=o,e.originPoint=se(t.min,t.max,e.origin),e.scale=pe(n)/pe(t),e.translate=se(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ng&&e.scale<=og||isNaN(e.scale))&&(e.scale=1),(e.translate>=ig&&e.translate<=sg||isNaN(e.translate))&&(e.translate=0)}function Kt(e,t,n,o){rr(e.x,t.x,n.x,o?o.originX:void 0),rr(e.y,t.y,n.y,o?o.originY:void 0)}function ar(e,t,n){e.min=n.min+t.min,e.max=e.min+pe(t)}function ag(e,t,n){ar(e.x,t.x,n.x),ar(e.y,t.y,n.y)}function lr(e,t,n){e.min=t.min-n.min,e.max=e.min+pe(t)}function $n(e,t,n){lr(e.x,t.x,n.x),lr(e.y,t.y,n.y)}function Pe(e){return[e("x"),e("y")]}const Kl=({current:e})=>e?e.ownerDocument.defaultView:null,cr=(e,t)=>Math.abs(e-t);function lg(e,t){const n=cr(e.x,t.x),o=cr(e.y,t.y);return Math.sqrt(n**2+o**2)}class ql{constructor(t,n,{transformPagePoint:o,contextWindow:i=window,dragSnapToOrigin:s=!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 d=po(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,m=lg(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!m)return;const{point:g}=d,{timestamp:y}=fe;this.history.push({...g,timestamp:y});const{onStart:x,onMove:w}=this.handlers;h||(x&&x(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=mo(h,this.transformPagePoint),oe.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=po(d.type==="pointercancel"?this.lastMoveEventInfo:mo(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(d,x),g&&g(d,x)},!Wi(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=o,this.distanceThreshold=r,this.contextWindow=i||window;const a=an(t),l=mo(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=fe;this.history=[{...c,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,po(l,this.history)),this.removeListeners=on(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(),et(this.updatePoint)}}function mo(e,t){return t?{point:t(e.point)}:e}function ur(e,t){return{x:e.x-t.x,y:e.y-t.y}}function po({point:e},t){return{point:e,delta:ur(e,Xl(t)),offset:ur(e,cg(t)),velocity:ug(t,.1)}}function cg(e){return e[0]}function Xl(e){return e[e.length-1]}function ug(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const i=Xl(e);for(;n>=0&&(o=e[n],!(i.timestamp-o.timestamp>Le(t)));)n--;if(!o)return{x:0,y:0};const s=Ee(i.timestamp-o.timestamp);if(s===0)return{x:0,y:0};const r={x:(i.x-o.x)/s,y:(i.y-o.y)/s};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function dg(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?se(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?se(n,e,o.max):Math.min(e,n)),e}function dr(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 fg(e,{top:t,left:n,bottom:o,right:i}){return{x:dr(e.x,n,i),y:dr(e.y,t,o)}}function fr(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function hg(e,t){return{x:fr(e.x,t.x),y:fr(e.y,t.y)}}function gg(e,t){let n=.5;const o=pe(e),i=pe(t);return i>o?n=Yt(t.min,t.max-o,e.min):o>i&&(n=Yt(e.min,e.max-i,t.min)),Ue(0,1,n)}function mg(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 ri=.35;function pg(e=ri){return e===!1?e=0:e===!0&&(e=ri),{x:hr(e,"left","right"),y:hr(e,"top","bottom")}}function hr(e,t,n){return{min:gr(e,t),max:gr(e,n)}}function gr(e,t){return typeof e=="number"?e:e[t]||0}const vg=new WeakMap;class yg{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=ce(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:o}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(an(f).point)},r=(f,d)=>{const{drag:h,dragPropagation:m,onDragStart:g}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Sf(h),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Pe(x=>{let w=this.getAxisMotionValue(x).get()||0;if(Oe.test(w)){const{projection:v}=this.visualElement;if(v&&v.layout){const S=v.layout.layoutBox[x];S&&(w=pe(S)*(parseFloat(w)/100))}}this.originPoint[x]=w}),g&&oe.postRender(()=>g(f,d)),ii(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:g,onDrag:y}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:x}=d;if(m&&this.currentDirection===null){this.currentDirection=xg(x),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",d.point,x),this.updateAxis("y",d.point,x),this.visualElement.render(),y&&y(f,d)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>Pe(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new ql(t,{onSessionStart:s,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:o,contextWindow:Kl(this.visualElement)})}stop(t,n){const o=t||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!o)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&oe.postRender(()=>a(o,i))}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:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,o){const{drag:i}=this.getProps();if(!o||!mn(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let r=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(r=dg(r,this.constraints[t],this.elastic[t])),s.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&St(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=fg(o.layoutBox,t):this.constraints=!1,this.elastic=pg(n),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Pe(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=mg(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!St(t))return!1;const o=t.current;Ke(o!==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:i}=this.visualElement;if(!i||!i.layout)return!1;const s=wh(o,i.root,this.visualElement.getTransformPagePoint());let r=hg(i.layout.layoutBox,s);if(n){const a=n(vh(r));this.hasMutatedConstraints=!!a,a&&(r=Dl(a))}return r}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:i,dragTransition:s,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Pe(u=>{if(!mn(u,n,this.currentDirection))return;let f=l&&l[u]||{};r&&(f={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:o?t[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return ii(this.visualElement,t),o.start(es(t,o,0,n,this.visualElement,!1))}stopAnimation(){Pe(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Pe(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),i=o[n];return i||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){Pe(n=>{const{drag:o}=this.getProps();if(!mn(n,o,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];s.set(t[n]-se(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!St(n)||!o||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Pe(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=gg({min:l,max:l},this.constraints[r])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),Pe(r=>{if(!mn(r,t,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(se(l,c,i[r]))})}addListeners(){if(!this.visualElement.current)return;vg.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)}),o=()=>{const{dragConstraints:l}=this.getProps();St(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",o);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),oe.read(o);const r=en(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Pe(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())}));return()=>{r(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:r=ri,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:i,dragConstraints:s,dragElastic:r,dragMomentum:a}}}function mn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function xg(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class wg extends st{constructor(t){super(t),this.removeGroupControls=Me,this.removeListeners=Me,this.controls=new yg(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Me}unmount(){this.removeGroupControls(),this.removeListeners()}}const mr=e=>(t,n)=>{e&&oe.postRender(()=>e(t,n))};class Cg extends st{constructor(){super(...arguments),this.removePointerDownListener=Me}onPointerDown(t){this.session=new ql(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Kl(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:i}=this.node.getProps();return{onSessionStart:mr(t),onStart:mr(n),onMove:o,onEnd:(s,r)=>{delete this.session,i&&oe.postRender(()=>i(s,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 En={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let vo=!1;class bg extends C.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:i}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),o&&o.register&&i&&o.register(s),vo&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),En.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:i,isPresent:s}=this.props,{projection:r}=o;return r&&(r.isPresent=s,vo=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?r.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?r.promote():r.relegate()||oe.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Hi.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:i}=t;vo=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),o&&o.deregister&&o.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Yl(e){const[t,n]=yl(),o=C.useContext(bi);return p.jsx(bg,{...e,layoutGroup:o,switchLayoutGroup:C.useContext(Al),isPresent:t,safeToRemove:n})}function Sg(e,t,n){const o=ge(e)?e:Tt(e);return o.start(es("",o,t,n)),o.animation}const Rg=(e,t)=>e.depth-t.depth;class _g{constructor(){this.children=[],this.isDirty=!1}add(t){_i(this.children,t),this.isDirty=!0}remove(t){Pi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Rg),this.isDirty=!1,this.children.forEach(t)}}function Pg(e,t){const n=xe.now(),o=({timestamp:i})=>{const s=i-n;s>=t&&(et(o),e(s-t))};return oe.setup(o,!0),()=>et(o)}const Zl=["TopLeft","TopRight","BottomLeft","BottomRight"],Eg=Zl.length,pr=e=>typeof e=="string"?parseFloat(e):e,vr=e=>typeof e=="number"||G.test(e);function Mg(e,t,n,o,i,s){i?(e.opacity=se(0,n.opacity??1,Tg(o)),e.opacityExit=se(t.opacity??1,0,Ag(o))):s&&(e.opacity=se(t.opacity??1,n.opacity??1,o));for(let r=0;r<Eg;r++){const a=`border${Zl[r]}Radius`;let l=yr(t,a),c=yr(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||vr(l)===vr(c)?(e[a]=Math.max(se(pr(l),pr(c),o),0),(Oe.test(c)||Oe.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=se(t.rotate||0,n.rotate||0,o))}function yr(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Tg=Jl(0,.5,ja),Ag=Jl(.5,.95,Me);function Jl(e,t,n){return o=>o<e?0:o>t?1:n(Yt(e,t,o))}function xr(e,t){e.min=t.min,e.max=t.max}function De(e,t){xr(e.x,t.x),xr(e.y,t.y)}function wr(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Cr(e,t,n,o,i){return e-=t,e=jn(e,1/n,o),i!==void 0&&(e=jn(e,1/i,o)),e}function Vg(e,t=0,n=1,o=.5,i,s=e,r=e){if(Oe.test(t)&&(t=parseFloat(t),t=se(r.min,r.max,t/100)-r.min),typeof t!="number")return;let a=se(s.min,s.max,o);e===s&&(a-=t),e.min=Cr(e.min,t,n,a,i),e.max=Cr(e.max,t,n,a,i)}function br(e,t,[n,o,i],s,r){Vg(e,t[n],t[o],t[i],t.scale,s,r)}const Dg=["x","scaleX","originX"],kg=["y","scaleY","originY"];function Sr(e,t,n,o){br(e.x,t,Dg,n?n.x:void 0,o?o.x:void 0),br(e.y,t,kg,n?n.y:void 0,o?o.y:void 0)}function Rr(e){return e.translate===0&&e.scale===1}function Ql(e){return Rr(e.x)&&Rr(e.y)}function _r(e,t){return e.min===t.min&&e.max===t.max}function Fg(e,t){return _r(e.x,t.x)&&_r(e.y,t.y)}function Pr(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ec(e,t){return Pr(e.x,t.x)&&Pr(e.y,t.y)}function Er(e){return pe(e.x)/pe(e.y)}function Mr(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Lg{constructor(){this.members=[]}add(t){_i(this.members,t),t.scheduleRender()}remove(t){if(Pi(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(i=>t===i);if(n===0)return!1;let o;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){o=s;break}}return o?(this.promote(o),!0):!1}promote(t,n){const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,n&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:o}=t;n.onExitComplete&&n.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Ig(e,t,n){let o="";const i=e.x.translate/t.x,s=e.y.translate/t.y,r=n?.z||0;if((i||s||r)&&(o=`translate3d(${i}px, ${s}px, ${r}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:d,skewX:h,skewY:m}=n;c&&(o=`perspective(${c}px) ${o}`),u&&(o+=`rotate(${u}deg) `),f&&(o+=`rotateX(${f}deg) `),d&&(o+=`rotateY(${d}deg) `),h&&(o+=`skewX(${h}deg) `),m&&(o+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(o+=`scale(${a}, ${l})`),o||"none"}const yo=["","X","Y","Z"],jg=1e3;let $g=0;function xo(e,t,n,o){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),o&&(o[e]=0))}function tc(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Nl(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",oe,!(i||s))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&tc(o)}function nc({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:i}){return class{constructor(r={},a=t?.()){this.id=$g++,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.layoutVersion=0,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(zg),this.nodes.forEach(Gg),this.nodes.forEach(Ug),this.nodes.forEach(Bg)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=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 _g)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Mi),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=vl(r)&&!Tf(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,f=0;const d=()=>this.root.updateBlockedByResize=!1;oe.read(()=>{f=window.innerWidth}),e(r,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,u&&u(),u=Pg(d,250),En.hasAnimatedSinceResize&&(En.hasAnimatedSinceResize=!1,this.nodes.forEach(Vr)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||Zg,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=c.getProps(),x=!this.targetLayout||!ec(this.targetLayout,h),w=!f&&d;if(this.options.layoutRoot||this.resumeFrom||w||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...zi(m,"layout"),onPlay:g,onComplete:y};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,w)}else f||Vr(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(),et(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(Kg),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&&tc(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.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(Tr);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ar);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Wg),this.nodes.forEach(Og),this.nodes.forEach(Ng)):this.nodes.forEach(Ar),this.clearAllSnapshots();const a=xe.now();fe.delta=Ue(0,1e3/60,a-fe.timestamp),fe.timestamp=a,fe.isProcessing=!0,ro.update.process(fe),ro.preRender.process(fe),ro.render.process(fe),fe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Hi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Hg),this.sharedNodes.forEach(qg)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,oe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){oe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!pe(this.snapshot.measuredBox.x)&&!pe(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.layoutVersion++,this.layoutCorrected=ce(),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=o(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(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ql(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(a||at(this.latestValues)||u)&&(i(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)),Jg(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return ce();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Qg))){const{scroll:c}=this.root;c&&(Rt(a.x,c.offset.x),Rt(a.y,c.offset.y))}return a}removeElementScroll(r){const a=ce();if(De(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;c!==this.root&&u&&f.layoutScroll&&(u.wasRoot&&De(a,r),Rt(a.x,u.offset.x),Rt(a.y,u.offset.y))}return a}applyTransform(r,a=!1){const l=ce();De(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&&_t(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),at(u.latestValues)&&_t(l,u.latestValues)}return at(this.latestValues)&&_t(l,this.latestValues),l}removeTransform(r){const a=ce();De(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!at(c.latestValues))continue;ei(c.latestValues)&&c.updateSnapshot();const u=ce(),f=c.measurePageBox();De(u,f),Sr(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return at(this.latestValues)&&Sr(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!==fe.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:f}=this.options;if(!this.layout||!(u||f))return;this.resolvedRelativeTargetAt=fe.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ce(),this.targetWithTransforms=ce()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ag(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):De(this.target,this.layout.layoutBox),Fl(this.target,this.targetDelta)):De(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||ei(this.parent.latestValues)||kl(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,a,l){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ce(),this.relativeTargetOrigin=ce(),$n(this.relativeTargetOrigin,a,l),De(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}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===fe.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;De(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;xh(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=ce());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(wr(this.prevProjectionDelta.x,this.projectionDelta.x),wr(this.prevProjectionDelta.y,this.projectionDelta.y)),Kt(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!Mr(this.projectionDelta.x,this.prevProjectionDelta.x)||!Mr(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=Pt(),this.projectionDelta=Pt(),this.projectionDeltaWithTransform=Pt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=Pt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=ce(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=h!==m,y=this.getStack(),x=!y||y.members.length<=1,w=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(Yg));this.animationProgress=0;let v;this.mixTargetDelta=S=>{const b=S/1e3;Dr(f.x,r.x,b),Dr(f.y,r.y,b),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($n(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Xg(this.relativeTarget,this.relativeTargetOrigin,d,b),v&&Fg(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=ce()),De(v,this.relativeTarget)),g&&(this.animationValues=u,Mg(u,c,this.latestValues,b,w,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(et(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=oe.update(()=>{En.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Tt(0)),this.currentAnimation=Sg(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(jg),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&&oc(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||ce();const f=pe(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+f;const d=pe(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+d}De(a,l),_t(a,u),Kt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Lg),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&&xo("z",r,c,this.animationValues);for(let u=0;u<yo.length;u++)xo(`rotate${yo[u]}`,r,c,this.animationValues),xo(`skew${yo[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=Pn(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=Pn(a?.pointerEvents)||""),this.hasProjected&&!at(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let f=Ig(this.projectionDeltaWithTransform,this.treeScale,u);l&&(f=l(u,f)),r.transform=f;const{x:d,y:h}=this.projectionDelta;r.transformOrigin=`${d.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 m in Qo){if(u[m]===void 0)continue;const{correct:g,applyTo:y,isCSSVariable:x}=Qo[m],w=f==="none"?u[m]:g(u[m],c);if(y){const v=y.length;for(let S=0;S<v;S++)r[y[S]]=w}else x?this.options.visualElement.renderState.vars[m]=w:r[m]=w}this.options.layoutId&&(r.pointerEvents=c===this?Pn(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Tr),this.root.sharedNodes.clear()}}}function Og(e){e.updateLayout()}function Ng(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:o}=e.layout,{animationType:i}=e.options,s=t.source!==e.layout.source;i==="size"?Pe(u=>{const f=s?t.measuredBox[u]:t.layoutBox[u],d=pe(f);f.min=n[u].min,f.max=f.min+d}):oc(i,t.layoutBox,n)&&Pe(u=>{const f=s?t.measuredBox[u]:t.layoutBox[u],d=pe(n[u]);f.max=f.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+d)});const r=Pt();Kt(r,n,t.layoutBox);const a=Pt();s?Kt(a,e.applyTransform(o,!0),t.measuredBox):Kt(a,n,t.layoutBox);const l=!Ql(r);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:f,layout:d}=u;if(f&&d){const h=ce();$n(h,t.layoutBox,f.layoutBox);const m=ce();$n(m,n,d.layoutBox),ec(h,m)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=m,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 zg(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 Bg(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Hg(e){e.clearSnapshot()}function Tr(e){e.clearMeasurements()}function Ar(e){e.isLayoutDirty=!1}function Wg(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Vr(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Gg(e){e.resolveTargetDelta()}function Ug(e){e.calcProjection()}function Kg(e){e.resetSkewAndRotation()}function qg(e){e.removeLeadSnapshot()}function Dr(e,t,n){e.translate=se(t.translate,0,n),e.scale=se(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function kr(e,t,n,o){e.min=se(t.min,n.min,o),e.max=se(t.max,n.max,o)}function Xg(e,t,n,o){kr(e.x,t.x,n.x,o),kr(e.y,t.y,n.y,o)}function Yg(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Zg={duration:.45,ease:[.4,0,.1,1]},Fr=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Lr=Fr("applewebkit/")&&!Fr("chrome/")?Math.round:Me;function Ir(e){e.min=Lr(e.min),e.max=Lr(e.max)}function Jg(e){Ir(e.x),Ir(e.y)}function oc(e,t,n){return e==="position"||e==="preserve-aspect"&&!rg(Er(t),Er(n),.2)}function Qg(e){return e!==e.root&&e.scroll?.wasRoot}const em=nc({attachResizeListener:(e,t)=>en(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),wo={current:void 0},ic=nc({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!wo.current){const e=new em({});e.mount(window),e.setOptions({layoutScroll:!0}),wo.current=e}return wo.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),tm={pan:{Feature:Cg},drag:{Feature:wg,ProjectionNode:ic,MeasureLayout:Yl}};function jr(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=o[i];s&&oe.postRender(()=>s(t,an(t)))}class nm extends st{mount(){const{current:t}=this.node;t&&(this.unmount=Rf(t,(n,o)=>(jr(this.node,o,"Start"),i=>jr(this.node,i,"End"))))}unmount(){}}class om extends st{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=on(en(this.node.current,"focus",()=>this.onFocus()),en(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function $r(e,t,n){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=o[i];s&&oe.postRender(()=>s(t,an(t)))}class im extends st{mount(){const{current:t}=this.node;t&&(this.unmount=Mf(t,(n,o)=>($r(this.node,o,"Start"),(i,{success:s})=>$r(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ai=new WeakMap,Co=new WeakMap,sm=e=>{const t=ai.get(e.target);t&&t(e)},rm=e=>{e.forEach(sm)};function am({root:e,...t}){const n=e||document;Co.has(n)||Co.set(n,{});const o=Co.get(n),i=JSON.stringify(t);return o[i]||(o[i]=new IntersectionObserver(rm,{root:e,...t})),o[i]}function lm(e,t,n){const o=am(t);return ai.set(e,n),o.observe(e),()=>{ai.delete(e),o.unobserve(e)}}const cm={some:0,all:1};class um extends st{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:i="some",once:s}=t,r={root:n?n.current:void 0,rootMargin:o,threshold:typeof i=="number"?i:cm[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=c?u:f;d&&d(l)};return lm(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(dm(t,n))&&this.startObserver()}unmount(){}}function dm({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const fm={inView:{Feature:um},tap:{Feature:im},focus:{Feature:om},hover:{Feature:nm}},hm={layout:{ProjectionNode:ic,MeasureLayout:Yl}},gm={...eg,...fm,...tm,...hm},Kn=ph(gm,Th),mm="_primary_13825_8",pm="_secondary_13825_12",vm="_tertiary_13825_16",ym="_positive_13825_20",xm="_negative_13825_24",wm="_warning_13825_28",Cm="_accent_13825_32",bm="_inverse_13825_36",Sm="_text_13825_111",Rm="_regular_13825_117",_m="_medium_13825_121",Pm="_semibold_13825_125",Em="_bold_13825_129",pn={primary:mm,secondary:pm,tertiary:vm,positive:ym,negative:xm,warning:wm,accent:Cm,inverse:bm,"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:Sm,regular:Rm,medium:_m,semibold:Pm,bold:Em},Mm=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"),V.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})},K=C.forwardRef(({children:e,className:t,variant:n="body-1",fontWeight:o="medium",tag:i="p",colorName:s="primary",style:r,clickOpacity:a=.5,opacityDuration:l=200,onClick:c,disabled:u,mt:f,mb:d,ml:h,mr:m,flex:g,cursor:y,wordBreak:x,whiteSpace:w,textOverflow:v,decoration:S,color:b,center:M,left:T,right:E,uppercase:D,lowercase:F,capitalize:$,overflow:O,...j},k)=>{const[N,B]=C.useState(!1),P=!!c,_=()=>P&&B(!0),A=()=>P&&B(!1),I=Mm({mt:f,mb:d,ml:h,mr:m,flex:g,cursor:y,wordBreak:x,whiteSpace:w,textOverflow:v,decoration:S,color:b,center:M,left:T,right:E,uppercase:D,lowercase:F,capitalize:$,overflow:O}),X=i,U=P?V.css({opacity:N?a:1,transition:`opacity ${l}ms ease`}):"";return p.jsx(X,{ref:k,...j,className:V.cx(pn.text,pn[n],pn[s],pn[o],U,t,I),style:r,onClick:c,onMouseDown:_,onMouseUp:A,onMouseLeave:A,onTouchStart:_,onTouchEnd:A,role:P?"button":void 0,tabIndex:P?0:void 0,children:e})});K.displayName="Text";const sc=Kn(K),Tm=V.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}),zt={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)"},Am={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},Vm={clear:V.css({backgroundColor:"transparent",border:"none"}),filled:V.css({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:V.css({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},Dm=(e,t,n,o)=>{if(o)return V.css({cursor:"not-allowed",opacity:.7});const i={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 V.css({...i,backgroundColor:`var(--fill-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${t}-${n}-hover)`}});case"outline":return V.css({...i,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 V.css({...i,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});default:return V.css(i)}},li=({disabled:e,loading:t,wrapperClassName:n,buttonClassName:o,buttonDisabledClassName:i,textClassName:s,children:r,variant:a="filled",backgroundColor:l,textColor:c,textFontWeight:u,borderColor:f,color:d="accent",opacity:h,borderRadius:m,width:g="full",size:y="md",iconLeft:x,iconRight:w,intensity:v="primary",flex:S,type:b="button",...M})=>{const T=C.useMemo(()=>{switch(g){case"full":return"100%";case"auto":return"auto";default:return g}},[g]),E=C.useMemo(()=>l||(a==="filled"?d==="neutral"?"var(--fill-neutral-secondary)":`var(--fill-${d}-${v})`:"transparent"),[a,l,d,v]),D=C.useMemo(()=>{if(v==="primary"){if(d==="neutral")return"var(--text-secondary)";if(a==="filled")return"var(--text-inverse)"}else if(d==="neutral")return"var(--text-secondary)";return`var(--text-${d})`},[v,d,a]),F=C.useMemo(()=>{if(v==="primary"){if(d==="neutral")return"secondary";if(a==="filled")return"inverse"}else if(d==="neutral")return"secondary";return d},[a,d,v]),$=C.useMemo(()=>f||(a==="outline"?`var(--border-${d}-${v})`:"transparent"),[a,f,d,v]),O=C.useMemo(()=>{switch(y){case"lg":return zt.lg;case"md":case"sm":return zt.md;case"xs":return zt.sm;default:return zt.md}},[y]),j=V.cx(Tm,Dm(a,d,v,e),Vm[a],e?i:void 0,V.css({borderRadius:m?zt[m]:O,backgroundColor:E,borderColor:$,color:c,width:"100%",height:Am[y],opacity:h||(e?.7:1)}),o),k=C.useMemo(()=>{switch(y){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[y]);return p.jsx(L,{className:V.cx(n),w:T,flex:S,relative:!0,overflow:"hidden",children:p.jsxs(Kn.button,{...M,whileTap:!e&&!t?{scale:.99,boxShadow:"inset 0 0 0 10000px rgba(0,0,0,0.1)",transition:{duration:0}}:{},disabled:e||t,className:j,children:[t?p.jsx(Ca,{color:D}):p.jsxs(p.Fragment,{children:[x,p.jsx(sc,{style:{color:c},colorName:F,variant:k,className:s,textOverflow:"ellipsis",overflow:"hidden",children:r}),w]}),p.jsx(gt,{})]})})},km=e=>R.createElement("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",...e},R.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),Fm=e=>R.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...e},R.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),Lm="_checkbox_22ifd_8",Im="_disabled_22ifd_14",jm="_checkbox__ripple_22ifd_14",$m="_checkbox__input_22ifd_26",Om="_checkbox__box_22ifd_33",Nm="_secondary_22ifd_46",zm="_checked_22ifd_52",Bm="_error_22ifd_61",Be={checkbox:Lm,disabled:Im,checkbox__ripple:jm,checkbox__input:$m,checkbox__box:Om,secondary:Nm,checked:zm,error:Bm},Hm={sm:20,md:24},ts=C.forwardRef(({checked:e,onChange:t,disabled:n,error:o,indeterminate:i,size:s="md",title:r,titleColor:a,subtitle:l,subtitleColor:c="secondary",name:u,required:f,variant:d="primary",flex:h,readOnly:m},g)=>{const[y,x]=C.useState(!1),w=e!==void 0,v=w?e:y,S=D=>{w||x(D.target.checked),t?.(D)},b=Hm[s],M=v||i,T=!!m&&!n,E=n?"not-allowed":T?"auto":"pointer";return p.jsxs("label",{className:V.cx(Be.checkbox,V.css({flex:h,cursor:E}),{[Be.disabled]:n}),children:[p.jsxs(L,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${b}px`,"--checkbox-size-double":`${b*2}px`},children:[p.jsx("input",{ref:g,type:"checkbox",checked:v,onChange:T?void 0:S,onClick:D=>D.stopPropagation(),disabled:n,readOnly:T,name:u,required:f,className:V.cx(Be.checkbox__input,{[Be.disabled]:n},V.css({cursor:E}))}),p.jsx("div",{className:V.cx(Be.checkbox__box,Be[d],{[Be.disabled]:n,[Be.error]:o,[Be.checked]:M}),children:M&&(i?p.jsx(Fm,{width:b*.75,height:b*.75}):p.jsx(km,{width:b*.75,height:b*.75}))})]}),(r||l)&&p.jsxs(L,{gap:4,children:[r&&p.jsx(K,{colorName:a,variant:s==="sm"?"body-2":"body-1",children:r}),l&&p.jsx(K,{variant:"body-2",colorName:c,children:l})]})]})});ts.displayName="Checkbox";const Wm=e=>R.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("g",{opacity:.5},R.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"}))),Gm="_disabled_19ujt_20",Um="_multiline_19ujt_24",Km="_input_19ujt_8",qm="_sm_19ujt_74",Xm="_md_19ujt_79",Ym="_error_19ujt_84",Zm="_white_19ujt_88",Jm="_gray_19ujt_92",ye={"input-container":"_input-container_19ujt_8",disabled:Gm,multiline:Um,input:Km,"input-text-size_sm":"_input-text-size_sm_19ujt_55","input-text-size_md":"_input-text-size_md_19ujt_59","input-text-align_left":"_input-text-align_left_19ujt_64","input-text-align_center":"_input-text-align_center_19ujt_67","input-text-align_right":"_input-text-align_right_19ujt_70",sm:qm,md:Xm,error:Ym,white:Zm,gray:Jm,"clear-button":"_clear-button_19ujt_96"};function Or(e){return{...new Event("input",{bubbles:!0}),target:e,currentTarget:e}}const rc=C.forwardRef((e,t)=>{const{label:n,prompt:o,error:i,errorText:s,size:r="md",prefix:a,suffix:l,background:c="white",showClearButton:u,disabled:f,value:d,defaultValue:h,inputClassName:m,textAlign:g="left",...y}=e,x=e.multiline===!0,w=C.useRef(null),v=C.useRef(null),[S,b]=mt(typeof d=="string"||typeof d=="number"?String(d):void 0,typeof h=="string"||typeof h=="number"?String(h):"");C.useImperativeHandle(t,()=>({focus:()=>{w.current?.focus(),v.current?.focus()},blur:()=>{w.current?.blur(),v.current?.blur()},get value(){return w.current?.value||v.current?.value},set value(D){b(D),w.current&&(w.current.value=D),v.current&&(v.current.value=D)}}));const M=D=>{if(b(D.target.value),x){const F=e.onChange;F?.(D)}else{const F=e.onChange;F?.(D)}};C.useEffect(()=>{x&&e.autoResize&&v.current&&(v.current.style.height="auto",v.current.style.height=`${v.current.scrollHeight}px`)},[S,x,e.autoResize]);const T=()=>{if(b(""),!x){const F=w.current;if(F){F.value="";const $=Or(F),O=e.onChange;O?.($)}return}const D=v.current;if(D){D.value="";const F=Or(D),$=e.onChange;$?.(F)}},E=()=>{if(x){const{rows:O,autoResize:j,onChange:k,multiline:N,...B}=y;return p.jsx("textarea",{ref:v,rows:e.rows??3,className:V.cx(ye.input,m,{[ye.disabled]:f,[ye[`input-text-align_${g}`]]:!!g}),disabled:f,maxLength:e.maxLength,...B,value:S,onChange:M})}const{onChange:D,multiline:F,...$}=y;return p.jsx("input",{...$,ref:w,className:V.cx(ye.input,ye[`input-text-size_${r}`],m,{[ye.disabled]:f,[ye[`input-text-align_${g}`]]:!!g}),disabled:f,type:e.type??"text",value:S,onChange:M})};return p.jsxs(L,{w:"full",gap:"var(--spacing-sm)",children:[n&&p.jsx(K,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:n}),p.jsxs(L,{row:!0,alignItems:x?"flex-start":"center",w:"full",gap:"var(--spacing-md)",className:V.cx(ye["input-container"],ye[c],ye[r],{[ye.error]:i,[ye.disabled]:f,[ye.multiline]:x}),children:[a&&p.jsx(L,{flex:"none",children:a}),p.jsx(L,{flex:"1",children:E()}),u&&S&&!f&&p.jsx(L,{flex:"none",children:p.jsx("span",{className:ye["clear-button"],onClick:T,children:p.jsx(Wm,{})})}),l&&p.jsx(L,{flex:"none",children:l})]}),(o||x)&&p.jsxs(L,{row:!0,gap:10,w:"full",children:[typeof o=="string"?p.jsx(K,{variant:"caption-1",colorName:"tertiary",children:o}):o,x&&e.maxLength&&p.jsx(K,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${S.length}/${e.maxLength}`})]}),s&&i&&p.jsx(K,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:s})]})});rc.displayName="Input";const Qm="_input_5xq63_8",ep="_disabled_5xq63_29",tp="_error_5xq63_37",np="_success_5xq63_41",op="_white_5xq63_50",ip="_gray_5xq63_54",sp="_glow_5xq63_58",vt={input:Qm,disabled:ep,error:tp,success:np,white:op,gray:ip,glow:sp};function rp(e){const t=C.useRef(void 0);return C.useEffect(()=>{t.current=e},[e]),t.current}const ac=C.forwardRef(({length:e=6,label:t,prompt:n,error:o,errorText:i,success:s,disabled:r,autoFocus:a,center:l,secure:c,loading:u,background:f="gray",numeric:d=!0,className:h,value:m,defaultValue:g,onChange:y,onComplete:x},w)=>{const v=typeof m=="string",S=v?m:g,b=typeof S=="string"?S.slice(0,e):"",[M,T]=mt(v?m:void 0,b),[E,D]=C.useState(()=>{const P=b.slice(0,e);return Array.from({length:e},(_,A)=>P[A]??"")}),F=C.useRef(void 0),$=rp(m),O=C.useRef([]);C.useEffect(()=>{if(!v)return;const P=m??"";if(P===$)return;if(P===F.current){F.current=void 0;return}const _=P.slice(0,e);D(Array.from({length:e},(A,I)=>_[I]??""))},[v,m,e,$]);const j=C.useCallback((P,_)=>{const A=P.slice(0,e);_?.fromInternal&&(F.current=A),T(A),y?.(A),A.length===e&&x?.(A)},[e,y,x,T]);C.useImperativeHandle(w,()=>({focus:()=>{O.current[0]?.focus()},blur:()=>{O.current.forEach(P=>P?.blur())},get value(){return M||""},setValue:P=>{const _=P.slice(0,e);D(Array.from({length:e},(A,I)=>_[I]??"")),j(_,{fromInternal:!0})},clear:()=>{D(Array.from({length:e},()=>"")),j("",{fromInternal:!0})}}),[e,j,M]);const k=C.useCallback((P,_)=>{if(r)return;let A=_;if(d&&(A=A.replace(/\D/g,"")),A.length>1){const q=E.slice(0,P).join("")+A+E.slice(P+1).join(""),Q=Array.from({length:e},(le,Ce)=>q[Ce]??"");D(Q),j(q,{fromInternal:!0});const Z=Math.min(P+A.length,e-1),ne=O.current[Z];ne?.focus(),ne?.select();return}const I=E[P],X=[...E];X[P]=A,D(X);const U=X.join("");if(j(U,{fromInternal:!0}),!I&&A&&P<e-1){const q=O.current[P+1];q?.focus(),q?.select()}},[E,r,e,d,j]),N=C.useCallback((P,_)=>{if(!r){if(_.key==="Backspace"){_.preventDefault();const A=O.current[P];if(E[P]){const I=[...E];I[P]="",D(I),j(I.join(""),{fromInternal:!0}),A?.focus();return}if(P>0){const I=O.current[P-1];I?.focus(),I?.select()}return}_.key==="ArrowLeft"&&P>0&&(_.preventDefault(),O.current[P-1]?.focus()),_.key==="ArrowRight"&&P<e-1&&(_.preventDefault(),O.current[P+1]?.focus())}},[E,r,e,j]),B=C.useCallback((P,_)=>{if(r)return;_.preventDefault();let A=_.clipboardData.getData("text");if(d&&(A=A.replace(/\D/g,"")),!A)return;const I=e-P,X=Math.min(A.length,I),U=A.slice(0,X),q=[...E];for(let le=0;le<X;le++)q[P+le]=U[le]??"";D(q);const Q=q.join("");j(Q,{fromInternal:!0});const Z=Math.min(P+X-1,e-1),ne=O.current[Z];ne?.focus(),ne?.select()},[E,r,e,d,j]);return p.jsxs(L,{w:"full",gap:"var(--spacing-sm)",className:h,center:l,children:[t&&p.jsx(K,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:t}),p.jsx(L,{row:!0,w:"full",gap:"var(--spacing-sm)",center:l,className:V.cx({[vt.disabled]:r}),children:Array.from({length:e}).map((P,_)=>p.jsxs(L,{relative:!0,display:"inline-block",children:[p.jsx("input",{ref:A=>{O.current[_]=A},className:V.cx(vt.input,vt[f],o&&vt.error,s&&vt.success,E[_]&&V.css({caretColor:"transparent"})),inputMode:d?"numeric":"text",type:c?"password":"text",maxLength:1,autoFocus:a&&_===0,disabled:r||u,value:E[_],onChange:A=>k(_,A.target.value),onKeyDown:A=>N(_,A),onPaste:A=>B(_,A)}),p.jsx(Kn.span,{className:vt.glow,variants:ap,custom:_,initial:"idle",animate:u?"wave":"idle"})]},_))}),n&&p.jsx(K,{variant:"caption-1",colorName:"tertiary",children:n}),i&&o&&p.jsx(K,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:i})]})}),ap={idle:{opacity:0,scale:1,transition:{duration:.18}},wave:(e=0)=>({opacity:[0,.2,0],scale:[1,1.03,1],transition:{duration:1.5,delay:e*.15,repeat:1/0,ease:[.42,0,.58,1]}})};ac.displayName="OtpInput";const lc=C.createContext(null),lp=()=>C.useContext(lc),cp="_radio_zru2j_8",up="_disabled_zru2j_16",dp="_side_right_zru2j_21",Bt={radio:cp,disabled:up,side_right:dp,"read-only":"_read-only_zru2j_26"},Nr={sm:{inner:12,outer:20},md:{inner:16,outer:24}},cc=C.forwardRef(({value:e,children:t,checked:n,defaultChecked:o,onChange:i,disabled:s,className:r,description:a,size:l,side:c,readOnly:u,error:f},d)=>{const h=lp(),m=!!h,g=n!==void 0,[y,x]=mt(n,o),w=m?h.value===e:g?n:y,v=h?.disabled||s,S=l??h?.size??"md",b=c??h?.side??"left",M=u??h?.readOnly??!1,T=f??h?.error??!1,E=Nr[S].outer,D=Nr[S].inner,F=()=>{v||M||(m?h.setValue?.(e):(g||x(!w),i?.(!w)))},$=w&&T?"var(--fill-negative-tint)":w?"var(--fill-accent-tint)":"var(--fill-bg-secondary)",O=w&&T?"var(--fill-negative-primary)":w?"var(--fill-accent-primary)":void 0,j=w&&T||T&&!w?"var(--border-negative-secondary)":"var(--border-neutral-alpha-low)";return p.jsxs("button",{ref:d,role:"radio",type:"button","data-value":e,"aria-checked":w,"aria-disabled":v||void 0,tabIndex:w?0:-1,className:V.cx([Bt.radio,w&&Bt.checked,v&&Bt.disabled,b==="right"&&Bt.side_right,M&&Bt["read-only"],r]),onClick:F,children:[p.jsx(L,{w:E,h:E,backgroundColor:$,borderWidth:w?0:1,borderColor:j,borderStyle:"solid",center:!0,borderRadius:"var(--corner-full-round)",children:p.jsx(L,{w:D,h:D,backgroundColor:O,borderRadius:"var(--corner-full-round)","aria-hidden":!0})}),p.jsxs(L,{alignItems:"flex-start",children:[p.jsx(K,{variant:S==="sm"?"body-2":"body-1",tag:"span",left:!0,children:t}),a&&p.jsx(K,{tag:"span",variant:"body-2",colorName:"secondary",children:a})]})]})});cc.displayName="Radio";const uc=C.forwardRef(({label:e,value:t,defaultValue:n,onChange:o,children:i,className:s,error:r=!1,disabled:a=!1,readOnly:l=!1,side:c="left",size:u="md"},f)=>{const[d,h]=mt(t,n),m=t!==void 0,g=m?t:d,y=C.useCallback(w=>{m||h(w),o?.(w)},[m,o,h]),x=C.useRef(null);return C.useImperativeHandle(f,()=>x.current),p.jsx(lc.Provider,{value:{value:g,readOnly:l,disabled:a,setValue:y,size:u,side:c,error:r},children:p.jsxs(L,{gap:"var(--spacing-sm)",ref:x,role:"radiogroup","aria-invalid":r||void 0,className:s,children:[typeof e=="string"?p.jsx(K,{colorName:"secondary",children:e}):e,p.jsx(L,{gap:"var(--spacing-lg)",children:i})]})})});uc.displayName="RadioGroup";const fp="_primary_svt6d_8",hp="_secondary_svt6d_13",gp="_button_svt6d_18",Ye={primary:fp,secondary:hp,button:gp,"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 mp({value:e,onChange:t,options:n,variant:o="primary",fullWidth:i=!1,className:s}){return p.jsx(L,{row:!0,alignItems:"center",borderRadius:"var(--corner-md)",p:"var(--spacing-xs)",gap:"var(--spacing-md)",className:V.cx(Ye[o],i&&Ye["full-width"],s),children:n.map(r=>{const a=r.value===e,l=r.disabled,c=r.separatorAfter??!1;return p.jsxs(C.Fragment,{children:[p.jsxs("button",{type:"button",disabled:l,className:V.cx(Ye.button,i&&Ye["full-width"],a&&Ye["button-active"],a&&Ye[`button-${o}`],l&&Ye["button-disabled"]),onClick:()=>!l&&t(r.value),children:[r.icon&&p.jsx(L,{alignItems:"center",justifyContent:"center",className:Ye["icon-container"],children:r.icon}),r.label&&p.jsx(K,{colorName:a?"primary":"tertiary",children:r.label}),!l&&p.jsx(gt,{color:"var(--fill-bg-overlay-primary)"})]}),c&&p.jsx(L,{w:1,h:24,backgroundColor:"var(--fill-bg-tertiary)"})]},r.value)})})}function qn(){return typeof window<"u"}function It(e){return dc(e)?(e.nodeName||"").toLowerCase():"#document"}function we(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ze(e){var t;return(t=(dc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dc(e){return qn()?e instanceof Node||e instanceof we(e).Node:!1}function ee(e){return qn()?e instanceof Element||e instanceof we(e).Element:!1}function ve(e){return qn()?e instanceof HTMLElement||e instanceof we(e).HTMLElement:!1}function ci(e){return!qn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof we(e).ShadowRoot}const pp=new Set(["inline","contents"]);function ln(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!pp.has(i)}const vp=new Set(["table","td","th"]);function yp(e){return vp.has(It(e))}const xp=[":popover-open",":modal"];function Xn(e){return xp.some(t=>{try{return e.matches(t)}catch{return!1}})}const wp=["transform","translate","scale","rotate","perspective"],Cp=["transform","translate","scale","rotate","perspective","filter"],bp=["paint","layout","strict","content"];function ns(e){const t=Yn(),n=ee(e)?Te(e):e;return wp.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Cp.some(o=>(n.willChange||"").includes(o))||bp.some(o=>(n.contain||"").includes(o))}function Sp(e){let t=Xe(e);for(;ve(t)&&!Ge(t);){if(ns(t))return t;if(Xn(t))return null;t=Xe(t)}return null}function Yn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Rp=new Set(["html","body","#document"]);function Ge(e){return Rp.has(It(e))}function Te(e){return we(e).getComputedStyle(e)}function Zn(e){return ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xe(e){if(It(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ci(e)&&e.host||ze(e);return ci(t)?t.host:t}function fc(e){const t=Xe(e);return Ge(t)?e.ownerDocument?e.ownerDocument.body:e.body:ve(t)&&ln(t)?t:fc(t)}function Qe(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=fc(e),s=i===((o=e.ownerDocument)==null?void 0:o.body),r=we(i);if(s){const a=ui(r);return t.concat(r,r.visualViewport||[],ln(i)?i:[],a&&n?Qe(a):[])}return t.concat(i,Qe(i,[],n))}function ui(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const nt=Math.min,be=Math.max,On=Math.round,vn=Math.floor,Ne=e=>({x:e,y:e}),_p={left:"right",right:"left",bottom:"top",top:"bottom"},Pp={start:"end",end:"start"};function di(e,t,n){return be(e,nt(t,n))}function jt(e,t){return typeof e=="function"?e(t):e}function ot(e){return e.split("-")[0]}function $t(e){return e.split("-")[1]}function hc(e){return e==="x"?"y":"x"}function os(e){return e==="y"?"height":"width"}const Ep=new Set(["top","bottom"]);function We(e){return Ep.has(ot(e))?"y":"x"}function is(e){return hc(We(e))}function Mp(e,t,n){n===void 0&&(n=!1);const o=$t(e),i=is(e),s=os(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Nn(r)),[r,Nn(r)]}function Tp(e){const t=Nn(e);return[fi(e),t,fi(t)]}function fi(e){return e.replace(/start|end/g,t=>Pp[t])}const zr=["left","right"],Br=["right","left"],Ap=["top","bottom"],Vp=["bottom","top"];function Dp(e,t,n){switch(e){case"top":case"bottom":return n?t?Br:zr:t?zr:Br;case"left":case"right":return t?Ap:Vp;default:return[]}}function kp(e,t,n,o){const i=$t(e);let s=Dp(ot(e),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),t&&(s=s.concat(s.map(fi)))),s}function Nn(e){return e.replace(/left|right|bottom|top/g,t=>_p[t])}function Fp(e){return{top:0,right:0,bottom:0,left:0,...e}}function gc(e){return typeof e!="number"?Fp(e):{top:e,right:e,bottom:e,left:e}}function zn(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function Lp(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Ip(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:o}=t;return n+"/"+o}).join(" "):navigator.userAgent}function jp(){return/apple/i.test(navigator.vendor)}function $p(){return Lp().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Op(){return Ip().includes("jsdom/")}const Hr="data-floating-ui-focusable",Np="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Wr(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function tn(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ci(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function xt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function bo(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function zp(e){return e.matches("html,body")}function ut(e){return e?.ownerDocument||document}function mc(e){return ve(e)&&e.matches(Np)}function Bp(e){if(!e||Op())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Hp(e){return e?e.hasAttribute(Hr)?e:e.querySelector("["+Hr+"]")||e:null}function Mn(e,t,n){return n===void 0&&(n=!0),e.filter(i=>{var s;return i.parentId===t&&(!n||((s=i.context)==null?void 0:s.open))}).flatMap(i=>[i,...Mn(e,i.id,n)])}function Wp(e){return"nativeEvent"in e}function nn(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var Gp=typeof document<"u",Up=function(){},Vt=Gp?C.useLayoutEffect:Up;const Kp={...R};function yn(e){const t=R.useRef(e);return Vt(()=>{t.current=e}),t}const qp=Kp.useInsertionEffect,Xp=qp||(e=>e());function $e(e){const t=R.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Xp(()=>{t.current=e}),R.useCallback(function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return t.current==null?void 0:t.current(...o)},[])}function Gr(e,t,n){let{reference:o,floating:i}=e;const s=We(t),r=is(t),a=os(r),l=ot(t),c=s==="y",u=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,d=o[a]/2-i[a]/2;let h;switch(l){case"top":h={x:u,y:o.y-i.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-i.width,y:f};break;default:h={x:o.x,y:o.y}}switch($t(t)){case"start":h[r]-=d*(n&&c?-1:1);break;case"end":h[r]+=d*(n&&c?-1:1);break}return h}const Yp=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,a=s.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(t));let c=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:f}=Gr(c,o,l),d=o,h={},m=0;for(let g=0;g<a.length;g++){const{name:y,fn:x}=a[g],{x:w,y:v,data:S,reset:b}=await x({x:u,y:f,initialPlacement:o,placement:d,strategy:i,middlewareData:h,rects:c,platform:r,elements:{reference:e,floating:t}});u=w??u,f=v??f,h={...h,[y]:{...h[y],...S}},b&&m<=50&&(m++,typeof b=="object"&&(b.placement&&(d=b.placement),b.rects&&(c=b.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):b.rects),{x:u,y:f}=Gr(c,d,l)),g=-1)}return{x:u,y:f,placement:d,strategy:i,middlewareData:h}};async function ss(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:s,rects:r,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=jt(t,e),m=gc(h),y=a[d?f==="floating"?"reference":"floating":f],x=zn(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),w=f==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},b=zn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:v,strategy:l}):w);return{top:(x.top-b.top+m.top)/S.y,bottom:(b.bottom-x.bottom+m.bottom)/S.y,left:(x.left-b.left+m.left)/S.x,right:(b.right-x.right+m.right)/S.x}}const Zp=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:s,platform:r,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=jt(e,t)||{};if(c==null)return{};const f=gc(u),d={x:n,y:o},h=is(i),m=os(h),g=await r.getDimensions(c),y=h==="y",x=y?"top":"left",w=y?"bottom":"right",v=y?"clientHeight":"clientWidth",S=s.reference[m]+s.reference[h]-d[h]-s.floating[m],b=d[h]-s.reference[h],M=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c));let T=M?M[v]:0;(!T||!await(r.isElement==null?void 0:r.isElement(M)))&&(T=a.floating[v]||s.floating[m]);const E=S/2-b/2,D=T/2-g[m]/2-1,F=nt(f[x],D),$=nt(f[w],D),O=F,j=T-g[m]-$,k=T/2-g[m]/2+E,N=di(O,k,j),B=!l.arrow&&$t(i)!=null&&k!==N&&s.reference[m]/2-(k<O?F:$)-g[m]/2<0,P=B?k<O?k-O:k-j:0;return{[h]:d[h]+P,data:{[h]:N,centerOffset:k-N-P,...B&&{alignmentOffset:P}},reset:B}}}),Jp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=jt(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=ot(i),w=We(a),v=ot(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),b=d||(v||!g?[Nn(a)]:Tp(a)),M=m!=="none";!d&&M&&b.push(...kp(a,g,m,S));const T=[a,...b],E=await ss(t,y),D=[];let F=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&D.push(E[x]),f){const k=Mp(i,r,S);D.push(E[k[0]],E[k[1]])}if(F=[...F,{placement:i,overflows:D}],!D.every(k=>k<=0)){var $,O;const k=((($=s.flip)==null?void 0:$.index)||0)+1,N=T[k];if(N&&(!(f==="alignment"?w!==We(N):!1)||F.every(_=>We(_.placement)===w?_.overflows[0]>0:!0)))return{data:{index:k,overflows:F},reset:{placement:N}};let B=(O=F.filter(P=>P.overflows[0]<=0).sort((P,_)=>P.overflows[1]-_.overflows[1])[0])==null?void 0:O.placement;if(!B)switch(h){case"bestFit":{var j;const P=(j=F.filter(_=>{if(M){const A=We(_.placement);return A===w||A==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(A=>A>0).reduce((A,I)=>A+I,0)]).sort((_,A)=>_[1]-A[1])[0])==null?void 0:j[0];P&&(B=P);break}case"initialPlacement":B=a;break}if(i!==B)return{reset:{placement:B}}}return{}}}},Qp=new Set(["left","top"]);async function ev(e,t){const{placement:n,platform:o,elements:i}=e,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=ot(n),a=$t(n),l=We(n)==="y",c=Qp.has(r)?-1:1,u=s&&l?-1:1,f=jt(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),l?{x:h*u,y:d*c}:{x:d*c,y:h*u}}const tv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:s,placement:r,middlewareData:a}=t,l=await ev(t,e);return r===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:r}}}}},nv=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:s=!0,crossAxis:r=!1,limiter:a={fn:y=>{let{x,y:w}=y;return{x,y:w}}},...l}=jt(e,t),c={x:n,y:o},u=await ss(t,l),f=We(ot(i)),d=hc(f);let h=c[d],m=c[f];if(s){const y=d==="y"?"top":"left",x=d==="y"?"bottom":"right",w=h+u[y],v=h-u[x];h=di(w,h,v)}if(r){const y=f==="y"?"top":"left",x=f==="y"?"bottom":"right",w=m+u[y],v=m-u[x];m=di(w,m,v)}const g=a.fn({...t,[d]:h,[f]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[d]:s,[f]:r}}}}}},ov=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:s,platform:r,elements:a}=t,{apply:l=()=>{},...c}=jt(e,t),u=await ss(t,c),f=ot(i),d=$t(i),h=We(i)==="y",{width:m,height:g}=s.floating;let y,x;f==="top"||f==="bottom"?(y=f,x=d===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(x=f,y=d==="end"?"top":"bottom");const w=g-u.top-u.bottom,v=m-u.left-u.right,S=nt(g-u[y],w),b=nt(m-u[x],v),M=!t.middlewareData.shift;let T=S,E=b;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=v),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(T=w),M&&!d){const F=be(u.left,0),$=be(u.right,0),O=be(u.top,0),j=be(u.bottom,0);h?E=m-2*(F!==0||$!==0?F+$:be(u.left,u.right)):T=g-2*(O!==0||j!==0?O+j:be(u.top,u.bottom))}await l({...t,availableWidth:E,availableHeight:T});const D=await r.getDimensions(a.floating);return m!==D.width||g!==D.height?{reset:{rects:!0}}:{}}}};function pc(e){const t=Te(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=ve(e),s=i?e.offsetWidth:n,r=i?e.offsetHeight:o,a=On(n)!==s||On(o)!==r;return a&&(n=s,o=r),{width:n,height:o,$:a}}function rs(e){return ee(e)?e:e.contextElement}function Mt(e){const t=rs(e);if(!ve(t))return Ne(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:s}=pc(t);let r=(s?On(n.width):n.width)/o,a=(s?On(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const iv=Ne(0);function vc(e){const t=we(e);return!Yn()||!t.visualViewport?iv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==we(e)?!1:t}function ht(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=rs(e);let r=Ne(1);t&&(o?ee(o)&&(r=Mt(o)):r=Mt(e));const a=sv(s,n,o)?vc(s):Ne(0);let l=(i.left+a.x)/r.x,c=(i.top+a.y)/r.y,u=i.width/r.x,f=i.height/r.y;if(s){const d=we(s),h=o&&ee(o)?we(o):o;let m=d,g=ui(m);for(;g&&o&&h!==m;){const y=Mt(g),x=g.getBoundingClientRect(),w=Te(g),v=x.left+(g.clientLeft+parseFloat(w.paddingLeft))*y.x,S=x.top+(g.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,f*=y.y,l+=v,c+=S,m=we(g),g=ui(m)}}return zn({width:u,height:f,x:l,y:c})}function Jn(e,t){const n=Zn(e).scrollLeft;return t?t.left+n:ht(ze(e)).left+n}function yc(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Jn(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function rv(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const s=i==="fixed",r=ze(o),a=t?Xn(t.floating):!1;if(o===r||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Ne(1);const u=Ne(0),f=ve(o);if((f||!f&&!s)&&((It(o)!=="body"||ln(r))&&(l=Zn(o)),ve(o))){const h=ht(o);c=Mt(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}const d=r&&!f&&!s?yc(r,l):Ne(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}}function av(e){return Array.from(e.getClientRects())}function lv(e){const t=ze(e),n=Zn(e),o=e.ownerDocument.body,i=be(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=be(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+Jn(e);const a=-n.scrollTop;return Te(o).direction==="rtl"&&(r+=be(t.clientWidth,o.clientWidth)-i),{width:i,height:s,x:r,y:a}}const Ur=25;function cv(e,t){const n=we(e),o=ze(e),i=n.visualViewport;let s=o.clientWidth,r=o.clientHeight,a=0,l=0;if(i){s=i.width,r=i.height;const u=Yn();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=Jn(o);if(c<=0){const u=o.ownerDocument,f=u.body,d=getComputedStyle(f),h=u.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,m=Math.abs(o.clientWidth-f.clientWidth-h);m<=Ur&&(s-=m)}else c<=Ur&&(s+=c);return{width:s,height:r,x:a,y:l}}const uv=new Set(["absolute","fixed"]);function dv(e,t){const n=ht(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,s=ve(e)?Mt(e):Ne(1),r=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,c=o*s.y;return{width:r,height:a,x:l,y:c}}function Kr(e,t,n){let o;if(t==="viewport")o=cv(e,n);else if(t==="document")o=lv(ze(e));else if(ee(t))o=dv(t,n);else{const i=vc(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return zn(o)}function xc(e,t){const n=Xe(e);return n===t||!ee(n)||Ge(n)?!1:Te(n).position==="fixed"||xc(n,t)}function fv(e,t){const n=t.get(e);if(n)return n;let o=Qe(e,[],!1).filter(a=>ee(a)&&It(a)!=="body"),i=null;const s=Te(e).position==="fixed";let r=s?Xe(e):e;for(;ee(r)&&!Ge(r);){const a=Te(r),l=ns(r);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&uv.has(i.position)||ln(r)&&!l&&xc(e,r))?o=o.filter(u=>u!==r):i=a,r=Xe(r)}return t.set(e,o),o}function hv(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const r=[...n==="clippingAncestors"?Xn(t)?[]:fv(t,this._c):[].concat(n),o],a=r[0],l=r.reduce((c,u)=>{const f=Kr(t,u,i);return c.top=be(f.top,c.top),c.right=nt(f.right,c.right),c.bottom=nt(f.bottom,c.bottom),c.left=be(f.left,c.left),c},Kr(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function gv(e){const{width:t,height:n}=pc(e);return{width:t,height:n}}function mv(e,t,n){const o=ve(t),i=ze(t),s=n==="fixed",r=ht(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Ne(0);function c(){l.x=Jn(i)}if(o||!o&&!s)if((It(t)!=="body"||ln(i))&&(a=Zn(t)),o){const h=ht(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&c();s&&!o&&i&&c();const u=i&&!o&&!s?yc(i,a):Ne(0),f=r.left+a.scrollLeft-l.x-u.x,d=r.top+a.scrollTop-l.y-u.y;return{x:f,y:d,width:r.width,height:r.height}}function So(e){return Te(e).position==="static"}function qr(e,t){if(!ve(e)||Te(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ze(e)===n&&(n=n.ownerDocument.body),n}function wc(e,t){const n=we(e);if(Xn(e))return n;if(!ve(e)){let i=Xe(e);for(;i&&!Ge(i);){if(ee(i)&&!So(i))return i;i=Xe(i)}return n}let o=qr(e,t);for(;o&&yp(o)&&So(o);)o=qr(o,t);return o&&Ge(o)&&So(o)&&!ns(o)?n:o||Sp(e)||n}const pv=async function(e){const t=this.getOffsetParent||wc,n=this.getDimensions,o=await n(e.floating);return{reference:mv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function vv(e){return Te(e).direction==="rtl"}const yv={convertOffsetParentRelativeRectToViewportRelativeRect:rv,getDocumentElement:ze,getClippingRect:hv,getOffsetParent:wc,getElementRects:pv,getClientRects:av,getDimensions:gv,getScale:Mt,isElement:ee,isRTL:vv};function Cc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xv(e,t){let n=null,o;const i=ze(e);function s(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function r(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:u,top:f,width:d,height:h}=c;if(a||t(),!d||!h)return;const m=vn(f),g=vn(i.clientWidth-(u+d)),y=vn(i.clientHeight-(f+h)),x=vn(u),v={rootMargin:-m+"px "+-g+"px "+-y+"px "+-x+"px",threshold:be(0,nt(1,l))||1};let S=!0;function b(M){const T=M[0].intersectionRatio;if(T!==l){if(!S)return r();T?r(!1,T):o=setTimeout(()=>{r(!1,1e-7)},1e3)}T===1&&!Cc(c,e.getBoundingClientRect())&&r(),S=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return r(!0),s}function as(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=rs(e),u=i||s?[...c?Qe(c):[],...Qe(t)]:[];u.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=c&&a?xv(c,n):null;let d=-1,h=null;r&&(h=new ResizeObserver(x=>{let[w]=x;w&&w.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let m,g=l?ht(e):null;l&&y();function y(){const x=ht(e);g&&!Cc(g,x)&&n(),g=x,m=requestAnimationFrame(y)}return n(),()=>{var x;u.forEach(w=>{i&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),f?.(),(x=h)==null||x.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const wv=tv,Cv=nv,bv=Jp,Sv=ov,Xr=Zp,Rv=(e,t,n)=>{const o=new Map,i={platform:yv,...n},s={...i.platform,_c:o};return Yp(e,t,{...i,platform:s})};var _v=typeof document<"u",Pv=function(){},Tn=_v?C.useLayoutEffect:Pv;function Bn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Bn(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){const s=i[o];if(!(s==="_owner"&&e.$$typeof)&&!Bn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function bc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yr(e,t){const n=bc(e);return Math.round(t*n)/n}function Ro(e){const t=R.useRef(e);return Tn(()=>{t.current=e}),t}function Ev(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:r}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,f]=R.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=R.useState(o);Bn(d,o)||h(o);const[m,g]=R.useState(null),[y,x]=R.useState(null),w=R.useCallback(_=>{_!==M.current&&(M.current=_,g(_))},[]),v=R.useCallback(_=>{_!==T.current&&(T.current=_,x(_))},[]),S=s||m,b=r||y,M=R.useRef(null),T=R.useRef(null),E=R.useRef(u),D=l!=null,F=Ro(l),$=Ro(i),O=Ro(c),j=R.useCallback(()=>{if(!M.current||!T.current)return;const _={placement:t,strategy:n,middleware:d};$.current&&(_.platform=$.current),Rv(M.current,T.current,_).then(A=>{const I={...A,isPositioned:O.current!==!1};k.current&&!Bn(E.current,I)&&(E.current=I,su.flushSync(()=>{f(I)}))})},[d,t,n,$,O]);Tn(()=>{c===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(_=>({..._,isPositioned:!1})))},[c]);const k=R.useRef(!1);Tn(()=>(k.current=!0,()=>{k.current=!1}),[]),Tn(()=>{if(S&&(M.current=S),b&&(T.current=b),S&&b){if(F.current)return F.current(S,b,j);j()}},[S,b,j,F,D]);const N=R.useMemo(()=>({reference:M,floating:T,setReference:w,setFloating:v}),[w,v]),B=R.useMemo(()=>({reference:S,floating:b}),[S,b]),P=R.useMemo(()=>{const _={position:n,left:0,top:0};if(!B.floating)return _;const A=Yr(B.floating,u.x),I=Yr(B.floating,u.y);return a?{..._,transform:"translate("+A+"px, "+I+"px)",...bc(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:I}},[n,a,B.floating,u.x,u.y]);return R.useMemo(()=>({...u,update:j,refs:N,elements:B,floatingStyles:P}),[u,j,N,B,P])}const Mv=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:i}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Xr({element:o.current,padding:i}).fn(n):{}:o?Xr({element:o,padding:i}).fn(n):{}}}},ls=(e,t)=>({...wv(e),options:[e,t]}),cs=(e,t)=>({...Cv(e),options:[e,t]}),us=(e,t)=>({...bv(e),options:[e,t]}),Tv=(e,t)=>({...Sv(e),options:[e,t]}),Av=(e,t)=>({...Mv(e),options:[e,t]});function Sc(e){const t=R.useRef(void 0),n=R.useCallback(o=>{const i=e.map(s=>{if(s!=null){if(typeof s=="function"){const r=s,a=r(o);return typeof a=="function"?a:()=>{r(null)}}return s.current=o,()=>{s.current=null}}});return()=>{i.forEach(s=>s?.())}},e);return R.useMemo(()=>e.every(o=>o==null)?null:o=>{t.current&&(t.current(),t.current=void 0),o!=null&&(t.current=n(o))},e)}const Vv="data-floating-ui-focusable",Zr="active",Jr="selected",Dv={...R};let Qr=!1,kv=0;const ea=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+kv++;function Fv(){const[e,t]=R.useState(()=>Qr?ea():void 0);return Vt(()=>{e==null&&t(ea())},[]),R.useEffect(()=>{Qr=!0},[]),e}const Lv=Dv.useId,Rc=Lv||Fv;let hi;process.env.NODE_ENV!=="production"&&(hi=new Set);function Iv(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];const i="Floating UI: "+n.join(" ");if(!((e=hi)!=null&&e.has(i))){var s;(s=hi)==null||s.add(i),console.error(i)}}function jv(){const e=new Map;return{emit(t,n){var o;(o=e.get(t))==null||o.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var o;(o=e.get(t))==null||o.delete(n)}}}const $v=R.createContext(null),Ov=R.createContext(null),ds=()=>{var e;return((e=R.useContext($v))==null?void 0:e.id)||null},fs=()=>R.useContext(Ov);function hs(e){return"data-floating-ui-"+e}function _e(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const ta=hs("safe-polygon");function _o(e,t,n){if(n&&!nn(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const o=e();return typeof o=="number"?o:o?.[t]}return e?.[t]}function Po(e){return typeof e=="function"?e():e}function _c(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:i,events:s,elements:r}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:d=!0}=t,h=fs(),m=ds(),g=yn(c),y=yn(l),x=yn(n),w=yn(f),v=R.useRef(),S=R.useRef(-1),b=R.useRef(),M=R.useRef(-1),T=R.useRef(!0),E=R.useRef(!1),D=R.useRef(()=>{}),F=R.useRef(!1),$=$e(()=>{var P;const _=(P=i.current.openEvent)==null?void 0:P.type;return _?.includes("mouse")&&_!=="mousedown"});R.useEffect(()=>{if(!a)return;function P(_){let{open:A}=_;A||(_e(S),_e(M),T.current=!0,F.current=!1)}return s.on("openchange",P),()=>{s.off("openchange",P)}},[a,s]),R.useEffect(()=>{if(!a||!g.current||!n)return;function P(A){$()&&o(!1,A,"hover")}const _=ut(r.floating).documentElement;return _.addEventListener("mouseleave",P),()=>{_.removeEventListener("mouseleave",P)}},[r.floating,n,o,a,g,$]);const O=R.useCallback(function(P,_,A){_===void 0&&(_=!0),A===void 0&&(A="hover");const I=_o(y.current,"close",v.current);I&&!b.current?(_e(S),S.current=window.setTimeout(()=>o(!1,P,A),I)):_&&(_e(S),o(!1,P,A))},[y,o]),j=$e(()=>{D.current(),b.current=void 0}),k=$e(()=>{if(E.current){const P=ut(r.floating).body;P.style.pointerEvents="",P.removeAttribute(ta),E.current=!1}}),N=$e(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);R.useEffect(()=>{if(!a)return;function P(U){if(_e(S),T.current=!1,u&&!nn(v.current)||Po(w.current)>0&&!_o(y.current,"open"))return;const q=_o(y.current,"open",v.current);q?S.current=window.setTimeout(()=>{x.current||o(!0,U,"hover")},q):n||o(!0,U,"hover")}function _(U){if(N()){k();return}D.current();const q=ut(r.floating);if(_e(M),F.current=!1,g.current&&i.current.floatingContext){n||_e(S),b.current=g.current({...i.current.floatingContext,tree:h,x:U.clientX,y:U.clientY,onClose(){k(),j(),N()||O(U,!0,"safe-polygon")}});const Z=b.current;q.addEventListener("mousemove",Z),D.current=()=>{q.removeEventListener("mousemove",Z)};return}(v.current!=="touch"||!tn(r.floating,U.relatedTarget))&&O(U)}function A(U){N()||i.current.floatingContext&&(g.current==null||g.current({...i.current.floatingContext,tree:h,x:U.clientX,y:U.clientY,onClose(){k(),j(),N()||O(U)}})(U))}function I(){_e(S)}function X(U){N()||O(U,!1)}if(ee(r.domReference)){const U=r.domReference,q=r.floating;return n&&U.addEventListener("mouseleave",A),d&&U.addEventListener("mousemove",P,{once:!0}),U.addEventListener("mouseenter",P),U.addEventListener("mouseleave",_),q&&(q.addEventListener("mouseleave",A),q.addEventListener("mouseenter",I),q.addEventListener("mouseleave",X)),()=>{n&&U.removeEventListener("mouseleave",A),d&&U.removeEventListener("mousemove",P),U.removeEventListener("mouseenter",P),U.removeEventListener("mouseleave",_),q&&(q.removeEventListener("mouseleave",A),q.removeEventListener("mouseenter",I),q.removeEventListener("mouseleave",X))}}},[r,a,e,u,d,O,j,k,o,n,x,h,y,g,i,N,w]),Vt(()=>{var P;if(a&&n&&(P=g.current)!=null&&(P=P.__options)!=null&&P.blockPointerEvents&&$()){E.current=!0;const A=r.floating;if(ee(r.domReference)&&A){var _;const I=ut(r.floating).body;I.setAttribute(ta,"");const X=r.domReference,U=h==null||(_=h.nodesRef.current.find(q=>q.id===m))==null||(_=_.context)==null?void 0:_.elements.floating;return U&&(U.style.pointerEvents=""),I.style.pointerEvents="none",X.style.pointerEvents="auto",A.style.pointerEvents="auto",()=>{I.style.pointerEvents="",X.style.pointerEvents="",A.style.pointerEvents=""}}}},[a,n,m,r,h,g,$]),Vt(()=>{n||(v.current=void 0,F.current=!1,j(),k())},[n,j,k]),R.useEffect(()=>()=>{j(),_e(S),_e(M),k()},[a,r.domReference,j,k]);const B=R.useMemo(()=>{function P(_){v.current=_.pointerType}return{onPointerDown:P,onPointerEnter:P,onMouseMove(_){const{nativeEvent:A}=_;function I(){!T.current&&!x.current&&o(!0,A,"hover")}u&&!nn(v.current)||n||Po(w.current)===0||F.current&&_.movementX**2+_.movementY**2<2||(_e(M),v.current==="touch"?I():(F.current=!0,M.current=window.setTimeout(I,Po(w.current))))}}},[u,o,n,x,w]);return R.useMemo(()=>a?{reference:B}:{},[a,B])}function na(e){return ve(e.target)&&e.target.tagName==="BUTTON"}function Nv(e){return ve(e.target)&&e.target.tagName==="A"}function oa(e){return mc(e)}function zv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:i,elements:{domReference:s}}=e,{enabled:r=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:f=!0}=t,d=R.useRef(),h=R.useRef(!1),m=R.useMemo(()=>({onPointerDown(g){d.current=g.pointerType},onMouseDown(g){const y=d.current;g.button===0&&a!=="click"&&(nn(y,!0)&&c||(n&&l&&(!(i.current.openEvent&&f)||i.current.openEvent.type==="mousedown")?o(!1,g.nativeEvent,"click"):(g.preventDefault(),o(!0,g.nativeEvent,"click"))))},onClick(g){const y=d.current;if(a==="mousedown"&&d.current){d.current=void 0;return}nn(y,!0)&&c||(n&&l&&(!(i.current.openEvent&&f)||i.current.openEvent.type==="click")?o(!1,g.nativeEvent,"click"):o(!0,g.nativeEvent,"click"))},onKeyDown(g){d.current=void 0,!(g.defaultPrevented||!u||na(g))&&(g.key===" "&&!oa(s)&&(g.preventDefault(),h.current=!0),!Nv(g)&&g.key==="Enter"&&o(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||na(g)||oa(s)||g.key===" "&&h.current&&(h.current=!1,o(!(n&&l),g.nativeEvent,"click"))}}),[i,s,a,c,u,o,n,f,l]);return R.useMemo(()=>r?{reference:m}:{},[r,m])}const Bv={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Hv={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ia=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Pc(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,elements:i,dataRef:s}=e,{enabled:r=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:d=!1,bubbles:h,capture:m}=t,g=fs(),y=$e(typeof l=="function"?l:()=>!1),x=typeof l=="function"?y:l,w=R.useRef(!1),{escapeKey:v,outsidePress:S}=ia(h),{escapeKey:b,outsidePress:M}=ia(m),T=R.useRef(!1),E=$e(k=>{var N;if(!n||!r||!a||k.key!=="Escape"||T.current)return;const B=(N=s.current.floatingContext)==null?void 0:N.nodeId,P=g?Mn(g.nodesRef.current,B):[];if(!v&&(k.stopPropagation(),P.length>0)){let _=!0;if(P.forEach(A=>{var I;if((I=A.context)!=null&&I.open&&!A.context.dataRef.current.__escapeKeyBubbles){_=!1;return}}),!_)return}o(!1,Wp(k)?k.nativeEvent:k,"escape-key")}),D=$e(k=>{var N;const B=()=>{var P;E(k),(P=xt(k))==null||P.removeEventListener("keydown",B)};(N=xt(k))==null||N.addEventListener("keydown",B)}),F=$e(k=>{var N;const B=s.current.insideReactTree;s.current.insideReactTree=!1;const P=w.current;if(w.current=!1,c==="click"&&P||B||typeof x=="function"&&!x(k))return;const _=xt(k),A="["+hs("inert")+"]",I=ut(i.floating).querySelectorAll(A);let X=ee(_)?_:null;for(;X&&!Ge(X);){const Z=Xe(X);if(Ge(Z)||!ee(Z))break;X=Z}if(I.length&&ee(_)&&!zp(_)&&!tn(_,i.floating)&&Array.from(I).every(Z=>!tn(X,Z)))return;if(ve(_)&&j){const Z=Ge(_),ne=Te(_),le=/auto|scroll/,Ce=Z||le.test(ne.overflowX),me=Z||le.test(ne.overflowY),je=Ce&&_.clientWidth>0&&_.scrollWidth>_.clientWidth,z=me&&_.clientHeight>0&&_.scrollHeight>_.clientHeight,J=ne.direction==="rtl",re=z&&(J?k.offsetX<=_.offsetWidth-_.clientWidth:k.offsetX>_.clientWidth),ue=je&&k.offsetY>_.clientHeight;if(re||ue)return}const U=(N=s.current.floatingContext)==null?void 0:N.nodeId,q=g&&Mn(g.nodesRef.current,U).some(Z=>{var ne;return bo(k,(ne=Z.context)==null?void 0:ne.elements.floating)});if(bo(k,i.floating)||bo(k,i.domReference)||q)return;const Q=g?Mn(g.nodesRef.current,U):[];if(Q.length>0){let Z=!0;if(Q.forEach(ne=>{var le;if((le=ne.context)!=null&&le.open&&!ne.context.dataRef.current.__outsidePressBubbles){Z=!1;return}}),!Z)return}o(!1,k,"outside-press")}),$=$e(k=>{var N;const B=()=>{var P;F(k),(P=xt(k))==null||P.removeEventListener(c,B)};(N=xt(k))==null||N.addEventListener(c,B)});R.useEffect(()=>{if(!n||!r)return;s.current.__escapeKeyBubbles=v,s.current.__outsidePressBubbles=S;let k=-1;function N(I){o(!1,I,"ancestor-scroll")}function B(){window.clearTimeout(k),T.current=!0}function P(){k=window.setTimeout(()=>{T.current=!1},Yn()?5:0)}const _=ut(i.floating);a&&(_.addEventListener("keydown",b?D:E,b),_.addEventListener("compositionstart",B),_.addEventListener("compositionend",P)),x&&_.addEventListener(c,M?$:F,M);let A=[];return d&&(ee(i.domReference)&&(A=Qe(i.domReference)),ee(i.floating)&&(A=A.concat(Qe(i.floating))),!ee(i.reference)&&i.reference&&i.reference.contextElement&&(A=A.concat(Qe(i.reference.contextElement)))),A=A.filter(I=>{var X;return I!==((X=_.defaultView)==null?void 0:X.visualViewport)}),A.forEach(I=>{I.addEventListener("scroll",N,{passive:!0})}),()=>{a&&(_.removeEventListener("keydown",b?D:E,b),_.removeEventListener("compositionstart",B),_.removeEventListener("compositionend",P)),x&&_.removeEventListener(c,M?$:F,M),A.forEach(I=>{I.removeEventListener("scroll",N)}),window.clearTimeout(k)}},[s,i,a,x,c,n,o,d,r,v,S,E,b,D,F,M,$]),R.useEffect(()=>{s.current.insideReactTree=!1},[s,x,c]);const O=R.useMemo(()=>({onKeyDown:E,...u&&{[Bv[f]]:k=>{o(!1,k.nativeEvent,"reference-press")},...f!=="click"&&{onClick(k){o(!1,k.nativeEvent,"reference-press")}}}}),[E,o,u,f]),j=R.useMemo(()=>({onKeyDown:E,onMouseDown(){w.current=!0},onMouseUp(){w.current=!0},[Hv[c]]:()=>{s.current.insideReactTree=!0}}),[E,c,s]);return R.useMemo(()=>r?{reference:O,floating:j}:{},[r,O,j])}function Wv(e){const{open:t=!1,onOpenChange:n,elements:o}=e,i=Rc(),s=R.useRef({}),[r]=R.useState(()=>jv()),a=ds()!=null;if(process.env.NODE_ENV!=="production"){const h=o.reference;h&&!ee(h)&&Iv("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=R.useState(o.reference),u=$e((h,m,g)=>{s.current.openEvent=h?m:void 0,r.emit("openchange",{open:h,event:m,reason:g,nested:a}),n?.(h,m,g)}),f=R.useMemo(()=>({setPositionReference:c}),[]),d=R.useMemo(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return R.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:d,events:r,floatingId:i,refs:f}),[t,u,d,r,i,f])}function gs(e){e===void 0&&(e={});const{nodeId:t}=e,n=Wv({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,i=o.elements,[s,r]=R.useState(null),[a,l]=R.useState(null),u=i?.domReference||s,f=R.useRef(null),d=fs();Vt(()=>{u&&(f.current=u)},[u]);const h=Ev({...e,elements:{...i,...a&&{reference:a}}}),m=R.useCallback(v=>{const S=ee(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),getClientRects:()=>v.getClientRects(),contextElement:v}:v;l(S),h.refs.setReference(S)},[h.refs]),g=R.useCallback(v=>{(ee(v)||v===null)&&(f.current=v,r(v)),(ee(h.refs.reference.current)||h.refs.reference.current===null||v!==null&&!ee(v))&&h.refs.setReference(v)},[h.refs]),y=R.useMemo(()=>({...h.refs,setReference:g,setPositionReference:m,domReference:f}),[h.refs,g,m]),x=R.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),w=R.useMemo(()=>({...h,...o,refs:y,elements:x,nodeId:t}),[h,y,x,t,o]);return Vt(()=>{o.dataRef.current.floatingContext=w;const v=d?.nodesRef.current.find(S=>S.id===t);v&&(v.context=w)}),R.useMemo(()=>({...h,context:w,refs:y,elements:x}),[h,y,x,w])}function Eo(){return $p()&&jp()}function Gv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,events:i,dataRef:s,elements:r}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=R.useRef(!1),u=R.useRef(-1),f=R.useRef(!0);R.useEffect(()=>{if(!a)return;const h=we(r.domReference);function m(){!n&&ve(r.domReference)&&r.domReference===Wr(ut(r.domReference))&&(c.current=!0)}function g(){f.current=!0}function y(){f.current=!1}return h.addEventListener("blur",m),Eo()&&(h.addEventListener("keydown",g,!0),h.addEventListener("pointerdown",y,!0)),()=>{h.removeEventListener("blur",m),Eo()&&(h.removeEventListener("keydown",g,!0),h.removeEventListener("pointerdown",y,!0))}},[r.domReference,n,a]),R.useEffect(()=>{if(!a)return;function h(m){let{reason:g}=m;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return i.on("openchange",h),()=>{i.off("openchange",h)}},[i,a]),R.useEffect(()=>()=>{_e(u)},[]);const d=R.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const m=xt(h.nativeEvent);if(l&&ee(m)){if(Eo()&&!h.relatedTarget){if(!f.current&&!mc(m))return}else if(!Bp(m))return}o(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const m=h.relatedTarget,g=h.nativeEvent,y=ee(m)&&m.hasAttribute(hs("focus-guard"))&&m.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var x;const w=Wr(r.domReference?r.domReference.ownerDocument:document);!m&&w===r.domReference||tn((x=s.current.floatingContext)==null?void 0:x.refs.floating.current,w)||tn(r.domReference,w)||y||o(!1,g,"focus")})}}),[s,r.domReference,o,l]);return R.useMemo(()=>a?{reference:d}:{},[a,d])}function Mo(e,t,n){const o=new Map,i=n==="item";let s=e;if(i&&e){const{[Zr]:r,[Jr]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1,[Vv]:""},...s,...t.map(r=>{const a=r?r[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((r,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(i&&[Zr,Jr].includes(c)))if(c.indexOf("on")===0){if(o.has(c)||o.set(c,[]),typeof u=="function"){var f;(f=o.get(c))==null||f.push(u),r[c]=function(){for(var d,h=arguments.length,m=new Array(h),g=0;g<h;g++)m[g]=arguments[g];return(d=o.get(c))==null?void 0:d.map(y=>y(...m)).find(y=>y!==void 0)}}}else r[c]=u}),r),{})}}function Ec(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),o=e.map(a=>a?.item),i=R.useCallback(a=>Mo(a,e,"reference"),t),s=R.useCallback(a=>Mo(a,e,"floating"),n),r=R.useCallback(a=>Mo(a,e,"item"),o);return R.useMemo(()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:r}),[i,s,r])}const Uv=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Mc(e,t){var n,o;t===void 0&&(t={});const{open:i,elements:s,floatingId:r}=e,{enabled:a=!0,role:l="dialog"}=t,c=Rc(),u=((n=s.domReference)==null?void 0:n.id)||c,f=R.useMemo(()=>{var w;return((w=Hp(s.floating))==null?void 0:w.id)||r},[s.floating,r]),d=(o=Uv.get(l))!=null?o:l,m=ds()!=null,g=R.useMemo(()=>d==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:i?f:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":d==="alertdialog"?"dialog":d,"aria-controls":i?f:void 0,...d==="listbox"&&{role:"combobox"},...d==="menu"&&{id:u},...d==="menu"&&m&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[d,f,m,i,u,l]),y=R.useMemo(()=>{const w={id:f,...d&&{role:d}};return d==="tooltip"||l==="label"?w:{...w,...d==="menu"&&{"aria-labelledby":u}}},[d,f,u,l]),x=R.useCallback(w=>{let{active:v,selected:S}=w;const b={role:"option",...v&&{id:f+"-fui-option"}};switch(l){case"select":case"combobox":return{...b,"aria-selected":S}}return{}},[f,l]);return R.useMemo(()=>a?{reference:g,floating:y,item:x}:{},[a,g,y,x])}const Kv=e=>R.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),qv=e=>R.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},R.createElement("g",null,R.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"}))),Tc=e=>R.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("g",{opacity:.6},R.createElement("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),To={sm:{h:28,p:"var(--spacing-xs) var(--spacing-sm)",text:"body-2"},md:{h:32,p:"6px var(--spacing-md)",text:"body-2"},lg:{h:40,p:"var(--spacing-sm) var(--spacing-lg)",text:"body-1"}},ms=C.forwardRef(({label:e,color:t="primary",size:n="md",onClick:o,onDelete:i,avatar:s,icon:r,disabled:a,className:l},c)=>{const u=C.useRef(null),f=C.useMemo(()=>{switch(t){case"primary":return{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"};case"accent":return{bg:"var(--status-accent-tint-low)",color:"var(--text-accent)"};case"warning":return{bg:"var(--status-warning-tint-low)",color:"var(--text-warning)"};case"positive":return{bg:"var(--status-positive-tint-low)",color:"var(--text-positive)"};case"negative":return{bg:"var(--status-negative-tint-low)",color:"var(--text-negative)"};default:return{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"}}},[t]),d=V.css({cursor:a?"not-allowed":o?"pointer":"default",opacity:a?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s","&:hover":a?void 0:{backgroundColor:f.bg}}),h=V.css({display:"inline-flex",cursor:"pointer",opacity:.6,"&:hover":{opacity:1}});return p.jsxs(L,{ref:m=>{u.current=m,typeof c=="function"?c(m):c&&(c.current=m)},row:!0,alignItems:"center",justifyContent:"center",gap:"var(--spacing-sm)",h:To[n].h,p:To[n].p,overflow:"hidden",borderRadius:"var(--corner-sm)",backgroundColor:f.bg,color:f.color,onClick:o,className:V.cx(d,l),children:[o&&p.jsx(gt,{}),s&&p.jsx(L,{w:20,h:20,borderRadius:"50%",overflow:"hidden",children:s}),r&&p.jsx(L,{children:r}),typeof e=="string"?p.jsx(K,{variant:To[n].text,colorName:t,textOverflow:"ellipsis",overflow:"hidden",children:e}):e,i&&!a&&p.jsx(K,{className:h,colorName:t,onClick:m=>{m.stopPropagation(),i(m)},children:p.jsx(Tc,{})})]})});ms.displayName="Tag";const Xv="_disabled_zbo6w_40",Yv="_open_zbo6w_48",Zv="_error_zbo6w_51",Jv="_hidden_zbo6w_87",Qv="_visible_zbo6w_90",ey="_selected_zbo6w_163",de={"select-container":"_select-container_zbo6w_8","full-width":"_full-width_zbo6w_13","select-input":"_select-input_zbo6w_17","size-xs":"_size-xs_zbo6w_25","size-sm":"_size-sm_zbo6w_30","size-md":"_size-md_zbo6w_35",disabled:Xv,open:Yv,"select-arrow":"_select-arrow_zbo6w_48",error:Zv,"select-value":"_select-value_zbo6w_62","select-value_xs":"_select-value_xs_zbo6w_74","select-placeholder":"_select-placeholder_zbo6w_81",hidden:Jv,visible:Qv,"select-arrow_xs":"_select-arrow_xs_zbo6w_106","select-dropdown":"_select-dropdown_zbo6w_116","select-menu":"_select-menu_zbo6w_126","select-menu-item":"_select-menu-item_zbo6w_145","select-menu-item-first":"_select-menu-item-first_zbo6w_158",selected:ey,"overflow-tooltip-container":"_overflow-tooltip-container_zbo6w_167","overflow-tooltip-text":"_overflow-tooltip-text_zbo6w_172","empty-block":"_empty-block_zbo6w_179"};function Ac({value:e,onChange:t,multiple:n=!1,returnedValue:o,renderItem:i,renderInputItem:s,renderSingleInputItem:r,renderMultipleInputItem:a,renderDropdownItem:l,placeholder:c,items:u=[],fullWidth:f,size:d="md",showDefaultItem:h,disabled:m,label:g,firstItem:y,lastItem:x,observer:w,emptyText:v,onBlur:S,prompt:b,error:M,errorText:T,dropdownMaxWidth:E=400,dropdownMinWidth:D=120,minWidth:F=120,width:$}){const[O,j]=mt(e,n?[]:null),[k,N]=C.useState(!1),{refs:B,floatingStyles:P}=gs({open:k,strategy:"fixed",middleware:[ls(4),us({crossAxis:!0,fallbackAxisSideDirection:"start"}),cs({crossAxis:!0,padding:8}),Tv({apply({availableHeight:z,availableWidth:J,elements:re}){const ue=Math.min(typeof J=="number"?J-64:E,E);Object.assign(re.floating.style,{maxHeight:typeof z=="number"?`${z}px`:"auto",maxWidth:`${ue}px`,minWidth:`${D}px`})}})],whileElementsMounted:as}),_=C.useMemo(()=>n?O||[]:O!=null?[O]:[],[O,n]),A=C.useCallback(z=>o?o(z):z,[o]),I=C.useMemo(()=>{const z=new Map;return u.forEach(J=>{z.set(A(J),J)}),z},[u,A]),X=!u.length&&!M,U=C.useMemo(()=>_.map(z=>I.get(z)).filter(z=>!!z),[I,_]);C.useEffect(()=>{process.env.NODE_ENV!=="production"&&i&&!l&&console.warn("[Select] `renderItem` deprecated, use `renderDropdownItem` instead.")},[l,i]);const q=C.useCallback((z,J)=>l?l(z,J):i?i(z):String(z),[l,i]),Q=()=>{N(!1),S?.()},Z=z=>{const J=A(z);if(n){const re=_.includes(J)?_.filter(ue=>ue!==J):[..._,J];j(re),t?.(re)}else j(J),t?.(J),Q()},ne=z=>{if(!n)return;const J=_.filter(re=>re!==z);j(J),t?.(J)},le=()=>{const z=n?[]:null;j(z),t?.(z),n||Q()},Ce=()=>typeof c=="string"?p.jsx(K,{variant:d==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:c??"Select..."}):c,me=()=>{if(!_.length)return Ce();if(n)return a?a(U):s?s({mode:"multiple",selectedItems:U}):p.jsx(L,{flexWrap:"wrap",row:!0,gap:10,children:_.map(re=>{const ue=I.get(re);return ue?p.jsx(ms,{size:"sm",label:i?i(ue):String(re),onDelete:Ae=>{Ae.stopPropagation(),ne(re)}},re):null})});const z=I.get(_[0])??null;if(!z)return Ce();if(r)return r(z);if(s)return s({mode:"single",selectedItem:z});const J=i?i(z):String(_[0]);return typeof J=="string"?p.jsx(K,{variant:d==="xs"?"caption-1":"body-2",tag:"p",textOverflow:"ellipsis",overflow:"hidden",children:J}):p.jsx(p.Fragment,{children:J})},je=k&&p.jsx(cn,{children:p.jsx(L,{row:!0,top:0,right:0,bottom:0,left:0,position:"fixed",center:!0,flex:1,onClick:Q,display:"block",backgroundColor:"transparent",zIndex:1,children:p.jsx(Kn.div,{ref:B.setFloating,className:de["select-dropdown"],initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},style:{...P,zIndex:1},onMouseDown:z=>z.stopPropagation(),onClick:z=>z.stopPropagation(),children:p.jsxs("ul",{className:de["select-menu"],children:[h&&!n&&p.jsx(L,{className:de["select-menu-item"],role:"option",onClick:le,children:p.jsx(K,{variant:"body-2",colorName:"tertiary",children:c})}),y&&p.jsx(L,{className:V.cx(de["select-menu-item"],de["select-menu-item-first"]),children:y}),X&&p.jsxs(L,{className:de["empty-block"],children:[p.jsx(L,{w:20,h:20,children:p.jsx(qv,{})}),p.jsx(K,{variant:"body-2",children:v??"There is nothing yet"})]}),u.map((z,J)=>{const re=A(z),ue=_.includes(re),Ae=q(z,{item:z,selected:ue,index:J}),Ve=typeof Ae=="string";return p.jsxs(L,{row:!0,gap:10,alignItems:"center",className:V.cx(de["select-menu-item"],{[de.selected]:ue}),role:"option",relative:!0,onClick:()=>Z(z),children:[n&&p.jsx(ts,{size:"sm",checked:ue}),Ve?p.jsx(K,{variant:"body-2",tag:"p",wordBreak:"break-all",whiteSpace:"break-spaces",children:Ae}):Ae,p.jsx(gt,{})]},re)}),w,x&&p.jsx(L,{className:V.cx(de["select-menu-item"],de["select-menu-item-first"]),children:x})]})},"dropdown")})});return p.jsxs(L,{relative:!0,display:"inline-block",minWidth:F,w:$||(f?"full":"auto"),onMouseDown:z=>z.stopPropagation(),onClick:z=>z.stopPropagation(),children:[typeof g=="string"?p.jsx(K,{variant:"body-2",colorName:"tertiary",fontWeight:"regular",mb:d==="sm"?4:8,children:g}):g,p.jsxs(L,{ref:B.setReference,row:!0,gap:10,tabIndex:m?-1:0,role:"button",alignItems:"flex-start","aria-haspopup":"listbox",relative:!0,w:"100%",className:V.cx(de["select-input"],de[`size-${d}`],{[de.error]:M,[de.disabled]:m,[de.open]:k}),onClick:()=>!m&&N(z=>!z),children:[p.jsx(L,{className:V.cx(de["select-value"]),children:me()}),p.jsx(L,{className:V.cx(de["select-arrow"],de[`select-arrow_${d}`]),children:p.jsx(Kv,{})})]}),typeof b=="string"?p.jsx(K,{variant:"caption-1",colorName:"tertiary",mt:4,children:b}):b,M&&T&&p.jsx(K,{tag:"p",colorName:"negative",variant:"body-2",mt:5,children:T}),p.jsx($f,{children:je})]})}const ty=e=>R.createElement("svg",{width:10,height:10,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.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"})),ny=e=>R.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.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"})),oy="_container_e7tan_8",iy="_disabled_e7tan_17",sy="_reverse_e7tan_21",ry="_input_e7tan_25",ay="_switchContainer_e7tan_35",ly="_variant_accent_e7tan_43",cy="_variant_secondary_e7tan_47",uy="_thumb_e7tan_51",dy="_variant_theme_e7tan_54",fy="_moon_e7tan_58",hy="_fire_e7tan_61",gy="_size_sm_e7tan_74",my="_size_md_e7tan_80",py="_size_lg_e7tan_86",ke={container:oy,disabled:iy,reverse:sy,input:ry,switchContainer:ay,variant_accent:ly,variant_secondary:cy,switch:"_switch_e7tan_35",thumb:uy,variant_theme:dy,moon:fy,fire:hy,size_sm:gy,size_md:my,size_lg:py},Vc=C.forwardRef(({title:e,text:t,icon:n,disabled:o,onChange:i,checked:s,defaultValue:r,className:a,size:l="md",variant:c="accent",reverse:u=!1,w:f="auto",...d},h)=>{const[m,g]=mt(s,r),y=C.useRef(null);C.useImperativeHandle(h,()=>({focus:()=>{y.current?.focus()},blur:()=>{y.current?.blur()},get checked(){return m??!1},setChecked:S=>{g(S),i?.(S)},toggle:()=>{const S=!m;g(S),i?.(S)},isFocused:()=>document.activeElement===y.current,isDisabled:()=>o??!1,getInputElement:()=>y.current,checkValidity:()=>y.current?.checkValidity()??!0,reset:()=>{const S=r??!1;g(S),i?.(S)}}),[m,g,i,o,r]);const x=C.useCallback(S=>{g(S.target.checked),i?.(S.target.checked)},[i]),w=C.useMemo(()=>typeof e=="string"?p.jsx(K,{variant:"body-1",colorName:"primary",fontWeight:"medium",children:e}):e,[e]),v=C.useMemo(()=>typeof t=="string"?p.jsx(K,{variant:"body-2",colorName:"secondary",fontWeight:"regular",children:t}):t,[t]);return p.jsxs(L,{row:!0,w:f,gap:"var(--spacing-sm)",children:[p.jsxs("label",{className:V.cx(ke.container,a,{[ke.disabled]:o,[ke.reverse]:u}),children:[p.jsxs(L,{className:V.cx(ke.switchContainer,ke[`size_${l}`],ke[`variant_${c}`]),children:[p.jsx("input",{ref:y,type:"checkbox",checked:m,className:ke.input,onChange:x,disabled:o,...d}),p.jsx("div",{className:ke.switch,children:p.jsx("div",{className:ke.thumb,children:c==="theme"&&p.jsxs(p.Fragment,{children:[p.jsx(ny,{className:ke.moon}),p.jsx(ty,{className:ke.fire})]})})})]}),p.jsxs(L,{gap:"var(--spacing-xs)",children:[w,v]})]}),n]})});Vc.displayName="Switch";const vy=V.css({cursor:"pointer",userSelect:"none"}),yy=V.css({cursor:"not-allowed",opacity:.5}),xy=V.css({transition:"color 0.2s ease"}),wy=C.forwardRef(({label:e,selected:t,disabled:n,fullWidth:o,onClick:i},s)=>p.jsx(L,{w:o?"full":void 0,justifyContent:"center",alignItems:"center",ref:s,py:"var(--spacing-md)",px:"var(--spacing-xl)",onClick:i,className:V.cx(vy,{[yy]:n}),children:p.jsx(K,{className:xy,colorName:t?"primary":"tertiary",fontWeight:"medium",variant:"body-2",children:e})})),Cy=V.css({borderBottom:"1px solid var(--border-neutral-alpha-basic)"}),Dc=({value:e,onChange:t,options:n,fullWidth:o=!1,className:i})=>{const[s,r]=C.useState({left:0,width:0}),a=C.useRef([]),l=u=>f=>{a.current[u]=f};C.useEffect(()=>{const u=n.findIndex(d=>d.value===e),f=a.current[u];f&&r({left:f.offsetLeft,width:f.offsetWidth})},[e,n]);const c=(u,f=!1)=>()=>!f&&t(u);return p.jsxs(L,{row:!0,w:o?"full":"auto",relative:!0,className:V.cx(Cy,i),children:[n.map((u,f)=>p.jsx(wy,{selected:e===u.value,onClick:c(u.value,u.disabled),ref:l(f),label:u.label,disabled:u.disabled,fullWidth:o},u.value)),p.jsx(L,{h:2,w:s.width,absolute:!0,bottom:-1,left:s.left,backgroundColor:"var(--border-accent-primary)",className:V.css({transition:"left 0.2s ease, width 0.2s ease"})})]})};Dc.displayName="Tabs";const by="_header_446to_8",Sy={header:by},kc=C.forwardRef(({title:e,subtitle:t,w:n="full",p:o,py:i,px:s="var(--spacing-2xl)",pt:r="var(--spacing-2xl)",pb:a="var(--spacing-lg)",row:l=!0,justifyContent:c="space-between",showCloseButton:u=!1},f)=>{const{onClose:d}=Pu();return p.jsxs(L,{w:n,p:o,py:i,px:s,pt:r,pb:a,row:l,justifyContent:c,ref:f,className:Sy.header,children:[p.jsxs(L,{gap:"var(--spacing-sm)",children:[p.jsx(K,{variant:"title-3",colorName:"primary",fontWeight:"semibold",children:e}),p.jsx(K,{variant:"body-1",colorName:"tertiary",fontWeight:"medium",children:t})]}),u&&p.jsx(L,{children:p.jsx(Xt,{onClick:d,color:"neutral",children:p.jsx(ba,{})})})]})});kc.displayName="ModalHeader";function yt(e,t,n){let o=n.initialDeps??[],i,s=!0;function r(){var a,l,c;let u;n.key&&((a=n.debug)!=null&&a.call(n))&&(u=Date.now());const f=e();if(!(f.length!==o.length||f.some((m,g)=>o[g]!==m)))return i;o=f;let h;if(n.key&&((l=n.debug)!=null&&l.call(n))&&(h=Date.now()),i=t(...f),n.key&&((c=n.debug)!=null&&c.call(n))){const m=Math.round((Date.now()-u)*100)/100,g=Math.round((Date.now()-h)*100)/100,y=g/16,x=(w,v)=>{for(w=String(w);w.length<v;)w=" "+w;return w};console.info(`%c⏱ ${x(g,5)} /${x(m,5)} ms`,`
|
|
9
|
+
`),()=>{y.contains(g)&&y.removeChild(g)}},[t]),p.jsx(Ff,{isPresent:t,childRef:s,sizeRef:r,children:R.cloneElement(e,{ref:l})})}const If=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:i,presenceAffectsLayout:s,mode:r,anchorX:a,root:l})=>{const c=Ri(jf),u=C.useId();let f=!0,d=C.useMemo(()=>(f=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:h=>{c.set(h,!0);for(const m of c.values())if(!m)return;o&&o()},register:h=>(c.set(h,!1),()=>c.delete(h))}),[n,c,o]);return s&&f&&(d={...d}),C.useMemo(()=>{c.forEach((h,m)=>c.set(m,!1))},[n]),R.useEffect(()=>{!n&&!c.size&&o&&o()},[n]),r==="popLayout"&&(e=p.jsx(Lf,{isPresent:n,anchorX:a,root:l,children:e})),p.jsx(Wn.Provider,{value:d,children:e})};function jf(){return new Map}function yl(e=!0){const t=C.useContext(Wn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:i}=t,s=C.useId();C.useEffect(()=>{if(e)return i(s)},[e]);const r=C.useCallback(()=>e&&o&&o(s),[s,o,e]);return!n&&o?[!1,r]:[!0]}const mn=e=>e.key||"";function Us(e){const t=[];return C.Children.forEach(e,n=>{C.isValidElement(n)&&t.push(n)}),t}const $f=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:i=!0,mode:s="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[c,u]=yl(r),f=C.useMemo(()=>Us(e),[e]),d=r&&!c?[]:f.map(mn),h=C.useRef(!0),m=C.useRef(f),g=Ri(()=>new Map),[y,x]=C.useState(f),[w,v]=C.useState(f);Pa(()=>{h.current=!1,m.current=f;for(let M=0;M<w.length;M++){const A=mn(w[M]);d.includes(A)?g.delete(A):g.get(A)!==!0&&g.set(A,!1)}},[w,d.length,d.join("-")]);const b=[];if(f!==y){let M=[...f];for(let A=0;A<w.length;A++){const E=w[A],k=mn(E);d.includes(k)||(M.splice(A,0,E),b.push(E))}return s==="wait"&&b.length&&(M=b),v(Us(M)),x(f),null}process.env.NODE_ENV!=="production"&&s==="wait"&&w.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:S}=C.useContext(bi);return p.jsx(p.Fragment,{children:w.map(M=>{const A=mn(M),E=r&&!c?!1:f===w||d.includes(A),k=()=>{if(g.has(A))g.set(A,!0);else return;let F=!0;g.forEach($=>{$||(F=!1)}),F&&(S?.(),v(m.current),r&&u?.(),o&&o())};return p.jsx(If,{isPresent:E,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:l,onExitComplete:E?void 0:k,anchorX:a,children:M},A)})})},xl=C.createContext({strict:!1}),Ks={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"]},At={};for(const e in Ks)At[e]={isEnabled:t=>Ks[e].some(n=>!!t[n])};function Of(e){for(const t in e)At[t]={...At[t],...e[t]}}const Nf=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 jn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Nf.has(e)}let wl=e=>!jn(e);function Bf(e){typeof e=="function"&&(wl=t=>t.startsWith("on")?!jn(t):e(t))}try{Bf(require("@emotion/is-prop-valid").default)}catch{}function zf(e,t,n){const o={};for(const i in e)i==="values"&&typeof e.values=="object"||(wl(i)||n===!0&&jn(i)||!t&&!jn(i)||e.draggable&&i.startsWith("onDrag"))&&(o[i]=e[i]);return o}const Gn=C.createContext({});function Un(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Qt(e){return typeof e=="string"||Array.isArray(e)}const Ki=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qi=["initial",...Ki];function Kn(e){return Un(e.animate)||qi.some(t=>Qt(e[t]))}function Cl(e){return!!(Kn(e)||e.variants)}function Hf(e,t){if(Kn(e)){const{initial:n,animate:o}=e;return{initial:n===!1||Qt(n)?n:void 0,animate:Qt(o)?o:void 0}}return e.inherit!==!1?t:{}}function Wf(e){const{initial:t,animate:n}=Hf(e,C.useContext(Gn));return C.useMemo(()=>({initial:t,animate:n}),[qs(t),qs(n)])}function qs(e){return Array.isArray(e)?e.join(" "):e}function Xs(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Nt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(G.test(e))e=parseFloat(e);else return e;const n=Xs(e,t.target.x),o=Xs(e,t.target.y);return`${n}% ${o}%`}},Gf={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,i=tt.parse(e);if(i.length>5)return o;const s=tt.createTransformer(e),r=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+r]/=a,i[1+r]/=l;const c=se(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=c),typeof i[3+r]=="number"&&(i[3+r]/=c),s(i)}},ei={borderRadius:{...Nt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Nt,borderTopRightRadius:Nt,borderBottomLeftRadius:Nt,borderBottomRightRadius:Nt,boxShadow:Gf};function Sl(e,{layout:t,layoutId:n}){return Lt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ei[e]||e==="opacity")}const Uf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Kf=Ft.length;function qf(e,t,n){let o="",i=!0;for(let s=0;s<Kf;s++){const r=Ft[s],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=fl(a,Hi[r]);if(!l){i=!1;const u=Uf[r]||r;o+=`${u}(${c}) `}n&&(t[r]=c)}}return o=o.trim(),n?o=n(t,i?"":o):i&&(o="none"),o}function Xi(e,t,n){const{style:o,vars:i,transformOrigin:s}=e;let r=!1,a=!1;for(const l in t){const c=t[l];if(Lt.has(l)){r=!0;continue}else if(Ha(l)){i[l]=c;continue}else{const u=fl(c,Hi[l]);l.startsWith("origin")?(a=!0,s[l]=u):o[l]=u}}if(t.transform||(r||n?o.transform=qf(t,e.transform,n):o.transform&&(o.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;o.transformOrigin=`${l} ${c} ${u}`}}const Yi=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function bl(e,t,n){for(const o in t)!me(t[o])&&!Sl(o,n)&&(e[o]=t[o])}function Xf({transformTemplate:e},t){return C.useMemo(()=>{const n=Yi();return Xi(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Yf(e,t){const n=e.style||{},o={};return bl(o,n,e),Object.assign(o,Xf(e,t)),o}function Zf(e,t){const n={},o=Yf(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.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=o,n}const Jf={offset:"stroke-dashoffset",array:"stroke-dasharray"},Qf={offset:"strokeDashoffset",array:"strokeDasharray"};function eh(e,t,n=1,o=0,i=!0){e.pathLength=1;const s=i?Jf:Qf;e[s.offset]=G.transform(-o);const r=G.transform(t),a=G.transform(n);e[s.array]=`${r} ${a}`}function Rl(e,{attrX:t,attrY:n,attrScale:o,pathLength:i,pathSpacing:s=1,pathOffset:r=0,...a},l,c,u){if(Xi(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:d}=e;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),o!==void 0&&(f.scale=o),i!==void 0&&eh(f,i,s,r,!1)}const _l=()=>({...Yi(),attrs:{}}),Pl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function th(e,t,n,o){const i=C.useMemo(()=>{const s=_l();return Rl(s,t,Pl(o),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};bl(s,e.style,e),i.style={...s,...i.style}}return i}const nh=["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 Zi(e){return typeof e!="string"||e.includes("-")?!1:!!(nh.indexOf(e)>-1||/[A-Z]/u.test(e))}function oh(e,t,n,{latestValues:o},i,s=!1){const a=(Zi(e)?th:Zf)(t,o,i,e),l=zf(t,typeof e=="string",s),c=e!==C.Fragment?{...l,...a,ref:n}:{},{children:u}=t,f=C.useMemo(()=>me(u)?u.get():u,[u]);return C.createElement(e,{...c,children:f})}function Ys(e){const t=[{},{}];return e?.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function Ji(e,t,n,o){if(typeof t=="function"){const[i,s]=Ys(o);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=Ys(o);t=t(n!==void 0?n:e.custom,i,s)}return t}function En(e){return me(e)?e.get():e}function ih({scrapeMotionValuesFromProps:e,createRenderState:t},n,o,i){return{latestValues:sh(n,o,i,e),renderState:t()}}function sh(e,t,n,o){const i={},s=o(e,{});for(const d in s)i[d]=En(s[d]);let{initial:r,animate:a}=e;const l=Kn(e),c=Cl(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 f=u?a:r;if(f&&typeof f!="boolean"&&!Un(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const m=Ji(e,d[h]);if(m){const{transitionEnd:g,transition:y,...x}=m;for(const w in x){let v=x[w];if(Array.isArray(v)){const b=u?v.length-1:0;v=v[b]}v!==null&&(i[w]=v)}for(const w in g)i[w]=g[w]}}}return i}const El=e=>(t,n)=>{const o=C.useContext(Gn),i=C.useContext(Wn),s=()=>ih(e,t,o,i);return n?s():Ri(s)};function Qi(e,t,n){const{style:o}=e,i={};for(const s in o)(me(o[s])||t.style&&me(t.style[s])||Sl(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(i[s]=o[s]);return i}const rh=El({scrapeMotionValuesFromProps:Qi,createRenderState:Yi});function Ml(e,t,n){const o=Qi(e,t,n);for(const i in e)if(me(e[i])||me(t[i])){const s=Ft.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;o[s]=e[i]}return o}const ah=El({scrapeMotionValuesFromProps:Ml,createRenderState:_l}),lh=Symbol.for("motionComponentSymbol");function bt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function ch(e,t,n){return C.useCallback(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),n&&(typeof n=="function"?n(o):bt(n)&&(n.current=o))},[t])}const es=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),uh="framerAppearId",Tl="data-"+es(uh),Al=C.createContext({});function dh(e,t,n,o,i){const{visualElement:s}=C.useContext(Gn),r=C.useContext(xl),a=C.useContext(Wn),l=C.useContext(Ui).reducedMotion,c=C.useRef(null);o=o||r.renderer,!c.current&&o&&(c.current=o(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=C.useContext(Al);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&fh(c.current,n,i,f);const d=C.useRef(!1);C.useInsertionEffect(()=>{u&&d.current&&u.update(n,a)});const h=n[Tl],m=C.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return Pa(()=>{u&&(d.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),m.current&&u.animationState&&u.animationState.animateChanges())}),C.useEffect(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),m.current=!1),u.enteringChildren=void 0)}),u}function fh(e,t,n,o){const{layoutId:i,layout:s,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Vl(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!r||a&&bt(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:o,crossfade:u,layoutScroll:l,layoutRoot:c})}function Vl(e){if(e)return e.options.allowProjection!==!1?e.projection:Vl(e.parent)}function go(e,{forwardMotionProps:t=!1}={},n,o){n&&Of(n);const i=Zi(e)?ah:rh;function s(a,l){let c;const u={...C.useContext(Ui),...a,layoutId:hh(a)},{isStatic:f}=u,d=Wf(a),h=i(a,f);if(!f&&_i){gh(u,n);const m=mh(u);c=m.MeasureLayout,d.visualElement=dh(e,h,u,o,m.ProjectionNode)}return p.jsxs(Gn.Provider,{value:d,children:[c&&d.visualElement?p.jsx(c,{visualElement:d.visualElement,...u}):null,oh(e,a,ch(h,d.visualElement,l),h,f,t)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const r=C.forwardRef(s);return r[lh]=e,r}function hh({layoutId:e}){const t=C.useContext(bi).id;return t&&e!==void 0?t+"-"+e:e}function gh(e,t){const n=C.useContext(xl).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?kt(!1,o,"lazy-strict-mode"):Ke(!1,o,"lazy-strict-mode")}}function mh(e){const{drag:t,layout:n}=At;if(!t&&!n)return{};const o={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function ph(e,t){if(typeof Proxy>"u")return go;const n=new Map,o=(s,r)=>go(s,r,e,t),i=(s,r)=>(process.env.NODE_ENV!=="production"&&Ai(!1,"motion() is deprecated. Use motion.create() instead."),o(s,r));return new Proxy(i,{get:(s,r)=>r==="create"?o:(n.has(r)||n.set(r,go(r,void 0,e,t)),n.get(r))})}function kl({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function vh({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function yh(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}function mo(e){return e===void 0||e===1}function ti({scale:e,scaleX:t,scaleY:n}){return!mo(e)||!mo(t)||!mo(n)}function at(e){return ti(e)||Dl(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Dl(e){return Zs(e.x)||Zs(e.y)}function Zs(e){return e&&e!=="0%"}function $n(e,t,n){const o=e-n,i=t*o;return n+i}function Js(e,t,n,o,i){return i!==void 0&&(e=$n(e,i,o)),$n(e,n,o)+t}function ni(e,t=0,n=1,o,i){e.min=Js(e.min,t,n,o,i),e.max=Js(e.max,t,n,o,i)}function Fl(e,{x:t,y:n}){ni(e.x,t.translate,t.scale,t.originPoint),ni(e.y,n.translate,n.scale,n.originPoint)}const Qs=.999999999999,er=1.0000000000001;function xh(e,t,n,o=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,r;for(let a=0;a<i;a++){s=n[a],r=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&s.options.layoutScroll&&s.scroll&&s!==s.root&&_t(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,Fl(e,r)),o&&at(s.latestValues)&&_t(e,s.latestValues))}t.x<er&&t.x>Qs&&(t.x=1),t.y<er&&t.y>Qs&&(t.y=1)}function Rt(e,t){e.min=e.min+t,e.max=e.max+t}function tr(e,t,n,o,i=.5){const s=se(e.min,e.max,i);ni(e,t,n,s,o)}function _t(e,t){tr(e.x,t.x,t.scaleX,t.scale,t.originX),tr(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ll(e,t){return kl(yh(e.getBoundingClientRect(),t))}function wh(e,t,n){const o=Ll(e,n),{scroll:i}=t;return i&&(Rt(o.x,i.offset.x),Rt(o.y,i.offset.y)),o}const nr=()=>({translate:0,scale:1,origin:0,originPoint:0}),Pt=()=>({x:nr(),y:nr()}),or=()=>({min:0,max:0}),ue=()=>({x:or(),y:or()}),oi={current:null},Il={current:!1};function Ch(){if(Il.current=!0,!!_i)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>oi.current=e.matches;e.addEventListener("change",t),t()}else oi.current=!1}const Sh=new WeakMap;function bh(e,t,n){for(const o in t){const i=t[o],s=n[o];if(me(i))e.addValue(o,i);else if(me(s))e.addValue(o,Tt(i,{owner:e}));else if(s!==i)if(e.hasValue(o)){const r=e.getValue(o);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=e.getStaticValue(o);e.addValue(o,Tt(r!==void 0?r:i,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const ir=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Rh{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:i,blockInitialAnimation:s,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=Bi,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 d=Ce.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,oe.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=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Kn(n),this.isVariantNode=Cl(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&me(h)&&h.set(l[d])}}mount(t){this.current=t,Sh.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,o)=>this.bindToMotionValue(o,n)),Il.current||Ch(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:oi.current,process.env.NODE_ENV!=="production"&&Ai(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(),et(this.notifyUpdate),et(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 o=Lt.has(t);o&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&oe.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),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 At){const n=At[t];if(!n)continue;const{isEnabled:o,Feature:i}=n;if(!this.features[t]&&i&&o(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ue()}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 o=0;o<ir.length;o++){const i=ir[o];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,r=t[s];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=bh(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 o=this.values.get(t);n!==o&&(o&&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 o=this.values.get(t);return o===void 0&&n!==void 0&&(o=Tt(n===null?void 0:n,{owner:this}),this.addValue(t,o)),o}readValue(t,n){let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(Ea(o)||Ta(o))?o=parseFloat(o):!Vf(o)&&tt.test(n)&&(o=dl(t,n)),this.setBaseTarget(t,me(o)?o.get():o)),me(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let o;if(typeof n=="string"||typeof n=="object"){const s=Ji(this.props,n,this.presenceContext?.custom);s&&(o=s[t])}if(n&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!me(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ti),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Wi.render(this.render)}}class jl extends Rh{constructor(){super(...arguments),this.KeyframeResolver=xf}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:o}){delete n[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;me(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function $l(e,{style:t,vars:n},o,i){const s=e.style;let r;for(r in t)s[r]=t[r];i?.applyProjectionStyles(s,o);for(r in n)s.setProperty(r,n[r])}function _h(e){return window.getComputedStyle(e)}class Ph extends jl{constructor(){super(...arguments),this.type="html",this.renderInstance=$l}readValueFromInstance(t,n){if(Lt.has(n))return this.projection?.isProjecting?Ko(n):Id(t,n);{const o=_h(t),i=(Ha(n)?o.getPropertyValue(n):o[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ll(t,n)}build(t,n,o){Xi(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return Qi(t,n,o)}}const Ol=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 Eh(e,t,n,o){$l(e,t,void 0,o);for(const i in t.attrs)e.setAttribute(Ol.has(i)?i:es(i),t.attrs[i])}class Mh extends jl{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ue}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Lt.has(n)){const o=ul(n);return o&&o.default||0}return n=Ol.has(n)?n:es(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return Ml(t,n,o)}build(t,n,o){Rl(t,n,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,n,o,i){Eh(t,n,o,i)}mount(t){this.isSVGTag=Pl(t.tagName),super.mount(t)}}const Th=(e,t)=>Zi(e)?new Mh(t):new Ph(t,{allowProjection:e!==C.Fragment});function Et(e,t,n){const o=e.getProps();return Ji(o,t,n!==void 0?n:o.custom,e)}const ii=e=>Array.isArray(e);function Ah(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Tt(n))}function Vh(e){return ii(e)?e[e.length-1]||0:e}function kh(e,t){const n=Et(e,t);let{transitionEnd:o={},transition:i={},...s}=n||{};s={...s,...o};for(const r in s){const a=Vh(s[r]);Ah(e,r,a)}}function Dh(e){return!!(me(e)&&e.add)}function si(e,t){const n=e.getValue("willChange");if(Dh(n))return n.add(t);if(!n&&qe.WillChange){const o=new qe.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function Nl(e){return e.props[Tl]}const Fh=e=>e!==null;function Lh(e,{repeat:t,repeatType:n="loop"},o){const i=e.filter(Fh),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[s]}const Ih={type:"spring",stiffness:500,damping:25,restSpeed:10},jh=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),$h={type:"keyframes",duration:.8},Oh={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Nh=(e,{keyframes:t})=>t.length>2?$h:Lt.has(e)?e.startsWith("scale")?jh(t[1]):Ih:Oh;function Bh({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:i,repeat:s,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const ts=(e,t,n,o={},i,s)=>r=>{const a=zi(o,e)||{},l=a.delay||o.delay||0;let{elapsed:c=0}=o;c=c-Le(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};Bh(a)||Object.assign(u,Nh(e,u)),u.duration&&(u.duration=Le(u.duration)),u.repeatDelay&&(u.repeatDelay=Le(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Jo(u),u.delay===0&&(f=!0)),(qe.instantAnimations||qe.skipAnimations)&&(f=!0,Jo(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!s&&t.get()!==void 0){const d=Lh(u.keyframes,a);if(d!==void 0){oe.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new Ni(u):new rf(u)};function zh({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function Bl(e,t,{delay:n=0,transitionOverride:o,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:r,...a}=t;o&&(s=o);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const u in a){const f=e.getValue(u,e.latestValues[u]??null),d=a[u];if(d===void 0||c&&zh(c,u))continue;const h={delay:n,...zi(s||{},u)},m=f.get();if(m!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===m&&!h.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const x=Nl(e);if(x){const w=window.MotionHandoffAnimation(x,u,oe);w!==null&&(h.startTime=w,g=!0)}}si(e,u),f.start(ts(u,f,d,e.shouldReduceMotion&&al.has(u)?{type:!1}:h,e,g));const y=f.animation;y&&l.push(y)}return r&&Promise.all(l).then(()=>{oe.update(()=>{r&&kh(e,r)})}),l}function zl(e,t,n,o=0,i=1){const s=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),r=e.size,a=(r-1)*o;return typeof n=="function"?n(s,r):i===1?s*o:a-s*o}function ri(e,t,n={}){const o=Et(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(Bl(e,o,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:f}=i;return Hh(e,t,l,c,u,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,c]=a==="beforeChildren"?[s,r]:[r,s];return l().then(()=>c())}else return Promise.all([s(),r(n.delay)])}function Hh(e,t,n=0,o=0,i=0,s=1,r){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(ri(l,t,{...r,delay:n+(typeof o=="function"?0:o)+zl(e.variantChildren,l,o,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function Wh(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const i=t.map(s=>ri(e,s,n));o=Promise.all(i)}else if(typeof t=="string")o=ri(e,t,n);else{const i=typeof t=="function"?Et(e,t,n.custom):t;o=Promise.all(Bl(e,i,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}function Hl(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}const Gh=qi.length;function Wl(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Wl(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Gh;n++){const o=qi[n],i=e.props[o];(Qt(i)||i===!1)&&(t[o]=i)}return t}const Uh=[...Ki].reverse(),Kh=Ki.length;function qh(e){return t=>Promise.all(t.map(({animation:n,options:o})=>Wh(e,n,o)))}function Xh(e){let t=qh(e),n=sr(),o=!0;const i=l=>(c,u)=>{const f=Et(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:h,...m}=f;c={...c,...m,...h}}return c};function s(l){t=l(e)}function r(l){const{props:c}=e,u=Wl(e.parent)||{},f=[],d=new Set;let h={},m=1/0;for(let y=0;y<Kh;y++){const x=Uh[y],w=n[x],v=c[x]!==void 0?c[x]:u[x],b=Qt(v),S=x===l?w.isActive:null;S===!1&&(m=y);let M=v===u[x]&&v!==c[x]&&b;if(M&&o&&e.manuallyAnimateOnMount&&(M=!1),w.protectedKeys={...h},!w.isActive&&S===null||!v&&!w.prevProp||Un(v)||typeof v=="boolean")continue;const A=Yh(w.prevProp,v);let E=A||x===l&&w.isActive&&!M&&b||y>m&&b,k=!1;const F=Array.isArray(v)?v:[v];let $=F.reduce(i(x),{});S===!1&&($={});const{prevResolvedValues:N={}}=w,j={...N,...$},D=P=>{E=!0,d.has(P)&&(k=!0,d.delete(P)),w.needsAnimating[P]=!0;const _=e.getValue(P);_&&(_.liveStyle=!1)};for(const P in j){const _=$[P],T=N[P];if(h.hasOwnProperty(P))continue;let I=!1;ii(_)&&ii(T)?I=!Hl(_,T):I=_!==T,I?_!=null?D(P):d.add(P):_!==void 0&&d.has(P)?D(P):w.protectedKeys[P]=!0}w.prevProp=v,w.prevResolvedValues=$,w.isActive&&(h={...h,...$}),o&&e.blockInitialAnimation&&(E=!1);const O=M&&A;E&&(!O||k)&&f.push(...F.map(P=>{const _={type:x};if(typeof P=="string"&&o&&!O&&e.manuallyAnimateOnMount&&e.parent){const{parent:T}=e,I=Et(T,P);if(T.enteringChildren&&I){const{delayChildren:q}=I.transition||{};_.delay=zl(T.enteringChildren,e,q)}}return{animation:P,options:_}}))}if(d.size){const y={};if(typeof c.initial!="boolean"){const x=Et(e,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(y.transition=x.transition)}d.forEach(x=>{const w=e.getBaseTarget(x),v=e.getValue(x);v&&(v.liveStyle=!0),y[x]=w??null}),f.push({animation:y})}let g=!!f.length;return o&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),o=!1,g?t(f):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(l,c)),n[l].isActive=c;const u=r(l);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=sr()}}}function Yh(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Hl(t,e):!1}function rt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function sr(){return{animate:rt(!0),whileInView:rt(),whileHover:rt(),whileTap:rt(),whileDrag:rt(),whileFocus:rt(),exit:rt()}}class st{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Zh extends st{constructor(t){super(t),t.animationState||(t.animationState=Xh(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Un(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 Jh=0;class Qh extends st{constructor(){super(...arguments),this.id=Jh++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.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 eg={animation:{Feature:Zh},exit:{Feature:Qh}};function en(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function an(e){return{point:{x:e.pageX,y:e.pageY}}}const tg=e=>t=>Gi(t)&&e(t,an(t));function Ut(e,t,n,o){return en(e,t,tg(n),o)}const Gl=1e-4,ng=1-Gl,og=1+Gl,Ul=.01,ig=0-Ul,sg=0+Ul;function ye(e){return e.max-e.min}function rg(e,t,n){return Math.abs(e-t)<=n}function rr(e,t,n,o=.5){e.origin=o,e.originPoint=se(t.min,t.max,e.origin),e.scale=ye(n)/ye(t),e.translate=se(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ng&&e.scale<=og||isNaN(e.scale))&&(e.scale=1),(e.translate>=ig&&e.translate<=sg||isNaN(e.translate))&&(e.translate=0)}function Kt(e,t,n,o){rr(e.x,t.x,n.x,o?o.originX:void 0),rr(e.y,t.y,n.y,o?o.originY:void 0)}function ar(e,t,n){e.min=n.min+t.min,e.max=e.min+ye(t)}function ag(e,t,n){ar(e.x,t.x,n.x),ar(e.y,t.y,n.y)}function lr(e,t,n){e.min=t.min-n.min,e.max=e.min+ye(t)}function On(e,t,n){lr(e.x,t.x,n.x),lr(e.y,t.y,n.y)}function Me(e){return[e("x"),e("y")]}const Kl=({current:e})=>e?e.ownerDocument.defaultView:null,cr=(e,t)=>Math.abs(e-t);function lg(e,t){const n=cr(e.x,t.x),o=cr(e.y,t.y);return Math.sqrt(n**2+o**2)}class ql{constructor(t,n,{transformPagePoint:o,contextWindow:i=window,dragSnapToOrigin:s=!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 d=vo(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,m=lg(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!m)return;const{point:g}=d,{timestamp:y}=de;this.history.push({...g,timestamp:y});const{onStart:x,onMove:w}=this.handlers;h||(x&&x(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=po(h,this.transformPagePoint),oe.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=vo(d.type==="pointercancel"?this.lastMoveEventInfo:po(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(d,x),g&&g(d,x)},!Gi(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=o,this.distanceThreshold=r,this.contextWindow=i||window;const a=an(t),l=po(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=de;this.history=[{...c,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,vo(l,this.history)),this.removeListeners=on(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(),et(this.updatePoint)}}function po(e,t){return t?{point:t(e.point)}:e}function ur(e,t){return{x:e.x-t.x,y:e.y-t.y}}function vo({point:e},t){return{point:e,delta:ur(e,Xl(t)),offset:ur(e,cg(t)),velocity:ug(t,.1)}}function cg(e){return e[0]}function Xl(e){return e[e.length-1]}function ug(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const i=Xl(e);for(;n>=0&&(o=e[n],!(i.timestamp-o.timestamp>Le(t)));)n--;if(!o)return{x:0,y:0};const s=Te(i.timestamp-o.timestamp);if(s===0)return{x:0,y:0};const r={x:(i.x-o.x)/s,y:(i.y-o.y)/s};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function dg(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?se(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?se(n,e,o.max):Math.min(e,n)),e}function dr(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 fg(e,{top:t,left:n,bottom:o,right:i}){return{x:dr(e.x,n,i),y:dr(e.y,t,o)}}function fr(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function hg(e,t){return{x:fr(e.x,t.x),y:fr(e.y,t.y)}}function gg(e,t){let n=.5;const o=ye(e),i=ye(t);return i>o?n=Yt(t.min,t.max-o,e.min):o>i&&(n=Yt(e.min,e.max-i,t.min)),Ue(0,1,n)}function mg(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 ai=.35;function pg(e=ai){return e===!1?e=0:e===!0&&(e=ai),{x:hr(e,"left","right"),y:hr(e,"top","bottom")}}function hr(e,t,n){return{min:gr(e,t),max:gr(e,n)}}function gr(e,t){return typeof e=="number"?e:e[t]||0}const vg=new WeakMap;class yg{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=ue(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:o}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(an(f).point)},r=(f,d)=>{const{drag:h,dragPropagation:m,onDragStart:g}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=bf(h),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Me(x=>{let w=this.getAxisMotionValue(x).get()||0;if(Oe.test(w)){const{projection:v}=this.visualElement;if(v&&v.layout){const b=v.layout.layoutBox[x];b&&(w=ye(b)*(parseFloat(w)/100))}}this.originPoint[x]=w}),g&&oe.postRender(()=>g(f,d)),si(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:g,onDrag:y}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:x}=d;if(m&&this.currentDirection===null){this.currentDirection=xg(x),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",d.point,x),this.updateAxis("y",d.point,x),this.visualElement.render(),y&&y(f,d)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>Me(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new ql(t,{onSessionStart:s,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:o,contextWindow:Kl(this.visualElement)})}stop(t,n){const o=t||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!o)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&oe.postRender(()=>a(o,i))}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:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,o){const{drag:i}=this.getProps();if(!o||!pn(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let r=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(r=dg(r,this.constraints[t],this.elastic[t])),s.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&bt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=fg(o.layoutBox,t):this.constraints=!1,this.elastic=pg(n),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Me(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=mg(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!bt(t))return!1;const o=t.current;Ke(o!==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:i}=this.visualElement;if(!i||!i.layout)return!1;const s=wh(o,i.root,this.visualElement.getTransformPagePoint());let r=hg(i.layout.layoutBox,s);if(n){const a=n(vh(r));this.hasMutatedConstraints=!!a,a&&(r=kl(a))}return r}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:i,dragTransition:s,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Me(u=>{if(!pn(u,n,this.currentDirection))return;let f=l&&l[u]||{};r&&(f={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:o?t[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return si(this.visualElement,t),o.start(ts(t,o,0,n,this.visualElement,!1))}stopAnimation(){Me(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Me(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),i=o[n];return i||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){Me(n=>{const{drag:o}=this.getProps();if(!pn(n,o,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];s.set(t[n]-se(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!bt(n)||!o||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Me(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=gg({min:l,max:l},this.constraints[r])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),Me(r=>{if(!pn(r,t,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(se(l,c,i[r]))})}addListeners(){if(!this.visualElement.current)return;vg.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)}),o=()=>{const{dragConstraints:l}=this.getProps();bt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",o);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),oe.read(o);const r=en(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Me(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())}));return()=>{r(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:r=ai,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:i,dragConstraints:s,dragElastic:r,dragMomentum:a}}}function pn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function xg(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class wg extends st{constructor(t){super(t),this.removeGroupControls=Ae,this.removeListeners=Ae,this.controls=new yg(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ae}unmount(){this.removeGroupControls(),this.removeListeners()}}const mr=e=>(t,n)=>{e&&oe.postRender(()=>e(t,n))};class Cg extends st{constructor(){super(...arguments),this.removePointerDownListener=Ae}onPointerDown(t){this.session=new ql(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Kl(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:i}=this.node.getProps();return{onSessionStart:mr(t),onStart:mr(n),onMove:o,onEnd:(s,r)=>{delete this.session,i&&oe.postRender(()=>i(s,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 Mn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let yo=!1;class Sg extends C.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:i}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),o&&o.register&&i&&o.register(s),yo&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Mn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:i,isPresent:s}=this.props,{projection:r}=o;return r&&(r.isPresent=s,yo=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?r.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?r.promote():r.relegate()||oe.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Wi.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:i}=t;yo=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),o&&o.deregister&&o.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Yl(e){const[t,n]=yl(),o=C.useContext(bi);return p.jsx(Sg,{...e,layoutGroup:o,switchLayoutGroup:C.useContext(Al),isPresent:t,safeToRemove:n})}function bg(e,t,n){const o=me(e)?e:Tt(e);return o.start(ts("",o,t,n)),o.animation}const Rg=(e,t)=>e.depth-t.depth;class _g{constructor(){this.children=[],this.isDirty=!1}add(t){Pi(this.children,t),this.isDirty=!0}remove(t){Ei(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Rg),this.isDirty=!1,this.children.forEach(t)}}function Pg(e,t){const n=Ce.now(),o=({timestamp:i})=>{const s=i-n;s>=t&&(et(o),e(s-t))};return oe.setup(o,!0),()=>et(o)}const Zl=["TopLeft","TopRight","BottomLeft","BottomRight"],Eg=Zl.length,pr=e=>typeof e=="string"?parseFloat(e):e,vr=e=>typeof e=="number"||G.test(e);function Mg(e,t,n,o,i,s){i?(e.opacity=se(0,n.opacity??1,Tg(o)),e.opacityExit=se(t.opacity??1,0,Ag(o))):s&&(e.opacity=se(t.opacity??1,n.opacity??1,o));for(let r=0;r<Eg;r++){const a=`border${Zl[r]}Radius`;let l=yr(t,a),c=yr(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||vr(l)===vr(c)?(e[a]=Math.max(se(pr(l),pr(c),o),0),(Oe.test(c)||Oe.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=se(t.rotate||0,n.rotate||0,o))}function yr(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Tg=Jl(0,.5,ja),Ag=Jl(.5,.95,Ae);function Jl(e,t,n){return o=>o<e?0:o>t?1:n(Yt(e,t,o))}function xr(e,t){e.min=t.min,e.max=t.max}function ke(e,t){xr(e.x,t.x),xr(e.y,t.y)}function wr(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Cr(e,t,n,o,i){return e-=t,e=$n(e,1/n,o),i!==void 0&&(e=$n(e,1/i,o)),e}function Vg(e,t=0,n=1,o=.5,i,s=e,r=e){if(Oe.test(t)&&(t=parseFloat(t),t=se(r.min,r.max,t/100)-r.min),typeof t!="number")return;let a=se(s.min,s.max,o);e===s&&(a-=t),e.min=Cr(e.min,t,n,a,i),e.max=Cr(e.max,t,n,a,i)}function Sr(e,t,[n,o,i],s,r){Vg(e,t[n],t[o],t[i],t.scale,s,r)}const kg=["x","scaleX","originX"],Dg=["y","scaleY","originY"];function br(e,t,n,o){Sr(e.x,t,kg,n?n.x:void 0,o?o.x:void 0),Sr(e.y,t,Dg,n?n.y:void 0,o?o.y:void 0)}function Rr(e){return e.translate===0&&e.scale===1}function Ql(e){return Rr(e.x)&&Rr(e.y)}function _r(e,t){return e.min===t.min&&e.max===t.max}function Fg(e,t){return _r(e.x,t.x)&&_r(e.y,t.y)}function Pr(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ec(e,t){return Pr(e.x,t.x)&&Pr(e.y,t.y)}function Er(e){return ye(e.x)/ye(e.y)}function Mr(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Lg{constructor(){this.members=[]}add(t){Pi(this.members,t),t.scheduleRender()}remove(t){if(Ei(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(i=>t===i);if(n===0)return!1;let o;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){o=s;break}}return o?(this.promote(o),!0):!1}promote(t,n){const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,n&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:o}=t;n.onExitComplete&&n.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Ig(e,t,n){let o="";const i=e.x.translate/t.x,s=e.y.translate/t.y,r=n?.z||0;if((i||s||r)&&(o=`translate3d(${i}px, ${s}px, ${r}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:d,skewX:h,skewY:m}=n;c&&(o=`perspective(${c}px) ${o}`),u&&(o+=`rotate(${u}deg) `),f&&(o+=`rotateX(${f}deg) `),d&&(o+=`rotateY(${d}deg) `),h&&(o+=`skewX(${h}deg) `),m&&(o+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(o+=`scale(${a}, ${l})`),o||"none"}const xo=["","X","Y","Z"],jg=1e3;let $g=0;function wo(e,t,n,o){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),o&&(o[e]=0))}function tc(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Nl(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",oe,!(i||s))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&tc(o)}function nc({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:i}){return class{constructor(r={},a=t?.()){this.id=$g++,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.layoutVersion=0,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(Bg),this.nodes.forEach(Gg),this.nodes.forEach(Ug),this.nodes.forEach(zg)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=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 _g)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Ti),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=vl(r)&&!Tf(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,f=0;const d=()=>this.root.updateBlockedByResize=!1;oe.read(()=>{f=window.innerWidth}),e(r,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,u&&u(),u=Pg(d,250),Mn.hasAnimatedSinceResize&&(Mn.hasAnimatedSinceResize=!1,this.nodes.forEach(Vr)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||Zg,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=c.getProps(),x=!this.targetLayout||!ec(this.targetLayout,h),w=!f&&d;if(this.options.layoutRoot||this.resumeFrom||w||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...zi(m,"layout"),onPlay:g,onComplete:y};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,w)}else f||Vr(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(),et(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(Kg),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&&tc(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.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(Tr);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ar);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Wg),this.nodes.forEach(Og),this.nodes.forEach(Ng)):this.nodes.forEach(Ar),this.clearAllSnapshots();const a=Ce.now();de.delta=Ue(0,1e3/60,a-de.timestamp),de.timestamp=a,de.isProcessing=!0,ao.update.process(de),ao.preRender.process(de),ao.render.process(de),de.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Wi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Hg),this.sharedNodes.forEach(qg)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,oe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){oe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ye(this.snapshot.measuredBox.x)&&!ye(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.layoutVersion++,this.layoutCorrected=ue(),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=o(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(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ql(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(a||at(this.latestValues)||u)&&(i(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)),Jg(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return ue();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Qg))){const{scroll:c}=this.root;c&&(Rt(a.x,c.offset.x),Rt(a.y,c.offset.y))}return a}removeElementScroll(r){const a=ue();if(ke(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;c!==this.root&&u&&f.layoutScroll&&(u.wasRoot&&ke(a,r),Rt(a.x,u.offset.x),Rt(a.y,u.offset.y))}return a}applyTransform(r,a=!1){const l=ue();ke(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&&_t(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),at(u.latestValues)&&_t(l,u.latestValues)}return at(this.latestValues)&&_t(l,this.latestValues),l}removeTransform(r){const a=ue();ke(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!at(c.latestValues))continue;ti(c.latestValues)&&c.updateSnapshot();const u=ue(),f=c.measurePageBox();ke(u,f),br(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return at(this.latestValues)&&br(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!==de.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:f}=this.options;if(!this.layout||!(u||f))return;this.resolvedRelativeTargetAt=de.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ue(),this.targetWithTransforms=ue()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ag(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ke(this.target,this.layout.layoutBox),Fl(this.target,this.targetDelta)):ke(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||ti(this.parent.latestValues)||Dl(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,a,l){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ue(),this.relativeTargetOrigin=ue(),On(this.relativeTargetOrigin,a,l),ke(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}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===de.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;ke(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;xh(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=ue());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(wr(this.prevProjectionDelta.x,this.projectionDelta.x),wr(this.prevProjectionDelta.y,this.projectionDelta.y)),Kt(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!Mr(this.projectionDelta.x,this.prevProjectionDelta.x)||!Mr(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=Pt(),this.projectionDelta=Pt(),this.projectionDeltaWithTransform=Pt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=Pt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=ue(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=h!==m,y=this.getStack(),x=!y||y.members.length<=1,w=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(Yg));this.animationProgress=0;let v;this.mixTargetDelta=b=>{const S=b/1e3;kr(f.x,r.x,S),kr(f.y,r.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(On(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Xg(this.relativeTarget,this.relativeTargetOrigin,d,S),v&&Fg(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=ue()),ke(v,this.relativeTarget)),g&&(this.animationValues=u,Mg(u,c,this.latestValues,S,w,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(et(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=oe.update(()=>{Mn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Tt(0)),this.currentAnimation=bg(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(jg),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&&oc(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||ue();const f=ye(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+f;const d=ye(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+d}ke(a,l),_t(a,u),Kt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Lg),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&&wo("z",r,c,this.animationValues);for(let u=0;u<xo.length;u++)wo(`rotate${xo[u]}`,r,c,this.animationValues),wo(`skew${xo[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=En(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=En(a?.pointerEvents)||""),this.hasProjected&&!at(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let f=Ig(this.projectionDeltaWithTransform,this.treeScale,u);l&&(f=l(u,f)),r.transform=f;const{x:d,y:h}=this.projectionDelta;r.transformOrigin=`${d.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 m in ei){if(u[m]===void 0)continue;const{correct:g,applyTo:y,isCSSVariable:x}=ei[m],w=f==="none"?u[m]:g(u[m],c);if(y){const v=y.length;for(let b=0;b<v;b++)r[y[b]]=w}else x?this.options.visualElement.renderState.vars[m]=w:r[m]=w}this.options.layoutId&&(r.pointerEvents=c===this?En(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Tr),this.root.sharedNodes.clear()}}}function Og(e){e.updateLayout()}function Ng(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:o}=e.layout,{animationType:i}=e.options,s=t.source!==e.layout.source;i==="size"?Me(u=>{const f=s?t.measuredBox[u]:t.layoutBox[u],d=ye(f);f.min=n[u].min,f.max=f.min+d}):oc(i,t.layoutBox,n)&&Me(u=>{const f=s?t.measuredBox[u]:t.layoutBox[u],d=ye(n[u]);f.max=f.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+d)});const r=Pt();Kt(r,n,t.layoutBox);const a=Pt();s?Kt(a,e.applyTransform(o,!0),t.measuredBox):Kt(a,n,t.layoutBox);const l=!Ql(r);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:f,layout:d}=u;if(f&&d){const h=ue();On(h,t.layoutBox,f.layoutBox);const m=ue();On(m,n,d.layoutBox),ec(h,m)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=m,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 Bg(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 zg(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Hg(e){e.clearSnapshot()}function Tr(e){e.clearMeasurements()}function Ar(e){e.isLayoutDirty=!1}function Wg(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Vr(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Gg(e){e.resolveTargetDelta()}function Ug(e){e.calcProjection()}function Kg(e){e.resetSkewAndRotation()}function qg(e){e.removeLeadSnapshot()}function kr(e,t,n){e.translate=se(t.translate,0,n),e.scale=se(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Dr(e,t,n,o){e.min=se(t.min,n.min,o),e.max=se(t.max,n.max,o)}function Xg(e,t,n,o){Dr(e.x,t.x,n.x,o),Dr(e.y,t.y,n.y,o)}function Yg(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Zg={duration:.45,ease:[.4,0,.1,1]},Fr=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Lr=Fr("applewebkit/")&&!Fr("chrome/")?Math.round:Ae;function Ir(e){e.min=Lr(e.min),e.max=Lr(e.max)}function Jg(e){Ir(e.x),Ir(e.y)}function oc(e,t,n){return e==="position"||e==="preserve-aspect"&&!rg(Er(t),Er(n),.2)}function Qg(e){return e!==e.root&&e.scroll?.wasRoot}const em=nc({attachResizeListener:(e,t)=>en(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Co={current:void 0},ic=nc({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Co.current){const e=new em({});e.mount(window),e.setOptions({layoutScroll:!0}),Co.current=e}return Co.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),tm={pan:{Feature:Cg},drag:{Feature:wg,ProjectionNode:ic,MeasureLayout:Yl}};function jr(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=o[i];s&&oe.postRender(()=>s(t,an(t)))}class nm extends st{mount(){const{current:t}=this.node;t&&(this.unmount=Rf(t,(n,o)=>(jr(this.node,o,"Start"),i=>jr(this.node,i,"End"))))}unmount(){}}class om extends st{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=on(en(this.node.current,"focus",()=>this.onFocus()),en(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function $r(e,t,n){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=o[i];s&&oe.postRender(()=>s(t,an(t)))}class im extends st{mount(){const{current:t}=this.node;t&&(this.unmount=Mf(t,(n,o)=>($r(this.node,o,"Start"),(i,{success:s})=>$r(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const li=new WeakMap,So=new WeakMap,sm=e=>{const t=li.get(e.target);t&&t(e)},rm=e=>{e.forEach(sm)};function am({root:e,...t}){const n=e||document;So.has(n)||So.set(n,{});const o=So.get(n),i=JSON.stringify(t);return o[i]||(o[i]=new IntersectionObserver(rm,{root:e,...t})),o[i]}function lm(e,t,n){const o=am(t);return li.set(e,n),o.observe(e),()=>{li.delete(e),o.unobserve(e)}}const cm={some:0,all:1};class um extends st{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:i="some",once:s}=t,r={root:n?n.current:void 0,rootMargin:o,threshold:typeof i=="number"?i:cm[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=c?u:f;d&&d(l)};return lm(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(dm(t,n))&&this.startObserver()}unmount(){}}function dm({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const fm={inView:{Feature:um},tap:{Feature:im},focus:{Feature:om},hover:{Feature:nm}},hm={layout:{ProjectionNode:ic,MeasureLayout:Yl}},gm={...eg,...fm,...tm,...hm},qn=ph(gm,Th),mm="_primary_13825_8",pm="_secondary_13825_12",vm="_tertiary_13825_16",ym="_positive_13825_20",xm="_negative_13825_24",wm="_warning_13825_28",Cm="_accent_13825_32",Sm="_inverse_13825_36",bm="_text_13825_111",Rm="_regular_13825_117",_m="_medium_13825_121",Pm="_semibold_13825_125",Em="_bold_13825_129",vn={primary:mm,secondary:pm,tertiary:vm,positive:ym,negative:xm,warning:wm,accent:Cm,inverse:Sm,"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:bm,regular:Rm,medium:_m,semibold:Pm,bold:Em},Mm=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"),V.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})},K=C.forwardRef(({children:e,className:t,variant:n="body-1",fontWeight:o="medium",tag:i="p",colorName:s="primary",style:r,clickOpacity:a=.5,opacityDuration:l=200,onClick:c,disabled:u,mt:f,mb:d,ml:h,mr:m,flex:g,cursor:y,wordBreak:x,whiteSpace:w,textOverflow:v,decoration:b,color:S,center:M,left:A,right:E,uppercase:k,lowercase:F,capitalize:$,overflow:N,...j},D)=>{const[O,B]=C.useState(!1),P=!!c,_=()=>P&&B(!0),T=()=>P&&B(!1),I=Mm({mt:f,mb:d,ml:h,mr:m,flex:g,cursor:y,wordBreak:x,whiteSpace:w,textOverflow:v,decoration:b,color:S,center:M,left:A,right:E,uppercase:k,lowercase:F,capitalize:$,overflow:N}),q=i,U=P?V.css({opacity:O?a:1,transition:`opacity ${l}ms ease`}):"";return p.jsx(q,{ref:D,...j,className:V.cx(vn.text,vn[n],vn[s],vn[o],U,t,I),style:r,onClick:c,onMouseDown:_,onMouseUp:T,onMouseLeave:T,onTouchStart:_,onTouchEnd:T,role:P?"button":void 0,tabIndex:P?0:void 0,children:e})});K.displayName="Text";const sc=qn(K),Tm=V.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}),Bt={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)"},Am={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},Vm={clear:V.css({backgroundColor:"transparent",border:"none"}),filled:V.css({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:V.css({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},km=(e,t,n,o)=>{if(o)return V.css({cursor:"not-allowed",opacity:.7});const i={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 V.css({...i,backgroundColor:`var(--fill-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${t}-${n}-hover)`}});case"outline":return V.css({...i,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 V.css({...i,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});default:return V.css(i)}},ci=({disabled:e,loading:t,wrapperClassName:n,buttonClassName:o,buttonDisabledClassName:i,textClassName:s,children:r,variant:a="filled",backgroundColor:l,textColor:c,textFontWeight:u,borderColor:f,color:d="accent",opacity:h,borderRadius:m,width:g="full",size:y="md",iconLeft:x,iconRight:w,intensity:v="primary",flex:b,type:S="button",...M})=>{const A=C.useMemo(()=>{switch(g){case"full":return"100%";case"auto":return"auto";default:return g}},[g]),E=C.useMemo(()=>l||(a==="filled"?d==="neutral"?"var(--fill-neutral-secondary)":`var(--fill-${d}-${v})`:"transparent"),[a,l,d,v]),k=C.useMemo(()=>{if(v==="primary"){if(d==="neutral")return"var(--text-secondary)";if(a==="filled")return"var(--text-inverse)"}else if(d==="neutral")return"var(--text-secondary)";return`var(--text-${d})`},[v,d,a]),F=C.useMemo(()=>{if(v==="primary"){if(d==="neutral")return"secondary";if(a==="filled")return"inverse"}else if(d==="neutral")return"secondary";return d},[a,d,v]),$=C.useMemo(()=>f||(a==="outline"?`var(--border-${d}-${v})`:"transparent"),[a,f,d,v]),N=C.useMemo(()=>{switch(y){case"lg":return Bt.lg;case"md":case"sm":return Bt.md;case"xs":return Bt.sm;default:return Bt.md}},[y]),j=V.cx(Tm,km(a,d,v,e),Vm[a],e?i:void 0,V.css({borderRadius:m?Bt[m]:N,backgroundColor:E,borderColor:$,color:c,width:"100%",height:Am[y],opacity:h||(e?.7:1)}),o),D=C.useMemo(()=>{switch(y){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[y]);return p.jsx(L,{className:V.cx(n),w:A,flex:b,relative:!0,overflow:"hidden",children:p.jsxs(qn.button,{...M,whileTap:!e&&!t?{scale:.99,boxShadow:"inset 0 0 0 10000px rgba(0,0,0,0.1)",transition:{duration:0}}:{},disabled:e||t,className:j,children:[t?p.jsx(Ca,{color:k}):p.jsxs(p.Fragment,{children:[x,p.jsx(sc,{style:{color:c},colorName:F,variant:D,className:s,textOverflow:"ellipsis",overflow:"hidden",children:r}),w]}),p.jsx(gt,{})]})})},Dm=e=>R.createElement("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",...e},R.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),Fm=e=>R.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...e},R.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),Lm="_checkbox_22ifd_8",Im="_disabled_22ifd_14",jm="_checkbox__ripple_22ifd_14",$m="_checkbox__input_22ifd_26",Om="_checkbox__box_22ifd_33",Nm="_secondary_22ifd_46",Bm="_checked_22ifd_52",zm="_error_22ifd_61",ze={checkbox:Lm,disabled:Im,checkbox__ripple:jm,checkbox__input:$m,checkbox__box:Om,secondary:Nm,checked:Bm,error:zm},Hm={sm:20,md:24},ns=C.forwardRef(({checked:e,onChange:t,disabled:n,error:o,indeterminate:i,size:s="md",title:r,titleColor:a,subtitle:l,subtitleColor:c="secondary",name:u,required:f,variant:d="primary",flex:h,readOnly:m},g)=>{const[y,x]=C.useState(!1),w=e!==void 0,v=w?e:y,b=k=>{w||x(k.target.checked),t?.(k)},S=Hm[s],M=v||i,A=!!m&&!n,E=n?"not-allowed":A?"auto":"pointer";return p.jsxs("label",{className:V.cx(ze.checkbox,V.css({flex:h,cursor:E}),{[ze.disabled]:n}),children:[p.jsxs(L,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${S}px`,"--checkbox-size-double":`${S*2}px`},children:[p.jsx("input",{ref:g,type:"checkbox",checked:v,onChange:A?void 0:b,onClick:k=>k.stopPropagation(),disabled:n,readOnly:A,name:u,required:f,className:V.cx(ze.checkbox__input,{[ze.disabled]:n},V.css({cursor:E}))}),p.jsx("div",{className:V.cx(ze.checkbox__box,ze[d],{[ze.disabled]:n,[ze.error]:o,[ze.checked]:M}),children:M&&(i?p.jsx(Fm,{width:S*.75,height:S*.75}):p.jsx(Dm,{width:S*.75,height:S*.75}))})]}),(r||l)&&p.jsxs(L,{gap:4,children:[r&&p.jsx(K,{colorName:a,variant:s==="sm"?"body-2":"body-1",children:r}),l&&p.jsx(K,{variant:"body-2",colorName:c,children:l})]})]})});ns.displayName="Checkbox";const Wm=e=>R.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("g",{opacity:.5},R.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"}))),Gm="_disabled_1kvy1_20",Um="_multiline_1kvy1_24",Km="_input_1kvy1_8",qm="_sm_1kvy1_74",Xm="_md_1kvy1_79",Ym="_error_1kvy1_84",Zm="_primary_1kvy1_88",Jm="_secondary_1kvy1_92",we={"input-container":"_input-container_1kvy1_8",disabled:Gm,multiline:Um,input:Km,"input-text-size_sm":"_input-text-size_sm_1kvy1_55","input-text-size_md":"_input-text-size_md_1kvy1_59","input-text-align_left":"_input-text-align_left_1kvy1_64","input-text-align_center":"_input-text-align_center_1kvy1_67","input-text-align_right":"_input-text-align_right_1kvy1_70",sm:qm,md:Xm,error:Ym,primary:Zm,secondary:Jm,"clear-button":"_clear-button_1kvy1_96"};function Or(e){return{...new Event("input",{bubbles:!0}),target:e,currentTarget:e}}const rc=C.forwardRef((e,t)=>{const{label:n,prompt:o,error:i,errorText:s,size:r="md",prefix:a,suffix:l,background:c="primary",showClearButton:u,disabled:f,value:d,defaultValue:h,inputClassName:m,textAlign:g="left",...y}=e,x=e.multiline===!0,w=C.useRef(null),v=C.useRef(null),[b,S]=mt(typeof d=="string"||typeof d=="number"?String(d):void 0,typeof h=="string"||typeof h=="number"?String(h):"");C.useImperativeHandle(t,()=>({focus:()=>{w.current?.focus(),v.current?.focus()},blur:()=>{w.current?.blur(),v.current?.blur()},get value(){return w.current?.value||v.current?.value},set value(k){S(k),w.current&&(w.current.value=k),v.current&&(v.current.value=k)}}));const M=k=>{if(S(k.target.value),x){const F=e.onChange;F?.(k)}else{const F=e.onChange;F?.(k)}};C.useEffect(()=>{x&&e.autoResize&&v.current&&(v.current.style.height="auto",v.current.style.height=`${v.current.scrollHeight}px`)},[b,x,e.autoResize]);const A=()=>{if(S(""),!x){const F=w.current;if(F){F.value="";const $=Or(F),N=e.onChange;N?.($)}return}const k=v.current;if(k){k.value="";const F=Or(k),$=e.onChange;$?.(F)}},E=()=>{if(x){const{rows:N,autoResize:j,onChange:D,multiline:O,...B}=y;return p.jsx("textarea",{ref:v,rows:e.rows??3,className:V.cx(we.input,m,{[we.disabled]:f,[we[`input-text-align_${g}`]]:!!g}),disabled:f,maxLength:e.maxLength,...B,value:b,onChange:M})}const{onChange:k,multiline:F,...$}=y;return p.jsx("input",{...$,ref:w,className:V.cx(we.input,we[`input-text-size_${r}`],m,{[we.disabled]:f,[we[`input-text-align_${g}`]]:!!g}),disabled:f,type:e.type??"text",value:b,onChange:M})};return p.jsxs(L,{w:"full",gap:"var(--spacing-sm)",children:[typeof n=="string"?p.jsx(K,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:n}):n,p.jsxs(L,{row:!0,alignItems:x?"flex-start":"center",w:"full",gap:"var(--spacing-md)",className:V.cx(we["input-container"],we[c],we[r],{[we.error]:i,[we.disabled]:f,[we.multiline]:x}),children:[a&&p.jsx(L,{flex:"none",children:a}),p.jsx(L,{flex:"1",children:E()}),u&&b&&!f&&p.jsx(L,{flex:"none",children:p.jsx("span",{className:we["clear-button"],onClick:A,children:p.jsx(Wm,{})})}),l&&p.jsx(L,{flex:"none",children:l})]}),(o||x)&&p.jsxs(L,{row:!0,gap:10,w:"full",children:[typeof o=="string"?p.jsx(K,{variant:"caption-1",colorName:"tertiary",children:o}):o,x&&e.maxLength&&p.jsx(K,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${b.length}/${e.maxLength}`})]}),s&&i&&p.jsx(K,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:s})]})});rc.displayName="Input";const Qm="_input_5xq63_8",ep="_disabled_5xq63_29",tp="_error_5xq63_37",np="_success_5xq63_41",op="_white_5xq63_50",ip="_gray_5xq63_54",sp="_glow_5xq63_58",vt={input:Qm,disabled:ep,error:tp,success:np,white:op,gray:ip,glow:sp};function rp(e){const t=C.useRef(void 0);return C.useEffect(()=>{t.current=e},[e]),t.current}const ac=C.forwardRef(({length:e=6,label:t,prompt:n,error:o,errorText:i,success:s,disabled:r,autoFocus:a,center:l,secure:c,loading:u,background:f="gray",numeric:d=!0,className:h,value:m,defaultValue:g,onChange:y,onComplete:x},w)=>{const v=typeof m=="string",b=v?m:g,S=typeof b=="string"?b.slice(0,e):"",[M,A]=mt(v?m:void 0,S),[E,k]=C.useState(()=>{const P=S.slice(0,e);return Array.from({length:e},(_,T)=>P[T]??"")}),F=C.useRef(void 0),$=rp(m),N=C.useRef([]);C.useEffect(()=>{if(!v)return;const P=m??"";if(P===$)return;if(P===F.current){F.current=void 0;return}const _=P.slice(0,e);k(Array.from({length:e},(T,I)=>_[I]??""))},[v,m,e,$]);const j=C.useCallback((P,_)=>{const T=P.slice(0,e);_?.fromInternal&&(F.current=T),A(T),y?.(T),T.length===e&&x?.(T)},[e,y,x,A]);C.useImperativeHandle(w,()=>({focus:()=>{N.current[0]?.focus()},blur:()=>{N.current.forEach(P=>P?.blur())},get value(){return M||""},setValue:P=>{const _=P.slice(0,e);k(Array.from({length:e},(T,I)=>_[I]??"")),j(_,{fromInternal:!0})},clear:()=>{k(Array.from({length:e},()=>"")),j("",{fromInternal:!0})}}),[e,j,M]);const D=C.useCallback((P,_)=>{if(r)return;let T=_;if(d&&(T=T.replace(/\D/g,"")),T.length>1){const X=E.slice(0,P).join("")+T+E.slice(P+1).join(""),te=Array.from({length:e},(le,_e)=>X[_e]??"");k(te),j(X,{fromInternal:!0});const Y=Math.min(P+T.length,e-1),ne=N.current[Y];ne?.focus(),ne?.select();return}const I=E[P],q=[...E];q[P]=T,k(q);const U=q.join("");if(j(U,{fromInternal:!0}),!I&&T&&P<e-1){const X=N.current[P+1];X?.focus(),X?.select()}},[E,r,e,d,j]),O=C.useCallback((P,_)=>{if(!r){if(_.key==="Backspace"){_.preventDefault();const T=N.current[P];if(E[P]){const I=[...E];I[P]="",k(I),j(I.join(""),{fromInternal:!0}),T?.focus();return}if(P>0){const I=N.current[P-1];I?.focus(),I?.select()}return}_.key==="ArrowLeft"&&P>0&&(_.preventDefault(),N.current[P-1]?.focus()),_.key==="ArrowRight"&&P<e-1&&(_.preventDefault(),N.current[P+1]?.focus())}},[E,r,e,j]),B=C.useCallback((P,_)=>{if(r)return;_.preventDefault();let T=_.clipboardData.getData("text");if(d&&(T=T.replace(/\D/g,"")),!T)return;const I=e-P,q=Math.min(T.length,I),U=T.slice(0,q),X=[...E];for(let le=0;le<q;le++)X[P+le]=U[le]??"";k(X);const te=X.join("");j(te,{fromInternal:!0});const Y=Math.min(P+q-1,e-1),ne=N.current[Y];ne?.focus(),ne?.select()},[E,r,e,d,j]);return p.jsxs(L,{w:"full",gap:"var(--spacing-sm)",className:h,center:l,children:[t&&p.jsx(K,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:t}),p.jsx(L,{row:!0,w:"full",gap:"var(--spacing-sm)",center:l,className:V.cx({[vt.disabled]:r}),children:Array.from({length:e}).map((P,_)=>p.jsxs(L,{relative:!0,display:"inline-block",children:[p.jsx("input",{ref:T=>{N.current[_]=T},className:V.cx(vt.input,vt[f],o&&vt.error,s&&vt.success,E[_]&&V.css({caretColor:"transparent"})),inputMode:d?"numeric":"text",type:c?"password":"text",maxLength:1,autoFocus:a&&_===0,disabled:r||u,value:E[_],onChange:T=>D(_,T.target.value),onKeyDown:T=>O(_,T),onPaste:T=>B(_,T)}),p.jsx(qn.span,{className:vt.glow,variants:ap,custom:_,initial:"idle",animate:u?"wave":"idle"})]},_))}),n&&p.jsx(K,{variant:"caption-1",colorName:"tertiary",children:n}),i&&o&&p.jsx(K,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:i})]})}),ap={idle:{opacity:0,scale:1,transition:{duration:.18}},wave:(e=0)=>({opacity:[0,.2,0],scale:[1,1.03,1],transition:{duration:1.5,delay:e*.15,repeat:1/0,ease:[.42,0,.58,1]}})};ac.displayName="OtpInput";const lc=C.createContext(null),lp=()=>C.useContext(lc),cp="_radio_zru2j_8",up="_disabled_zru2j_16",dp="_side_right_zru2j_21",zt={radio:cp,disabled:up,side_right:dp,"read-only":"_read-only_zru2j_26"},Nr={sm:{inner:12,outer:20},md:{inner:16,outer:24}},cc=C.forwardRef(({value:e,children:t,checked:n,defaultChecked:o,onChange:i,disabled:s,className:r,description:a,size:l,side:c,readOnly:u,error:f},d)=>{const h=lp(),m=!!h,g=n!==void 0,[y,x]=mt(n,o),w=m?h.value===e:g?n:y,v=h?.disabled||s,b=l??h?.size??"md",S=c??h?.side??"left",M=u??h?.readOnly??!1,A=f??h?.error??!1,E=Nr[b].outer,k=Nr[b].inner,F=()=>{v||M||(m?h.setValue?.(e):(g||x(!w),i?.(!w)))},$=w&&A?"var(--fill-negative-tint)":w?"var(--fill-accent-tint)":"var(--fill-bg-secondary)",N=w&&A?"var(--fill-negative-primary)":w?"var(--fill-accent-primary)":void 0,j=w&&A||A&&!w?"var(--border-negative-secondary)":"var(--border-neutral-alpha-low)";return p.jsxs("button",{ref:d,role:"radio",type:"button","data-value":e,"aria-checked":w,"aria-disabled":v||void 0,tabIndex:w?0:-1,className:V.cx([zt.radio,w&&zt.checked,v&&zt.disabled,S==="right"&&zt.side_right,M&&zt["read-only"],r]),onClick:F,children:[p.jsx(L,{w:E,h:E,backgroundColor:$,borderWidth:w?0:1,borderColor:j,borderStyle:"solid",center:!0,borderRadius:"var(--corner-full-round)",children:p.jsx(L,{w:k,h:k,backgroundColor:N,borderRadius:"var(--corner-full-round)","aria-hidden":!0})}),p.jsxs(L,{alignItems:"flex-start",children:[p.jsx(K,{variant:b==="sm"?"body-2":"body-1",tag:"span",left:!0,children:t}),a&&p.jsx(K,{tag:"span",variant:"body-2",colorName:"secondary",children:a})]})]})});cc.displayName="Radio";const uc=C.forwardRef(({label:e,value:t,defaultValue:n,onChange:o,children:i,className:s,error:r=!1,disabled:a=!1,readOnly:l=!1,side:c="left",size:u="md"},f)=>{const[d,h]=mt(t,n),m=t!==void 0,g=m?t:d,y=C.useCallback(w=>{m||h(w),o?.(w)},[m,o,h]),x=C.useRef(null);return C.useImperativeHandle(f,()=>x.current),p.jsx(lc.Provider,{value:{value:g,readOnly:l,disabled:a,setValue:y,size:u,side:c,error:r},children:p.jsxs(L,{gap:"var(--spacing-sm)",ref:x,role:"radiogroup","aria-invalid":r||void 0,className:s,children:[typeof e=="string"?p.jsx(K,{colorName:"secondary",children:e}):e,p.jsx(L,{gap:"var(--spacing-lg)",children:i})]})})});uc.displayName="RadioGroup";const fp="_primary_svt6d_8",hp="_secondary_svt6d_13",gp="_button_svt6d_18",Ye={primary:fp,secondary:hp,button:gp,"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 mp({value:e,onChange:t,options:n,variant:o="primary",fullWidth:i=!1,className:s}){return p.jsx(L,{row:!0,alignItems:"center",borderRadius:"var(--corner-md)",p:"var(--spacing-xs)",gap:"var(--spacing-md)",className:V.cx(Ye[o],i&&Ye["full-width"],s),children:n.map(r=>{const a=r.value===e,l=r.disabled,c=r.separatorAfter??!1;return p.jsxs(C.Fragment,{children:[p.jsxs("button",{type:"button",disabled:l,className:V.cx(Ye.button,i&&Ye["full-width"],a&&Ye["button-active"],a&&Ye[`button-${o}`],l&&Ye["button-disabled"]),onClick:()=>!l&&t(r.value),children:[r.icon&&p.jsx(L,{alignItems:"center",justifyContent:"center",className:Ye["icon-container"],children:r.icon}),r.label&&p.jsx(K,{colorName:a?"primary":"tertiary",children:r.label}),!l&&p.jsx(gt,{color:"var(--fill-bg-overlay-primary)"})]}),c&&p.jsx(L,{w:1,h:24,backgroundColor:"var(--fill-bg-tertiary)"})]},r.value)})})}function Xn(){return typeof window<"u"}function It(e){return dc(e)?(e.nodeName||"").toLowerCase():"#document"}function Se(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Be(e){var t;return(t=(dc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dc(e){return Xn()?e instanceof Node||e instanceof Se(e).Node:!1}function Q(e){return Xn()?e instanceof Element||e instanceof Se(e).Element:!1}function xe(e){return Xn()?e instanceof HTMLElement||e instanceof Se(e).HTMLElement:!1}function ui(e){return!Xn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Se(e).ShadowRoot}const pp=new Set(["inline","contents"]);function ln(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=Ve(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!pp.has(i)}const vp=new Set(["table","td","th"]);function yp(e){return vp.has(It(e))}const xp=[":popover-open",":modal"];function Yn(e){return xp.some(t=>{try{return e.matches(t)}catch{return!1}})}const wp=["transform","translate","scale","rotate","perspective"],Cp=["transform","translate","scale","rotate","perspective","filter"],Sp=["paint","layout","strict","content"];function os(e){const t=Zn(),n=Q(e)?Ve(e):e;return wp.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Cp.some(o=>(n.willChange||"").includes(o))||Sp.some(o=>(n.contain||"").includes(o))}function bp(e){let t=Xe(e);for(;xe(t)&&!Ge(t);){if(os(t))return t;if(Yn(t))return null;t=Xe(t)}return null}function Zn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Rp=new Set(["html","body","#document"]);function Ge(e){return Rp.has(It(e))}function Ve(e){return Se(e).getComputedStyle(e)}function Jn(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xe(e){if(It(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ui(e)&&e.host||Be(e);return ui(t)?t.host:t}function fc(e){const t=Xe(e);return Ge(t)?e.ownerDocument?e.ownerDocument.body:e.body:xe(t)&&ln(t)?t:fc(t)}function Qe(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=fc(e),s=i===((o=e.ownerDocument)==null?void 0:o.body),r=Se(i);if(s){const a=di(r);return t.concat(r,r.visualViewport||[],ln(i)?i:[],a&&n?Qe(a):[])}return t.concat(i,Qe(i,[],n))}function di(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const nt=Math.min,be=Math.max,Nn=Math.round,yn=Math.floor,Ne=e=>({x:e,y:e}),_p={left:"right",right:"left",bottom:"top",top:"bottom"},Pp={start:"end",end:"start"};function fi(e,t,n){return be(e,nt(t,n))}function jt(e,t){return typeof e=="function"?e(t):e}function ot(e){return e.split("-")[0]}function $t(e){return e.split("-")[1]}function hc(e){return e==="x"?"y":"x"}function is(e){return e==="y"?"height":"width"}const Ep=new Set(["top","bottom"]);function We(e){return Ep.has(ot(e))?"y":"x"}function ss(e){return hc(We(e))}function Mp(e,t,n){n===void 0&&(n=!1);const o=$t(e),i=ss(e),s=is(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Bn(r)),[r,Bn(r)]}function Tp(e){const t=Bn(e);return[hi(e),t,hi(t)]}function hi(e){return e.replace(/start|end/g,t=>Pp[t])}const Br=["left","right"],zr=["right","left"],Ap=["top","bottom"],Vp=["bottom","top"];function kp(e,t,n){switch(e){case"top":case"bottom":return n?t?zr:Br:t?Br:zr;case"left":case"right":return t?Ap:Vp;default:return[]}}function Dp(e,t,n,o){const i=$t(e);let s=kp(ot(e),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),t&&(s=s.concat(s.map(hi)))),s}function Bn(e){return e.replace(/left|right|bottom|top/g,t=>_p[t])}function Fp(e){return{top:0,right:0,bottom:0,left:0,...e}}function gc(e){return typeof e!="number"?Fp(e):{top:e,right:e,bottom:e,left:e}}function zn(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function Lp(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Ip(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:o}=t;return n+"/"+o}).join(" "):navigator.userAgent}function jp(){return/apple/i.test(navigator.vendor)}function $p(){return Lp().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Op(){return Ip().includes("jsdom/")}const Hr="data-floating-ui-focusable",Np="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Wr(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function tn(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ui(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function xt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function bo(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Bp(e){return e.matches("html,body")}function ut(e){return e?.ownerDocument||document}function mc(e){return xe(e)&&e.matches(Np)}function zp(e){if(!e||Op())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Hp(e){return e?e.hasAttribute(Hr)?e:e.querySelector("["+Hr+"]")||e:null}function Tn(e,t,n){return n===void 0&&(n=!0),e.filter(i=>{var s;return i.parentId===t&&(!n||((s=i.context)==null?void 0:s.open))}).flatMap(i=>[i,...Tn(e,i.id,n)])}function Wp(e){return"nativeEvent"in e}function nn(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var Gp=typeof document<"u",Up=function(){},Vt=Gp?C.useLayoutEffect:Up;const Kp={...R};function xn(e){const t=R.useRef(e);return Vt(()=>{t.current=e}),t}const qp=Kp.useInsertionEffect,Xp=qp||(e=>e());function $e(e){const t=R.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Xp(()=>{t.current=e}),R.useCallback(function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return t.current==null?void 0:t.current(...o)},[])}function Gr(e,t,n){let{reference:o,floating:i}=e;const s=We(t),r=ss(t),a=is(r),l=ot(t),c=s==="y",u=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,d=o[a]/2-i[a]/2;let h;switch(l){case"top":h={x:u,y:o.y-i.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-i.width,y:f};break;default:h={x:o.x,y:o.y}}switch($t(t)){case"start":h[r]-=d*(n&&c?-1:1);break;case"end":h[r]+=d*(n&&c?-1:1);break}return h}const Yp=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,a=s.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(t));let c=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:f}=Gr(c,o,l),d=o,h={},m=0;for(let g=0;g<a.length;g++){const{name:y,fn:x}=a[g],{x:w,y:v,data:b,reset:S}=await x({x:u,y:f,initialPlacement:o,placement:d,strategy:i,middlewareData:h,rects:c,platform:r,elements:{reference:e,floating:t}});u=w??u,f=v??f,h={...h,[y]:{...h[y],...b}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(c=S.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:u,y:f}=Gr(c,d,l)),g=-1)}return{x:u,y:f,placement:d,strategy:i,middlewareData:h}};async function rs(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:s,rects:r,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=jt(t,e),m=gc(h),y=a[d?f==="floating"?"reference":"floating":f],x=zn(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),w=f==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),b=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},S=zn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:v,strategy:l}):w);return{top:(x.top-S.top+m.top)/b.y,bottom:(S.bottom-x.bottom+m.bottom)/b.y,left:(x.left-S.left+m.left)/b.x,right:(S.right-x.right+m.right)/b.x}}const Zp=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:s,platform:r,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=jt(e,t)||{};if(c==null)return{};const f=gc(u),d={x:n,y:o},h=ss(i),m=is(h),g=await r.getDimensions(c),y=h==="y",x=y?"top":"left",w=y?"bottom":"right",v=y?"clientHeight":"clientWidth",b=s.reference[m]+s.reference[h]-d[h]-s.floating[m],S=d[h]-s.reference[h],M=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c));let A=M?M[v]:0;(!A||!await(r.isElement==null?void 0:r.isElement(M)))&&(A=a.floating[v]||s.floating[m]);const E=b/2-S/2,k=A/2-g[m]/2-1,F=nt(f[x],k),$=nt(f[w],k),N=F,j=A-g[m]-$,D=A/2-g[m]/2+E,O=fi(N,D,j),B=!l.arrow&&$t(i)!=null&&D!==O&&s.reference[m]/2-(D<N?F:$)-g[m]/2<0,P=B?D<N?D-N:D-j:0;return{[h]:d[h]+P,data:{[h]:O,centerOffset:D-O-P,...B&&{alignmentOffset:P}},reset:B}}}),Jp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=jt(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=ot(i),w=We(a),v=ot(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=d||(v||!g?[Bn(a)]:Tp(a)),M=m!=="none";!d&&M&&S.push(...Dp(a,g,m,b));const A=[a,...S],E=await rs(t,y),k=[];let F=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&k.push(E[x]),f){const D=Mp(i,r,b);k.push(E[D[0]],E[D[1]])}if(F=[...F,{placement:i,overflows:k}],!k.every(D=>D<=0)){var $,N;const D=((($=s.flip)==null?void 0:$.index)||0)+1,O=A[D];if(O&&(!(f==="alignment"?w!==We(O):!1)||F.every(_=>We(_.placement)===w?_.overflows[0]>0:!0)))return{data:{index:D,overflows:F},reset:{placement:O}};let B=(N=F.filter(P=>P.overflows[0]<=0).sort((P,_)=>P.overflows[1]-_.overflows[1])[0])==null?void 0:N.placement;if(!B)switch(h){case"bestFit":{var j;const P=(j=F.filter(_=>{if(M){const T=We(_.placement);return T===w||T==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(T=>T>0).reduce((T,I)=>T+I,0)]).sort((_,T)=>_[1]-T[1])[0])==null?void 0:j[0];P&&(B=P);break}case"initialPlacement":B=a;break}if(i!==B)return{reset:{placement:B}}}return{}}}},Qp=new Set(["left","top"]);async function ev(e,t){const{placement:n,platform:o,elements:i}=e,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=ot(n),a=$t(n),l=We(n)==="y",c=Qp.has(r)?-1:1,u=s&&l?-1:1,f=jt(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),l?{x:h*u,y:d*c}:{x:d*c,y:h*u}}const tv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:s,placement:r,middlewareData:a}=t,l=await ev(t,e);return r===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:r}}}}},nv=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:s=!0,crossAxis:r=!1,limiter:a={fn:y=>{let{x,y:w}=y;return{x,y:w}}},...l}=jt(e,t),c={x:n,y:o},u=await rs(t,l),f=We(ot(i)),d=hc(f);let h=c[d],m=c[f];if(s){const y=d==="y"?"top":"left",x=d==="y"?"bottom":"right",w=h+u[y],v=h-u[x];h=fi(w,h,v)}if(r){const y=f==="y"?"top":"left",x=f==="y"?"bottom":"right",w=m+u[y],v=m-u[x];m=fi(w,m,v)}const g=a.fn({...t,[d]:h,[f]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[d]:s,[f]:r}}}}}},ov=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:s,platform:r,elements:a}=t,{apply:l=()=>{},...c}=jt(e,t),u=await rs(t,c),f=ot(i),d=$t(i),h=We(i)==="y",{width:m,height:g}=s.floating;let y,x;f==="top"||f==="bottom"?(y=f,x=d===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(x=f,y=d==="end"?"top":"bottom");const w=g-u.top-u.bottom,v=m-u.left-u.right,b=nt(g-u[y],w),S=nt(m-u[x],v),M=!t.middlewareData.shift;let A=b,E=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=v),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(A=w),M&&!d){const F=be(u.left,0),$=be(u.right,0),N=be(u.top,0),j=be(u.bottom,0);h?E=m-2*(F!==0||$!==0?F+$:be(u.left,u.right)):A=g-2*(N!==0||j!==0?N+j:be(u.top,u.bottom))}await l({...t,availableWidth:E,availableHeight:A});const k=await r.getDimensions(a.floating);return m!==k.width||g!==k.height?{reset:{rects:!0}}:{}}}};function pc(e){const t=Ve(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=xe(e),s=i?e.offsetWidth:n,r=i?e.offsetHeight:o,a=Nn(n)!==s||Nn(o)!==r;return a&&(n=s,o=r),{width:n,height:o,$:a}}function as(e){return Q(e)?e:e.contextElement}function Mt(e){const t=as(e);if(!xe(t))return Ne(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:s}=pc(t);let r=(s?Nn(n.width):n.width)/o,a=(s?Nn(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const iv=Ne(0);function vc(e){const t=Se(e);return!Zn()||!t.visualViewport?iv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Se(e)?!1:t}function ht(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=as(e);let r=Ne(1);t&&(o?Q(o)&&(r=Mt(o)):r=Mt(e));const a=sv(s,n,o)?vc(s):Ne(0);let l=(i.left+a.x)/r.x,c=(i.top+a.y)/r.y,u=i.width/r.x,f=i.height/r.y;if(s){const d=Se(s),h=o&&Q(o)?Se(o):o;let m=d,g=di(m);for(;g&&o&&h!==m;){const y=Mt(g),x=g.getBoundingClientRect(),w=Ve(g),v=x.left+(g.clientLeft+parseFloat(w.paddingLeft))*y.x,b=x.top+(g.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,f*=y.y,l+=v,c+=b,m=Se(g),g=di(m)}}return zn({width:u,height:f,x:l,y:c})}function Qn(e,t){const n=Jn(e).scrollLeft;return t?t.left+n:ht(Be(e)).left+n}function yc(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Qn(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function rv(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const s=i==="fixed",r=Be(o),a=t?Yn(t.floating):!1;if(o===r||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Ne(1);const u=Ne(0),f=xe(o);if((f||!f&&!s)&&((It(o)!=="body"||ln(r))&&(l=Jn(o)),xe(o))){const h=ht(o);c=Mt(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}const d=r&&!f&&!s?yc(r,l):Ne(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}}function av(e){return Array.from(e.getClientRects())}function lv(e){const t=Be(e),n=Jn(e),o=e.ownerDocument.body,i=be(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=be(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+Qn(e);const a=-n.scrollTop;return Ve(o).direction==="rtl"&&(r+=be(t.clientWidth,o.clientWidth)-i),{width:i,height:s,x:r,y:a}}const Ur=25;function cv(e,t){const n=Se(e),o=Be(e),i=n.visualViewport;let s=o.clientWidth,r=o.clientHeight,a=0,l=0;if(i){s=i.width,r=i.height;const u=Zn();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=Qn(o);if(c<=0){const u=o.ownerDocument,f=u.body,d=getComputedStyle(f),h=u.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,m=Math.abs(o.clientWidth-f.clientWidth-h);m<=Ur&&(s-=m)}else c<=Ur&&(s+=c);return{width:s,height:r,x:a,y:l}}const uv=new Set(["absolute","fixed"]);function dv(e,t){const n=ht(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,s=xe(e)?Mt(e):Ne(1),r=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,c=o*s.y;return{width:r,height:a,x:l,y:c}}function Kr(e,t,n){let o;if(t==="viewport")o=cv(e,n);else if(t==="document")o=lv(Be(e));else if(Q(t))o=dv(t,n);else{const i=vc(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return zn(o)}function xc(e,t){const n=Xe(e);return n===t||!Q(n)||Ge(n)?!1:Ve(n).position==="fixed"||xc(n,t)}function fv(e,t){const n=t.get(e);if(n)return n;let o=Qe(e,[],!1).filter(a=>Q(a)&&It(a)!=="body"),i=null;const s=Ve(e).position==="fixed";let r=s?Xe(e):e;for(;Q(r)&&!Ge(r);){const a=Ve(r),l=os(r);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&uv.has(i.position)||ln(r)&&!l&&xc(e,r))?o=o.filter(u=>u!==r):i=a,r=Xe(r)}return t.set(e,o),o}function hv(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const r=[...n==="clippingAncestors"?Yn(t)?[]:fv(t,this._c):[].concat(n),o],a=r[0],l=r.reduce((c,u)=>{const f=Kr(t,u,i);return c.top=be(f.top,c.top),c.right=nt(f.right,c.right),c.bottom=nt(f.bottom,c.bottom),c.left=be(f.left,c.left),c},Kr(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function gv(e){const{width:t,height:n}=pc(e);return{width:t,height:n}}function mv(e,t,n){const o=xe(t),i=Be(t),s=n==="fixed",r=ht(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Ne(0);function c(){l.x=Qn(i)}if(o||!o&&!s)if((It(t)!=="body"||ln(i))&&(a=Jn(t)),o){const h=ht(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&c();s&&!o&&i&&c();const u=i&&!o&&!s?yc(i,a):Ne(0),f=r.left+a.scrollLeft-l.x-u.x,d=r.top+a.scrollTop-l.y-u.y;return{x:f,y:d,width:r.width,height:r.height}}function Ro(e){return Ve(e).position==="static"}function qr(e,t){if(!xe(e)||Ve(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Be(e)===n&&(n=n.ownerDocument.body),n}function wc(e,t){const n=Se(e);if(Yn(e))return n;if(!xe(e)){let i=Xe(e);for(;i&&!Ge(i);){if(Q(i)&&!Ro(i))return i;i=Xe(i)}return n}let o=qr(e,t);for(;o&&yp(o)&&Ro(o);)o=qr(o,t);return o&&Ge(o)&&Ro(o)&&!os(o)?n:o||bp(e)||n}const pv=async function(e){const t=this.getOffsetParent||wc,n=this.getDimensions,o=await n(e.floating);return{reference:mv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function vv(e){return Ve(e).direction==="rtl"}const yv={convertOffsetParentRelativeRectToViewportRelativeRect:rv,getDocumentElement:Be,getClippingRect:hv,getOffsetParent:wc,getElementRects:pv,getClientRects:av,getDimensions:gv,getScale:Mt,isElement:Q,isRTL:vv};function Cc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xv(e,t){let n=null,o;const i=Be(e);function s(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function r(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:u,top:f,width:d,height:h}=c;if(a||t(),!d||!h)return;const m=yn(f),g=yn(i.clientWidth-(u+d)),y=yn(i.clientHeight-(f+h)),x=yn(u),v={rootMargin:-m+"px "+-g+"px "+-y+"px "+-x+"px",threshold:be(0,nt(1,l))||1};let b=!0;function S(M){const A=M[0].intersectionRatio;if(A!==l){if(!b)return r();A?r(!1,A):o=setTimeout(()=>{r(!1,1e-7)},1e3)}A===1&&!Cc(c,e.getBoundingClientRect())&&r(),b=!1}try{n=new IntersectionObserver(S,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(e)}return r(!0),s}function ls(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=as(e),u=i||s?[...c?Qe(c):[],...Qe(t)]:[];u.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=c&&a?xv(c,n):null;let d=-1,h=null;r&&(h=new ResizeObserver(x=>{let[w]=x;w&&w.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let m,g=l?ht(e):null;l&&y();function y(){const x=ht(e);g&&!Cc(g,x)&&n(),g=x,m=requestAnimationFrame(y)}return n(),()=>{var x;u.forEach(w=>{i&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),f?.(),(x=h)==null||x.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const wv=tv,Cv=nv,Sv=Jp,bv=ov,Xr=Zp,Rv=(e,t,n)=>{const o=new Map,i={platform:yv,...n},s={...i.platform,_c:o};return Yp(e,t,{...i,platform:s})};var _v=typeof document<"u",Pv=function(){},An=_v?C.useLayoutEffect:Pv;function Hn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Hn(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){const s=i[o];if(!(s==="_owner"&&e.$$typeof)&&!Hn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Sc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yr(e,t){const n=Sc(e);return Math.round(t*n)/n}function _o(e){const t=R.useRef(e);return An(()=>{t.current=e}),t}function Ev(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:r}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,f]=R.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=R.useState(o);Hn(d,o)||h(o);const[m,g]=R.useState(null),[y,x]=R.useState(null),w=R.useCallback(_=>{_!==M.current&&(M.current=_,g(_))},[]),v=R.useCallback(_=>{_!==A.current&&(A.current=_,x(_))},[]),b=s||m,S=r||y,M=R.useRef(null),A=R.useRef(null),E=R.useRef(u),k=l!=null,F=_o(l),$=_o(i),N=_o(c),j=R.useCallback(()=>{if(!M.current||!A.current)return;const _={placement:t,strategy:n,middleware:d};$.current&&(_.platform=$.current),Rv(M.current,A.current,_).then(T=>{const I={...T,isPositioned:N.current!==!1};D.current&&!Hn(E.current,I)&&(E.current=I,su.flushSync(()=>{f(I)}))})},[d,t,n,$,N]);An(()=>{c===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(_=>({..._,isPositioned:!1})))},[c]);const D=R.useRef(!1);An(()=>(D.current=!0,()=>{D.current=!1}),[]),An(()=>{if(b&&(M.current=b),S&&(A.current=S),b&&S){if(F.current)return F.current(b,S,j);j()}},[b,S,j,F,k]);const O=R.useMemo(()=>({reference:M,floating:A,setReference:w,setFloating:v}),[w,v]),B=R.useMemo(()=>({reference:b,floating:S}),[b,S]),P=R.useMemo(()=>{const _={position:n,left:0,top:0};if(!B.floating)return _;const T=Yr(B.floating,u.x),I=Yr(B.floating,u.y);return a?{..._,transform:"translate("+T+"px, "+I+"px)",...Sc(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:I}},[n,a,B.floating,u.x,u.y]);return R.useMemo(()=>({...u,update:j,refs:O,elements:B,floatingStyles:P}),[u,j,O,B,P])}const Mv=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:i}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Xr({element:o.current,padding:i}).fn(n):{}:o?Xr({element:o,padding:i}).fn(n):{}}}},cs=(e,t)=>({...wv(e),options:[e,t]}),us=(e,t)=>({...Cv(e),options:[e,t]}),ds=(e,t)=>({...Sv(e),options:[e,t]}),Tv=(e,t)=>({...bv(e),options:[e,t]}),Av=(e,t)=>({...Mv(e),options:[e,t]});function bc(e){const t=R.useRef(void 0),n=R.useCallback(o=>{const i=e.map(s=>{if(s!=null){if(typeof s=="function"){const r=s,a=r(o);return typeof a=="function"?a:()=>{r(null)}}return s.current=o,()=>{s.current=null}}});return()=>{i.forEach(s=>s?.())}},e);return R.useMemo(()=>e.every(o=>o==null)?null:o=>{t.current&&(t.current(),t.current=void 0),o!=null&&(t.current=n(o))},e)}const Vv="data-floating-ui-focusable",Zr="active",Jr="selected",kv={...R};let Qr=!1,Dv=0;const ea=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Dv++;function Fv(){const[e,t]=R.useState(()=>Qr?ea():void 0);return Vt(()=>{e==null&&t(ea())},[]),R.useEffect(()=>{Qr=!0},[]),e}const Lv=kv.useId,Rc=Lv||Fv;let gi;process.env.NODE_ENV!=="production"&&(gi=new Set);function Iv(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];const i="Floating UI: "+n.join(" ");if(!((e=gi)!=null&&e.has(i))){var s;(s=gi)==null||s.add(i),console.error(i)}}function jv(){const e=new Map;return{emit(t,n){var o;(o=e.get(t))==null||o.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var o;(o=e.get(t))==null||o.delete(n)}}}const $v=R.createContext(null),Ov=R.createContext(null),fs=()=>{var e;return((e=R.useContext($v))==null?void 0:e.id)||null},hs=()=>R.useContext(Ov);function gs(e){return"data-floating-ui-"+e}function Ee(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const ta=gs("safe-polygon");function Po(e,t,n){if(n&&!nn(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const o=e();return typeof o=="number"?o:o?.[t]}return e?.[t]}function Eo(e){return typeof e=="function"?e():e}function _c(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:i,events:s,elements:r}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:d=!0}=t,h=hs(),m=fs(),g=xn(c),y=xn(l),x=xn(n),w=xn(f),v=R.useRef(),b=R.useRef(-1),S=R.useRef(),M=R.useRef(-1),A=R.useRef(!0),E=R.useRef(!1),k=R.useRef(()=>{}),F=R.useRef(!1),$=$e(()=>{var P;const _=(P=i.current.openEvent)==null?void 0:P.type;return _?.includes("mouse")&&_!=="mousedown"});R.useEffect(()=>{if(!a)return;function P(_){let{open:T}=_;T||(Ee(b),Ee(M),A.current=!0,F.current=!1)}return s.on("openchange",P),()=>{s.off("openchange",P)}},[a,s]),R.useEffect(()=>{if(!a||!g.current||!n)return;function P(T){$()&&o(!1,T,"hover")}const _=ut(r.floating).documentElement;return _.addEventListener("mouseleave",P),()=>{_.removeEventListener("mouseleave",P)}},[r.floating,n,o,a,g,$]);const N=R.useCallback(function(P,_,T){_===void 0&&(_=!0),T===void 0&&(T="hover");const I=Po(y.current,"close",v.current);I&&!S.current?(Ee(b),b.current=window.setTimeout(()=>o(!1,P,T),I)):_&&(Ee(b),o(!1,P,T))},[y,o]),j=$e(()=>{k.current(),S.current=void 0}),D=$e(()=>{if(E.current){const P=ut(r.floating).body;P.style.pointerEvents="",P.removeAttribute(ta),E.current=!1}}),O=$e(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);R.useEffect(()=>{if(!a)return;function P(U){if(Ee(b),A.current=!1,u&&!nn(v.current)||Eo(w.current)>0&&!Po(y.current,"open"))return;const X=Po(y.current,"open",v.current);X?b.current=window.setTimeout(()=>{x.current||o(!0,U,"hover")},X):n||o(!0,U,"hover")}function _(U){if(O()){D();return}k.current();const X=ut(r.floating);if(Ee(M),F.current=!1,g.current&&i.current.floatingContext){n||Ee(b),S.current=g.current({...i.current.floatingContext,tree:h,x:U.clientX,y:U.clientY,onClose(){D(),j(),O()||N(U,!0,"safe-polygon")}});const Y=S.current;X.addEventListener("mousemove",Y),k.current=()=>{X.removeEventListener("mousemove",Y)};return}(v.current!=="touch"||!tn(r.floating,U.relatedTarget))&&N(U)}function T(U){O()||i.current.floatingContext&&(g.current==null||g.current({...i.current.floatingContext,tree:h,x:U.clientX,y:U.clientY,onClose(){D(),j(),O()||N(U)}})(U))}function I(){Ee(b)}function q(U){O()||N(U,!1)}if(Q(r.domReference)){const U=r.domReference,X=r.floating;return n&&U.addEventListener("mouseleave",T),d&&U.addEventListener("mousemove",P,{once:!0}),U.addEventListener("mouseenter",P),U.addEventListener("mouseleave",_),X&&(X.addEventListener("mouseleave",T),X.addEventListener("mouseenter",I),X.addEventListener("mouseleave",q)),()=>{n&&U.removeEventListener("mouseleave",T),d&&U.removeEventListener("mousemove",P),U.removeEventListener("mouseenter",P),U.removeEventListener("mouseleave",_),X&&(X.removeEventListener("mouseleave",T),X.removeEventListener("mouseenter",I),X.removeEventListener("mouseleave",q))}}},[r,a,e,u,d,N,j,D,o,n,x,h,y,g,i,O,w]),Vt(()=>{var P;if(a&&n&&(P=g.current)!=null&&(P=P.__options)!=null&&P.blockPointerEvents&&$()){E.current=!0;const T=r.floating;if(Q(r.domReference)&&T){var _;const I=ut(r.floating).body;I.setAttribute(ta,"");const q=r.domReference,U=h==null||(_=h.nodesRef.current.find(X=>X.id===m))==null||(_=_.context)==null?void 0:_.elements.floating;return U&&(U.style.pointerEvents=""),I.style.pointerEvents="none",q.style.pointerEvents="auto",T.style.pointerEvents="auto",()=>{I.style.pointerEvents="",q.style.pointerEvents="",T.style.pointerEvents=""}}}},[a,n,m,r,h,g,$]),Vt(()=>{n||(v.current=void 0,F.current=!1,j(),D())},[n,j,D]),R.useEffect(()=>()=>{j(),Ee(b),Ee(M),D()},[a,r.domReference,j,D]);const B=R.useMemo(()=>{function P(_){v.current=_.pointerType}return{onPointerDown:P,onPointerEnter:P,onMouseMove(_){const{nativeEvent:T}=_;function I(){!A.current&&!x.current&&o(!0,T,"hover")}u&&!nn(v.current)||n||Eo(w.current)===0||F.current&&_.movementX**2+_.movementY**2<2||(Ee(M),v.current==="touch"?I():(F.current=!0,M.current=window.setTimeout(I,Eo(w.current))))}}},[u,o,n,x,w]);return R.useMemo(()=>a?{reference:B}:{},[a,B])}function na(e){return xe(e.target)&&e.target.tagName==="BUTTON"}function Nv(e){return xe(e.target)&&e.target.tagName==="A"}function oa(e){return mc(e)}function Bv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:i,elements:{domReference:s}}=e,{enabled:r=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:f=!0}=t,d=R.useRef(),h=R.useRef(!1),m=R.useMemo(()=>({onPointerDown(g){d.current=g.pointerType},onMouseDown(g){const y=d.current;g.button===0&&a!=="click"&&(nn(y,!0)&&c||(n&&l&&(!(i.current.openEvent&&f)||i.current.openEvent.type==="mousedown")?o(!1,g.nativeEvent,"click"):(g.preventDefault(),o(!0,g.nativeEvent,"click"))))},onClick(g){const y=d.current;if(a==="mousedown"&&d.current){d.current=void 0;return}nn(y,!0)&&c||(n&&l&&(!(i.current.openEvent&&f)||i.current.openEvent.type==="click")?o(!1,g.nativeEvent,"click"):o(!0,g.nativeEvent,"click"))},onKeyDown(g){d.current=void 0,!(g.defaultPrevented||!u||na(g))&&(g.key===" "&&!oa(s)&&(g.preventDefault(),h.current=!0),!Nv(g)&&g.key==="Enter"&&o(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||na(g)||oa(s)||g.key===" "&&h.current&&(h.current=!1,o(!(n&&l),g.nativeEvent,"click"))}}),[i,s,a,c,u,o,n,f,l]);return R.useMemo(()=>r?{reference:m}:{},[r,m])}const zv={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Hv={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ia=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Pc(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,elements:i,dataRef:s}=e,{enabled:r=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:d=!1,bubbles:h,capture:m}=t,g=hs(),y=$e(typeof l=="function"?l:()=>!1),x=typeof l=="function"?y:l,w=R.useRef(!1),{escapeKey:v,outsidePress:b}=ia(h),{escapeKey:S,outsidePress:M}=ia(m),A=R.useRef(!1),E=$e(D=>{var O;if(!n||!r||!a||D.key!=="Escape"||A.current)return;const B=(O=s.current.floatingContext)==null?void 0:O.nodeId,P=g?Tn(g.nodesRef.current,B):[];if(!v&&(D.stopPropagation(),P.length>0)){let _=!0;if(P.forEach(T=>{var I;if((I=T.context)!=null&&I.open&&!T.context.dataRef.current.__escapeKeyBubbles){_=!1;return}}),!_)return}o(!1,Wp(D)?D.nativeEvent:D,"escape-key")}),k=$e(D=>{var O;const B=()=>{var P;E(D),(P=xt(D))==null||P.removeEventListener("keydown",B)};(O=xt(D))==null||O.addEventListener("keydown",B)}),F=$e(D=>{var O;const B=s.current.insideReactTree;s.current.insideReactTree=!1;const P=w.current;if(w.current=!1,c==="click"&&P||B||typeof x=="function"&&!x(D))return;const _=xt(D),T="["+gs("inert")+"]",I=ut(i.floating).querySelectorAll(T);let q=Q(_)?_:null;for(;q&&!Ge(q);){const Y=Xe(q);if(Ge(Y)||!Q(Y))break;q=Y}if(I.length&&Q(_)&&!Bp(_)&&!tn(_,i.floating)&&Array.from(I).every(Y=>!tn(q,Y)))return;if(xe(_)&&j){const Y=Ge(_),ne=Ve(_),le=/auto|scroll/,_e=Y||le.test(ne.overflowX),fe=Y||le.test(ne.overflowY),je=_e&&_.clientWidth>0&&_.scrollWidth>_.clientWidth,pe=fe&&_.clientHeight>0&&_.scrollHeight>_.clientHeight,z=ne.direction==="rtl",J=pe&&(z?D.offsetX<=_.offsetWidth-_.clientWidth:D.offsetX>_.clientWidth),re=je&&D.offsetY>_.clientHeight;if(J||re)return}const U=(O=s.current.floatingContext)==null?void 0:O.nodeId,X=g&&Tn(g.nodesRef.current,U).some(Y=>{var ne;return bo(D,(ne=Y.context)==null?void 0:ne.elements.floating)});if(bo(D,i.floating)||bo(D,i.domReference)||X)return;const te=g?Tn(g.nodesRef.current,U):[];if(te.length>0){let Y=!0;if(te.forEach(ne=>{var le;if((le=ne.context)!=null&&le.open&&!ne.context.dataRef.current.__outsidePressBubbles){Y=!1;return}}),!Y)return}o(!1,D,"outside-press")}),$=$e(D=>{var O;const B=()=>{var P;F(D),(P=xt(D))==null||P.removeEventListener(c,B)};(O=xt(D))==null||O.addEventListener(c,B)});R.useEffect(()=>{if(!n||!r)return;s.current.__escapeKeyBubbles=v,s.current.__outsidePressBubbles=b;let D=-1;function O(I){o(!1,I,"ancestor-scroll")}function B(){window.clearTimeout(D),A.current=!0}function P(){D=window.setTimeout(()=>{A.current=!1},Zn()?5:0)}const _=ut(i.floating);a&&(_.addEventListener("keydown",S?k:E,S),_.addEventListener("compositionstart",B),_.addEventListener("compositionend",P)),x&&_.addEventListener(c,M?$:F,M);let T=[];return d&&(Q(i.domReference)&&(T=Qe(i.domReference)),Q(i.floating)&&(T=T.concat(Qe(i.floating))),!Q(i.reference)&&i.reference&&i.reference.contextElement&&(T=T.concat(Qe(i.reference.contextElement)))),T=T.filter(I=>{var q;return I!==((q=_.defaultView)==null?void 0:q.visualViewport)}),T.forEach(I=>{I.addEventListener("scroll",O,{passive:!0})}),()=>{a&&(_.removeEventListener("keydown",S?k:E,S),_.removeEventListener("compositionstart",B),_.removeEventListener("compositionend",P)),x&&_.removeEventListener(c,M?$:F,M),T.forEach(I=>{I.removeEventListener("scroll",O)}),window.clearTimeout(D)}},[s,i,a,x,c,n,o,d,r,v,b,E,S,k,F,M,$]),R.useEffect(()=>{s.current.insideReactTree=!1},[s,x,c]);const N=R.useMemo(()=>({onKeyDown:E,...u&&{[zv[f]]:D=>{o(!1,D.nativeEvent,"reference-press")},...f!=="click"&&{onClick(D){o(!1,D.nativeEvent,"reference-press")}}}}),[E,o,u,f]),j=R.useMemo(()=>({onKeyDown:E,onMouseDown(){w.current=!0},onMouseUp(){w.current=!0},[Hv[c]]:()=>{s.current.insideReactTree=!0}}),[E,c,s]);return R.useMemo(()=>r?{reference:N,floating:j}:{},[r,N,j])}function Wv(e){const{open:t=!1,onOpenChange:n,elements:o}=e,i=Rc(),s=R.useRef({}),[r]=R.useState(()=>jv()),a=fs()!=null;if(process.env.NODE_ENV!=="production"){const h=o.reference;h&&!Q(h)&&Iv("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=R.useState(o.reference),u=$e((h,m,g)=>{s.current.openEvent=h?m:void 0,r.emit("openchange",{open:h,event:m,reason:g,nested:a}),n?.(h,m,g)}),f=R.useMemo(()=>({setPositionReference:c}),[]),d=R.useMemo(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return R.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:d,events:r,floatingId:i,refs:f}),[t,u,d,r,i,f])}function ms(e){e===void 0&&(e={});const{nodeId:t}=e,n=Wv({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,i=o.elements,[s,r]=R.useState(null),[a,l]=R.useState(null),u=i?.domReference||s,f=R.useRef(null),d=hs();Vt(()=>{u&&(f.current=u)},[u]);const h=Ev({...e,elements:{...i,...a&&{reference:a}}}),m=R.useCallback(v=>{const b=Q(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),getClientRects:()=>v.getClientRects(),contextElement:v}:v;l(b),h.refs.setReference(b)},[h.refs]),g=R.useCallback(v=>{(Q(v)||v===null)&&(f.current=v,r(v)),(Q(h.refs.reference.current)||h.refs.reference.current===null||v!==null&&!Q(v))&&h.refs.setReference(v)},[h.refs]),y=R.useMemo(()=>({...h.refs,setReference:g,setPositionReference:m,domReference:f}),[h.refs,g,m]),x=R.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),w=R.useMemo(()=>({...h,...o,refs:y,elements:x,nodeId:t}),[h,y,x,t,o]);return Vt(()=>{o.dataRef.current.floatingContext=w;const v=d?.nodesRef.current.find(b=>b.id===t);v&&(v.context=w)}),R.useMemo(()=>({...h,context:w,refs:y,elements:x}),[h,y,x,w])}function Mo(){return $p()&&jp()}function Gv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,events:i,dataRef:s,elements:r}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=R.useRef(!1),u=R.useRef(-1),f=R.useRef(!0);R.useEffect(()=>{if(!a)return;const h=Se(r.domReference);function m(){!n&&xe(r.domReference)&&r.domReference===Wr(ut(r.domReference))&&(c.current=!0)}function g(){f.current=!0}function y(){f.current=!1}return h.addEventListener("blur",m),Mo()&&(h.addEventListener("keydown",g,!0),h.addEventListener("pointerdown",y,!0)),()=>{h.removeEventListener("blur",m),Mo()&&(h.removeEventListener("keydown",g,!0),h.removeEventListener("pointerdown",y,!0))}},[r.domReference,n,a]),R.useEffect(()=>{if(!a)return;function h(m){let{reason:g}=m;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return i.on("openchange",h),()=>{i.off("openchange",h)}},[i,a]),R.useEffect(()=>()=>{Ee(u)},[]);const d=R.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const m=xt(h.nativeEvent);if(l&&Q(m)){if(Mo()&&!h.relatedTarget){if(!f.current&&!mc(m))return}else if(!zp(m))return}o(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const m=h.relatedTarget,g=h.nativeEvent,y=Q(m)&&m.hasAttribute(gs("focus-guard"))&&m.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var x;const w=Wr(r.domReference?r.domReference.ownerDocument:document);!m&&w===r.domReference||tn((x=s.current.floatingContext)==null?void 0:x.refs.floating.current,w)||tn(r.domReference,w)||y||o(!1,g,"focus")})}}),[s,r.domReference,o,l]);return R.useMemo(()=>a?{reference:d}:{},[a,d])}function To(e,t,n){const o=new Map,i=n==="item";let s=e;if(i&&e){const{[Zr]:r,[Jr]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1,[Vv]:""},...s,...t.map(r=>{const a=r?r[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((r,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(i&&[Zr,Jr].includes(c)))if(c.indexOf("on")===0){if(o.has(c)||o.set(c,[]),typeof u=="function"){var f;(f=o.get(c))==null||f.push(u),r[c]=function(){for(var d,h=arguments.length,m=new Array(h),g=0;g<h;g++)m[g]=arguments[g];return(d=o.get(c))==null?void 0:d.map(y=>y(...m)).find(y=>y!==void 0)}}}else r[c]=u}),r),{})}}function Ec(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),o=e.map(a=>a?.item),i=R.useCallback(a=>To(a,e,"reference"),t),s=R.useCallback(a=>To(a,e,"floating"),n),r=R.useCallback(a=>To(a,e,"item"),o);return R.useMemo(()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:r}),[i,s,r])}const Uv=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Mc(e,t){var n,o;t===void 0&&(t={});const{open:i,elements:s,floatingId:r}=e,{enabled:a=!0,role:l="dialog"}=t,c=Rc(),u=((n=s.domReference)==null?void 0:n.id)||c,f=R.useMemo(()=>{var w;return((w=Hp(s.floating))==null?void 0:w.id)||r},[s.floating,r]),d=(o=Uv.get(l))!=null?o:l,m=fs()!=null,g=R.useMemo(()=>d==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:i?f:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":d==="alertdialog"?"dialog":d,"aria-controls":i?f:void 0,...d==="listbox"&&{role:"combobox"},...d==="menu"&&{id:u},...d==="menu"&&m&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[d,f,m,i,u,l]),y=R.useMemo(()=>{const w={id:f,...d&&{role:d}};return d==="tooltip"||l==="label"?w:{...w,...d==="menu"&&{"aria-labelledby":u}}},[d,f,u,l]),x=R.useCallback(w=>{let{active:v,selected:b}=w;const S={role:"option",...v&&{id:f+"-fui-option"}};switch(l){case"select":case"combobox":return{...S,"aria-selected":b}}return{}},[f,l]);return R.useMemo(()=>a?{reference:g,floating:y,item:x}:{},[a,g,y,x])}const Kv=e=>R.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),qv=e=>R.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},R.createElement("g",null,R.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"}))),Tc=e=>R.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("g",{opacity:.6},R.createElement("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),Ao={sm:{h:28,p:"var(--spacing-xs) var(--spacing-sm)",text:"body-2"},md:{h:32,p:"6px var(--spacing-md)",text:"body-2"},lg:{h:40,p:"var(--spacing-sm) var(--spacing-lg)",text:"body-1"}},ps=C.forwardRef(({label:e,color:t="primary",size:n="md",onClick:o,onDelete:i,avatar:s,icon:r,disabled:a,className:l},c)=>{const u=C.useRef(null),f=C.useMemo(()=>{switch(t){case"primary":return{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"};case"accent":return{bg:"var(--status-accent-tint-low)",color:"var(--text-accent)"};case"warning":return{bg:"var(--status-warning-tint-low)",color:"var(--text-warning)"};case"positive":return{bg:"var(--status-positive-tint-low)",color:"var(--text-positive)"};case"negative":return{bg:"var(--status-negative-tint-low)",color:"var(--text-negative)"};default:return{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"}}},[t]),d=V.css({cursor:a?"not-allowed":o?"pointer":"default",opacity:a?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s","&:hover":a?void 0:{backgroundColor:f.bg}}),h=V.css({display:"inline-flex",cursor:"pointer",opacity:.6,"&:hover":{opacity:1}});return p.jsxs(L,{ref:m=>{u.current=m,typeof c=="function"?c(m):c&&(c.current=m)},row:!0,alignItems:"center",justifyContent:"center",gap:"var(--spacing-sm)",h:Ao[n].h,p:Ao[n].p,overflow:"hidden",borderRadius:"var(--corner-sm)",backgroundColor:f.bg,color:f.color,onClick:o,className:V.cx(d,l),children:[o&&p.jsx(gt,{}),s&&p.jsx(L,{w:20,h:20,borderRadius:"50%",overflow:"hidden",children:s}),r&&p.jsx(L,{children:r}),typeof e=="string"?p.jsx(K,{variant:Ao[n].text,colorName:t,textOverflow:"ellipsis",overflow:"hidden",children:e}):e,i&&!a&&p.jsx(K,{className:h,colorName:t,onClick:m=>{m.stopPropagation(),i(m)},children:p.jsx(Tc,{})})]})});ps.displayName="Tag";const Xv="_disabled_ns6ei_45",Yv="_open_ns6ei_53",Zv="_error_ns6ei_56",Jv="_hidden_ns6ei_92",Qv="_visible_ns6ei_95",ey="_selected_ns6ei_168",ce={"select-container":"_select-container_ns6ei_8","full-width":"_full-width_ns6ei_13","select-input":"_select-input_ns6ei_17","size-xs":"_size-xs_ns6ei_24","size-sm":"_size-sm_ns6ei_29","size-md":"_size-md_ns6ei_34","background-primary":"_background-primary_ns6ei_39","background-secondary":"_background-secondary_ns6ei_42",disabled:Xv,open:Yv,"select-arrow":"_select-arrow_ns6ei_53",error:Zv,"select-value":"_select-value_ns6ei_67","select-value_xs":"_select-value_xs_ns6ei_79","select-placeholder":"_select-placeholder_ns6ei_86",hidden:Jv,visible:Qv,"select-arrow_xs":"_select-arrow_xs_ns6ei_111","select-dropdown":"_select-dropdown_ns6ei_121","select-menu":"_select-menu_ns6ei_131","select-menu-item":"_select-menu-item_ns6ei_150","select-menu-item-first":"_select-menu-item-first_ns6ei_163",selected:ey,"overflow-tooltip-container":"_overflow-tooltip-container_ns6ei_172","overflow-tooltip-text":"_overflow-tooltip-text_ns6ei_177","empty-block":"_empty-block_ns6ei_184"};function Ac({value:e,onChange:t,multiple:n=!1,returnedValue:o,renderItem:i,renderInputItem:s,renderSingleInputItem:r,renderMultipleInputItem:a,renderDropdownItem:l,placeholder:c,items:u=[],fullWidth:f,size:d="md",showDefaultItem:h,disabled:m,label:g,firstItem:y,lastItem:x,observer:w,emptyText:v,onBlur:b,prompt:S,error:M,errorText:A,dropdownMaxWidth:E=400,dropdownMinWidth:k=120,minWidth:F=120,width:$,background:N="secondary"}){const[j,D]=mt(e,n?[]:null),[O,B]=C.useState(!1),{refs:P,floatingStyles:_}=ms({open:O,strategy:"fixed",middleware:[cs(4),ds({crossAxis:!0,fallbackAxisSideDirection:"start"}),us({crossAxis:!0,padding:8}),Tv({apply({availableHeight:z,availableWidth:J,elements:re}){const he=Math.min(typeof J=="number"?J-64:E,E);Object.assign(re.floating.style,{maxHeight:typeof z=="number"?`${z}px`:"auto",maxWidth:`${he}px`,minWidth:`${k}px`})}})],whileElementsMounted:ls}),T=C.useMemo(()=>n?j||[]:j!=null?[j]:[],[j,n]),I=C.useCallback(z=>o?o(z):z,[o]),q=C.useMemo(()=>{const z=new Map;return u.forEach(J=>{z.set(I(J),J)}),z},[u,I]),U=!u.length&&!M,X=C.useMemo(()=>T.map(z=>q.get(z)).filter(z=>!!z),[q,T]);C.useEffect(()=>{process.env.NODE_ENV!=="production"&&i&&!l&&console.warn("[Select] `renderItem` deprecated, use `renderDropdownItem` instead.")},[l,i]);const te=C.useCallback((z,J)=>l?l(z,J):i?i(z):String(z),[l,i]),Y=()=>{B(!1),b?.()},ne=z=>{const J=I(z);if(n){const re=T.includes(J)?T.filter(he=>he!==J):[...T,J];D(re),t?.(re)}else D(J),t?.(J),Y()},le=z=>{if(!n)return;const J=T.filter(re=>re!==z);D(J),t?.(J)},_e=()=>{const z=n?[]:null;D(z),t?.(z),n||Y()},fe=()=>typeof c=="string"?p.jsx(K,{variant:d==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:c??"Select..."}):c,je=()=>{if(!T.length)return fe();if(n)return a?a(X):s?s({mode:"multiple",selectedItems:X}):p.jsx(L,{flexWrap:"wrap",row:!0,gap:10,children:T.map(re=>{const he=q.get(re);return he?p.jsx(ps,{size:"sm",label:i?i(he):String(re),onDelete:ve=>{ve.stopPropagation(),le(re)}},re):null})});const z=q.get(T[0])??null;if(!z)return fe();if(r)return r(z);if(s)return s({mode:"single",selectedItem:z});const J=i?i(z):String(T[0]);return typeof J=="string"?p.jsx(K,{variant:d==="xs"?"caption-1":"body-2",tag:"p",textOverflow:"ellipsis",overflow:"hidden",children:J}):p.jsx(p.Fragment,{children:J})},pe=O&&p.jsx(cn,{children:p.jsx(L,{row:!0,top:0,right:0,bottom:0,left:0,position:"fixed",center:!0,flex:1,onClick:Y,display:"block",backgroundColor:"transparent",zIndex:1,children:p.jsx(qn.div,{ref:P.setFloating,className:ce["select-dropdown"],initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},style:{..._,zIndex:1},onMouseDown:z=>z.stopPropagation(),onClick:z=>z.stopPropagation(),children:p.jsxs("ul",{className:ce["select-menu"],children:[h&&!n&&p.jsx(L,{className:ce["select-menu-item"],role:"option",onClick:_e,children:p.jsx(K,{variant:"body-2",colorName:"tertiary",children:c})}),y&&p.jsx(L,{className:V.cx(ce["select-menu-item"],ce["select-menu-item-first"]),children:y}),U&&p.jsxs(L,{className:ce["empty-block"],children:[p.jsx(L,{w:20,h:20,children:p.jsx(qv,{})}),p.jsx(K,{variant:"body-2",children:v??"There is nothing yet"})]}),u.map((z,J)=>{const re=I(z),he=T.includes(re),ve=te(z,{item:z,selected:he,index:J}),un=typeof ve=="string";return p.jsxs(L,{row:!0,gap:10,alignItems:"center",className:V.cx(ce["select-menu-item"],{[ce.selected]:he}),role:"option",relative:!0,onClick:()=>ne(z),children:[n&&p.jsx(ns,{size:"sm",checked:he}),un?p.jsx(K,{variant:"body-2",tag:"p",wordBreak:"break-all",whiteSpace:"break-spaces",children:ve}):ve,p.jsx(gt,{})]},re)}),w,x&&p.jsx(L,{className:V.cx(ce["select-menu-item"],ce["select-menu-item-first"]),children:x})]})},"dropdown")})});return p.jsxs(L,{relative:!0,display:"inline-block",minWidth:F,w:$||(f?"full":"auto"),onMouseDown:z=>z.stopPropagation(),onClick:z=>z.stopPropagation(),children:[typeof g=="string"?p.jsx(K,{variant:"body-2",colorName:"tertiary",fontWeight:"regular",mb:d==="sm"?4:8,children:g}):g,p.jsxs(L,{ref:P.setReference,row:!0,gap:10,tabIndex:m?-1:0,role:"button",alignItems:"flex-start","aria-haspopup":"listbox",relative:!0,w:"100%",className:V.cx(ce["select-input"],ce[`size-${d}`],ce[`background-${N}`],{[ce.error]:M,[ce.disabled]:m,[ce.open]:O}),onClick:()=>!m&&B(z=>!z),children:[p.jsx(L,{className:V.cx(ce["select-value"]),children:je()}),p.jsx(L,{className:V.cx(ce["select-arrow"],ce[`select-arrow_${d}`]),children:p.jsx(Kv,{})})]}),typeof S=="string"?p.jsx(K,{variant:"caption-1",colorName:"tertiary",mt:4,children:S}):S,M&&A&&p.jsx(K,{tag:"p",colorName:"negative",variant:"body-2",mt:5,children:A}),p.jsx($f,{children:pe})]})}const ty=e=>R.createElement("svg",{width:10,height:10,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.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"})),ny=e=>R.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.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"})),oy="_container_e7tan_8",iy="_disabled_e7tan_17",sy="_reverse_e7tan_21",ry="_input_e7tan_25",ay="_switchContainer_e7tan_35",ly="_variant_accent_e7tan_43",cy="_variant_secondary_e7tan_47",uy="_thumb_e7tan_51",dy="_variant_theme_e7tan_54",fy="_moon_e7tan_58",hy="_fire_e7tan_61",gy="_size_sm_e7tan_74",my="_size_md_e7tan_80",py="_size_lg_e7tan_86",De={container:oy,disabled:iy,reverse:sy,input:ry,switchContainer:ay,variant_accent:ly,variant_secondary:cy,switch:"_switch_e7tan_35",thumb:uy,variant_theme:dy,moon:fy,fire:hy,size_sm:gy,size_md:my,size_lg:py},Vc=C.forwardRef(({title:e,text:t,icon:n,disabled:o,onChange:i,checked:s,defaultValue:r,className:a,size:l="md",variant:c="accent",reverse:u=!1,w:f="auto",...d},h)=>{const[m,g]=mt(s,r),y=C.useRef(null);C.useImperativeHandle(h,()=>({focus:()=>{y.current?.focus()},blur:()=>{y.current?.blur()},get checked(){return m??!1},setChecked:b=>{g(b),i?.(b)},toggle:()=>{const b=!m;g(b),i?.(b)},isFocused:()=>document.activeElement===y.current,isDisabled:()=>o??!1,getInputElement:()=>y.current,checkValidity:()=>y.current?.checkValidity()??!0,reset:()=>{const b=r??!1;g(b),i?.(b)}}),[m,g,i,o,r]);const x=C.useCallback(b=>{g(b.target.checked),i?.(b.target.checked)},[i]),w=C.useMemo(()=>typeof e=="string"?p.jsx(K,{variant:"body-1",colorName:"primary",fontWeight:"medium",children:e}):e,[e]),v=C.useMemo(()=>typeof t=="string"?p.jsx(K,{variant:"body-2",colorName:"secondary",fontWeight:"regular",children:t}):t,[t]);return p.jsxs(L,{row:!0,w:f,gap:"var(--spacing-sm)",children:[p.jsxs("label",{className:V.cx(De.container,a,{[De.disabled]:o,[De.reverse]:u}),children:[p.jsxs(L,{className:V.cx(De.switchContainer,De[`size_${l}`],De[`variant_${c}`]),children:[p.jsx("input",{ref:y,type:"checkbox",checked:m,className:De.input,onChange:x,disabled:o,...d}),p.jsx("div",{className:De.switch,children:p.jsx("div",{className:De.thumb,children:c==="theme"&&p.jsxs(p.Fragment,{children:[p.jsx(ny,{className:De.moon}),p.jsx(ty,{className:De.fire})]})})})]}),p.jsxs(L,{gap:"var(--spacing-xs)",children:[w,v]})]}),n]})});Vc.displayName="Switch";const vy=V.css({cursor:"pointer",userSelect:"none"}),yy=V.css({cursor:"not-allowed",opacity:.5}),xy=V.css({transition:"color 0.2s ease"}),wy=C.forwardRef(({label:e,selected:t,disabled:n,fullWidth:o,onClick:i},s)=>p.jsx(L,{w:o?"full":void 0,justifyContent:"center",alignItems:"center",ref:s,py:"var(--spacing-md)",px:"var(--spacing-xl)",onClick:i,className:V.cx(vy,{[yy]:n}),children:p.jsx(K,{className:xy,colorName:t?"primary":"tertiary",fontWeight:"medium",variant:"body-2",children:e})})),Cy=V.css({borderBottom:"1px solid var(--border-neutral-alpha-basic)"}),kc=({value:e,onChange:t,options:n,fullWidth:o=!1,className:i})=>{const[s,r]=C.useState({left:0,width:0}),a=C.useRef([]),l=u=>f=>{a.current[u]=f};C.useEffect(()=>{const u=n.findIndex(d=>d.value===e),f=a.current[u];f&&r({left:f.offsetLeft,width:f.offsetWidth})},[e,n]);const c=(u,f=!1)=>()=>!f&&t(u);return p.jsxs(L,{row:!0,w:o?"full":"auto",relative:!0,className:V.cx(Cy,i),children:[n.map((u,f)=>p.jsx(wy,{selected:e===u.value,onClick:c(u.value,u.disabled),ref:l(f),label:u.label,disabled:u.disabled,fullWidth:o},u.value)),p.jsx(L,{h:2,w:s.width,absolute:!0,bottom:-1,left:s.left,backgroundColor:"var(--border-accent-primary)",className:V.css({transition:"left 0.2s ease, width 0.2s ease"})})]})};kc.displayName="Tabs";const Sy="_header_446to_8",by={header:Sy},Dc=C.forwardRef(({title:e,subtitle:t,w:n="full",p:o,py:i,px:s="var(--spacing-2xl)",pt:r="var(--spacing-2xl)",pb:a="var(--spacing-lg)",row:l=!0,justifyContent:c="space-between",showCloseButton:u=!1},f)=>{const{onClose:d}=Pu();return p.jsxs(L,{w:n,p:o,py:i,px:s,pt:r,pb:a,row:l,justifyContent:c,ref:f,className:by.header,children:[p.jsxs(L,{gap:"var(--spacing-sm)",children:[p.jsx(K,{variant:"title-3",colorName:"primary",fontWeight:"semibold",children:e}),p.jsx(K,{variant:"body-1",colorName:"tertiary",fontWeight:"medium",children:t})]}),u&&p.jsx(L,{children:p.jsx(Xt,{onClick:d,color:"neutral",children:p.jsx(Sa,{})})})]})});Dc.displayName="ModalHeader";function yt(e,t,n){let o=n.initialDeps??[],i,s=!0;function r(){var a,l,c;let u;n.key&&((a=n.debug)!=null&&a.call(n))&&(u=Date.now());const f=e();if(!(f.length!==o.length||f.some((m,g)=>o[g]!==m)))return i;o=f;let h;if(n.key&&((l=n.debug)!=null&&l.call(n))&&(h=Date.now()),i=t(...f),n.key&&((c=n.debug)!=null&&c.call(n))){const m=Math.round((Date.now()-u)*100)/100,g=Math.round((Date.now()-h)*100)/100,y=g/16,x=(w,v)=>{for(w=String(w);w.length<v;)w=" "+w;return w};console.info(`%c⏱ ${x(g,5)} /${x(m,5)} ms`,`
|
|
10
10
|
font-size: .6rem;
|
|
11
11
|
font-weight: bold;
|
|
12
|
-
color: hsl(${Math.max(0,Math.min(120-120*y,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(s&&n.skipInitialOnChange)&&n.onChange(i),s=!1,i}return r.updateDeps=a=>{o=a},r}function sa(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Ry=(e,t)=>Math.abs(e-t)<1.01,_y=(e,t,n)=>{let o;return function(...i){e.clearTimeout(o),o=e.setTimeout(()=>t.apply(this,i),n)}},ra=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Py=e=>e,Ey=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let i=t;i<=n;i++)o.push(i);return o},My=(e,t)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;const i=r=>{const{width:a,height:l}=r;t({width:Math.round(a),height:Math.round(l)})};if(i(ra(n)),!o.ResizeObserver)return()=>{};const s=new o.ResizeObserver(r=>{const a=()=>{const l=r[0];if(l?.borderBoxSize){const c=l.borderBoxSize[0];if(c){i({width:c.inlineSize,height:c.blockSize});return}}i(ra(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},aa={passive:!0},la=typeof window>"u"?!0:"onscrollend"in window,Ty=(e,t)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;let i=0;const s=e.options.useScrollendEvent&&la?()=>{}:_y(o,()=>{t(i,!1)},e.options.isScrollingResetDelay),r=u=>()=>{const{horizontal:f,isRtl:d}=e.options;i=f?n.scrollLeft*(d&&-1||1):n.scrollTop,s(),t(i,u)},a=r(!0),l=r(!1);l(),n.addEventListener("scroll",a,aa);const c=e.options.useScrollendEvent&&la;return c&&n.addEventListener("scrollend",l,aa),()=>{n.removeEventListener("scroll",a),c&&n.removeEventListener("scrollend",l)}},Ay=(e,t,n)=>{if(t?.borderBoxSize){const o=t.borderBoxSize[0];if(o)return Math.round(o[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},Vy=(e,{adjustments:t=0,behavior:n},o)=>{var i,s;const r=e+t;(s=(i=o.scrollElement)==null?void 0:i.scrollTo)==null||s.call(i,{[o.options.horizontal?"left":"top"]:r,behavior:n})};class Dy{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const o=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(s=>{const r=()=>{this._measureElement(s.target,s)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()})}));return{disconnect:()=>{var i;(i=o())==null||i.disconnect(),n=null},observe:i=>{var s;return(s=o())==null?void 0:s.observe(i,{box:"border-box"})},unobserve:i=>{var s;return(s=o())==null?void 0:s.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([o,i])=>{typeof i>"u"&&delete n[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Py,rangeExtractor:Ey,onChange:()=>{},measureElement:Ay,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 o,i;(i=(o=this.options).onChange)==null||i.call(o,this,n)},this.maybeNotify=yt(()=>(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 o=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==o){if(this.cleanup(),!o){this.maybeNotify();return}this.scrollElement=o,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(i=>{this.observer.observe(i)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=s,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,o)=>{const i=new Map,s=new Map;for(let r=o-1;r>=0;r--){const a=n[r];if(i.has(a.lane))continue;const l=s.get(a.lane);if(l==null||a.end>l.end?s.set(a.lane,a):a.end<l.end&&i.set(a.lane,!0),i.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((r,a)=>r.end===a.end?r.index-a.index:r.end-a.end)[0]:void 0},this.getMeasurementOptions=yt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,o,i,s,r,a)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:o,scrollMargin:i,getItemKey:s,enabled:r,lanes:a}),{key:!1,skipInitialOnChange:!0,onChange:()=>{this.notify(this.isScrolling)}}),this.getMeasurements=yt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:o,scrollMargin:i,getItemKey:s,enabled:r,lanes:a},l)=>{if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const d of this.laneAssignments.keys())d>=n&&this.laneAssignments.delete(d);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(d=>{this.itemSizeCache.set(d.key,d.size)}));const c=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const u=this.measurementsCache.slice(0,c),f=new Array(a).fill(void 0);for(let d=0;d<c;d++){const h=u[d];h&&(f[h.lane]=d)}for(let d=c;d<n;d++){const h=s(d),m=this.laneAssignments.get(d);let g,y;if(m!==void 0&&this.options.lanes>1){g=m;const S=f[g],b=S!==void 0?u[S]:void 0;y=b?b.end+this.options.gap:o+i}else{const S=this.options.lanes===1?u[d-1]:this.getFurthestMeasurement(u,d);y=S?S.end+this.options.gap:o+i,g=S?S.lane:d%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(d,g)}const x=l.get(h),w=typeof x=="number"?x:this.options.estimateSize(d),v=y+w;u[d]={index:d,start:y,size:w,end:v,key:h,lane:g},f[g]=d}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=yt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,o,i,s)=>this.range=n.length>0&&o>0?ky({measurements:n,outerSize:o,scrollOffset:i,lanes:s}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=yt(()=>{let n=null,o=null;const i=this.calculateRange();return i&&(n=i.startIndex,o=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,o]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,o]},(n,o,i,s,r)=>s===null||r===null?[]:n({startIndex:s,endIndex:r,overscan:o,count:i}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const o=this.options.indexAttribute,i=n.getAttribute(o);return i?parseInt(i,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(n,o)=>{const i=this.indexFromElement(n),s=this.measurementsCache[i];if(!s)return;const r=s.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(i,this.options.measureElement(n,o,this))},this.resizeItem=(n,o)=>{const i=this.measurementsCache[n];if(!i)return;const s=this.itemSizeCache.get(i.key)??i.size,r=o-s;r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,r,this):i.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(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,o)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((o,i)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=yt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,o)=>{const i=[];for(let s=0,r=n.length;s<r;s++){const a=n[s],l=o[a];i.push(l)}return i},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const o=this.getMeasurements();if(o.length!==0)return sa(o[Fc(0,o.length-1,i=>sa(o[i]).start,n)])},this.getOffsetForAlignment=(n,o,i=0)=>{const s=this.getSize(),r=this.getScrollOffset();o==="auto"&&(o=n>=r+s?"end":"start"),o==="center"?n+=(i-s)/2:o==="end"&&(n-=s);const a=this.getTotalSize()+this.options.scrollMargin-s;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,o="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const s=this.getSize(),r=this.getScrollOffset();if(o==="auto")if(i.end>=r+s-this.options.scrollPaddingEnd)o="end";else if(i.start<=r+this.options.scrollPaddingStart)o="start";else return[r,o];const a=o==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,o,i.size),o]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:o="start",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,o),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:o="auto",behavior:i}={})=>{i==="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 s=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[f,d]=u;this._scrollToOffset(f,{adjustments:void 0,behavior:i}),this.targetWindow.requestAnimationFrame(()=>{const h=this.getScrollOffset(),m=this.getOffsetForIndex(n,d);if(!m){console.warn("Failed to get offset for index:",n);return}Ry(m[0],h)||l(d)})},l=c=>{this.targetWindow&&(s++,s<r?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",s,r),this.targetWindow.requestAnimationFrame(()=>a(c))):console.warn(`Failed to scroll to index ${n} after ${r} attempts.`))};a(o)},this.scrollBy=(n,{behavior:o}={})=>{o==="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:o})},this.getTotalSize=()=>{var n;const o=this.getMeasurements();let i;if(o.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((n=o[o.length-1])==null?void 0:n.end)??0;else{const s=Array(this.options.lanes).fill(null);let r=o.length-1;for(;r>=0&&s.some(a=>a===null);){const a=o[r];s[a.lane]===null&&(s[a.lane]=a.end),r--}i=Math.max(...s.filter(a=>a!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:o,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:o},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}}const Fc=(e,t,n,o)=>{for(;e<=t;){const i=(e+t)/2|0,s=n(i);if(s<o)e=i+1;else if(s>o)t=i-1;else return i}return e>0?e-1:0};function ky({measurements:e,outerSize:t,scrollOffset:n,lanes:o}){const i=e.length-1,s=l=>e[l].start;if(e.length<=o)return{startIndex:0,endIndex:i};let r=Fc(0,i,s,n),a=r;if(o===1)for(;a<i&&e[a].end<n+t;)a++;else if(o>1){const l=Array(o).fill(0);for(;a<i&&l.some(u=>u<n+t);){const u=e[a];l[u.lane]=u.end,a++}const c=Array(o).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%o),a=Math.min(i,a+(o-1-a%o))}return{startIndex:r,endIndex:a}}const ca=typeof document<"u"?R.useLayoutEffect:R.useEffect;function Fy(e){const t=R.useReducer(()=>({}),{})[1],n={...e,onChange:(i,s)=>{var r;s?wi.flushSync(t):t(),(r=e.onChange)==null||r.call(e,i,s)}},[o]=R.useState(()=>new Dy(n));return o.setOptions(n),ca(()=>o._didMount(),[]),ca(()=>o._willUpdate()),o}function Ly(e){return Fy({observeElementRect:My,observeElementOffset:Ty,scrollToFn:Vy,...e})}const Iy="_main_1qx2l_8",ua={main:Iy},Lc=C.forwardRef(({children:e,className:t,row:n=!1,estimatedItemHeight:o=100,virtualize:i=!1,maxHeight:s=448},r)=>{const a=C.useRef(null),l=C.useMemo(()=>C.Children.toArray(e),[e]),c=Ly({count:l.length,getScrollElement:()=>a.current,estimateSize:()=>o,measureElement:f=>f.getBoundingClientRect().height});return C.useImperativeHandle(r,()=>({scrollToTop:()=>c.scrollToOffset(0,{behavior:"smooth"}),scrollToBottom:()=>c.scrollToOffset(c.getTotalSize(),{behavior:"smooth"}),scrollToIndex:(f,d={})=>c.scrollToIndex(f,{behavior:"smooth",...d}),scrollToOffset:(f,d={})=>c.scrollToOffset(f,{behavior:"smooth",...d}),scrollBy:f=>{const d=c.scrollOffset||0;c.scrollToOffset(d+f,{behavior:"smooth"})},getElement:()=>a.current,getScrollOffset:()=>c.scrollOffset||0,getTotalSize:()=>c.getTotalSize()}),[c]),C.useMemo(()=>i||l.length>50,[i,l])&&l.length>0?p.jsx(L,{ref:a,row:n,maxHeight:s,className:V.cx(ua.main,t),w:"full",p:"var(--spacing-2xl)",children:p.jsx(L,{relative:!0,h:c.getTotalSize(),children:c.getVirtualItems().map(f=>p.jsx(L,{"data-index":f.index,ref:c.measureElement,w:"full",absolute:!0,style:{top:0,left:0,transform:`translateY(${f.start}px)`},children:l[f.index]},f.key))})}):p.jsx(L,{ref:a,className:V.cx(ua.main,t),w:"full",row:n,pl:"var(--spacing-2xl)",pr:"var(--spacing-xs)",children:p.jsx(L,{py:"var(--spacing-2xl)",pr:"var(--spacing-xl)",children:e})})});Lc.displayName="ModalMain";const Qn=Ra;Qn.Header=kc;Qn.Main=Lc;Qn.Footer=_a;const Ic=C.createContext(null),jy=()=>C.useContext(Ic),cn=({children:e})=>{const[t,n]=C.useState(null),o=jy();return C.useEffect(()=>{if(typeof document>"u")return;const i=o?.current??document.body;if(!i)return;let s=i.querySelector("[data-portal-root]")??void 0;s||(s=document.createElement("div"),s.setAttribute("data-portal-root","true"),i.appendChild(s)),n(s)},[o]),t?wi.createPortal(e,t):null};function jc(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function Je(e,t){return typeof e=="function"?e(t):e}function Se(e,t){return n=>{t.setState(o=>({...o,[e]:Je(n,o[e])}))}}function eo(e){return e instanceof Function}function $y(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Oy(e,t){const n=[],o=i=>{i.forEach(s=>{n.push(s);const r=t(s);r!=null&&r.length&&o(r)})};return o(e),n}function H(e,t,n){let o=[],i;return s=>{let r;n.key&&n.debug&&(r=Date.now());const a=e(s);if(!(a.length!==o.length||a.some((u,f)=>o[f]!==u)))return i;o=a;let c;if(n.key&&n.debug&&(c=Date.now()),i=t(...a),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-r)*100)/100,f=Math.round((Date.now()-c)*100)/100,d=f/16,h=(m,g)=>{for(m=String(m);m.length<g;)m=" "+m;return m};console.info(`%c⏱ ${h(f,5)} /${h(u,5)} ms`,`
|
|
12
|
+
color: hsl(${Math.max(0,Math.min(120-120*y,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(s&&n.skipInitialOnChange)&&n.onChange(i),s=!1,i}return r.updateDeps=a=>{o=a},r}function sa(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Ry=(e,t)=>Math.abs(e-t)<1.01,_y=(e,t,n)=>{let o;return function(...i){e.clearTimeout(o),o=e.setTimeout(()=>t.apply(this,i),n)}},ra=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Py=e=>e,Ey=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let i=t;i<=n;i++)o.push(i);return o},My=(e,t)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;const i=r=>{const{width:a,height:l}=r;t({width:Math.round(a),height:Math.round(l)})};if(i(ra(n)),!o.ResizeObserver)return()=>{};const s=new o.ResizeObserver(r=>{const a=()=>{const l=r[0];if(l?.borderBoxSize){const c=l.borderBoxSize[0];if(c){i({width:c.inlineSize,height:c.blockSize});return}}i(ra(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},aa={passive:!0},la=typeof window>"u"?!0:"onscrollend"in window,Ty=(e,t)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;let i=0;const s=e.options.useScrollendEvent&&la?()=>{}:_y(o,()=>{t(i,!1)},e.options.isScrollingResetDelay),r=u=>()=>{const{horizontal:f,isRtl:d}=e.options;i=f?n.scrollLeft*(d&&-1||1):n.scrollTop,s(),t(i,u)},a=r(!0),l=r(!1);l(),n.addEventListener("scroll",a,aa);const c=e.options.useScrollendEvent&&la;return c&&n.addEventListener("scrollend",l,aa),()=>{n.removeEventListener("scroll",a),c&&n.removeEventListener("scrollend",l)}},Ay=(e,t,n)=>{if(t?.borderBoxSize){const o=t.borderBoxSize[0];if(o)return Math.round(o[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},Vy=(e,{adjustments:t=0,behavior:n},o)=>{var i,s;const r=e+t;(s=(i=o.scrollElement)==null?void 0:i.scrollTo)==null||s.call(i,{[o.options.horizontal?"left":"top"]:r,behavior:n})};class ky{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const o=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(s=>{const r=()=>{this._measureElement(s.target,s)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()})}));return{disconnect:()=>{var i;(i=o())==null||i.disconnect(),n=null},observe:i=>{var s;return(s=o())==null?void 0:s.observe(i,{box:"border-box"})},unobserve:i=>{var s;return(s=o())==null?void 0:s.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([o,i])=>{typeof i>"u"&&delete n[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Py,rangeExtractor:Ey,onChange:()=>{},measureElement:Ay,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 o,i;(i=(o=this.options).onChange)==null||i.call(o,this,n)},this.maybeNotify=yt(()=>(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 o=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==o){if(this.cleanup(),!o){this.maybeNotify();return}this.scrollElement=o,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(i=>{this.observer.observe(i)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=s,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,o)=>{const i=new Map,s=new Map;for(let r=o-1;r>=0;r--){const a=n[r];if(i.has(a.lane))continue;const l=s.get(a.lane);if(l==null||a.end>l.end?s.set(a.lane,a):a.end<l.end&&i.set(a.lane,!0),i.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((r,a)=>r.end===a.end?r.index-a.index:r.end-a.end)[0]:void 0},this.getMeasurementOptions=yt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,o,i,s,r,a)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:o,scrollMargin:i,getItemKey:s,enabled:r,lanes:a}),{key:!1,skipInitialOnChange:!0,onChange:()=>{this.notify(this.isScrolling)}}),this.getMeasurements=yt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:o,scrollMargin:i,getItemKey:s,enabled:r,lanes:a},l)=>{if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const d of this.laneAssignments.keys())d>=n&&this.laneAssignments.delete(d);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(d=>{this.itemSizeCache.set(d.key,d.size)}));const c=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const u=this.measurementsCache.slice(0,c),f=new Array(a).fill(void 0);for(let d=0;d<c;d++){const h=u[d];h&&(f[h.lane]=d)}for(let d=c;d<n;d++){const h=s(d),m=this.laneAssignments.get(d);let g,y;if(m!==void 0&&this.options.lanes>1){g=m;const b=f[g],S=b!==void 0?u[b]:void 0;y=S?S.end+this.options.gap:o+i}else{const b=this.options.lanes===1?u[d-1]:this.getFurthestMeasurement(u,d);y=b?b.end+this.options.gap:o+i,g=b?b.lane:d%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(d,g)}const x=l.get(h),w=typeof x=="number"?x:this.options.estimateSize(d),v=y+w;u[d]={index:d,start:y,size:w,end:v,key:h,lane:g},f[g]=d}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=yt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,o,i,s)=>this.range=n.length>0&&o>0?Dy({measurements:n,outerSize:o,scrollOffset:i,lanes:s}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=yt(()=>{let n=null,o=null;const i=this.calculateRange();return i&&(n=i.startIndex,o=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,o]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,o]},(n,o,i,s,r)=>s===null||r===null?[]:n({startIndex:s,endIndex:r,overscan:o,count:i}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const o=this.options.indexAttribute,i=n.getAttribute(o);return i?parseInt(i,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(n,o)=>{const i=this.indexFromElement(n),s=this.measurementsCache[i];if(!s)return;const r=s.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(i,this.options.measureElement(n,o,this))},this.resizeItem=(n,o)=>{const i=this.measurementsCache[n];if(!i)return;const s=this.itemSizeCache.get(i.key)??i.size,r=o-s;r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,r,this):i.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(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,o)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((o,i)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=yt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,o)=>{const i=[];for(let s=0,r=n.length;s<r;s++){const a=n[s],l=o[a];i.push(l)}return i},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const o=this.getMeasurements();if(o.length!==0)return sa(o[Fc(0,o.length-1,i=>sa(o[i]).start,n)])},this.getOffsetForAlignment=(n,o,i=0)=>{const s=this.getSize(),r=this.getScrollOffset();o==="auto"&&(o=n>=r+s?"end":"start"),o==="center"?n+=(i-s)/2:o==="end"&&(n-=s);const a=this.getTotalSize()+this.options.scrollMargin-s;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,o="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const s=this.getSize(),r=this.getScrollOffset();if(o==="auto")if(i.end>=r+s-this.options.scrollPaddingEnd)o="end";else if(i.start<=r+this.options.scrollPaddingStart)o="start";else return[r,o];const a=o==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,o,i.size),o]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:o="start",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,o),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:o="auto",behavior:i}={})=>{i==="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 s=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[f,d]=u;this._scrollToOffset(f,{adjustments:void 0,behavior:i}),this.targetWindow.requestAnimationFrame(()=>{const h=this.getScrollOffset(),m=this.getOffsetForIndex(n,d);if(!m){console.warn("Failed to get offset for index:",n);return}Ry(m[0],h)||l(d)})},l=c=>{this.targetWindow&&(s++,s<r?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",s,r),this.targetWindow.requestAnimationFrame(()=>a(c))):console.warn(`Failed to scroll to index ${n} after ${r} attempts.`))};a(o)},this.scrollBy=(n,{behavior:o}={})=>{o==="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:o})},this.getTotalSize=()=>{var n;const o=this.getMeasurements();let i;if(o.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((n=o[o.length-1])==null?void 0:n.end)??0;else{const s=Array(this.options.lanes).fill(null);let r=o.length-1;for(;r>=0&&s.some(a=>a===null);){const a=o[r];s[a.lane]===null&&(s[a.lane]=a.end),r--}i=Math.max(...s.filter(a=>a!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:o,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:o},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}}const Fc=(e,t,n,o)=>{for(;e<=t;){const i=(e+t)/2|0,s=n(i);if(s<o)e=i+1;else if(s>o)t=i-1;else return i}return e>0?e-1:0};function Dy({measurements:e,outerSize:t,scrollOffset:n,lanes:o}){const i=e.length-1,s=l=>e[l].start;if(e.length<=o)return{startIndex:0,endIndex:i};let r=Fc(0,i,s,n),a=r;if(o===1)for(;a<i&&e[a].end<n+t;)a++;else if(o>1){const l=Array(o).fill(0);for(;a<i&&l.some(u=>u<n+t);){const u=e[a];l[u.lane]=u.end,a++}const c=Array(o).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%o),a=Math.min(i,a+(o-1-a%o))}return{startIndex:r,endIndex:a}}const ca=typeof document<"u"?R.useLayoutEffect:R.useEffect;function Fy(e){const t=R.useReducer(()=>({}),{})[1],n={...e,onChange:(i,s)=>{var r;s?Ci.flushSync(t):t(),(r=e.onChange)==null||r.call(e,i,s)}},[o]=R.useState(()=>new ky(n));return o.setOptions(n),ca(()=>o._didMount(),[]),ca(()=>o._willUpdate()),o}function Ly(e){return Fy({observeElementRect:My,observeElementOffset:Ty,scrollToFn:Vy,...e})}const Iy="_main_1qx2l_8",ua={main:Iy},Lc=C.forwardRef(({children:e,className:t,row:n=!1,estimatedItemHeight:o=100,virtualize:i=!1,maxHeight:s=448},r)=>{const a=C.useRef(null),l=C.useMemo(()=>C.Children.toArray(e),[e]),c=Ly({count:l.length,getScrollElement:()=>a.current,estimateSize:()=>o,measureElement:f=>f.getBoundingClientRect().height});return C.useImperativeHandle(r,()=>({scrollToTop:()=>c.scrollToOffset(0,{behavior:"smooth"}),scrollToBottom:()=>c.scrollToOffset(c.getTotalSize(),{behavior:"smooth"}),scrollToIndex:(f,d={})=>c.scrollToIndex(f,{behavior:"smooth",...d}),scrollToOffset:(f,d={})=>c.scrollToOffset(f,{behavior:"smooth",...d}),scrollBy:f=>{const d=c.scrollOffset||0;c.scrollToOffset(d+f,{behavior:"smooth"})},getElement:()=>a.current,getScrollOffset:()=>c.scrollOffset||0,getTotalSize:()=>c.getTotalSize()}),[c]),C.useMemo(()=>i||l.length>50,[i,l])&&l.length>0?p.jsx(L,{ref:a,row:n,maxHeight:s,className:V.cx(ua.main,t),w:"full",p:"var(--spacing-2xl)",children:p.jsx(L,{relative:!0,h:c.getTotalSize(),children:c.getVirtualItems().map(f=>p.jsx(L,{"data-index":f.index,ref:c.measureElement,w:"full",absolute:!0,style:{top:0,left:0,transform:`translateY(${f.start}px)`},children:l[f.index]},f.key))})}):p.jsx(L,{ref:a,className:V.cx(ua.main,t),w:"full",row:n,pl:"var(--spacing-2xl)",pr:"var(--spacing-xs)",children:p.jsx(L,{py:"var(--spacing-2xl)",pr:"var(--spacing-xl)",children:e})})});Lc.displayName="ModalMain";const eo=Ra;eo.Header=Dc;eo.Main=Lc;eo.Footer=_a;const Ic=C.createContext(null),jy=()=>C.useContext(Ic),cn=({children:e})=>{const[t,n]=C.useState(null),o=jy();return C.useEffect(()=>{if(typeof document>"u")return;const i=o?.current??document.body;if(!i)return;let s=i.querySelector("[data-portal-root]")??void 0;s||(s=document.createElement("div"),s.setAttribute("data-portal-root","true"),i.appendChild(s)),n(s)},[o]),t?Ci.createPortal(e,t):null};function jc(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function Je(e,t){return typeof e=="function"?e(t):e}function Re(e,t){return n=>{t.setState(o=>({...o,[e]:Je(n,o[e])}))}}function to(e){return e instanceof Function}function $y(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Oy(e,t){const n=[],o=i=>{i.forEach(s=>{n.push(s);const r=t(s);r!=null&&r.length&&o(r)})};return o(e),n}function H(e,t,n){let o=[],i;return s=>{let r;n.key&&n.debug&&(r=Date.now());const a=e(s);if(!(a.length!==o.length||a.some((u,f)=>o[f]!==u)))return i;o=a;let c;if(n.key&&n.debug&&(c=Date.now()),i=t(...a),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-r)*100)/100,f=Math.round((Date.now()-c)*100)/100,d=f/16,h=(m,g)=>{for(m=String(m);m.length<g;)m=" "+m;return m};console.info(`%c⏱ ${h(f,5)} /${h(u,5)} ms`,`
|
|
13
13
|
font-size: .6rem;
|
|
14
14
|
font-weight: bold;
|
|
15
|
-
color: hsl(${Math.max(0,Math.min(120-120*d,120))}deg 100% 31%);`,n?.key)}return i}}function W(e,t,n,o){return{debug:()=>{var i;return(i=e?.debugAll)!=null?i:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:o}}function Ny(e,t,n,o){const i=()=>{var r;return(r=s.getValue())!=null?r:e.options.renderFallbackValue},s={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(o),renderValue:i,getContext:H(()=>[e,n,t,s],(r,a,l,c)=>({table:r,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),W(e.options,"debugCells","cell.getContext"))};return e._features.forEach(r=>{r.createCell==null||r.createCell(s,n,t,e)},{}),s}function zy(e,t,n,o){var i,s;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(i=(s=a.id)!=null?s:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?i:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:l&&(l.includes(".")?u=d=>{let h=d;for(const g of l.split(".")){var m;h=(m=h)==null?void 0:m[g],process.env.NODE_ENV!=="production"&&h===void 0&&console.warn(`"${g}" in deeply nested key "${l}" returned undefined.`)}return h}:u=d=>d[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 f={id:`${String(c)}`,accessorFn:u,parent:o,depth:n,columnDef:a,columns:[],getFlatColumns:H(()=>[!0],()=>{var d;return[f,...(d=f.columns)==null?void 0:d.flatMap(h=>h.getFlatColumns())]},W(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:H(()=>[e._getOrderColumnsFn()],d=>{var h;if((h=f.columns)!=null&&h.length){let m=f.columns.flatMap(g=>g.getLeafColumns());return d(m)}return[f]},W(e.options,"debugColumns","column.getLeafColumns"))};for(const d of e._features)d.createColumn==null||d.createColumn(f,e);return f}const he="debugHeaders";function da(e,t,n){var o;let s={id:(o=n.id)!=null?o: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(s),r},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(r=>{r.createHeader==null||r.createHeader(s,e)}),s}const By={createTable:e=>{e.getHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o,i)=>{var s,r;const a=(s=o?.map(f=>n.find(d=>d.id===f)).filter(Boolean))!=null?s:[],l=(r=i?.map(f=>n.find(d=>d.id===f)).filter(Boolean))!=null?r:[],c=n.filter(f=>!(o!=null&&o.includes(f.id))&&!(i!=null&&i.includes(f.id)));return xn(t,[...a,...c,...l],e)},W(e.options,he,"getHeaderGroups")),e.getCenterHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o,i)=>(n=n.filter(s=>!(o!=null&&o.includes(s.id))&&!(i!=null&&i.includes(s.id))),xn(t,n,e,"center")),W(e.options,he,"getCenterHeaderGroups")),e.getLeftHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,o)=>{var i;const s=(i=o?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?i:[];return xn(t,s,e,"left")},W(e.options,he,"getLeftHeaderGroups")),e.getRightHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,o)=>{var i;const s=(i=o?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?i:[];return xn(t,s,e,"right")},W(e.options,he,"getRightHeaderGroups")),e.getFooterGroups=H(()=>[e.getHeaderGroups()],t=>[...t].reverse(),W(e.options,he,"getFooterGroups")),e.getLeftFooterGroups=H(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),W(e.options,he,"getLeftFooterGroups")),e.getCenterFooterGroups=H(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),W(e.options,he,"getCenterFooterGroups")),e.getRightFooterGroups=H(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),W(e.options,he,"getRightFooterGroups")),e.getFlatHeaders=H(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,he,"getFlatHeaders")),e.getLeftFlatHeaders=H(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,he,"getLeftFlatHeaders")),e.getCenterFlatHeaders=H(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,he,"getCenterFlatHeaders")),e.getRightFlatHeaders=H(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,he,"getRightFlatHeaders")),e.getCenterLeafHeaders=H(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),W(e.options,he,"getCenterLeafHeaders")),e.getLeftLeafHeaders=H(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),W(e.options,he,"getLeftLeafHeaders")),e.getRightLeafHeaders=H(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),W(e.options,he,"getRightLeafHeaders")),e.getLeafHeaders=H(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,o)=>{var i,s,r,a,l,c;return[...(i=(s=t[0])==null?void 0:s.headers)!=null?i:[],...(r=(a=n[0])==null?void 0:a.headers)!=null?r:[],...(l=(c=o[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},W(e.options,he,"getLeafHeaders"))}};function xn(e,t,n,o){var i,s;let r=0;const a=function(d,h){h===void 0&&(h=1),r=Math.max(r,h),d.filter(m=>m.getIsVisible()).forEach(m=>{var g;(g=m.columns)!=null&&g.length&&a(m.columns,h+1)},0)};a(e);let l=[];const c=(d,h)=>{const m={depth:h,id:[o,`${h}`].filter(Boolean).join("_"),headers:[]},g=[];d.forEach(y=>{const x=[...g].reverse()[0],w=y.column.depth===m.depth;let v,S=!1;if(w&&y.column.parent?v=y.column.parent:(v=y.column,S=!0),x&&x?.column===v)x.subHeaders.push(y);else{const b=da(n,v,{id:[o,h,v.id,y?.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${g.filter(M=>M.column===v).length}`:void 0,depth:h,index:g.length});b.subHeaders.push(y),g.push(b)}m.headers.push(y),y.headerGroup=m}),l.push(m),h>0&&c(g,h-1)},u=t.map((d,h)=>da(n,d,{depth:r,index:h}));c(u,r-1),l.reverse();const f=d=>d.filter(m=>m.column.getIsVisible()).map(m=>{let g=0,y=0,x=[0];m.subHeaders&&m.subHeaders.length?(x=[],f(m.subHeaders).forEach(v=>{let{colSpan:S,rowSpan:b}=v;g+=S,x.push(b)})):g=1;const w=Math.min(...x);return y=y+w,m.colSpan=g,m.rowSpan=y,{colSpan:g,rowSpan:y}});return f((i=(s=l[0])==null?void 0:s.headers)!=null?i:[]),l}const Hy=(e,t,n,o,i,s,r)=>{let a={id:t,index:o,original:n,depth:i,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,o),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,o),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:()=>Oy(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:H(()=>[e.getAllLeafColumns()],l=>l.map(c=>Ny(e,a,c,c.id)),W(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:H(()=>[a.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),W(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},Wy={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()}}},$c=(e,t,n)=>{var o,i;const s=n==null||(o=n.toString())==null?void 0:o.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(s))};$c.autoRemove=e=>Ie(e);const Oc=(e,t,n)=>{var o;return!!(!((o=e.getValue(t))==null||(o=o.toString())==null)&&o.includes(n))};Oc.autoRemove=e=>Ie(e);const Nc=(e,t,n)=>{var o;return((o=e.getValue(t))==null||(o=o.toString())==null?void 0:o.toLowerCase())===n?.toLowerCase()};Nc.autoRemove=e=>Ie(e);const zc=(e,t,n)=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(n)};zc.autoRemove=e=>Ie(e);const Bc=(e,t,n)=>!n.some(o=>{var i;return!((i=e.getValue(t))!=null&&i.includes(o))});Bc.autoRemove=e=>Ie(e)||!(e!=null&&e.length);const Hc=(e,t,n)=>n.some(o=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(o)});Hc.autoRemove=e=>Ie(e)||!(e!=null&&e.length);const Wc=(e,t,n)=>e.getValue(t)===n;Wc.autoRemove=e=>Ie(e);const Gc=(e,t,n)=>e.getValue(t)==n;Gc.autoRemove=e=>Ie(e);const ps=(e,t,n)=>{let[o,i]=n;const s=e.getValue(t);return s>=o&&s<=i};ps.resolveFilterValue=e=>{let[t,n]=e,o=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,s=t===null||Number.isNaN(o)?-1/0:o,r=n===null||Number.isNaN(i)?1/0:i;if(s>r){const a=s;s=r,r=a}return[s,r]};ps.autoRemove=e=>Ie(e)||Ie(e[0])&&Ie(e[1]);const He={includesString:$c,includesStringSensitive:Oc,equalsString:Nc,arrIncludes:zc,arrIncludesAll:Bc,arrIncludesSome:Hc,equals:Wc,weakEquals:Gc,inNumberRange:ps};function Ie(e){return e==null||e===""}const Gy={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Se("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],o=n?.getValue(e.id);return typeof o=="string"?He.includesString:typeof o=="number"?He.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?He.equals:Array.isArray(o)?He.arrIncludes:He.weakEquals},e.getFilterFn=()=>{var n,o;return eo(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(o=t.options.filterFns)==null?void 0:o[e.columnDef.filterFn])!=null?n:He[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,o,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((o=t.options.enableColumnFilters)!=null?o:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(o=>o.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,o;return(n=(o=t.getState().columnFilters)==null?void 0:o.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(o=>{const i=e.getFilterFn(),s=o?.find(u=>u.id===e.id),r=Je(n,s?s.value:void 0);if(fa(i,r,e)){var a;return(a=o?.filter(u=>u.id!==e.id))!=null?a:[]}const l={id:e.id,value:r};if(s){var c;return(c=o?.map(u=>u.id===e.id?l:u))!=null?c:[]}return o!=null&&o.length?[...o,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),o=i=>{var s;return(s=Je(t,i))==null?void 0:s.filter(r=>{const a=n.find(l=>l.id===r.id);if(a){const l=a.getFilterFn();if(fa(l,r.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(o)},e.resetColumnFilters=t=>{var n,o;e.setColumnFilters(t?[]:(n=(o=e.initialState)==null?void 0:o.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 fa(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Uy=(e,t,n)=>n.reduce((o,i)=>{const s=i.getValue(e);return o+(typeof s=="number"?s:0)},0),Ky=(e,t,n)=>{let o;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(o>s||o===void 0&&s>=s)&&(o=s)}),o},qy=(e,t,n)=>{let o;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(o<s||o===void 0&&s>=s)&&(o=s)}),o},Xy=(e,t,n)=>{let o,i;return n.forEach(s=>{const r=s.getValue(e);r!=null&&(o===void 0?r>=r&&(o=i=r):(o>r&&(o=r),i<r&&(i=r)))}),[o,i]},Yy=(e,t)=>{let n=0,o=0;if(t.forEach(i=>{let s=i.getValue(e);s!=null&&(s=+s)>=s&&(++n,o+=s)}),n)return o/n},Zy=(e,t)=>{if(!t.length)return;const n=t.map(s=>s.getValue(e));if(!$y(n))return;if(n.length===1)return n[0];const o=Math.floor(n.length/2),i=n.sort((s,r)=>s-r);return n.length%2!==0?i[o]:(i[o-1]+i[o])/2},Jy=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Qy=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,e0=(e,t)=>t.length,Ao={sum:Uy,min:Ky,max:qy,extent:Xy,mean:Yy,median:Zy,unique:Jy,uniqueCount:Qy,count:e0},t0={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:Se("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(o=>o!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,o;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((o=t.options.enableGrouping)!=null?o:!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],o=n?.getValue(e.id);if(typeof o=="number")return Ao.sum;if(Object.prototype.toString.call(o)==="[object Date]")return Ao.extent},e.getAggregationFn=()=>{var n,o;if(!e)throw new Error;return eo(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(o=t.options.aggregationFns)==null?void 0:o[e.columnDef.aggregationFn])!=null?n:Ao[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,o;e.setGrouping(t?[]:(n=(o=e.initialState)==null?void 0:o.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 o=t.getColumn(n);return o!=null&&o.columnDef.getGroupingValue?(e._groupingValuesCache[n]=o.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,o)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function n0(e,t,n){if(!(t!=null&&t.length)||!n)return e;const o=e.filter(s=>!t.includes(s.id));return n==="remove"?o:[...t.map(s=>e.find(r=>r.id===s)).filter(Boolean),...o]}const o0={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Se("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=H(n=>[qt(t,n)],n=>n.findIndex(o=>o.id===e.id),W(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var o;return((o=qt(t,n)[0])==null?void 0:o.id)===e.id},e.getIsLastColumn=n=>{var o;const i=qt(t,n);return((o=i[i.length-1])==null?void 0:o.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=H(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,o)=>i=>{let s=[];if(!(t!=null&&t.length))s=i;else{const r=[...t],a=[...i];for(;a.length&&r.length;){const l=r.shift(),c=a.findIndex(u=>u.id===l);c>-1&&s.push(a.splice(c,1)[0])}s=[...s,...a]}return n0(s,n,o)},W(e.options,"debugTable","_getOrderColumnsFn"))}},Vo=()=>({left:[],right:[]}),i0={getInitialState:e=>({columnPinning:Vo(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Se("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const o=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var s,r;if(n==="right"){var a,l;return{left:((a=i?.left)!=null?a:[]).filter(f=>!(o!=null&&o.includes(f))),right:[...((l=i?.right)!=null?l:[]).filter(f=>!(o!=null&&o.includes(f))),...o]}}if(n==="left"){var c,u;return{left:[...((c=i?.left)!=null?c:[]).filter(f=>!(o!=null&&o.includes(f))),...o],right:((u=i?.right)!=null?u:[]).filter(f=>!(o!=null&&o.includes(f)))}}return{left:((s=i?.left)!=null?s:[]).filter(f=>!(o!=null&&o.includes(f))),right:((r=i?.right)!=null?r:[]).filter(f=>!(o!=null&&o.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(o=>{var i,s,r;return((i=o.columnDef.enablePinning)!=null?i:!0)&&((s=(r=t.options.enableColumnPinning)!=null?r:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:o,right:i}=t.getState().columnPinning,s=n.some(a=>o?.includes(a)),r=n.some(a=>i?.includes(a));return s?"left":r?"right":!1},e.getPinnedIndex=()=>{var n,o;const i=e.getIsPinned();return i?(n=(o=t.getState().columnPinning)==null||(o=o[i])==null?void 0:o.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,o,i)=>{const s=[...o??[],...i??[]];return n.filter(r=>!s.includes(r.column.id))},W(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,o)=>(o??[]).map(s=>n.find(r=>r.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),W(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,o)=>(o??[]).map(s=>n.find(r=>r.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),W(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,o;return e.setColumnPinning(t?Vo():(n=(o=e.initialState)==null?void 0:o.columnPinning)!=null?n:Vo())},e.getIsSomeColumnsPinned=t=>{var n;const o=e.getState().columnPinning;if(!t){var i,s;return!!((i=o.left)!=null&&i.length||(s=o.right)!=null&&s.length)}return!!((n=o[t])!=null&&n.length)},e.getLeftLeafColumns=H(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(o=>t.find(i=>i.id===o)).filter(Boolean),W(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=H(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(o=>t.find(i=>i.id===o)).filter(Boolean),W(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=H(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o)=>{const i=[...n??[],...o??[]];return t.filter(s=>!i.includes(s.id))},W(e.options,"debugColumns","getCenterLeafColumns"))}};function s0(e){return e||(typeof document<"u"?document:null)}const wn={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Do=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),r0={getDefaultColumnDef:()=>wn,getInitialState:e=>({columnSizing:{},columnSizingInfo:Do(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Se("columnSizing",e),onColumnSizingInfoChange:Se("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,o,i;const s=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:wn.minSize,(o=s??e.columnDef.size)!=null?o:wn.size),(i=e.columnDef.maxSize)!=null?i:wn.maxSize)},e.getStart=H(n=>[n,qt(t,n),t.getState().columnSizing],(n,o)=>o.slice(0,e.getIndex(n)).reduce((i,s)=>i+s.getSize(),0),W(t.options,"debugColumns","getStart")),e.getAfter=H(n=>[n,qt(t,n),t.getState().columnSizing],(n,o)=>o.slice(e.getIndex(n)+1).reduce((i,s)=>i+s.getSize(),0),W(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:o,...i}=n;return i})},e.getCanResize=()=>{var n,o;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((o=t.options.enableColumnResizing)!=null?o:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const o=i=>{if(i.subHeaders.length)i.subHeaders.forEach(o);else{var s;n+=(s=i.column.getSize())!=null?s:0}};return o(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 o=t.getColumn(e.column.id),i=o?.getCanResize();return s=>{if(!o||!i||(s.persist==null||s.persist(),ko(s)&&s.touches&&s.touches.length>1))return;const r=e.getSize(),a=e?e.getLeafHeaders().map(x=>[x.column.id,x.column.getSize()]):[[o.id,o.getSize()]],l=ko(s)?Math.round(s.touches[0].clientX):s.clientX,c={},u=(x,w)=>{typeof w=="number"&&(t.setColumnSizingInfo(v=>{var S,b;const M=t.options.columnResizeDirection==="rtl"?-1:1,T=(w-((S=v?.startOffset)!=null?S:0))*M,E=Math.max(T/((b=v?.startSize)!=null?b:0),-.999999);return v.columnSizingStart.forEach(D=>{let[F,$]=D;c[F]=Math.round(Math.max($+$*E,0)*100)/100}),{...v,deltaOffset:T,deltaPercentage:E}}),(t.options.columnResizeMode==="onChange"||x==="end")&&t.setColumnSizing(v=>({...v,...c})))},f=x=>u("move",x),d=x=>{u("end",x),t.setColumnSizingInfo(w=>({...w,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=s0(n),m={moveHandler:x=>f(x.clientX),upHandler:x=>{h?.removeEventListener("mousemove",m.moveHandler),h?.removeEventListener("mouseup",m.upHandler),d(x.clientX)}},g={moveHandler:x=>(x.cancelable&&(x.preventDefault(),x.stopPropagation()),f(x.touches[0].clientX),!1),upHandler:x=>{var w;h?.removeEventListener("touchmove",g.moveHandler),h?.removeEventListener("touchend",g.upHandler),x.cancelable&&(x.preventDefault(),x.stopPropagation()),d((w=x.touches[0])==null?void 0:w.clientX)}},y=a0()?{passive:!1}:!1;ko(s)?(h?.addEventListener("touchmove",g.moveHandler,y),h?.addEventListener("touchend",g.upHandler,y)):(h?.addEventListener("mousemove",m.moveHandler,y),h?.addEventListener("mouseup",m.upHandler,y)),t.setColumnSizingInfo(x=>({...x,startOffset:l,startSize:r,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:o.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?Do():(n=e.initialState.columnSizingInfo)!=null?n:Do())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?t:0}}};let Cn=null;function a0(){if(typeof Cn=="boolean")return Cn;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 Cn=e,Cn}function ko(e){return e.type==="touchstart"}const l0={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Se("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(o=>({...o,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,o;const i=e.columns;return(n=i.length?i.some(s=>s.getIsVisible()):(o=t.getState().columnVisibility)==null?void 0:o[e.id])!=null?n:!0},e.getCanHide=()=>{var n,o;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((o=t.options.enableHiding)!=null?o:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=H(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(o=>o.column.getIsVisible()),W(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=H(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,o,i)=>[...n,...o,...i],W(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,o)=>H(()=>[o(),o().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),W(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 o;e.setColumnVisibility(n?{}:(o=e.initialState.columnVisibility)!=null?o:{})},e.toggleAllColumnsVisible=n=>{var o;n=(o=n)!=null?o:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,s)=>({...i,[s.id]:n||!(s.getCanHide!=null&&s.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 o;e.toggleAllColumnsVisible((o=n.target)==null?void 0:o.checked)}}};function qt(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const c0={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()}}},u0={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Se("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const o=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,o,i,s;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((o=t.options.enableGlobalFilter)!=null?o:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((s=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>He.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:o}=e.options;return eo(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[o])!=null?t:He[o]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},d0={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Se("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var o,i;if(!t){e._queue(()=>{t=!0});return}if((o=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?o:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=o=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(o),e.toggleAllRowsExpanded=o=>{o??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=o=>{var i,s;e.setExpanded(o?{}:(i=(s=e.initialState)==null?void 0:s.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const o=e.getState().expanded;return o===!0||Object.values(o).some(Boolean)},e.getIsAllRowsExpanded=()=>{const o=e.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let o=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const r=s.split(".");o=Math.max(o,r.length)}),o},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(o=>{var i;const s=o===!0?!0:!!(o!=null&&o[e.id]);let r={};if(o===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{r[a]=!0}):r=o,n=(i=n)!=null?i:!s,!s&&n)return{...r,[e.id]:!0};if(s&&!n){const{[e.id]:a,...l}=r;return l}return o})},e.getIsExpanded=()=>{var n;const o=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:o===!0||o?.[e.id])},e.getCanExpand=()=>{var n,o,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((o=t.options.enableExpanding)!=null?o:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,o=e;for(;n&&o.parentId;)o=t.getRow(o.parentId,!0),n=o.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},gi=0,mi=10,Fo=()=>({pageIndex:gi,pageSize:mi}),f0={getInitialState:e=>({...e,pagination:{...Fo(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Se("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var o,i;if(!t){e._queue(()=>{t=!0});return}if((o=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?o:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=o=>{const i=s=>Je(o,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=o=>{var i;e.setPagination(o?Fo():(i=e.initialState.pagination)!=null?i:Fo())},e.setPageIndex=o=>{e.setPagination(i=>{let s=Je(o,i.pageIndex);const r=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,r)),{...i,pageIndex:s}})},e.resetPageIndex=o=>{var i,s;e.setPageIndex(o?gi:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?i:gi)},e.resetPageSize=o=>{var i,s;e.setPageSize(o?mi:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?i:mi)},e.setPageSize=o=>{e.setPagination(i=>{const s=Math.max(1,Je(o,i.pageSize)),r=i.pageSize*i.pageIndex,a=Math.floor(r/s);return{...i,pageIndex:a,pageSize:s}})},e.setPageCount=o=>e.setPagination(i=>{var s;let r=Je(o,(s=e.options.pageCount)!=null?s:-1);return typeof r=="number"&&(r=Math.max(-1,r)),{...i,pageCount:r}}),e.getPageOptions=H(()=>[e.getPageCount()],o=>{let i=[];return o&&o>0&&(i=[...new Array(o)].fill(null).map((s,r)=>r)),i},W(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:o}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:o<i-1},e.previousPage=()=>e.setPageIndex(o=>o-1),e.nextPage=()=>e.setPageIndex(o=>o+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 o;return(o=e.options.pageCount)!=null?o:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var o;return(o=e.options.rowCount)!=null?o:e.getPrePaginationRowModel().rows.length}}},Lo=()=>({top:[],bottom:[]}),h0={getInitialState:e=>({rowPinning:Lo(),...e}),getDefaultOptions:e=>({onRowPinningChange:Se("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,o,i)=>{const s=o?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],r=i?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...r,e.id,...s]);t.setRowPinning(l=>{var c,u;if(n==="bottom"){var f,d;return{top:((f=l?.top)!=null?f:[]).filter(g=>!(a!=null&&a.has(g))),bottom:[...((d=l?.bottom)!=null?d:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)]}}if(n==="top"){var h,m;return{top:[...((h=l?.top)!=null?h:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)],bottom:((m=l?.bottom)!=null?m:[]).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:o,enablePinning:i}=t.options;return typeof o=="function"?o(e):(n=o??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:o,bottom:i}=t.getState().rowPinning,s=n.some(a=>o?.includes(a)),r=n.some(a=>i?.includes(a));return s?"top":r?"bottom":!1},e.getPinnedIndex=()=>{var n,o;const i=e.getIsPinned();if(!i)return-1;const s=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(r=>{let{id:a}=r;return a});return(o=s?.indexOf(e.id))!=null?o:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,o;return e.setRowPinning(t?Lo():(n=(o=e.initialState)==null?void 0:o.rowPinning)!=null?n:Lo())},e.getIsSomeRowsPinned=t=>{var n;const o=e.getState().rowPinning;if(!t){var i,s;return!!((i=o.top)!=null&&i.length||(s=o.bottom)!=null&&s.length)}return!!((n=o[t])!=null&&n.length)},e._getPinnedRows=(t,n,o)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(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:o}))},e.getTopRows=H(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),W(e.options,"debugRows","getTopRows")),e.getBottomRows=H(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),W(e.options,"debugRows","getBottomRows")),e.getCenterRows=H(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,o)=>{const i=new Set([...n??[],...o??[]]);return t.filter(s=>!i.has(s.id))},W(e.options,"debugRows","getCenterRows"))}},g0={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Se("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 o={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(s=>{s.getCanSelect()&&(o[s.id]=!0)}):i.forEach(s=>{delete o[s.id]}),o})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const o=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(s=>{pi(i,s.id,o,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=H(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Io(e,n):{rows:[],flatRows:[],rowsById:{}},W(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=H(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Io(e,n):{rows:[],flatRows:[],rowsById:{}},W(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=H(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Io(e,n):{rows:[],flatRows:[],rowsById:{}},W(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let o=!!(t.length&&Object.keys(n).length);return o&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let o=!!t.length;return o&&t.some(i=>!n[i.id])&&(o=!1),o},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,o)=>{const i=e.getIsSelected();t.setRowSelection(s=>{var r;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return s;const a={...s};return pi(a,e.id,n,(r=o?.selectChildren)!=null?r:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return vs(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return vi(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return vi(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 o=>{var i;n&&e.toggleSelected((i=o.target)==null?void 0:i.checked)}}}},pi=(e,t,n,o,i)=>{var s;const r=i.getRow(t,!0);n?(r.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),r.getCanSelect()&&(e[t]=!0)):delete e[t],o&&(s=r.subRows)!=null&&s.length&&r.getCanSelectSubRows()&&r.subRows.forEach(a=>pi(e,a.id,n,o,i))};function Io(e,t){const n=e.getState().rowSelection,o=[],i={},s=function(r,a){return r.map(l=>{var c;const u=vs(l,n);if(u&&(o.push(l),i[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:s(l.subRows)}),u)return l}).filter(Boolean)};return{rows:s(t.rows),flatRows:o,rowsById:i}}function vs(e,t){var n;return(n=t[e.id])!=null?n:!1}function vi(e,t,n){var o;if(!((o=e.subRows)!=null&&o.length))return!1;let i=!0,s=!1;return e.subRows.forEach(r=>{if(!(s&&!i)&&(r.getCanSelect()&&(vs(r,t)?s=!0:i=!1),r.subRows&&r.subRows.length)){const a=vi(r,t);a==="all"?s=!0:(a==="some"&&(s=!0),i=!1)}}),i?"all":s?"some":!1}const yi=/([0-9]+)/gm,m0=(e,t,n)=>Uc(it(e.getValue(n)).toLowerCase(),it(t.getValue(n)).toLowerCase()),p0=(e,t,n)=>Uc(it(e.getValue(n)),it(t.getValue(n))),v0=(e,t,n)=>ys(it(e.getValue(n)).toLowerCase(),it(t.getValue(n)).toLowerCase()),y0=(e,t,n)=>ys(it(e.getValue(n)),it(t.getValue(n))),x0=(e,t,n)=>{const o=e.getValue(n),i=t.getValue(n);return o>i?1:o<i?-1:0},w0=(e,t,n)=>ys(e.getValue(n),t.getValue(n));function ys(e,t){return e===t?0:e>t?1:-1}function it(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Uc(e,t){const n=e.split(yi).filter(Boolean),o=t.split(yi).filter(Boolean);for(;n.length&&o.length;){const i=n.shift(),s=o.shift(),r=parseInt(i,10),a=parseInt(s,10),l=[r,a].sort();if(isNaN(l[0])){if(i>s)return 1;if(s>i)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-o.length}const Ht={alphanumeric:m0,alphanumericCaseSensitive:p0,text:v0,textCaseSensitive:y0,datetime:x0,basic:w0},C0={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Se("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const i of n){const s=i?.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return Ht.datetime;if(typeof s=="string"&&(o=!0,s.split(yi).length>1))return Ht.alphanumeric}return o?Ht.text:Ht.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,o;if(!e)throw new Error;return eo(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(o=t.options.sortingFns)==null?void 0:o[e.columnDef.sortingFn])!=null?n:Ht[e.columnDef.sortingFn]},e.toggleSorting=(n,o)=>{const i=e.getNextSortingOrder(),s=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,f=s?n:i==="desc";if(r!=null&&r.length&&e.getCanMultiSort()&&o?a?u="toggle":u="add":r!=null&&r.length&&l!==r.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(s||i||(u="remove")),u==="add"){var d;c=[...r,{id:e.id,desc:f}],c.splice(0,c.length-((d=t.options.maxMultiSortColCount)!=null?d:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=r.map(h=>h.id===e.id?{...h,desc:f}:h):u==="remove"?c=r.filter(h=>h.id!==e.id):c=[{id:e.id,desc:f}];return c})},e.getFirstSortDir=()=>{var n,o;return((n=(o=e.columnDef.sortDescFirst)!=null?o:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var o,i;const s=e.getFirstSortDir(),r=e.getIsSorted();return r?r!==s&&((o=t.options.enableSortingRemoval)==null||o)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:r==="desc"?"asc":"desc":s},e.getCanSort=()=>{var n,o;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((o=t.options.enableSorting)!=null?o:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,o;return(n=(o=e.columnDef.enableMultiSort)!=null?o:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const o=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return o?o.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,o;return(n=(o=t.getState().sorting)==null?void 0:o.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(o=>o.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return o=>{n&&(o.persist==null||o.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(o):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,o;e.setSorting(t?[]:(n=(o=e.initialState)==null?void 0:o.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())}},b0=[By,l0,o0,i0,Wy,Gy,c0,u0,C0,t0,d0,f0,h0,g0,r0];function S0(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const o=[...b0,...(t=e._features)!=null?t:[]];let i={_features:o};const s=i._features.reduce((d,h)=>Object.assign(d,h.getDefaultOptions==null?void 0:h.getDefaultOptions(i)),{}),r=d=>i.options.mergeOptions?i.options.mergeOptions(s,d):{...s,...d};let l={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(d=>{var h;l=(h=d.getInitialState==null?void 0:d.getInitialState(l))!=null?h:l});const c=[];let u=!1;const f={_features:o,options:{...s,...e},initialState:l,_queue:d=>{c.push(d),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{i.setState(i.initialState)},setOptions:d=>{const h=Je(d,i.options);i.options=r(h)},getState:()=>i.options.state,setState:d=>{i.options.onStateChange==null||i.options.onStateChange(d)},_getRowId:(d,h,m)=>{var g;return(g=i.options.getRowId==null?void 0:i.options.getRowId(d,h,m))!=null?g:`${m?[m.id,h].join("."):h}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(d,h)=>{let m=(h?i.getPrePaginationRowModel():i.getRowModel()).rowsById[d];if(!m&&(m=i.getCoreRowModel().rowsById[d],!m))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${d}`):new Error;return m},_getDefaultColumnDef:H(()=>[i.options.defaultColumn],d=>{var h;return d=(h=d)!=null?h:{},{header:m=>{const g=m.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:m=>{var g,y;return(g=(y=m.renderValue())==null||y.toString==null?void 0:y.toString())!=null?g:null},...i._features.reduce((m,g)=>Object.assign(m,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...d}},W(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>i.options.columns,getAllColumns:H(()=>[i._getColumnDefs()],d=>{const h=function(m,g,y){return y===void 0&&(y=0),m.map(x=>{const w=zy(i,x,y,g),v=x;return w.columns=v.columns?h(v.columns,w,y+1):[],w})};return h(d)},W(e,"debugColumns","getAllColumns")),getAllFlatColumns:H(()=>[i.getAllColumns()],d=>d.flatMap(h=>h.getFlatColumns()),W(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:H(()=>[i.getAllFlatColumns()],d=>d.reduce((h,m)=>(h[m.id]=m,h),{}),W(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:H(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(d,h)=>{let m=d.flatMap(g=>g.getLeafColumns());return h(m)},W(e,"debugColumns","getAllLeafColumns")),getColumn:d=>{const h=i._getAllFlatColumnsById()[d];return process.env.NODE_ENV!=="production"&&!h&&console.error(`[Table] Column with id '${d}' does not exist.`),h}};Object.assign(i,f);for(let d=0;d<i._features.length;d++){const h=i._features[d];h==null||h.createTable==null||h.createTable(i)}return i}function R0(){return e=>H(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(i,s,r){s===void 0&&(s=0);const a=[];for(let c=0;c<i.length;c++){const u=Hy(e,e._getRowId(i[c],c,r),i[c],c,s,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(i[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=o(u.originalSubRows,s+1,u))}}return a};return n.rows=o(t),n},W(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function _0(e){const t=[],n=o=>{var i;t.push(o),(i=o.subRows)!=null&&i.length&&o.getIsExpanded()&&o.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function P0(e){return t=>H(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,o)=>{if(!o.rows.length)return o;const{pageSize:i,pageIndex:s}=n;let{rows:r,flatRows:a,rowsById:l}=o;const c=i*s,u=c+i;r=r.slice(c,u);let f;t.options.paginateExpandedRows?f={rows:r,flatRows:a,rowsById:l}:f=_0({rows:r,flatRows:a,rowsById:l}),f.flatRows=[];const d=h=>{f.flatRows.push(h),h.subRows.length&&h.subRows.forEach(d)};return f.rows.forEach(d),f},W(t.options,"debugTable","getPaginationRowModel"))}function E0(){return e=>H(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const o=e.getState().sorting,i=[],s=o.filter(l=>{var c;return(c=e.getColumn(l.id))==null?void 0:c.getCanSort()}),r={};s.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,f)=>{for(let h=0;h<s.length;h+=1){var d;const m=s[h],g=r[m.id],y=g.sortUndefined,x=(d=m?.desc)!=null?d:!1;let w=0;if(y){const v=u.getValue(m.id),S=f.getValue(m.id),b=v===void 0,M=S===void 0;if(b||M){if(y==="first")return b?-1:1;if(y==="last")return b?1:-1;w=b&&M?0:b?y:-y}}if(w===0&&(w=g.sortingFn(u,f,m.id)),w!==0)return x&&(w*=-1),g.invertSorting&&(w*=-1),w}return u.index-f.index}),c.forEach(u=>{var f;i.push(u),(f=u.subRows)!=null&&f.length&&(u.subRows=a(u.subRows))}),c};return{rows:a(n.rows),flatRows:i,rowsById:n.rowsById}},W(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function ha(e,t){return e?M0(e)?R.createElement(e,t):e:null}function M0(e){return T0(e)||typeof e=="function"||A0(e)}function T0(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function A0(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function V0(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=R.useState(()=>({current:S0(t)})),[o,i]=R.useState(()=>n.current.initialState);return n.current.setOptions(s=>({...s,...e,state:{...o,...e.state},onStateChange:r=>{i(r),e.onStateChange==null||e.onStateChange(r)}})),n.current}const D0=e=>R.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("style",null,`\r
|
|
16
|
-
@keyframes spin {
|
|
17
|
-
from {
|
|
18
|
-
transform: rotate(0deg)
|
|
19
|
-
}
|
|
20
|
-
to {
|
|
21
|
-
transform: rotate(360deg)
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
.spinner {
|
|
25
|
-
transform-origin: center
|
|
26
|
-
animation: spin 1s linear infinite
|
|
27
|
-
}
|
|
28
|
-
`),R.createElement("g",{className:"spinner"},R.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}),R.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"}))),k0=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("g",{clipPath:"url(#clip0_2074_3858)"},R.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"})),R.createElement("defs",null,R.createElement("clipPath",{id:"clip0_2074_3858"},R.createElement("rect",{width:24,height:24,fill:"white"})))),F0="_table_19yhs_8",L0={table:F0},Kc=C.forwardRef(({children:e,className:t,style:n,...o},i)=>p.jsx("td",{ref:i,className:V.cx(t),style:n,...o,children:e}));Kc.displayName="TableBodyCell";const qc=C.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:o="center",py:i="var(--spacing-sm)",px:s="var(--spacing-md)",minHeight:r="56px",...a},l)=>p.jsx(L,{row:t,justifyContent:n,alignItems:o,py:i,px:s,minHeight:r,ref:l,...a,children:e}));qc.displayName="TableBodyCellContent";const Xc=C.forwardRef(({children:e,className:t,showBorders:n=!1,isSelected:o=!1,...i},s)=>{const r=V.css({borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return p.jsx("tr",{ref:s,className:V.cx(r,t),...i,children:e})});Xc.displayName="TableBodyRow";const I0=C.forwardRef(({children:e,className:t,style:n,justifyContent:o="flex-start",alignItems:i="flex-start",...s},r)=>{const a=V.css({justifyContent:o,alignItems:i,fontWeight:"inherit"});return p.jsx("th",{ref:r,className:V.cx(a,t),style:n,...s,children:e})}),xs=C.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:o="center",py:i="var(--spacing-sm)",px:s="var(--spacing-md)",minHeight:r="56px",...a},l)=>p.jsx(L,{row:t,justifyContent:n,alignItems:o,py:i,px:s,minHeight:r,ref:l,...a,children:e}));xs.displayName="TableHeadCellContent";const j0=e=>R.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M8.75 0.75L4.75 4.75L0.75 0.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),$0=e=>R.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M8.75 4.75L4.75 0.75L0.75 4.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),O0=({sortDirection:e,gap:t="5px",...n})=>p.jsxs(L,{gap:t,...n,children:[p.jsx($0,{style:{color:e==="asc"?"var(--icon-accent)":"var(--icon-tertiary)"}}),p.jsx(j0,{style:{color:e==="desc"?"var(--icon-accent)":"var(--icon-tertiary)"}})]}),Yc=({children:e,tableProps:t,gap:n="10px",...o})=>{const i=t.column.getIsSorted();return p.jsxs(xs,{style:{cursor:"pointer",userSelect:"none"},gap:n,...o,children:[e,p.jsx(O0,{sortDirection:i})]})};Yc.displayName="TableHeadCellContentSortable";const Zc=C.forwardRef(({children:e,className:t,showBorders:n=!1,...o},i)=>{const s=V.css({backgroundColor:"var(--fill-bg-secondary)",borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return p.jsx("tr",{ref:i,className:V.cx(s,t),...o,children:e})});Zc.displayName="TableHeadRow";const N0=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),z0=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),B0=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.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"}),R.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"}),R.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"})),jo=(e,t)=>{const n=t-e+1;return Array.from({length:n},(o,i)=>e+i)};function H0(e){const{count:t=1,page:n,maxVisiblePages:o=10}=e;let i=1,s=1;if(o<=2)return[n];o<=4?(i=0,s=0):o<=6?(i=1,s=0):o<=7?(i=1,s=Math.max(0,Math.floor((o-4)/2))):(i=1,s=Math.max(1,Math.floor((o-5)/2)));const r=jo(1,Math.min(i,t)),a=jo(Math.max(t-i+1,i+1),t),l=Math.max(Math.min(n-s,t-i-s*2-1),i+2),c=Math.min(Math.max(n+s,i+s*2+2),t-i-1);return[...r,...l>i+2?["start-dots"]:i+1<t-i?[i+1]:[],...jo(l,c),...c<t-i-1?["end-dots"]:t-i>i?[t-i]:[],...a]}const W0=({pageIndex:e,pageSize:t,totalCount:n,onPageChange:o,onPageSizeChange:i,pageSizeOptions:s=[10,20,50,100],showPageSizeSelector:r=!0,renderPageSizeSelectorDropdownItem:a=c=>c.label,renderPageSizeSelectorInputItem:l})=>{const c=C.useRef(null),[u,f]=C.useState(0),d=Math.ceil(n/t),h=e>0,m=e<d-1;C.useEffect(()=>{const b=c.current;if(!b)return;const M=new ResizeObserver(T=>{for(const E of T)f(E.contentRect.width)});return M.observe(b),()=>{M.disconnect()}},[]);const y=(b=>{if(b<=0)return 1;const F=b-96;if(F<=40)return 1;const $=Math.floor((F+8)/48);return Math.max(1,Math.min(10,$))})(u),x=H0({page:e+1,count:d,maxVisiblePages:y}),w=()=>{h&&o(e-1)},v=()=>{m&&o(e+1)},S=b=>{i(Number(b))};return n===0?null:p.jsxs(L,{flex:1,row:!0,justifyContent:"space-between",children:[p.jsxs(L,{ref:c,flex:1,row:!0,overflow:"hidden",gap:"var(--spacing-sm)",children:[p.jsx(Xt,{onClick:w,disabled:!h,color:"neutral",size:"sm",children:p.jsx(N0,{})}),p.jsx(L,{row:!0,gap:"var(--spacing-sm)",children:x.map(b=>p.jsx(G0,{isDots:b==="start-dots"||b==="end-dots",isCurrentPage:b===e+1,disabled:b==="start-dots"||b==="end-dots",onClick:()=>o(b-1),children:b},b))}),p.jsx(Xt,{color:"neutral",size:"sm",onClick:v,disabled:!m,children:p.jsx(z0,{})})]}),r&&p.jsx(L,{alignItems:"flex-end",children:p.jsx(Ac,{width:"fit-content",value:t.toString(),size:"sm",items:s.map(b=>({value:b.toString(),label:b.toString()})),returnedValue:b=>b.value,renderDropdownItem:a,renderSingleInputItem:l,onChange:b=>S(b)})})]})},G0=({children:e,isCurrentPage:t=!1,onClick:n,isDots:o=!1,disabled:i=!1})=>{const s=V.css({cursor:i?"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=V.css({width:"24px",height:"24px",color:t?"var(--icon-secondary)":"var(--icon-tertiary)"});return p.jsx(L,{className:s,onClick:i?void 0:n,children:o?p.jsx(B0,{className:r}):p.jsx(K,{center:!0,variant:"body-2",fontWeight:"medium",children:e})})},U0=V.css({position:"relative",borderRadius:"var(--corner-md)",overflow:"hidden","&::before, &::after":{content:'""',position:"absolute",top:0,bottom:14,width:96,pointerEvents:"none",zIndex:1,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%)"}}),K0=V.css({overflowX:"auto",scrollbarWidth:"thin",scrollbarColor:"var(--gray-86) var(--gray-96)"}),Jc=C.memo(({data:e,children:t,className:n,showBorders:o=!1,...i})=>{const[s,r]=C.useState(!1),[a,l]=C.useState(!1),c=C.useRef(null),u=C.useCallback(()=>{const d=c.current;if(!d)return;const{scrollLeft:h,scrollWidth:m,clientWidth:g}=d,y=m>g;r(y&&h>0),l(y&&h<m-g-1)},[]);C.useEffect(()=>{const d=c.current;if(!d)return;u();const h=new ResizeObserver(u);return h.observe(d),d.addEventListener("scroll",u),()=>{h.disconnect(),d.removeEventListener("scroll",u)}},[u,e]);const f=V.css({border:o?"1px solid var(--border-neutral-alpha-low)":"transparent","&::before":{opacity:s?1:0},"&::after":{opacity:a?1:0}});return p.jsx(L,{className:V.cx(U0,f,n),...i,children:p.jsx(L,{ref:c,className:K0,children:t})})});Jc.displayName="TableWrapper";const q0=V.css({width:"100%",maxWidth:"100%",minWidth:"max-content",borderCollapse:"collapse",borderSpacing:0,backgroundColor:"var(--fill-bg-primary)"}),X0=V.css({backgroundColor:"var(--fill-bg-secondary)",color:"var(--text-tertiary)"}),Ot=({ref:e,data:t,columns:n,showBorders:o=!0,enableSorting:i=!1,enablePagination:s=!1,enableRowSelection:r=!1,enableMultiRowSelection:a=!1,sorting:l,onSortingChange:c,columnFilters:u,onColumnFiltersChange:f,columnVisibility:d,onColumnVisibilityChange:h,pagination:m,onPaginationChange:g,rowSelection:y,onRowSelectionChange:x,totalCount:w,loading:v=!1,emptyLabels:S={title:"Nothing found",description:"No results found for “result”",action:"Reset"},loadingLabels:b={title:"Loading...",description:"Please wait or reset your promt",action:"Reset"},className:M,containerClassName:T,tableOptions:E={},onRowClick:D,getRowId:F,headCellComponent:$=I0,bodyCellComponent:O=Kc,headRowComponent:j=Zc,bodyRowComponent:k=Xc,onReset:N,renderPageSizeSelectorDropdownItem:B,renderPageSizeSelectorInputItem:P})=>{const[_,A]=C.useState([]),[I,X]=C.useState([]),[U,q]=C.useState({}),[Q,Z]=C.useState({pageIndex:0,pageSize:10}),[ne,le]=C.useState({}),Ce=l??_,me=u??I,je=d??U,z=m??Q,J=y??ne,re=Y=>{const te=typeof Y=="function"?Y(Ce):Y;c?c(te):A(te)},ue=Y=>{const te=typeof Y=="function"?Y(me):Y;f?f(te):X(te)},Ae=Y=>{const te=typeof Y=="function"?Y(je):Y;h?h(te):q(te)},Ve=Y=>{const te=typeof Y=="function"?Y(z):Y;g?g(te):Z(te)},pt=V0({data:t,columns:n,state:{sorting:Ce,columnFilters:me,columnVisibility:je,pagination:z,rowSelection:J},onSortingChange:re,onColumnFiltersChange:ue,onColumnVisibilityChange:Ae,onPaginationChange:Ve,onRowSelectionChange:Y=>{const te=typeof Y=="function"?Y(J):Y;x?x(te):le(te)},getCoreRowModel:R0(),getSortedRowModel:i?E0():void 0,getPaginationRowModel:s?P0():void 0,enableRowSelection:r,enableMultiRowSelection:a,getRowId:F,manualPagination:!!w,pageCount:w?Math.ceil(w/z.pageSize):void 0,...E});C.useImperativeHandle(e,()=>pt);const{rows:un}=pt.getRowModel(),to=(Y,te)=>{D&&D(Y.original,te)};return v?p.jsxs(L,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:V.cx(T),children:[p.jsx(D0,{width:32,height:32,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),p.jsx(K,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:b.title}),p.jsx(K,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:b.description}),typeof b.action=="string"?p.jsx(li,{width:"auto",onClick:N,intensity:"secondary",color:"accent",children:b.action}):b.action]}):un.length?p.jsxs(L,{w:"full",gap:"var(--spacing-xl)",className:V.cx(T),children:[p.jsx(Jc,{data:t,showBorders:o,children:p.jsxs("table",{className:V.cx(q0,L0.table,M),children:[p.jsx("thead",{className:X0,children:pt.getHeaderGroups().map(Y=>p.jsx(j,{showBorders:o,children:Y.headers.map(te=>p.jsx($,{style:{width:te.getSize()},onClick:te.column.getToggleSortingHandler(),children:te.isPlaceholder?null:ha(te.column.columnDef.header,te.getContext())},te.id))},Y.id))}),p.jsx("tbody",{children:un.map((Y,te)=>p.jsx(k,{showBorders:o,isSelected:Y.getIsSelected(),onClick:()=>to(Y,te),children:Y.getVisibleCells().map(no=>p.jsx(O,{children:ha(no.column.columnDef.cell,no.getContext())},no.id))},Y.id))})]})}),s&&!v&&p.jsx(W0,{pageIndex:z.pageIndex,pageSize:z.pageSize,totalCount:w||t.length,renderPageSizeSelectorDropdownItem:B,renderPageSizeSelectorInputItem:P,onPageChange:Y=>Ve({...z,pageIndex:Y}),onPageSizeChange:Y=>Ve({...z,pageSize:Y,pageIndex:0})})]}):p.jsxs(L,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:V.cx(T),children:[p.jsx(k0,{width:24,height:24,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),p.jsx(K,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:S.title}),p.jsx(K,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:S.description}),typeof S.action=="string"?p.jsx(li,{width:"auto",onClick:N,intensity:"secondary",color:"accent",children:S.action}):S.action]})};Ot.displayName="Table";Ot.HeadCellContent=xs;Ot.BodyCellContent=qc;Ot.HeadCellContentSortable=Yc;Ot.createColumnHelper=jc;const $o={chart:{type:"areaspline",backgroundColor:"transparent",spacing:[0,0,0,0],margin:[0,0,0,0]},xAxis:{gridLineWidth:0,lineWidth:0,tickWidth:0,labels:{enabled:!1},title:{text:""}},yAxis:{gridLineWidth:0,lineWidth:0,tickWidth:0,labels:{enabled:!1},title:{text:""}},legend:{enabled:!1},credits:{enabled:!1}},Y0={positive:{color:"var(--fill-positive-primary)",fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"var(--fill-positive-tint-high)"],[1,"var(--fill-positive-transparent)"]]}},negative:{color:"var(--fill-negative-primary)",fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"var(--fill-negative-tint-high)"],[1,"var(--fill-negative-transparent)"]]}},accent:{color:"var(--fill-accent-primary)",fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"var(--fill-accent-tint-high)"],[1,"var(--fill-accent-transparent)"]]}},warning:{color:"var(--fill-warning-primary)",fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"var(--fill-warning-tint-high)"],[1,"var(--fill-warning-transparent)"]]}}},Z0=(e,t,n,o,i)=>({...$o,plotOptions:{areaspline:{marker:{enabled:!1,states:{hover:{enabled:i}}},allowPointSelect:!1}},xAxis:{...$o.xAxis,...n},yAxis:{...$o.yAxis,...o},series:[{type:"areaspline",data:t,...Y0[e]}]}),J0=e=>({outside:!0,enabled:!!e,padding:0,position:{alignByTranslate:!0},shadow:{color:"var(--effect-shadow-m)",offsetX:0,offsetY:0},borderRadius:8,backgroundColor:"var(--fill-bg-primary)",useHTML:!0,...e}),Qc=({color:e="positive",data:t=[],xAxis:n,yAxis:o,containerProps:i,highcharts:s,tooltip:r})=>{const a=C.useRef(null);C.useEffect(()=>()=>{typeof a=="object"&&a?.current?.chart&&a.current.chart.destroy()},[]);const l=C.useMemo(()=>Z0(e,t,n,o,!!r),[e,t,n,o,r]),c=C.useMemo(()=>r?J0(r):{enabled:!1},[r]);return p.jsx(Vn.Chart,{highcharts:s,ref:a,options:l,containerProps:i,children:p.jsx(Vn.Tooltip,{...c})})};Qc.displayName="LineChart";const Q0={chart:{type:"pie",backgroundColor:"transparent",spacing:[0,0,0,0],margin:[0,0,0,0],events:{click:void 0}},title:{align:"center",verticalAlign:"middle",floating:!0,style:{fontSize:"24px",fontWeight:"600",color:"var(--text-primary)"}},plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!1},startAngle:90,endAngle:-90,innerSize:"90%",borderWidth:0,states:{hover:{enabled:!1},select:{enabled:!1},inactive:{enabled:!1}},enableMouseTracking:!1}},tooltip:{enabled:!1},legend:{enabled:!1},credits:{enabled:!1}},ex={positive:{colors:["var(--fill-positive-primary)","var(--fill-positive-tint-high)"]},negative:{colors:["var(--fill-negative-primary)","var(--fill-negative-tint-high)"]},accent:{colors:["var(--fill-accent-primary)","var(--fill-accent-tint-high)"]},warning:{colors:["var(--fill-warning-primary)","var(--fill-warning-tint-high)"]}},tx=(e,t)=>({...Q0,series:[{type:"pie",data:[{name:"",y:Math.min(e,100)},{name:"",y:Math.max(100-e,0)}],...ex[t]}]}),eu=C.forwardRef(({highcharts:e,color:t="positive",percentage:n,label:o=r=>`${r}%`,containerProps:i},s)=>{const r=C.useRef(null),a=s||r;C.useEffect(()=>()=>{typeof a=="object"&&a?.current?.chart&&a.current.chart.destroy()},[a]);const l=C.useMemo(()=>tx(n,t),[n,t]);return p.jsx(Vn.Chart,{highcharts:e,ref:a,options:l,containerProps:i,children:p.jsx(Vn.Title,{children:o?.(n)})})});eu.displayName="PieProgressChart";const nx=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M9 17L14 12L9 7",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),ox="_link_aolvt_8",ix="_separator_aolvt_19",sx="_nav_aolvt_23",An={link:ox,separator:ix,nav:sx,"nav-item":"_nav-item_aolvt_29"},ws=({children:e,separator:t=p.jsx(nx,{className:An.separator})})=>{const n=C.Children.toArray(e).filter(o=>C.isValidElement(o));return p.jsx("nav",{"aria-label":"breadcrumb",className:An.nav,children:n.map((o,i)=>{const s=i===n.length-1;return p.jsxs(K,{tag:"span",className:An["nav-item"],children:[C.cloneElement(o,{active:o.props.active??s}),!s&&t]},i)})})},rx=({children:e,href:t,active:n,className:o,activeClassName:i,activeElement:s,onClick:r})=>n?s||p.jsx(K,{tag:"span",variant:"body-2",fontWeight:"medium",colorName:"primary",className:V.cx(o,i),onClick:r,children:e}):p.jsx("a",{href:t,className:V.cx(An.link,o),onClick:r,children:e});ws.Item=rx;ws.displayName="Breadcrumbs";const ax=ws,lx={primary:{bg:"var(--fill-accent-tint)",text:"var(--text-accent)",icon:"var(--icon-accent)"},secondary:{bg:"var(--fill-neutral-tint)",text:"var(--text-secondary)",icon:"var(--icon-tertiary)"},negative:{bg:"var(--fill-negative-tint)",text:"var(--text-negative)",icon:"var(--icon-negative)"},positive:{bg:"var(--fill-positive-tint)",text:"var(--text-positive)",icon:"var(--icon-positive)"},warning:{bg:"var(--fill-warning-tint)",text:"var(--text-warning)",icon:"var(--icon-warning)"},neutral:{bg:"var(--fill-neutral-tint)",text:"var(--text-tertiary)",icon:"var(--icon-tertiary)"},custom:{bg:"var(--fill-accent-tint)",text:"var(--text-accent)",icon:"var(--icon-accent)"}},cx={"2xs":{size:"var(--height-avatar-2xs)",borderRadius:"var(--corner-xs)",iconSize:"var(--height-icon-2xs)",fontSize:"var(--font-size-caption-2)",fontWeight:"var(--font-weight-medium)"},xs:{size:"var(--height-avatar-xs)",borderRadius:"var(--corner-sm)",iconSize:"var(--height-icon-xs)",fontSize:"var(--font-size-caption-1)",fontWeight:"var(--font-weight-medium)"},sm:{size:"var(--height-avatar-sm)",borderRadius:"var(--corner-sm)",iconSize:"var(--height-icon-xs)",fontSize:"var(--font-size-body-2)",fontWeight:"var(--font-weight-medium)"},md:{size:"var(--height-avatar-md)",borderRadius:"var(--corner-sm)",iconSize:"var(--height-icon-sm)",fontSize:"var(--font-size-body-2)",fontWeight:"var(--font-weight-medium)"},lg:{size:"var(--height-avatar-lg)",borderRadius:"var(--corner-md)",iconSize:"var(--height-icon-md)",fontSize:"var(--font-size-body-1)",fontWeight:"var(--font-weight-semibold)"},xl:{size:"var(--height-avatar-xl)",borderRadius:"var(--corner-md)",iconSize:"var(--height-icon-md)",fontSize:"var(--font-size-body-1)",fontWeight:"var(--font-weight-semibold)"},"2xl":{size:"var(--height-avatar-2xl)",borderRadius:"var(--corner-md)",iconSize:"var(--height-icon-md)",fontSize:"var(--font-size-headline-2)",fontWeight:"var(--font-weight-medium)"},custom:{size:"var(--height-avatar-md)",borderRadius:"var(--corner-sm)",iconSize:"var(--height-icon-sm)",fontSize:"var(--font-size-body-2)",fontWeight:"var(--font-weight-medium)"}},tu=C.forwardRef(({children:e,color:t="primary",size:n="md",fullRound:o=!1,className:i},s)=>{const r=C.useMemo(()=>lx[t],[t]),a=C.useMemo(()=>cx[n],[n]),l=C.useMemo(()=>V.css({width:a.size,height:a.size,borderRadius:o?"var(--corner-full-round)":a.borderRadius,backgroundColor:r.bg,color:r.text,fontSize:a.fontSize,fontWeight:a.fontWeight,lineHeight:1,transition:"var(--transition-general)","& svg":{width:a.iconSize,height:a.iconSize,color:r.icon,transition:"var(--transition-general)"},"& img":{width:"100%",height:"100%",objectFit:"cover"},"&:has(img)":{backgroundColor:"transparent",border:"1px solid var(--border-neutral-alpha-low)"}}),[r,a,o]);return p.jsx(L,{ref:s,center:!0,overflow:"hidden",className:V.cx(l,i),children:e})});tu.displayName="Avatar";const xi={neutral:{border:"var(--border-neutral-alpha-low)",bg:"var(--status-neutral-tint)",color:"var(--text-secondary)",colorName:"secondary"},accent:{border:"var(--border-accent-secondary)",bg:"var(--status-accent-tint-low)",color:"var(--text-accent)",colorName:"accent"},warning:{border:"var(--border-warning-secondary)",bg:"var(--status-warning-tint-low)",color:"var(--text-warning)",colorName:"warning"},positive:{border:"var(--border-positive-secondary)",bg:"var(--status-positive-tint-low)",color:"var(--text-positive)",colorName:"positive"},negative:{border:"var(--border-negative-secondary)",bg:"var(--status-negative-tint-low)",color:"var(--text-negative)",colorName:"negative"}},bn={sm:{h:24,text:"caption-1",corner:"var(--corner-xs)",p:"6px var(--spacing-sm)"},md:{h:32,text:"body-2",corner:"var(--corner-sm)",p:"6px var(--spacing-md)"},lg:{h:40,text:"body-2",corner:"var(--corner-md)",p:"6px var(--spacing-lg)"}},ux=(e,t,n,o)=>{const i=xi[t];let s=i.bg,r="none";const a=i.color;switch(e){case"outline":s="transparent",r=`1px solid ${i.border}`;break;case"clear":s="transparent";break;default:s=i.bg;break}return V.css({cursor:n?"not-allowed":o?"pointer":"default",opacity:n?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s",backgroundColor:s,color:a,border:r})},dx=V.css({display:"inline-flex",cursor:"pointer",opacity:.6,"&:hover":{opacity:1}}),nu=({label:e,color:t="neutral",size:n="md",variant:o="filled",leftElement:i,rightElement:s,disabled:r,onClick:a,onDelete:l,className:c})=>{const u=ux(o,t,r,a);return p.jsxs(L,{row:!0,alignItems:"center",gap:"var(--spacing-sm)",p:bn[n].p,h:bn[n].h,overflow:"hidden",borderRadius:bn[n].corner,onClick:a,className:V.cx(u,c),children:[a&&p.jsx(gt,{}),i,p.jsx(K,{variant:bn[n].text,colorName:xi[t].colorName,textOverflow:"ellipsis",children:e}),s,l&&!r&&p.jsx(K,{className:dx,colorName:xi[t].colorName,onClick:f=>{f.stopPropagation(),l(f)},children:p.jsx(Tc,{})})]})};nu.displayName="Badge";const fx=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),R.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),ga=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.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}),R.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"}),R.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"})),hx=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),R.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),gx=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"black",...e},R.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"})),mx="_hint_prca1_8",px="_md_prca1_19",vx="_sm_prca1_24",yx="_icon_prca1_29",xx="_content_prca1_40",wx="_title_prca1_46",Cx="_subtitle_prca1_50",bx="_disabled_prca1_55",Sx="_warning_prca1_60",Rx="_solid_prca1_60",_x="_negative_prca1_65",Px="_positive_prca1_70",Ex="_accent_prca1_75",Mx="_neutral_prca1_80",Tx="_soft_prca1_85",Re={hint:mx,md:px,sm:vx,icon:yx,content:xx,title:wx,subtitle:Cx,disabled:bx,warning:Sx,solid:Rx,negative:_x,positive:Px,accent:Ex,neutral:Mx,soft:Tx},Ax={negative:p.jsx(hx,{}),positive:p.jsx(fx,{}),accent:p.jsx(ga,{}),warning:p.jsx(ga,{}),neutral:p.jsx(gx,{})},Vx=({title:e,subtitle:t,color:n="warning",variant:o="soft",size:i="md",icon:s,disabled:r=!1,className:a,style:l})=>{const c=s||Ax[n];return p.jsxs("div",{className:wt(Re.hint,Re[n],Re[o],Re[i],r&&Re.disabled,a),style:l,"aria-disabled":r,children:[c&&p.jsx("span",{className:wt(Re.icon,Re[n]),children:c}),p.jsxs("div",{className:Re.content,children:[e&&p.jsx(K,{className:wt(Re.title,Dn(Re,"title",i)),variant:i==="md"?"body-1":"caption-2",children:e}),t&&p.jsx(K,{className:wt(Re.subtitle,Dn(Re,"subtitle",i)),variant:i==="md"?"body-2":"caption-1",children:t})]})]})},Dx=V.keyframes`
|
|
15
|
+
color: hsl(${Math.max(0,Math.min(120-120*d,120))}deg 100% 31%);`,n?.key)}return i}}function W(e,t,n,o){return{debug:()=>{var i;return(i=e?.debugAll)!=null?i:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:o}}function Ny(e,t,n,o){const i=()=>{var r;return(r=s.getValue())!=null?r:e.options.renderFallbackValue},s={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(o),renderValue:i,getContext:H(()=>[e,n,t,s],(r,a,l,c)=>({table:r,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),W(e.options,"debugCells","cell.getContext"))};return e._features.forEach(r=>{r.createCell==null||r.createCell(s,n,t,e)},{}),s}function By(e,t,n,o){var i,s;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(i=(s=a.id)!=null?s:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?i:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:l&&(l.includes(".")?u=d=>{let h=d;for(const g of l.split(".")){var m;h=(m=h)==null?void 0:m[g],process.env.NODE_ENV!=="production"&&h===void 0&&console.warn(`"${g}" in deeply nested key "${l}" returned undefined.`)}return h}:u=d=>d[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 f={id:`${String(c)}`,accessorFn:u,parent:o,depth:n,columnDef:a,columns:[],getFlatColumns:H(()=>[!0],()=>{var d;return[f,...(d=f.columns)==null?void 0:d.flatMap(h=>h.getFlatColumns())]},W(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:H(()=>[e._getOrderColumnsFn()],d=>{var h;if((h=f.columns)!=null&&h.length){let m=f.columns.flatMap(g=>g.getLeafColumns());return d(m)}return[f]},W(e.options,"debugColumns","column.getLeafColumns"))};for(const d of e._features)d.createColumn==null||d.createColumn(f,e);return f}const ge="debugHeaders";function da(e,t,n){var o;let s={id:(o=n.id)!=null?o: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(s),r},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(r=>{r.createHeader==null||r.createHeader(s,e)}),s}const zy={createTable:e=>{e.getHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o,i)=>{var s,r;const a=(s=o?.map(f=>n.find(d=>d.id===f)).filter(Boolean))!=null?s:[],l=(r=i?.map(f=>n.find(d=>d.id===f)).filter(Boolean))!=null?r:[],c=n.filter(f=>!(o!=null&&o.includes(f.id))&&!(i!=null&&i.includes(f.id)));return wn(t,[...a,...c,...l],e)},W(e.options,ge,"getHeaderGroups")),e.getCenterHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o,i)=>(n=n.filter(s=>!(o!=null&&o.includes(s.id))&&!(i!=null&&i.includes(s.id))),wn(t,n,e,"center")),W(e.options,ge,"getCenterHeaderGroups")),e.getLeftHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,o)=>{var i;const s=(i=o?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?i:[];return wn(t,s,e,"left")},W(e.options,ge,"getLeftHeaderGroups")),e.getRightHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,o)=>{var i;const s=(i=o?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?i:[];return wn(t,s,e,"right")},W(e.options,ge,"getRightHeaderGroups")),e.getFooterGroups=H(()=>[e.getHeaderGroups()],t=>[...t].reverse(),W(e.options,ge,"getFooterGroups")),e.getLeftFooterGroups=H(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),W(e.options,ge,"getLeftFooterGroups")),e.getCenterFooterGroups=H(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),W(e.options,ge,"getCenterFooterGroups")),e.getRightFooterGroups=H(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),W(e.options,ge,"getRightFooterGroups")),e.getFlatHeaders=H(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,ge,"getFlatHeaders")),e.getLeftFlatHeaders=H(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,ge,"getLeftFlatHeaders")),e.getCenterFlatHeaders=H(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,ge,"getCenterFlatHeaders")),e.getRightFlatHeaders=H(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,ge,"getRightFlatHeaders")),e.getCenterLeafHeaders=H(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),W(e.options,ge,"getCenterLeafHeaders")),e.getLeftLeafHeaders=H(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),W(e.options,ge,"getLeftLeafHeaders")),e.getRightLeafHeaders=H(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),W(e.options,ge,"getRightLeafHeaders")),e.getLeafHeaders=H(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,o)=>{var i,s,r,a,l,c;return[...(i=(s=t[0])==null?void 0:s.headers)!=null?i:[],...(r=(a=n[0])==null?void 0:a.headers)!=null?r:[],...(l=(c=o[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},W(e.options,ge,"getLeafHeaders"))}};function wn(e,t,n,o){var i,s;let r=0;const a=function(d,h){h===void 0&&(h=1),r=Math.max(r,h),d.filter(m=>m.getIsVisible()).forEach(m=>{var g;(g=m.columns)!=null&&g.length&&a(m.columns,h+1)},0)};a(e);let l=[];const c=(d,h)=>{const m={depth:h,id:[o,`${h}`].filter(Boolean).join("_"),headers:[]},g=[];d.forEach(y=>{const x=[...g].reverse()[0],w=y.column.depth===m.depth;let v,b=!1;if(w&&y.column.parent?v=y.column.parent:(v=y.column,b=!0),x&&x?.column===v)x.subHeaders.push(y);else{const S=da(n,v,{id:[o,h,v.id,y?.id].filter(Boolean).join("_"),isPlaceholder:b,placeholderId:b?`${g.filter(M=>M.column===v).length}`:void 0,depth:h,index:g.length});S.subHeaders.push(y),g.push(S)}m.headers.push(y),y.headerGroup=m}),l.push(m),h>0&&c(g,h-1)},u=t.map((d,h)=>da(n,d,{depth:r,index:h}));c(u,r-1),l.reverse();const f=d=>d.filter(m=>m.column.getIsVisible()).map(m=>{let g=0,y=0,x=[0];m.subHeaders&&m.subHeaders.length?(x=[],f(m.subHeaders).forEach(v=>{let{colSpan:b,rowSpan:S}=v;g+=b,x.push(S)})):g=1;const w=Math.min(...x);return y=y+w,m.colSpan=g,m.rowSpan=y,{colSpan:g,rowSpan:y}});return f((i=(s=l[0])==null?void 0:s.headers)!=null?i:[]),l}const Hy=(e,t,n,o,i,s,r)=>{let a={id:t,index:o,original:n,depth:i,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,o),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,o),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:()=>Oy(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:H(()=>[e.getAllLeafColumns()],l=>l.map(c=>Ny(e,a,c,c.id)),W(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:H(()=>[a.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),W(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},Wy={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()}}},$c=(e,t,n)=>{var o,i;const s=n==null||(o=n.toString())==null?void 0:o.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(s))};$c.autoRemove=e=>Ie(e);const Oc=(e,t,n)=>{var o;return!!(!((o=e.getValue(t))==null||(o=o.toString())==null)&&o.includes(n))};Oc.autoRemove=e=>Ie(e);const Nc=(e,t,n)=>{var o;return((o=e.getValue(t))==null||(o=o.toString())==null?void 0:o.toLowerCase())===n?.toLowerCase()};Nc.autoRemove=e=>Ie(e);const Bc=(e,t,n)=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(n)};Bc.autoRemove=e=>Ie(e);const zc=(e,t,n)=>!n.some(o=>{var i;return!((i=e.getValue(t))!=null&&i.includes(o))});zc.autoRemove=e=>Ie(e)||!(e!=null&&e.length);const Hc=(e,t,n)=>n.some(o=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(o)});Hc.autoRemove=e=>Ie(e)||!(e!=null&&e.length);const Wc=(e,t,n)=>e.getValue(t)===n;Wc.autoRemove=e=>Ie(e);const Gc=(e,t,n)=>e.getValue(t)==n;Gc.autoRemove=e=>Ie(e);const vs=(e,t,n)=>{let[o,i]=n;const s=e.getValue(t);return s>=o&&s<=i};vs.resolveFilterValue=e=>{let[t,n]=e,o=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,s=t===null||Number.isNaN(o)?-1/0:o,r=n===null||Number.isNaN(i)?1/0:i;if(s>r){const a=s;s=r,r=a}return[s,r]};vs.autoRemove=e=>Ie(e)||Ie(e[0])&&Ie(e[1]);const He={includesString:$c,includesStringSensitive:Oc,equalsString:Nc,arrIncludes:Bc,arrIncludesAll:zc,arrIncludesSome:Hc,equals:Wc,weakEquals:Gc,inNumberRange:vs};function Ie(e){return e==null||e===""}const Gy={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Re("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],o=n?.getValue(e.id);return typeof o=="string"?He.includesString:typeof o=="number"?He.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?He.equals:Array.isArray(o)?He.arrIncludes:He.weakEquals},e.getFilterFn=()=>{var n,o;return to(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(o=t.options.filterFns)==null?void 0:o[e.columnDef.filterFn])!=null?n:He[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,o,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((o=t.options.enableColumnFilters)!=null?o:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(o=>o.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,o;return(n=(o=t.getState().columnFilters)==null?void 0:o.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(o=>{const i=e.getFilterFn(),s=o?.find(u=>u.id===e.id),r=Je(n,s?s.value:void 0);if(fa(i,r,e)){var a;return(a=o?.filter(u=>u.id!==e.id))!=null?a:[]}const l={id:e.id,value:r};if(s){var c;return(c=o?.map(u=>u.id===e.id?l:u))!=null?c:[]}return o!=null&&o.length?[...o,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),o=i=>{var s;return(s=Je(t,i))==null?void 0:s.filter(r=>{const a=n.find(l=>l.id===r.id);if(a){const l=a.getFilterFn();if(fa(l,r.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(o)},e.resetColumnFilters=t=>{var n,o;e.setColumnFilters(t?[]:(n=(o=e.initialState)==null?void 0:o.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 fa(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Uy=(e,t,n)=>n.reduce((o,i)=>{const s=i.getValue(e);return o+(typeof s=="number"?s:0)},0),Ky=(e,t,n)=>{let o;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(o>s||o===void 0&&s>=s)&&(o=s)}),o},qy=(e,t,n)=>{let o;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(o<s||o===void 0&&s>=s)&&(o=s)}),o},Xy=(e,t,n)=>{let o,i;return n.forEach(s=>{const r=s.getValue(e);r!=null&&(o===void 0?r>=r&&(o=i=r):(o>r&&(o=r),i<r&&(i=r)))}),[o,i]},Yy=(e,t)=>{let n=0,o=0;if(t.forEach(i=>{let s=i.getValue(e);s!=null&&(s=+s)>=s&&(++n,o+=s)}),n)return o/n},Zy=(e,t)=>{if(!t.length)return;const n=t.map(s=>s.getValue(e));if(!$y(n))return;if(n.length===1)return n[0];const o=Math.floor(n.length/2),i=n.sort((s,r)=>s-r);return n.length%2!==0?i[o]:(i[o-1]+i[o])/2},Jy=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Qy=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,e0=(e,t)=>t.length,Vo={sum:Uy,min:Ky,max:qy,extent:Xy,mean:Yy,median:Zy,unique:Jy,uniqueCount:Qy,count:e0},t0={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:Re("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(o=>o!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,o;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((o=t.options.enableGrouping)!=null?o:!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],o=n?.getValue(e.id);if(typeof o=="number")return Vo.sum;if(Object.prototype.toString.call(o)==="[object Date]")return Vo.extent},e.getAggregationFn=()=>{var n,o;if(!e)throw new Error;return to(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(o=t.options.aggregationFns)==null?void 0:o[e.columnDef.aggregationFn])!=null?n:Vo[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,o;e.setGrouping(t?[]:(n=(o=e.initialState)==null?void 0:o.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 o=t.getColumn(n);return o!=null&&o.columnDef.getGroupingValue?(e._groupingValuesCache[n]=o.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,o)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function n0(e,t,n){if(!(t!=null&&t.length)||!n)return e;const o=e.filter(s=>!t.includes(s.id));return n==="remove"?o:[...t.map(s=>e.find(r=>r.id===s)).filter(Boolean),...o]}const o0={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Re("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=H(n=>[qt(t,n)],n=>n.findIndex(o=>o.id===e.id),W(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var o;return((o=qt(t,n)[0])==null?void 0:o.id)===e.id},e.getIsLastColumn=n=>{var o;const i=qt(t,n);return((o=i[i.length-1])==null?void 0:o.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=H(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,o)=>i=>{let s=[];if(!(t!=null&&t.length))s=i;else{const r=[...t],a=[...i];for(;a.length&&r.length;){const l=r.shift(),c=a.findIndex(u=>u.id===l);c>-1&&s.push(a.splice(c,1)[0])}s=[...s,...a]}return n0(s,n,o)},W(e.options,"debugTable","_getOrderColumnsFn"))}},ko=()=>({left:[],right:[]}),i0={getInitialState:e=>({columnPinning:ko(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Re("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const o=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var s,r;if(n==="right"){var a,l;return{left:((a=i?.left)!=null?a:[]).filter(f=>!(o!=null&&o.includes(f))),right:[...((l=i?.right)!=null?l:[]).filter(f=>!(o!=null&&o.includes(f))),...o]}}if(n==="left"){var c,u;return{left:[...((c=i?.left)!=null?c:[]).filter(f=>!(o!=null&&o.includes(f))),...o],right:((u=i?.right)!=null?u:[]).filter(f=>!(o!=null&&o.includes(f)))}}return{left:((s=i?.left)!=null?s:[]).filter(f=>!(o!=null&&o.includes(f))),right:((r=i?.right)!=null?r:[]).filter(f=>!(o!=null&&o.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(o=>{var i,s,r;return((i=o.columnDef.enablePinning)!=null?i:!0)&&((s=(r=t.options.enableColumnPinning)!=null?r:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:o,right:i}=t.getState().columnPinning,s=n.some(a=>o?.includes(a)),r=n.some(a=>i?.includes(a));return s?"left":r?"right":!1},e.getPinnedIndex=()=>{var n,o;const i=e.getIsPinned();return i?(n=(o=t.getState().columnPinning)==null||(o=o[i])==null?void 0:o.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,o,i)=>{const s=[...o??[],...i??[]];return n.filter(r=>!s.includes(r.column.id))},W(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,o)=>(o??[]).map(s=>n.find(r=>r.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),W(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,o)=>(o??[]).map(s=>n.find(r=>r.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),W(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,o;return e.setColumnPinning(t?ko():(n=(o=e.initialState)==null?void 0:o.columnPinning)!=null?n:ko())},e.getIsSomeColumnsPinned=t=>{var n;const o=e.getState().columnPinning;if(!t){var i,s;return!!((i=o.left)!=null&&i.length||(s=o.right)!=null&&s.length)}return!!((n=o[t])!=null&&n.length)},e.getLeftLeafColumns=H(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(o=>t.find(i=>i.id===o)).filter(Boolean),W(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=H(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(o=>t.find(i=>i.id===o)).filter(Boolean),W(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=H(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o)=>{const i=[...n??[],...o??[]];return t.filter(s=>!i.includes(s.id))},W(e.options,"debugColumns","getCenterLeafColumns"))}};function s0(e){return e||(typeof document<"u"?document:null)}const Cn={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Do=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),r0={getDefaultColumnDef:()=>Cn,getInitialState:e=>({columnSizing:{},columnSizingInfo:Do(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Re("columnSizing",e),onColumnSizingInfoChange:Re("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,o,i;const s=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Cn.minSize,(o=s??e.columnDef.size)!=null?o:Cn.size),(i=e.columnDef.maxSize)!=null?i:Cn.maxSize)},e.getStart=H(n=>[n,qt(t,n),t.getState().columnSizing],(n,o)=>o.slice(0,e.getIndex(n)).reduce((i,s)=>i+s.getSize(),0),W(t.options,"debugColumns","getStart")),e.getAfter=H(n=>[n,qt(t,n),t.getState().columnSizing],(n,o)=>o.slice(e.getIndex(n)+1).reduce((i,s)=>i+s.getSize(),0),W(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:o,...i}=n;return i})},e.getCanResize=()=>{var n,o;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((o=t.options.enableColumnResizing)!=null?o:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const o=i=>{if(i.subHeaders.length)i.subHeaders.forEach(o);else{var s;n+=(s=i.column.getSize())!=null?s:0}};return o(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 o=t.getColumn(e.column.id),i=o?.getCanResize();return s=>{if(!o||!i||(s.persist==null||s.persist(),Fo(s)&&s.touches&&s.touches.length>1))return;const r=e.getSize(),a=e?e.getLeafHeaders().map(x=>[x.column.id,x.column.getSize()]):[[o.id,o.getSize()]],l=Fo(s)?Math.round(s.touches[0].clientX):s.clientX,c={},u=(x,w)=>{typeof w=="number"&&(t.setColumnSizingInfo(v=>{var b,S;const M=t.options.columnResizeDirection==="rtl"?-1:1,A=(w-((b=v?.startOffset)!=null?b:0))*M,E=Math.max(A/((S=v?.startSize)!=null?S:0),-.999999);return v.columnSizingStart.forEach(k=>{let[F,$]=k;c[F]=Math.round(Math.max($+$*E,0)*100)/100}),{...v,deltaOffset:A,deltaPercentage:E}}),(t.options.columnResizeMode==="onChange"||x==="end")&&t.setColumnSizing(v=>({...v,...c})))},f=x=>u("move",x),d=x=>{u("end",x),t.setColumnSizingInfo(w=>({...w,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=s0(n),m={moveHandler:x=>f(x.clientX),upHandler:x=>{h?.removeEventListener("mousemove",m.moveHandler),h?.removeEventListener("mouseup",m.upHandler),d(x.clientX)}},g={moveHandler:x=>(x.cancelable&&(x.preventDefault(),x.stopPropagation()),f(x.touches[0].clientX),!1),upHandler:x=>{var w;h?.removeEventListener("touchmove",g.moveHandler),h?.removeEventListener("touchend",g.upHandler),x.cancelable&&(x.preventDefault(),x.stopPropagation()),d((w=x.touches[0])==null?void 0:w.clientX)}},y=a0()?{passive:!1}:!1;Fo(s)?(h?.addEventListener("touchmove",g.moveHandler,y),h?.addEventListener("touchend",g.upHandler,y)):(h?.addEventListener("mousemove",m.moveHandler,y),h?.addEventListener("mouseup",m.upHandler,y)),t.setColumnSizingInfo(x=>({...x,startOffset:l,startSize:r,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:o.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?Do():(n=e.initialState.columnSizingInfo)!=null?n:Do())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?t:0}}};let Sn=null;function a0(){if(typeof Sn=="boolean")return Sn;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 Sn=e,Sn}function Fo(e){return e.type==="touchstart"}const l0={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Re("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(o=>({...o,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,o;const i=e.columns;return(n=i.length?i.some(s=>s.getIsVisible()):(o=t.getState().columnVisibility)==null?void 0:o[e.id])!=null?n:!0},e.getCanHide=()=>{var n,o;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((o=t.options.enableHiding)!=null?o:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=H(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(o=>o.column.getIsVisible()),W(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=H(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,o,i)=>[...n,...o,...i],W(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,o)=>H(()=>[o(),o().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),W(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 o;e.setColumnVisibility(n?{}:(o=e.initialState.columnVisibility)!=null?o:{})},e.toggleAllColumnsVisible=n=>{var o;n=(o=n)!=null?o:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,s)=>({...i,[s.id]:n||!(s.getCanHide!=null&&s.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 o;e.toggleAllColumnsVisible((o=n.target)==null?void 0:o.checked)}}};function qt(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const c0={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()}}},u0={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Re("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const o=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,o,i,s;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((o=t.options.enableGlobalFilter)!=null?o:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((s=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>He.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:o}=e.options;return to(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[o])!=null?t:He[o]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},d0={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Re("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var o,i;if(!t){e._queue(()=>{t=!0});return}if((o=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?o:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=o=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(o),e.toggleAllRowsExpanded=o=>{o??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=o=>{var i,s;e.setExpanded(o?{}:(i=(s=e.initialState)==null?void 0:s.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const o=e.getState().expanded;return o===!0||Object.values(o).some(Boolean)},e.getIsAllRowsExpanded=()=>{const o=e.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let o=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const r=s.split(".");o=Math.max(o,r.length)}),o},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(o=>{var i;const s=o===!0?!0:!!(o!=null&&o[e.id]);let r={};if(o===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{r[a]=!0}):r=o,n=(i=n)!=null?i:!s,!s&&n)return{...r,[e.id]:!0};if(s&&!n){const{[e.id]:a,...l}=r;return l}return o})},e.getIsExpanded=()=>{var n;const o=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:o===!0||o?.[e.id])},e.getCanExpand=()=>{var n,o,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((o=t.options.enableExpanding)!=null?o:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,o=e;for(;n&&o.parentId;)o=t.getRow(o.parentId,!0),n=o.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},mi=0,pi=10,Lo=()=>({pageIndex:mi,pageSize:pi}),f0={getInitialState:e=>({...e,pagination:{...Lo(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Re("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var o,i;if(!t){e._queue(()=>{t=!0});return}if((o=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?o:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=o=>{const i=s=>Je(o,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=o=>{var i;e.setPagination(o?Lo():(i=e.initialState.pagination)!=null?i:Lo())},e.setPageIndex=o=>{e.setPagination(i=>{let s=Je(o,i.pageIndex);const r=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,r)),{...i,pageIndex:s}})},e.resetPageIndex=o=>{var i,s;e.setPageIndex(o?mi:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?i:mi)},e.resetPageSize=o=>{var i,s;e.setPageSize(o?pi:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?i:pi)},e.setPageSize=o=>{e.setPagination(i=>{const s=Math.max(1,Je(o,i.pageSize)),r=i.pageSize*i.pageIndex,a=Math.floor(r/s);return{...i,pageIndex:a,pageSize:s}})},e.setPageCount=o=>e.setPagination(i=>{var s;let r=Je(o,(s=e.options.pageCount)!=null?s:-1);return typeof r=="number"&&(r=Math.max(-1,r)),{...i,pageCount:r}}),e.getPageOptions=H(()=>[e.getPageCount()],o=>{let i=[];return o&&o>0&&(i=[...new Array(o)].fill(null).map((s,r)=>r)),i},W(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:o}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:o<i-1},e.previousPage=()=>e.setPageIndex(o=>o-1),e.nextPage=()=>e.setPageIndex(o=>o+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 o;return(o=e.options.pageCount)!=null?o:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var o;return(o=e.options.rowCount)!=null?o:e.getPrePaginationRowModel().rows.length}}},Io=()=>({top:[],bottom:[]}),h0={getInitialState:e=>({rowPinning:Io(),...e}),getDefaultOptions:e=>({onRowPinningChange:Re("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,o,i)=>{const s=o?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],r=i?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...r,e.id,...s]);t.setRowPinning(l=>{var c,u;if(n==="bottom"){var f,d;return{top:((f=l?.top)!=null?f:[]).filter(g=>!(a!=null&&a.has(g))),bottom:[...((d=l?.bottom)!=null?d:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)]}}if(n==="top"){var h,m;return{top:[...((h=l?.top)!=null?h:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)],bottom:((m=l?.bottom)!=null?m:[]).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:o,enablePinning:i}=t.options;return typeof o=="function"?o(e):(n=o??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:o,bottom:i}=t.getState().rowPinning,s=n.some(a=>o?.includes(a)),r=n.some(a=>i?.includes(a));return s?"top":r?"bottom":!1},e.getPinnedIndex=()=>{var n,o;const i=e.getIsPinned();if(!i)return-1;const s=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(r=>{let{id:a}=r;return a});return(o=s?.indexOf(e.id))!=null?o:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,o;return e.setRowPinning(t?Io():(n=(o=e.initialState)==null?void 0:o.rowPinning)!=null?n:Io())},e.getIsSomeRowsPinned=t=>{var n;const o=e.getState().rowPinning;if(!t){var i,s;return!!((i=o.top)!=null&&i.length||(s=o.bottom)!=null&&s.length)}return!!((n=o[t])!=null&&n.length)},e._getPinnedRows=(t,n,o)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(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:o}))},e.getTopRows=H(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),W(e.options,"debugRows","getTopRows")),e.getBottomRows=H(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),W(e.options,"debugRows","getBottomRows")),e.getCenterRows=H(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,o)=>{const i=new Set([...n??[],...o??[]]);return t.filter(s=>!i.has(s.id))},W(e.options,"debugRows","getCenterRows"))}},g0={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Re("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 o={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(s=>{s.getCanSelect()&&(o[s.id]=!0)}):i.forEach(s=>{delete o[s.id]}),o})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const o=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(s=>{vi(i,s.id,o,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=H(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?jo(e,n):{rows:[],flatRows:[],rowsById:{}},W(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=H(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?jo(e,n):{rows:[],flatRows:[],rowsById:{}},W(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=H(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?jo(e,n):{rows:[],flatRows:[],rowsById:{}},W(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let o=!!(t.length&&Object.keys(n).length);return o&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let o=!!t.length;return o&&t.some(i=>!n[i.id])&&(o=!1),o},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,o)=>{const i=e.getIsSelected();t.setRowSelection(s=>{var r;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return s;const a={...s};return vi(a,e.id,n,(r=o?.selectChildren)!=null?r:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return ys(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return yi(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return yi(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 o=>{var i;n&&e.toggleSelected((i=o.target)==null?void 0:i.checked)}}}},vi=(e,t,n,o,i)=>{var s;const r=i.getRow(t,!0);n?(r.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),r.getCanSelect()&&(e[t]=!0)):delete e[t],o&&(s=r.subRows)!=null&&s.length&&r.getCanSelectSubRows()&&r.subRows.forEach(a=>vi(e,a.id,n,o,i))};function jo(e,t){const n=e.getState().rowSelection,o=[],i={},s=function(r,a){return r.map(l=>{var c;const u=ys(l,n);if(u&&(o.push(l),i[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:s(l.subRows)}),u)return l}).filter(Boolean)};return{rows:s(t.rows),flatRows:o,rowsById:i}}function ys(e,t){var n;return(n=t[e.id])!=null?n:!1}function yi(e,t,n){var o;if(!((o=e.subRows)!=null&&o.length))return!1;let i=!0,s=!1;return e.subRows.forEach(r=>{if(!(s&&!i)&&(r.getCanSelect()&&(ys(r,t)?s=!0:i=!1),r.subRows&&r.subRows.length)){const a=yi(r,t);a==="all"?s=!0:(a==="some"&&(s=!0),i=!1)}}),i?"all":s?"some":!1}const xi=/([0-9]+)/gm,m0=(e,t,n)=>Uc(it(e.getValue(n)).toLowerCase(),it(t.getValue(n)).toLowerCase()),p0=(e,t,n)=>Uc(it(e.getValue(n)),it(t.getValue(n))),v0=(e,t,n)=>xs(it(e.getValue(n)).toLowerCase(),it(t.getValue(n)).toLowerCase()),y0=(e,t,n)=>xs(it(e.getValue(n)),it(t.getValue(n))),x0=(e,t,n)=>{const o=e.getValue(n),i=t.getValue(n);return o>i?1:o<i?-1:0},w0=(e,t,n)=>xs(e.getValue(n),t.getValue(n));function xs(e,t){return e===t?0:e>t?1:-1}function it(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Uc(e,t){const n=e.split(xi).filter(Boolean),o=t.split(xi).filter(Boolean);for(;n.length&&o.length;){const i=n.shift(),s=o.shift(),r=parseInt(i,10),a=parseInt(s,10),l=[r,a].sort();if(isNaN(l[0])){if(i>s)return 1;if(s>i)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-o.length}const Ht={alphanumeric:m0,alphanumericCaseSensitive:p0,text:v0,textCaseSensitive:y0,datetime:x0,basic:w0},C0={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Re("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const i of n){const s=i?.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return Ht.datetime;if(typeof s=="string"&&(o=!0,s.split(xi).length>1))return Ht.alphanumeric}return o?Ht.text:Ht.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,o;if(!e)throw new Error;return to(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(o=t.options.sortingFns)==null?void 0:o[e.columnDef.sortingFn])!=null?n:Ht[e.columnDef.sortingFn]},e.toggleSorting=(n,o)=>{const i=e.getNextSortingOrder(),s=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,f=s?n:i==="desc";if(r!=null&&r.length&&e.getCanMultiSort()&&o?a?u="toggle":u="add":r!=null&&r.length&&l!==r.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(s||i||(u="remove")),u==="add"){var d;c=[...r,{id:e.id,desc:f}],c.splice(0,c.length-((d=t.options.maxMultiSortColCount)!=null?d:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=r.map(h=>h.id===e.id?{...h,desc:f}:h):u==="remove"?c=r.filter(h=>h.id!==e.id):c=[{id:e.id,desc:f}];return c})},e.getFirstSortDir=()=>{var n,o;return((n=(o=e.columnDef.sortDescFirst)!=null?o:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var o,i;const s=e.getFirstSortDir(),r=e.getIsSorted();return r?r!==s&&((o=t.options.enableSortingRemoval)==null||o)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:r==="desc"?"asc":"desc":s},e.getCanSort=()=>{var n,o;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((o=t.options.enableSorting)!=null?o:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,o;return(n=(o=e.columnDef.enableMultiSort)!=null?o:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const o=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return o?o.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,o;return(n=(o=t.getState().sorting)==null?void 0:o.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(o=>o.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return o=>{n&&(o.persist==null||o.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(o):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,o;e.setSorting(t?[]:(n=(o=e.initialState)==null?void 0:o.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())}},S0=[zy,l0,o0,i0,Wy,Gy,c0,u0,C0,t0,d0,f0,h0,g0,r0];function b0(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const o=[...S0,...(t=e._features)!=null?t:[]];let i={_features:o};const s=i._features.reduce((d,h)=>Object.assign(d,h.getDefaultOptions==null?void 0:h.getDefaultOptions(i)),{}),r=d=>i.options.mergeOptions?i.options.mergeOptions(s,d):{...s,...d};let l={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(d=>{var h;l=(h=d.getInitialState==null?void 0:d.getInitialState(l))!=null?h:l});const c=[];let u=!1;const f={_features:o,options:{...s,...e},initialState:l,_queue:d=>{c.push(d),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{i.setState(i.initialState)},setOptions:d=>{const h=Je(d,i.options);i.options=r(h)},getState:()=>i.options.state,setState:d=>{i.options.onStateChange==null||i.options.onStateChange(d)},_getRowId:(d,h,m)=>{var g;return(g=i.options.getRowId==null?void 0:i.options.getRowId(d,h,m))!=null?g:`${m?[m.id,h].join("."):h}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(d,h)=>{let m=(h?i.getPrePaginationRowModel():i.getRowModel()).rowsById[d];if(!m&&(m=i.getCoreRowModel().rowsById[d],!m))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${d}`):new Error;return m},_getDefaultColumnDef:H(()=>[i.options.defaultColumn],d=>{var h;return d=(h=d)!=null?h:{},{header:m=>{const g=m.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:m=>{var g,y;return(g=(y=m.renderValue())==null||y.toString==null?void 0:y.toString())!=null?g:null},...i._features.reduce((m,g)=>Object.assign(m,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...d}},W(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>i.options.columns,getAllColumns:H(()=>[i._getColumnDefs()],d=>{const h=function(m,g,y){return y===void 0&&(y=0),m.map(x=>{const w=By(i,x,y,g),v=x;return w.columns=v.columns?h(v.columns,w,y+1):[],w})};return h(d)},W(e,"debugColumns","getAllColumns")),getAllFlatColumns:H(()=>[i.getAllColumns()],d=>d.flatMap(h=>h.getFlatColumns()),W(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:H(()=>[i.getAllFlatColumns()],d=>d.reduce((h,m)=>(h[m.id]=m,h),{}),W(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:H(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(d,h)=>{let m=d.flatMap(g=>g.getLeafColumns());return h(m)},W(e,"debugColumns","getAllLeafColumns")),getColumn:d=>{const h=i._getAllFlatColumnsById()[d];return process.env.NODE_ENV!=="production"&&!h&&console.error(`[Table] Column with id '${d}' does not exist.`),h}};Object.assign(i,f);for(let d=0;d<i._features.length;d++){const h=i._features[d];h==null||h.createTable==null||h.createTable(i)}return i}function R0(){return e=>H(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(i,s,r){s===void 0&&(s=0);const a=[];for(let c=0;c<i.length;c++){const u=Hy(e,e._getRowId(i[c],c,r),i[c],c,s,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(i[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=o(u.originalSubRows,s+1,u))}}return a};return n.rows=o(t),n},W(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function _0(e){const t=[],n=o=>{var i;t.push(o),(i=o.subRows)!=null&&i.length&&o.getIsExpanded()&&o.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function P0(e){return t=>H(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,o)=>{if(!o.rows.length)return o;const{pageSize:i,pageIndex:s}=n;let{rows:r,flatRows:a,rowsById:l}=o;const c=i*s,u=c+i;r=r.slice(c,u);let f;t.options.paginateExpandedRows?f={rows:r,flatRows:a,rowsById:l}:f=_0({rows:r,flatRows:a,rowsById:l}),f.flatRows=[];const d=h=>{f.flatRows.push(h),h.subRows.length&&h.subRows.forEach(d)};return f.rows.forEach(d),f},W(t.options,"debugTable","getPaginationRowModel"))}function E0(){return e=>H(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const o=e.getState().sorting,i=[],s=o.filter(l=>{var c;return(c=e.getColumn(l.id))==null?void 0:c.getCanSort()}),r={};s.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,f)=>{for(let h=0;h<s.length;h+=1){var d;const m=s[h],g=r[m.id],y=g.sortUndefined,x=(d=m?.desc)!=null?d:!1;let w=0;if(y){const v=u.getValue(m.id),b=f.getValue(m.id),S=v===void 0,M=b===void 0;if(S||M){if(y==="first")return S?-1:1;if(y==="last")return S?1:-1;w=S&&M?0:S?y:-y}}if(w===0&&(w=g.sortingFn(u,f,m.id)),w!==0)return x&&(w*=-1),g.invertSorting&&(w*=-1),w}return u.index-f.index}),c.forEach(u=>{var f;i.push(u),(f=u.subRows)!=null&&f.length&&(u.subRows=a(u.subRows))}),c};return{rows:a(n.rows),flatRows:i,rowsById:n.rowsById}},W(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function ha(e,t){return e?M0(e)?R.createElement(e,t):e:null}function M0(e){return T0(e)||typeof e=="function"||A0(e)}function T0(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function A0(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function V0(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=R.useState(()=>({current:b0(t)})),[o,i]=R.useState(()=>n.current.initialState);return n.current.setOptions(s=>({...s,...e,state:{...o,...e.state},onStateChange:r=>{i(r),e.onStateChange==null||e.onStateChange(r)}})),n.current}const k0=e=>R.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("style",null,`
|
|
16
|
+
@keyframes spin {
|
|
17
|
+
from {
|
|
18
|
+
transform: rotate(0deg);
|
|
19
|
+
}
|
|
20
|
+
to {
|
|
21
|
+
transform: rotate(360deg);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
.spinner {
|
|
25
|
+
transform-origin: center;
|
|
26
|
+
animation: spin 1s linear infinite;
|
|
27
|
+
}
|
|
28
|
+
`),R.createElement("g",{className:"spinner"},R.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}),R.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"}))),D0=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("g",{clipPath:"url(#clip0_2074_3858)"},R.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"})),R.createElement("defs",null,R.createElement("clipPath",{id:"clip0_2074_3858"},R.createElement("rect",{width:24,height:24,fill:"white"})))),F0="_table_19yhs_8",L0={table:F0},Kc=C.forwardRef(({children:e,className:t,style:n,...o},i)=>p.jsx("td",{ref:i,className:V.cx(t),style:n,...o,children:e}));Kc.displayName="TableBodyCell";const qc=C.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:o="center",py:i="var(--spacing-sm)",px:s="var(--spacing-md)",minHeight:r="56px",...a},l)=>p.jsx(L,{row:t,justifyContent:n,alignItems:o,py:i,px:s,minHeight:r,ref:l,...a,children:e}));qc.displayName="TableBodyCellContent";const Xc=C.forwardRef(({children:e,className:t,showBorders:n=!1,isSelected:o=!1,...i},s)=>{const r=V.css({borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return p.jsx("tr",{ref:s,className:V.cx(r,t),...i,children:e})});Xc.displayName="TableBodyRow";const I0=C.forwardRef(({children:e,className:t,style:n,justifyContent:o="flex-start",alignItems:i="flex-start",...s},r)=>{const a=V.css({justifyContent:o,alignItems:i,fontWeight:"inherit"});return p.jsx("th",{ref:r,className:V.cx(a,t),style:n,...s,children:e})}),ws=C.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:o="center",py:i="var(--spacing-sm)",px:s="var(--spacing-md)",minHeight:r="56px",...a},l)=>p.jsx(L,{row:t,justifyContent:n,alignItems:o,py:i,px:s,minHeight:r,ref:l,...a,children:e}));ws.displayName="TableHeadCellContent";const j0=e=>R.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M8.75 0.75L4.75 4.75L0.75 0.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),$0=e=>R.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M8.75 4.75L4.75 0.75L0.75 4.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),O0=({sortDirection:e,gap:t="5px",...n})=>p.jsxs(L,{gap:t,...n,children:[p.jsx($0,{style:{color:e==="asc"?"var(--icon-accent)":"var(--icon-tertiary)"}}),p.jsx(j0,{style:{color:e==="desc"?"var(--icon-accent)":"var(--icon-tertiary)"}})]}),Yc=({children:e,tableProps:t,gap:n="10px",...o})=>{const i=t.column.getIsSorted();return p.jsxs(ws,{style:{cursor:"pointer",userSelect:"none"},gap:n,...o,children:[e,p.jsx(O0,{sortDirection:i})]})};Yc.displayName="TableHeadCellContentSortable";const Zc=C.forwardRef(({children:e,className:t,showBorders:n=!1,...o},i)=>{const s=V.css({backgroundColor:"var(--fill-bg-secondary)",borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return p.jsx("tr",{ref:i,className:V.cx(s,t),...o,children:e})});Zc.displayName="TableHeadRow";const N0=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),B0=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),z0=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.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"}),R.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"}),R.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"})),$o=(e,t)=>{const n=t-e+1;return Array.from({length:n},(o,i)=>e+i)};function H0(e){const{count:t=1,page:n,maxVisiblePages:o=10}=e;let i=1,s=1;if(o<=2)return[n];o<=4?(i=0,s=0):o<=6?(i=1,s=0):o<=7?(i=1,s=Math.max(0,Math.floor((o-4)/2))):(i=1,s=Math.max(1,Math.floor((o-5)/2)));const r=$o(1,Math.min(i,t)),a=$o(Math.max(t-i+1,i+1),t),l=Math.max(Math.min(n-s,t-i-s*2-1),i+2),c=Math.min(Math.max(n+s,i+s*2+2),t-i-1);return[...r,...l>i+2?["start-dots"]:i+1<t-i?[i+1]:[],...$o(l,c),...c<t-i-1?["end-dots"]:t-i>i?[t-i]:[],...a]}const W0=({pageIndex:e,pageSize:t,totalCount:n,onPageChange:o,onPageSizeChange:i,pageSizeOptions:s=[10,20,50,100],showPageSizeSelector:r=!0,renderPageSizeSelectorDropdownItem:a=c=>c.label,renderPageSizeSelectorInputItem:l})=>{const c=C.useRef(null),[u,f]=C.useState(0),d=Math.ceil(n/t),h=e>0,m=e<d-1;C.useEffect(()=>{const S=c.current;if(!S)return;const M=new ResizeObserver(A=>{for(const E of A)f(E.contentRect.width)});return M.observe(S),()=>{M.disconnect()}},[]);const y=(S=>{if(S<=0)return 1;const F=S-96;if(F<=40)return 1;const $=Math.floor((F+8)/48);return Math.max(1,Math.min(10,$))})(u),x=H0({page:e+1,count:d,maxVisiblePages:y}),w=()=>{h&&o(e-1)},v=()=>{m&&o(e+1)},b=S=>{i(Number(S))};return n===0?null:p.jsxs(L,{flex:1,row:!0,justifyContent:"space-between",children:[p.jsxs(L,{ref:c,flex:1,row:!0,overflow:"hidden",gap:"var(--spacing-sm)",children:[p.jsx(Xt,{onClick:w,disabled:!h,color:"neutral",size:"sm",children:p.jsx(N0,{})}),p.jsx(L,{row:!0,gap:"var(--spacing-sm)",children:x.map(S=>p.jsx(G0,{isDots:S==="start-dots"||S==="end-dots",isCurrentPage:S===e+1,disabled:S==="start-dots"||S==="end-dots",onClick:()=>o(S-1),children:S},S))}),p.jsx(Xt,{color:"neutral",size:"sm",onClick:v,disabled:!m,children:p.jsx(B0,{})})]}),r&&p.jsx(L,{alignItems:"flex-end",children:p.jsx(Ac,{width:"fit-content",value:t.toString(),size:"sm",items:s.map(S=>({value:S.toString(),label:S.toString()})),returnedValue:S=>S.value,renderDropdownItem:a,renderSingleInputItem:l,onChange:S=>b(S)})})]})},G0=({children:e,isCurrentPage:t=!1,onClick:n,isDots:o=!1,disabled:i=!1})=>{const s=V.css({cursor:i?"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=V.css({width:"24px",height:"24px",color:t?"var(--icon-secondary)":"var(--icon-tertiary)"});return p.jsx(L,{className:s,onClick:i?void 0:n,children:o?p.jsx(z0,{className:r}):p.jsx(K,{center:!0,variant:"body-2",fontWeight:"medium",children:e})})},U0=V.css({position:"relative",borderRadius:"var(--corner-md)",overflow:"hidden","&::before, &::after":{content:'""',position:"absolute",top:0,bottom:14,width:96,pointerEvents:"none",zIndex:1,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%)"}}),K0=V.css({overflowX:"auto",scrollbarWidth:"thin",scrollbarColor:"var(--gray-86) var(--gray-96)"}),Jc=C.memo(({data:e,children:t,className:n,showBorders:o=!1,...i})=>{const[s,r]=C.useState(!1),[a,l]=C.useState(!1),c=C.useRef(null),u=C.useCallback(()=>{const d=c.current;if(!d)return;const{scrollLeft:h,scrollWidth:m,clientWidth:g}=d,y=m>g;r(y&&h>0),l(y&&h<m-g-1)},[]);C.useEffect(()=>{const d=c.current;if(!d)return;u();const h=new ResizeObserver(u);return h.observe(d),d.addEventListener("scroll",u),()=>{h.disconnect(),d.removeEventListener("scroll",u)}},[u,e]);const f=V.css({border:o?"1px solid var(--border-neutral-alpha-low)":"transparent","&::before":{opacity:s?1:0},"&::after":{opacity:a?1:0}});return p.jsx(L,{className:V.cx(U0,f,n),...i,children:p.jsx(L,{ref:c,className:K0,children:t})})});Jc.displayName="TableWrapper";const q0=V.css({width:"100%",maxWidth:"100%",minWidth:"max-content",borderCollapse:"collapse",borderSpacing:0,backgroundColor:"var(--fill-bg-primary)"}),X0=V.css({backgroundColor:"var(--fill-bg-secondary)",color:"var(--text-tertiary)"}),Ot=({ref:e,data:t,columns:n,showBorders:o=!0,enableSorting:i=!1,enablePagination:s=!1,enableRowSelection:r=!1,enableMultiRowSelection:a=!1,sorting:l,onSortingChange:c,columnFilters:u,onColumnFiltersChange:f,columnVisibility:d,onColumnVisibilityChange:h,pagination:m,onPaginationChange:g,rowSelection:y,onRowSelectionChange:x,totalCount:w,loading:v=!1,emptyLabels:b={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:M,containerClassName:A,tableOptions:E={},onRowClick:k,getRowId:F,headCellComponent:$=I0,bodyCellComponent:N=Kc,headRowComponent:j=Zc,bodyRowComponent:D=Xc,onReset:O,renderPageSizeSelectorDropdownItem:B,renderPageSizeSelectorInputItem:P})=>{const[_,T]=C.useState([]),[I,q]=C.useState([]),[U,X]=C.useState({}),[te,Y]=C.useState({pageIndex:0,pageSize:10}),[ne,le]=C.useState({}),_e=l??_,fe=u??I,je=d??U,pe=m??te,z=y??ne,J=Z=>{const ee=typeof Z=="function"?Z(_e):Z;c?c(ee):T(ee)},re=Z=>{const ee=typeof Z=="function"?Z(fe):Z;f?f(ee):q(ee)},he=Z=>{const ee=typeof Z=="function"?Z(je):Z;h?h(ee):X(ee)},ve=Z=>{const ee=typeof Z=="function"?Z(pe):Z;g?g(ee):Y(ee)},pt=V0({data:t,columns:n,state:{sorting:_e,columnFilters:fe,columnVisibility:je,pagination:pe,rowSelection:z},onSortingChange:J,onColumnFiltersChange:re,onColumnVisibilityChange:he,onPaginationChange:ve,onRowSelectionChange:Z=>{const ee=typeof Z=="function"?Z(z):Z;x?x(ee):le(ee)},getCoreRowModel:R0(),getSortedRowModel:i?E0():void 0,getPaginationRowModel:s?P0():void 0,enableRowSelection:r,enableMultiRowSelection:a,getRowId:F,manualPagination:!!w,pageCount:w?Math.ceil(w/pe.pageSize):void 0,...E});C.useImperativeHandle(e,()=>pt);const{rows:dn}=pt.getRowModel(),no=(Z,ee)=>{k&&k(Z.original,ee)};return v?p.jsxs(L,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:V.cx(A),children:[p.jsx(k0,{width:32,height:32,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),p.jsx(K,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:S.title}),p.jsx(K,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:S.description}),typeof S.action=="string"?p.jsx(ci,{width:"auto",onClick:O,intensity:"secondary",color:"accent",children:S.action}):S.action]}):dn.length?p.jsxs(L,{w:"full",gap:"var(--spacing-xl)",className:V.cx(A),children:[p.jsx(Jc,{data:t,showBorders:o,children:p.jsxs("table",{className:V.cx(q0,L0.table,M),children:[p.jsx("thead",{className:X0,children:pt.getHeaderGroups().map(Z=>p.jsx(j,{showBorders:o,children:Z.headers.map(ee=>p.jsx($,{style:{width:ee.getSize()},onClick:ee.column.getToggleSortingHandler(),children:ee.isPlaceholder?null:ha(ee.column.columnDef.header,ee.getContext())},ee.id))},Z.id))}),p.jsx("tbody",{children:dn.map((Z,ee)=>p.jsx(D,{showBorders:o,isSelected:Z.getIsSelected(),onClick:()=>no(Z,ee),children:Z.getVisibleCells().map(oo=>p.jsx(N,{children:ha(oo.column.columnDef.cell,oo.getContext())},oo.id))},Z.id))})]})}),s&&!v&&p.jsx(W0,{pageIndex:pe.pageIndex,pageSize:pe.pageSize,totalCount:w||t.length,renderPageSizeSelectorDropdownItem:B,renderPageSizeSelectorInputItem:P,onPageChange:Z=>ve({...pe,pageIndex:Z}),onPageSizeChange:Z=>ve({...pe,pageSize:Z,pageIndex:0})})]}):p.jsxs(L,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:V.cx(A),children:[p.jsx(D0,{width:24,height:24,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),p.jsx(K,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:b.title}),p.jsx(K,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:b.description}),typeof b.action=="string"?p.jsx(ci,{width:"auto",onClick:O,intensity:"secondary",color:"accent",children:b.action}):b.action]})};Ot.displayName="Table";Ot.HeadCellContent=ws;Ot.BodyCellContent=qc;Ot.HeadCellContentSortable=Yc;Ot.createColumnHelper=jc;const Oo={chart:{type:"areaspline",backgroundColor:"transparent",spacing:[0,0,0,0],margin:[0,0,0,0]},xAxis:{gridLineWidth:0,lineWidth:0,tickWidth:0,labels:{enabled:!1},title:{text:""}},yAxis:{gridLineWidth:0,lineWidth:0,tickWidth:0,labels:{enabled:!1},title:{text:""}},legend:{enabled:!1},credits:{enabled:!1}},Y0={positive:{color:"var(--fill-positive-primary)",fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"var(--fill-positive-tint-high)"],[1,"var(--fill-positive-transparent)"]]}},negative:{color:"var(--fill-negative-primary)",fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"var(--fill-negative-tint-high)"],[1,"var(--fill-negative-transparent)"]]}},accent:{color:"var(--fill-accent-primary)",fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"var(--fill-accent-tint-high)"],[1,"var(--fill-accent-transparent)"]]}},warning:{color:"var(--fill-warning-primary)",fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"var(--fill-warning-tint-high)"],[1,"var(--fill-warning-transparent)"]]}}},Z0=(e,t,n,o,i)=>({...Oo,plotOptions:{areaspline:{marker:{enabled:!1,states:{hover:{enabled:i}}},allowPointSelect:!1}},xAxis:{...Oo.xAxis,...n},yAxis:{...Oo.yAxis,...o},series:[{type:"areaspline",data:t,...Y0[e]}]}),J0=e=>({outside:!0,enabled:!!e,padding:0,position:{alignByTranslate:!0},shadow:{color:"var(--effect-shadow-m)",offsetX:0,offsetY:0},borderRadius:8,backgroundColor:"var(--fill-bg-primary)",useHTML:!0,...e}),Qc=({color:e="positive",data:t=[],xAxis:n,yAxis:o,containerProps:i,highcharts:s,tooltip:r})=>{const a=C.useRef(null);C.useEffect(()=>()=>{typeof a=="object"&&a?.current?.chart&&a.current.chart.destroy()},[]);const l=C.useMemo(()=>Z0(e,t,n,o,!!r),[e,t,n,o,r]),c=C.useMemo(()=>r?J0(r):{enabled:!1},[r]);return p.jsx(kn.Chart,{highcharts:s,ref:a,options:l,containerProps:i,children:p.jsx(kn.Tooltip,{...c})})};Qc.displayName="LineChart";const Q0={chart:{type:"pie",backgroundColor:"transparent",spacing:[0,0,0,0],margin:[0,0,0,0],events:{click:void 0}},title:{align:"center",verticalAlign:"middle",floating:!0,style:{fontSize:"24px",fontWeight:"600",color:"var(--text-primary)"}},plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!1},startAngle:90,endAngle:-90,innerSize:"90%",borderWidth:0,states:{hover:{enabled:!1},select:{enabled:!1},inactive:{enabled:!1}},enableMouseTracking:!1}},tooltip:{enabled:!1},legend:{enabled:!1},credits:{enabled:!1}},ex={positive:{colors:["var(--fill-positive-primary)","var(--fill-positive-tint-high)"]},negative:{colors:["var(--fill-negative-primary)","var(--fill-negative-tint-high)"]},accent:{colors:["var(--fill-accent-primary)","var(--fill-accent-tint-high)"]},warning:{colors:["var(--fill-warning-primary)","var(--fill-warning-tint-high)"]}},tx=(e,t)=>({...Q0,series:[{type:"pie",data:[{name:"",y:Math.min(e,100)},{name:"",y:Math.max(100-e,0)}],...ex[t]}]}),eu=C.forwardRef(({highcharts:e,color:t="positive",percentage:n,label:o=r=>`${r}%`,containerProps:i},s)=>{const r=C.useRef(null),a=s||r;C.useEffect(()=>()=>{typeof a=="object"&&a?.current?.chart&&a.current.chart.destroy()},[a]);const l=C.useMemo(()=>tx(n,t),[n,t]);return p.jsx(kn.Chart,{highcharts:e,ref:a,options:l,containerProps:i,children:p.jsx(kn.Title,{children:o?.(n)})})});eu.displayName="PieProgressChart";const nx=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M9 17L14 12L9 7",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),ox="_link_aolvt_8",ix="_separator_aolvt_19",sx="_nav_aolvt_23",Vn={link:ox,separator:ix,nav:sx,"nav-item":"_nav-item_aolvt_29"},Cs=({children:e,separator:t=p.jsx(nx,{className:Vn.separator})})=>{const n=C.Children.toArray(e).filter(o=>C.isValidElement(o));return p.jsx("nav",{"aria-label":"breadcrumb",className:Vn.nav,children:n.map((o,i)=>{const s=i===n.length-1;return p.jsxs(K,{tag:"span",className:Vn["nav-item"],children:[C.cloneElement(o,{active:o.props.active??s}),!s&&t]},i)})})},rx=({children:e,href:t,active:n,className:o,activeClassName:i,activeElement:s,onClick:r})=>n?s||p.jsx(K,{tag:"span",variant:"body-2",fontWeight:"medium",colorName:"primary",className:V.cx(o,i),onClick:r,children:e}):p.jsx("a",{href:t,className:V.cx(Vn.link,o),onClick:r,children:e});Cs.Item=rx;Cs.displayName="Breadcrumbs";const ax=Cs,lx={primary:{bg:"var(--fill-accent-tint)",text:"var(--text-accent)",icon:"var(--icon-accent)"},secondary:{bg:"var(--fill-neutral-tint)",text:"var(--text-secondary)",icon:"var(--icon-tertiary)"},negative:{bg:"var(--fill-negative-tint)",text:"var(--text-negative)",icon:"var(--icon-negative)"},positive:{bg:"var(--fill-positive-tint)",text:"var(--text-positive)",icon:"var(--icon-positive)"},warning:{bg:"var(--fill-warning-tint)",text:"var(--text-warning)",icon:"var(--icon-warning)"},neutral:{bg:"var(--fill-neutral-tint)",text:"var(--text-tertiary)",icon:"var(--icon-tertiary)"},custom:{bg:"var(--fill-accent-tint)",text:"var(--text-accent)",icon:"var(--icon-accent)"}},cx={"2xs":{size:"var(--height-avatar-2xs)",borderRadius:"var(--corner-xs)",iconSize:"var(--height-icon-2xs)",fontSize:"var(--font-size-caption-2)",fontWeight:"var(--font-weight-medium)"},xs:{size:"var(--height-avatar-xs)",borderRadius:"var(--corner-sm)",iconSize:"var(--height-icon-xs)",fontSize:"var(--font-size-caption-1)",fontWeight:"var(--font-weight-medium)"},sm:{size:"var(--height-avatar-sm)",borderRadius:"var(--corner-sm)",iconSize:"var(--height-icon-xs)",fontSize:"var(--font-size-body-2)",fontWeight:"var(--font-weight-medium)"},md:{size:"var(--height-avatar-md)",borderRadius:"var(--corner-sm)",iconSize:"var(--height-icon-sm)",fontSize:"var(--font-size-body-2)",fontWeight:"var(--font-weight-medium)"},lg:{size:"var(--height-avatar-lg)",borderRadius:"var(--corner-md)",iconSize:"var(--height-icon-md)",fontSize:"var(--font-size-body-1)",fontWeight:"var(--font-weight-semibold)"},xl:{size:"var(--height-avatar-xl)",borderRadius:"var(--corner-md)",iconSize:"var(--height-icon-md)",fontSize:"var(--font-size-body-1)",fontWeight:"var(--font-weight-semibold)"},"2xl":{size:"var(--height-avatar-2xl)",borderRadius:"var(--corner-md)",iconSize:"var(--height-icon-md)",fontSize:"var(--font-size-headline-2)",fontWeight:"var(--font-weight-medium)"},custom:{size:"var(--height-avatar-md)",borderRadius:"var(--corner-sm)",iconSize:"var(--height-icon-sm)",fontSize:"var(--font-size-body-2)",fontWeight:"var(--font-weight-medium)"}},tu=C.forwardRef(({children:e,color:t="primary",size:n="md",fullRound:o=!1,className:i},s)=>{const r=C.useMemo(()=>lx[t],[t]),a=C.useMemo(()=>cx[n],[n]),l=C.useMemo(()=>V.css({width:a.size,height:a.size,borderRadius:o?"var(--corner-full-round)":a.borderRadius,backgroundColor:r.bg,color:r.text,fontSize:a.fontSize,fontWeight:a.fontWeight,lineHeight:1,transition:"var(--transition-general)","& svg":{width:a.iconSize,height:a.iconSize,color:r.icon,transition:"var(--transition-general)"},"& img":{width:"100%",height:"100%",objectFit:"cover"},"&:has(img)":{backgroundColor:"transparent",border:"1px solid var(--border-neutral-alpha-low)"}}),[r,a,o]);return p.jsx(L,{ref:s,center:!0,overflow:"hidden",className:V.cx(l,i),children:e})});tu.displayName="Avatar";const wi={neutral:{border:"var(--border-neutral-alpha-low)",bg:"var(--status-neutral-tint)",color:"var(--text-secondary)",colorName:"secondary"},accent:{border:"var(--border-accent-secondary)",bg:"var(--status-accent-tint-low)",color:"var(--text-accent)",colorName:"accent"},warning:{border:"var(--border-warning-secondary)",bg:"var(--status-warning-tint-low)",color:"var(--text-warning)",colorName:"warning"},positive:{border:"var(--border-positive-secondary)",bg:"var(--status-positive-tint-low)",color:"var(--text-positive)",colorName:"positive"},negative:{border:"var(--border-negative-secondary)",bg:"var(--status-negative-tint-low)",color:"var(--text-negative)",colorName:"negative"}},bn={sm:{h:24,text:"caption-1",corner:"var(--corner-xs)",p:"6px var(--spacing-sm)"},md:{h:32,text:"body-2",corner:"var(--corner-sm)",p:"6px var(--spacing-md)"},lg:{h:40,text:"body-2",corner:"var(--corner-md)",p:"6px var(--spacing-lg)"}},ux=(e,t,n,o)=>{const i=wi[t];let s=i.bg,r="none";const a=i.color;switch(e){case"outline":s="transparent",r=`1px solid ${i.border}`;break;case"clear":s="transparent";break;default:s=i.bg;break}return V.css({cursor:n?"not-allowed":o?"pointer":"default",opacity:n?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s",backgroundColor:s,color:a,border:r})},dx=V.css({display:"inline-flex",cursor:"pointer",opacity:.6,"&:hover":{opacity:1}}),nu=({label:e,color:t="neutral",size:n="md",variant:o="filled",leftElement:i,rightElement:s,disabled:r,onClick:a,onDelete:l,className:c})=>{const u=ux(o,t,r,a);return p.jsxs(L,{row:!0,alignItems:"center",gap:"var(--spacing-sm)",p:bn[n].p,h:bn[n].h,overflow:"hidden",borderRadius:bn[n].corner,onClick:a,className:V.cx(u,c),children:[a&&p.jsx(gt,{}),i,p.jsx(K,{variant:bn[n].text,colorName:wi[t].colorName,textOverflow:"ellipsis",children:e}),s,l&&!r&&p.jsx(K,{className:dx,colorName:wi[t].colorName,onClick:f=>{f.stopPropagation(),l(f)},children:p.jsx(Tc,{})})]})};nu.displayName="Badge";const fx=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),R.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),ga=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.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}),R.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"}),R.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"})),hx=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),R.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),gx=e=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"black",...e},R.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"})),mx="_hint_prca1_8",px="_md_prca1_19",vx="_sm_prca1_24",yx="_icon_prca1_29",xx="_content_prca1_40",wx="_title_prca1_46",Cx="_subtitle_prca1_50",Sx="_disabled_prca1_55",bx="_warning_prca1_60",Rx="_solid_prca1_60",_x="_negative_prca1_65",Px="_positive_prca1_70",Ex="_accent_prca1_75",Mx="_neutral_prca1_80",Tx="_soft_prca1_85",Pe={hint:mx,md:px,sm:vx,icon:yx,content:xx,title:wx,subtitle:Cx,disabled:Sx,warning:bx,solid:Rx,negative:_x,positive:Px,accent:Ex,neutral:Mx,soft:Tx},Ax={negative:p.jsx(hx,{}),positive:p.jsx(fx,{}),accent:p.jsx(ga,{}),warning:p.jsx(ga,{}),neutral:p.jsx(gx,{})},Vx=({title:e,subtitle:t,color:n="warning",variant:o="soft",size:i="md",icon:s,disabled:r=!1,className:a,style:l})=>{const c=s||Ax[n];return p.jsxs("div",{className:wt(Pe.hint,Pe[n],Pe[o],Pe[i],r&&Pe.disabled,a),style:l,"aria-disabled":r,children:[c&&p.jsx("span",{className:wt(Pe.icon,Pe[n]),children:c}),p.jsxs("div",{className:Pe.content,children:[e&&p.jsx(K,{className:wt(Pe.title,Dn(Pe,"title",i)),variant:i==="md"?"body-1":"caption-2",children:e}),t&&p.jsx(K,{className:wt(Pe.subtitle,Dn(Pe,"subtitle",i)),variant:i==="md"?"body-2":"caption-1",children:t})]})]})},kx=V.keyframes`
|
|
29
29
|
from {
|
|
30
30
|
opacity: 0;
|
|
31
31
|
}
|
|
32
32
|
to {
|
|
33
33
|
opacity: 1;
|
|
34
34
|
}
|
|
35
|
-
`,
|
|
35
|
+
`,Dx=V.css({animation:`${kx} 0.2s ease-out`,boxShadow:"0 4px 20px 0 var(--effect-shadow-s)"}),Fx=({children:e,className:t,...n})=>p.jsx(L,{relative:!0,backgroundColor:"var(--fill-bg-primary)",borderRadius:"var(--corner-md)",className:V.cx(Dx,t),...n,children:e}),Lx=({children:e,content:t,initialOpen:n=!1,open:o,onChange:i,placement:s="bottom",trigger:r="click",offset:a=12,closeOnBackdropClick:l=!0,closeOnEsc:c=!0,className:u,contentClassName:f,style:d,openDelay:h=200,closeDelay:m=200,zIndex:g=1,popoverContentComponent:y=Fx})=>{const[x,w]=C.useState(n),v=o??x,b=i??w,S=C.useCallback(P=>{l&&P.target===P.currentTarget&&b(!1)},[l,b]),{context:M,refs:A,floatingStyles:E}=ms({placement:s,open:v,onOpenChange:b,whileElementsMounted:ls,middleware:[cs(a),ds({crossAxis:s.includes("-"),fallbackAxisSideDirection:s.includes("start")?"start":"end",padding:a}),us({padding:a})]}),k=Bv(M,{enabled:r==="click"}),F=_c(M,{enabled:r==="hover",delay:{open:h,close:m}}),$=Pc(M,{enabled:c,escapeKey:!0}),N=Mc(M),j=Ec([k,F,$,N]),D=e.ref,O=bc([A.setReference,D]),B=C.cloneElement(e,j.getReferenceProps({...e.props,ref:O,"data-state":M.open?"open":"closed"}));return p.jsxs(p.Fragment,{children:[B,v&&p.jsxs(cn,{children:[r!=="hover"&&l&&p.jsx(L,{position:"fixed",top:0,right:0,bottom:0,left:0,display:"block",backgroundColor:"transparent",onClick:S,zIndex:g}),p.jsx(L,{absolute:!0,zIndex:g,className:u,ref:A.setFloating,style:{...E,...d},...j.getFloatingProps(),children:p.jsx(y,{className:f,children:t})})]})]})},ma={xs:{width:16,height:16},sm:{width:24,height:24},md:{width:32,height:32},lg:{width:40,height:40},xl:{width:48,height:48}},Ix={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)",circular:"50%"},pa=V.css({backgroundColor:"var(--status-neutral-tint)",borderRadius:"var(--corner-sm)",position:"relative",overflow:"hidden","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,background:"linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent)",transform:"translateX(-100%)"}}),jx=V.css({animation:"skeleton-pulse 1.5s ease-in-out infinite","@keyframes skeleton-pulse":{"0%":{opacity:1},"50%":{opacity:.4},"100%":{opacity:1}}}),$x=V.css({"&::before":{animation:"skeleton-wave 1.6s linear infinite"},"@keyframes skeleton-wave":{"0%":{transform:"translateX(-100%)"},"50%":{transform:"translateX(100%)"},"100%":{transform:"translateX(100%)"}}}),va=(e,t)=>{if(t!==void 0)return V.css({borderRadius:Ix[t]});switch(e){case"circular":return V.css({borderRadius:"50%"});case"text":return V.css({borderRadius:"var(--corner-xs)"});default:return V.css({borderRadius:"var(--corner-sm)"})}},ya=e=>{switch(e){case"pulse":return jx;case"wave":return $x;default:return""}},ou=({width:e,height:t,variant:n="rectangular",size:o="md",animation:i="wave",lines:s=1,className:r,children:a,loading:l=!0,borderRadius:c})=>{if(!l&&a)return p.jsx(p.Fragment,{children:a});if(!l)return null;const u=e||ma[o].width,f=t||ma[o].height;return n==="text"&&s>1?p.jsx(L,{gap:"var(--spacing-sm)",className:r,children:Array.from({length:s},(d,h)=>p.jsx(L,{className:V.cx(pa,va(n,c),ya(i)),w:h===s-1?"70%":u,h:f},h))}):p.jsx(L,{className:V.cx(pa,va(n,c),ya(i),r),w:u,h:f})};ou.displayName="Skeleton";const Ox={top:"polygon(100% 0%, 50% 100%, 0% 0%)",bottom:"polygon(0% 100%, 50% 0%, 100% 100%)","top-start":"polygon(0% 0%, 0% 100%, 100% 0%)","top-end":"polygon(100% 0%, 100% 100%, 0% 0%)","bottom-start":"polygon(0% 100%, 0% 0%, 100% 100%)","bottom-end":"polygon(100% 100%, 100% 0%, 0% 100%)",left:"polygon(0% 100%, 100% 50%, 0% 0%)",right:"polygon(100% 100%, 0% 50%, 100% 0%)"},Nx=10,Bx=6,Rn=1,xa={primary:{backgroundColor:"var(--fill-bg-primary)",color:"var(--text-primary)"},inverse:{backgroundColor:"var(--fill-bg-primary-inverse)",color:"var(--text-primary-inverse)"}},zx=(e,t)=>(e==="top"||e==="bottom")&&t?`${e}-${t}`:e,Hx=(e,t,n)=>n?(e==="top"||e==="bottom")&&t?{[e==="top"?t==="start"?"borderBottomLeftRadius":"borderBottomRightRadius":t==="start"?"borderTopLeftRadius":"borderTopRightRadius"]:0}:{}:{},Wx=(e,t,n)=>e==="left"||e==="right"?{width:6,height:n}:t?{width:8,height:6}:{width:n,height:6},Gx=(e,t,n)=>e?(t==="top"||t==="bottom")&&n?{x:n==="start"?0:void 0,y:e.y}:{x:e.x,y:e.y}:{x:void 0,y:void 0},Ux=V.keyframes`
|
|
36
36
|
from { opacity: 0; transform: translateY(2px); }
|
|
37
37
|
to { opacity: 1; transform: translateY(0); }
|
|
38
|
-
`,Kx=V.css({boxShadow:"0 4px 20px 0 var(--effect-shadow-m)",animation:`${Ux} 0.16s ease-out`,fontSize:"12px",lineHeight:"16px",fontWeight:"500",wordBreak:"break-word"}),qx=V.css({position:"absolute",clipPath:"var(--tooltip-arrow-shape)"}),iu=({color:e="primary",children:t,content:n,disabled:o=!1,initialOpen:i=!1,open:s,onChange:r,placement:a="top",trigger:l="hover",offset:c=5,showArrow:u=!0,openDelay:f=400,closeDelay:d=0,closeOnEsc:h=!0,zIndex:m=1,maxWidth:g,className:y,contentClassName:x,style:w,id:v,p:
|
|
38
|
+
`,Kx=V.css({boxShadow:"0 4px 20px 0 var(--effect-shadow-m)",animation:`${Ux} 0.16s ease-out`,fontSize:"12px",lineHeight:"16px",fontWeight:"500",wordBreak:"break-word"}),qx=V.css({position:"absolute",clipPath:"var(--tooltip-arrow-shape)"}),iu=({color:e="primary",children:t,content:n,disabled:o=!1,initialOpen:i=!1,open:s,onChange:r,placement:a="top",trigger:l="hover",offset:c=5,showArrow:u=!0,openDelay:f=400,closeDelay:d=0,closeOnEsc:h=!0,zIndex:m=1,maxWidth:g,className:y,contentClassName:x,style:w,id:v,p:b="var(--spacing-md)",borderRadius:S="var(--corner-sm)"})=>{const[M,A]=C.useState(i),[E,k]=C.useState(null),F=s??M,$=r??A,N=C.useId(),j=v??`tooltip-${N}`,D=n==null||n==="",O=!o&&!D,B=C.useCallback(no=>{O&&$(no)},[O,$]),P=c+(u?Bx:0),{context:_,refs:T,floatingStyles:I,middlewareData:q,placement:U}=ms({placement:a,open:O?F:!1,onOpenChange:B,whileElementsMounted:ls,middleware:[cs(P),ds({crossAxis:a.includes("-"),fallbackAxisSideDirection:a.includes("start")?"start":"end",padding:P}),us({padding:P}),...u&&E?[Av({element:E,padding:0})]:[]]}),X=q.arrow,te=U.split("-")[0],Y=U.includes("-")?U.split("-")[1]:null,ne=Gx(X,te,Y),le=zx(te,Y),_e=Hx(te,Y,u),fe=Wx(te,Y,Nx),je=V.css({..._e,...xa[e]}),pe=V.css({left:ne.x??void 0,top:ne.y??void 0,width:fe.width,height:fe.height,"--tooltip-arrow-shape":Ox[le],...te==="top"&&{bottom:-fe.height+Rn},...te==="bottom"&&{top:-fe.height+Rn},...te==="left"&&{right:-fe.width+Rn},...te==="right"&&{left:-fe.width+Rn},...Y==="end"&&(te==="top"||te==="bottom")&&{left:"auto",right:0},...xa[e]}),z=_c(_,{enabled:l==="hover"&&O,delay:{open:f,close:d},move:!1}),J=Gv(_,{enabled:l==="hover"&&O}),re=Pc(_,{enabled:h&&O,escapeKey:!0}),he=Mc(_,{role:"tooltip"}),ve=Ec([z,J,re,he]),un=t.ref,pt=bc([T.setReference,un]),dn=C.useMemo(()=>C.cloneElement(t,ve.getReferenceProps({...t.props,ref:pt,"data-state":_.open?"open":"closed",..._.open?{"aria-describedby":j}:{}})),[t,ve,_.open,j,pt]);return p.jsxs(p.Fragment,{children:[dn,O&&F&&p.jsx(cn,{children:p.jsx(L,{absolute:!0,zIndex:m,className:y,ref:T.setFloating,style:{...I,...w},...ve.getFloatingProps({id:j}),children:p.jsxs(L,{relative:!0,maxWidth:g,p:b,borderRadius:S,className:V.cx(Kx,je,x),children:[u&&p.jsx(L,{ref:k,className:V.cx(qx,pe)}),typeof n=="string"?p.jsx(K,{colorName:e,variant:"caption-1",fontWeight:"medium",children:n}):n]})})})]})};iu.displayName="Tooltip";const Xx=C.createContext(null);function Yx({children:e,locale:t}){return p.jsx(Xx.Provider,{value:t||null,children:e})}const Zx="_themeProviderScoped_wp43s_9",Jx={themeProviderScoped:Zx};function Qx({className:e,children:t,theme:n}){const o=C.useRef(null);return p.jsx(Ic.Provider,{value:o,children:p.jsx("div",{ref:o,className:wt(Jx.themeProviderScoped,e),id:"theme-provider-scoped","data-theme":n,children:t})})}exports.AnimatedText=sc;exports.Avatar=tu;exports.Badge=nu;exports.Box=L;exports.Breadcrumbs=ax;exports.Button=ci;exports.Checkbox=ns;exports.Hint=Vx;exports.IconButton=Xt;exports.Input=rc;exports.LineChart=Qc;exports.Loader=Ca;exports.Modal=eo;exports.OtpInput=ac;exports.PieProgressChart=eu;exports.Popover=Lx;exports.Portal=cn;exports.Radio=cc;exports.RadioGroup=uc;exports.Ripple=gt;exports.SegmentControl=mp;exports.Select=Ac;exports.Skeleton=ou;exports.Switch=Vc;exports.Table=Ot;exports.Tabs=kc;exports.Tag=ps;exports.Text=K;exports.ThemeProviderScoped=Qx;exports.Tooltip=iu;exports.UiKitLocaleProvider=Yx;exports.createColumnHelper=jc;exports.getSizeClass=Dn;exports.getStyleClass=Si;exports.useControlled=mt;
|
|
39
39
|
//# sourceMappingURL=ui-kit.cjs.js.map
|