@dss-kit/ui-kit 0.2.15 → 0.2.16
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/dist/components/builders/Box/Box.d.ts +2 -0
- package/dist/components/builders/Box/Box.d.ts.map +1 -1
- package/dist/components/builders/Text/Text.d.ts +2 -2
- package/dist/components/charts/LineChart/LineChart.d.ts +3 -2
- package/dist/components/charts/LineChart/LineChart.d.ts.map +1 -1
- package/dist/components/charts/LineChart/LineChart.stories.d.ts +3 -1
- package/dist/components/charts/LineChart/LineChart.stories.d.ts.map +1 -1
- package/dist/components/charts/LineChart/constants.d.ts.map +1 -1
- package/dist/components/charts/LineChart/types.d.ts +56 -13
- package/dist/components/charts/LineChart/types.d.ts.map +1 -1
- package/dist/components/charts/LineChart/utils.d.ts +3 -1
- package/dist/components/charts/LineChart/utils.d.ts.map +1 -1
- package/dist/components/charts/PieProgressChart/PieProgressChart.d.ts +2 -1
- package/dist/components/charts/PieProgressChart/PieProgressChart.d.ts.map +1 -1
- package/dist/components/controls/RadioGroup/Radio.d.ts +93 -0
- package/dist/components/controls/RadioGroup/Radio.d.ts.map +1 -0
- package/dist/components/controls/RadioGroup/RadioGroup.d.ts +116 -0
- package/dist/components/controls/RadioGroup/RadioGroup.d.ts.map +1 -0
- package/dist/components/controls/RadioGroup/RadioGroup.stories.d.ts +16 -0
- package/dist/components/controls/RadioGroup/RadioGroup.stories.d.ts.map +1 -0
- package/dist/components/controls/RadioGroup/context.d.ts +87 -0
- package/dist/components/controls/RadioGroup/context.d.ts.map +1 -0
- package/dist/components/controls/RadioGroup/index.d.ts +3 -0
- package/dist/components/controls/RadioGroup/index.d.ts.map +1 -0
- package/dist/components/controls/index.d.ts +1 -0
- package/dist/components/controls/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/shared/Tooltip/Tooltip.d.ts +133 -0
- package/dist/components/shared/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/components/shared/Tooltip/Tooltip.stories.d.ts +34 -0
- package/dist/components/shared/Tooltip/Tooltip.stories.d.ts.map +1 -0
- package/dist/components/shared/Tooltip/constants.d.ts +14 -0
- package/dist/components/shared/Tooltip/constants.d.ts.map +1 -0
- package/dist/components/shared/Tooltip/index.d.ts +3 -0
- package/dist/components/shared/Tooltip/index.d.ts.map +1 -0
- package/dist/components/shared/Tooltip/types.d.ts +16 -0
- package/dist/components/shared/Tooltip/types.d.ts.map +1 -0
- package/dist/components/shared/Tooltip/utils.d.ts +14 -0
- package/dist/components/shared/Tooltip/utils.d.ts.map +1 -0
- package/dist/components/shared/index.d.ts +1 -0
- package/dist/components/shared/index.d.ts.map +1 -1
- package/dist/root.css +1 -1
- package/dist/ui-kit.cjs.js +11 -30
- package/dist/ui-kit.cjs.js.map +1 -1
- package/dist/ui-kit.css +1 -1
- package/dist/ui-kit.es.js +4476 -3700
- package/dist/ui-kit.es.js.map +1 -1
- package/package.json +7 -7
package/dist/ui-kit.cjs.js
CHANGED
|
@@ -1,40 +1,18 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),k=require("@emotion/css"),C=require("react"),fs=require("react-dom");function Zr(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 b=Zr(C),Vc=Zr(fs);function Ac(e){const{h:t,w:n,m:o,mx:s,my:i,mt:r,mr:a,mb:l,ml:c,p:u,px:d,py:f,pt:h,pr:m,pb:g,pl:p,gap:w,xGap:x,yGap:v,row:S,flex:_,relative:P,absolute:V,display:M,overflow:A,absoluteFill:F,center:$,justifyContent:z,alignItems:O,alignSelf:D,borderWidth:B,borderBottomWidth:N,borderColor:E,borderRadius:R,zIndex:T,minWidth:L,minHeight:Y,maxWidth:U,maxHeight:q,flexWrap:me,flexGrow:J,flexShrink:se,flexBasis:j,backgroundColor:Z,position:ie,top:he,right:ce,bottom:Ge,left:At,...Dt}=e;return{spacers:{h:t,w:n,m:o,mx:s,my:i,mt:r,mr:a,mb:l,ml:c,p:u,px:d,py:f,pt:h,pr:m,pb:g,pl:p,gap:w,xGap:x,yGap:v,row:S,flex:_,relative:P,absolute:V,display:M,overflow:A,absoluteFill:F,center:$,justifyContent:z,alignItems:O,alignSelf:D,borderWidth:B,borderBottomWidth:N,borderColor:E,borderRadius:R,zIndex:T,minWidth:L,minHeight:Y,maxWidth:U,maxHeight:q,flexWrap:me,flexGrow:J,flexShrink:se,flexBasis:j,backgroundColor:Z,position:ie,top:he,right:ce,bottom:Ge,left:At},rest:Dt}}const Dc=e=>k.css({display:e.display??"flex",flexDirection:e.row?"row":"column",height:e.h==="screen"?"100vh":e.h==="full"?"100%":e.h,width:e.w==="screen"?"100vw":e.w==="full"?"100%":e.w,margin:e.m,marginTop:e.mt??e.my,marginBottom:e.mb??e.my,marginLeft:e.ml??e.mx,marginRight:e.mr??e.mx,padding:e.p,paddingTop:e.pt??e.py,paddingBottom:e.pb??e.py,paddingLeft:e.pl??e.px,paddingRight:e.pr??e.px,gap:e.gap,columnGap:e.xGap,rowGap:e.yGap,justifyContent:e.center?"center":e.justifyContent,alignItems:e.center?"center":e.alignItems,alignSelf:e.alignSelf,borderWidth:e.borderWidth,borderBottomWidth:e.borderBottomWidth,borderColor:e.borderColor,borderRadius:e.borderRadius,zIndex:e.zIndex,overflow:e.overflow,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,flex:e.flex===!0?1:e.flex,flexWrap:e.flexWrap,flexGrow:e.flexGrow,flexShrink:e.flexShrink,flexBasis:e.flexBasis,backgroundColor:e.backgroundColor,position:e?.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}),I=C.forwardRef(({className:e,children:t,...n},o)=>{const{spacers:s,rest:i}=Ac(n),r=C.useMemo(()=>Dc(s),[s]);return y.jsx("div",{ref:o,className:k.cx(r,e),...i,children:t})});I.displayName="Box";const kc="_loader_1qleq_8",Fc={loader:kc},Jr=({color:e="var(--text-accent)"})=>y.jsx("span",{className:k.cx(Fc.loader,k.css({"--loader-color":e}))}),Qr=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));function Lc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qn={exports:{}};/*!
|
|
2
|
-
Copyright (c) 2018 Jed Watson.
|
|
3
|
-
Licensed under the MIT License (MIT), see
|
|
4
|
-
http://jedwatson.github.io/classnames
|
|
5
|
-
*/var ri;function Ic(){return ri||(ri=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",r=0;r<arguments.length;r++){var a=arguments[r];a&&(i=s(i,o(a)))}return i}function o(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var r="";for(var a in i)t.call(i,a)&&i[a]&&(r=s(r,a));return r}function s(i,r){return r?i?i+" "+r:i+r:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Qn)),Qn.exports}var jc=Ic();const ot=Lc(jc),$c="_rippleOverlay_s2kim_8",Oc="_ripple_s2kim_8",ai={rippleOverlay:$c,ripple:Oc},eo="button, a, input, label, [role='button'], [data-ripple]";function Nc(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 ct=C.forwardRef(({color:e="rgba(0,0,0,0.18)",duration:t=1e3,radius:n="auto",className:o},s)=>{const i=C.useRef(null),[r,a]=C.useState([]),l=C.useRef([]),c=C.useRef(1),u=C.useRef(null),d=()=>{l.current.map(g=>clearTimeout(g)),l.current=[]},f=C.useCallback((g,p,w,x)=>{if(typeof window>"u")return;const v=w.getBoundingClientRect(),S=n==="auto"?Math.max(v.width,v.height)*2:n,_=g-x.left,P=p-x.top,V=Math.max(0,v.top-x.top),M=Math.max(0,v.left-x.left),A=Math.max(0,x.right-v.right),F=Math.max(0,x.bottom-v.bottom),z=window.getComputedStyle(w).borderRadius||"0px",O=c.current++,D={id:O,left:_-S/2,top:P-S/2,size:Math.ceil(S),clip:{top:Math.round(V),right:Math.round(A),bottom:Math.round(F),left:Math.round(M)},borderRadius:z};a(N=>[...N,D]);const B=window.setTimeout(()=>{a(N=>N.filter(E=>E.id!==O))},t+80);l.current.push(B)},[t,n]),h=C.useCallback(g=>{try{if(!i.current)return;const p=i.current,w=p.parentElement;if(!w)return;const x=Nc(g);let v=null;for(const M of x)if(M instanceof Element){if(M===w)break;if(M.matches&&M.matches(eo)){v=M;break}}if(v||(v=w),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 _=p.getBoundingClientRect(),{clientX:P}=g,{clientY:V}=g;f(P,V,v,_)}catch{}},[f]),m=C.useCallback(g=>{if(!i.current||!(g.key==="Enter"||g.key===" "))return;const p=i.current,w=p.parentElement;if(!w)return;const x=document.activeElement;let v=null;if(x instanceof Element&&x.matches(eo)&&(v=x),v||(v=w),v.closest&&(v.closest("[disabled]")||v.getAttribute("aria-disabled")==="true"))return;const S=p.getBoundingClientRect(),_=v.getBoundingClientRect().left+v.getBoundingClientRect().width/2,P=v.getBoundingClientRect().top+v.getBoundingClientRect().height/2;f(_,P,v,S)},[f]);return C.useImperativeHandle(s,()=>({trigger:({center:g=!0,x:p,y:w}={})=>{const x=i.current;if(!x)return;const v=x.parentElement;if(!v)return;const S=x.getBoundingClientRect(),_=document.activeElement instanceof Element&&document.activeElement.matches(eo)?document.activeElement:v,P=g?_.getBoundingClientRect().left+_.getBoundingClientRect().width/2:p??S.left+S.width/2,V=g?_.getBoundingClientRect().top+_.getBoundingClientRect().height/2:w??S.top+S.height/2;f(P,V,_,S)}}),[f]),C.useEffect(()=>{const g=i.current;if(!g)return;const p=g.parentElement;if(!p||typeof window>"u")return;const w=window.getComputedStyle(p);let x=!1;return w.position==="static"&&(p.style.position="relative",x=!0,u.current=p),p.addEventListener("pointerdown",h,!0),p.addEventListener("keydown",m),()=>{p.removeEventListener("pointerdown",h,!0),p.removeEventListener("keydown",m),x&&u.current&&(u.current.style.position="",u.current=null),d()}},[h,m]),C.useEffect(()=>()=>d(),[]),y.jsx("div",{ref:i,className:`${ai.rippleOverlay} ${o??""}`,"aria-hidden":!0,children:r.map(g=>y.jsx("span",{className:ai.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 Jt(e,t){const{current:n}=C.useRef(e!==void 0),[o,s]=C.useState(t),i=n?e:o,r=C.useCallback(a=>{n||s(a)},[]);return[i,r]}function In(e,t,n,o=""){if(n)return e[`${t}_${n}${o}`]}function Ht(e,t,n){return In(e,t,n,"Size")}const Bc="_button_11ykb_8",zc="_button_primary_11ykb_19",Hc="_button_secondary_11ykb_22",Wc="_button_negative_11ykb_25",Gc="_button_positive_11ykb_28",Uc="_button_warning_11ykb_31",Kc="_button_neutral_11ykb_34",qc="_button_mdSize_11ykb_118",Xc="_button_smSize_11ykb_128",Yc="_button_xsSize_11ykb_138",to={button:Bc,button_primary:zc,button_secondary:Hc,button_negative:Wc,button_positive:Gc,button_warning:Uc,button_neutral:Kc,"button_neutral-white":"_button_neutral-white_11ykb_37","button_no-bg":"_button_no-bg_11ykb_40",button_mdSize:qc,button_smSize:Xc,button_xsSize:Yc};function Wt({attr:e,children:t,className:n,type:o="button",color:s="primary",size:i="md",...r}){const a="button";return y.jsxs("button",{...e,...r,type:o,className:ot(to[a],n,Ht(to,a,i),In(to,a,s)),children:[y.jsx(ct,{}),t]})}const ea=C.createContext({isOpen:!1,onClose:()=>{}}),Zc=()=>C.useContext(ea),Jc="_overlay_1gnp0_8",Qc="_modal_1gnp0_12",eu="_closeButton_1gnp0_28",tu="_size_lg_1gnp0_35",nu="_size_md_1gnp0_38",ou="_size_sm_1gnp0_41",an={overlay:Jc,modal:Qc,"modal-animation":"_modal-animation_1gnp0_1",closeButton:eu,size_lg:tu,size_md:nu,size_sm:ou},ta=C.forwardRef(({isOpen:e,onClose:t,overlayClassName:n,modalClassName:o,size:s="md",closeOnBackdropClick:i=!0,closeOnEsc:r=!0,disableBodyScroll:a=!0,showAbsoluteCloseButton:l=!1,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 d=C.useCallback(h=>{h.key==="Escape"&&t()},[t]);C.useEffect(()=>{if(typeof window<"u"&&typeof document<"u"&&r&&e)return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[e,r,d]);const f=C.useCallback(h=>{i&&h.target===h.currentTarget&&t()},[i,t]);return e?y.jsx(qn,{children:y.jsx(ea.Provider,{value:{isOpen:e,onClose:t},children:y.jsx(I,{position:"fixed",top:0,right:0,bottom:0,left:0,row:!0,center:!0,flex:1,onClick:f,backgroundColor:"var(--fill-bg-overlay-primary)",className:k.cx(an.overlay,n),zIndex:1,children:y.jsxs(I,{ref:u,className:k.cx(an.modal,an[`size_${s}`],o),relative:!0,children:[l&&y.jsx(Wt,{className:an.closeButton,onClick:t,color:"neutral",children:y.jsx(Qr,{})}),c]})})})}):null});ta.displayName="Modal";const su="_footer_1bo08_8",iu={footer:su},na=C.forwardRef(({children:e,row:t=!0,flex:n=!0,gap:o="var(--spacing-lg)",p:s="var(--spacing-2xl)",className:i,...r},a)=>y.jsx(I,{flex:n,row:t,gap:o,p:s,className:k.cx(iu.footer,i),ref:a,...r,children:e}));na.displayName="ModalFooter";const hs=C.createContext({});function gs(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const ms=typeof window<"u",oa=ms?C.useLayoutEffect:C.useEffect,jn=C.createContext(null);function ps(e,t){e.indexOf(t)===-1&&e.push(t)}function vs(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Be=(e,t,n)=>n>t?t:n<e?e:n;function Do(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Rt=()=>{},ze=()=>{};process.env.NODE_ENV!=="production"&&(Rt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Do(t,n))},ze=(e,t,n)=>{if(!e)throw new Error(Do(t,n))});const He={},sa=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ia(e){return typeof e=="object"&&e!==null}const ra=e=>/^0[^.\s]+$/u.test(e);function ys(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ee=e=>e,ru=(e,t)=>n=>t(e(n)),Qt=(...e)=>e.reduce(ru),Gt=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o};class ws{constructor(){this.subscriptions=[]}add(t){return ps(this.subscriptions,t),()=>vs(this.subscriptions,t)}notify(t,n,o){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,o);else for(let i=0;i<s;i++){const r=this.subscriptions[i];r&&r(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ae=e=>e*1e3,Re=e=>e/1e3;function aa(e,t){return t?e*(1e3/t):0}const li=new Set;function xs(e,t,n){e||li.has(t)||(console.warn(Do(t,n)),li.add(t))}const la=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,au=1e-7,lu=12;function cu(e,t,n,o,s){let i,r,a=0;do r=t+(n-t)/2,i=la(r,o,s)-e,i>0?n=r:t=r;while(Math.abs(i)>au&&++a<lu);return r}function en(e,t,n,o){if(e===t&&n===o)return Ee;const s=i=>cu(i,0,1,e,n);return i=>i===0||i===1?i:la(s(i),t,o)}const ca=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ua=e=>t=>1-e(1-t),da=en(.33,1.53,.69,.99),Cs=ua(da),fa=ca(Cs),ha=e=>(e*=2)<1?.5*Cs(e):.5*(2-Math.pow(2,-10*(e-1))),Ss=e=>1-Math.sin(Math.acos(e)),ga=ua(Ss),ma=ca(Ss),uu=en(.42,0,1,1),du=en(0,0,.58,1),pa=en(.42,0,.58,1),fu=e=>Array.isArray(e)&&typeof e[0]!="number",va=e=>Array.isArray(e)&&typeof e[0]=="number",ci={linear:Ee,easeIn:uu,easeInOut:pa,easeOut:du,circIn:Ss,circInOut:ma,circOut:ga,backIn:Cs,backInOut:fa,backOut:da,anticipate:ha},hu=e=>typeof e=="string",ui=e=>{if(va(e)){ze(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,o,s]=e;return en(t,n,o,s)}else if(hu(e))return ze(ci[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),ci[e];return e},ln=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function gu(e,t){let n=new Set,o=new Set,s=!1,i=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){r.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const m=f&&s?n:o;return d&&r.add(u),m.has(u)||m.add(u),u},cancel:u=>{o.delete(u),r.delete(u)},process:u=>{if(a=u,s){i=!0;return}s=!0,[n,o]=[o,n],n.forEach(l),n.clear(),s=!1,i&&(i=!1,c.process(u))}};return c}const mu=40;function ya(e,t){let n=!1,o=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,r=ln.reduce((v,S)=>(v[S]=gu(i),v),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:m}=r,g=()=>{const v=He.useManualTiming?s.timestamp:performance.now();n=!1,He.useManualTiming||(s.delta=o?1e3/60:Math.max(Math.min(v-s.timestamp,mu),1)),s.timestamp=v,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),d.process(s),f.process(s),h.process(s),m.process(s),s.isProcessing=!1,n&&t&&(o=!1,e(g))},p=()=>{n=!0,o=!0,s.isProcessing||e(g)};return{schedule:ln.reduce((v,S)=>{const _=r[S];return v[S]=(P,V=!1,M=!1)=>(n||p(),_.schedule(P,V,M)),v},{}),cancel:v=>{for(let S=0;S<ln.length;S++)r[ln[S]].cancel(v)},state:s,steps:r}}const{schedule:te,cancel:Ye,state:ue,steps:no}=ya(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ee,!0);let xn;function pu(){xn=void 0}const ve={now:()=>(xn===void 0&&ve.set(ue.isProcessing||He.useManualTiming?ue.timestamp:performance.now()),xn),set:e=>{xn=e,queueMicrotask(pu)}},wa=e=>t=>typeof t=="string"&&t.startsWith(e),bs=wa("--"),vu=wa("var(--"),_s=e=>vu(e)?yu.test(e.split("/*")[0].trim()):!1,yu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Et={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ut={...Et,transform:e=>Be(0,1,e)},cn={...Et,default:1},$t=e=>Math.round(e*1e5)/1e5,Rs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function wu(e){return e==null}const xu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Es=(e,t)=>n=>!!(typeof n=="string"&&xu.test(n)&&n.startsWith(e)||t&&!wu(n)&&Object.prototype.hasOwnProperty.call(n,t)),xa=(e,t,n)=>o=>{if(typeof o!="string")return o;const[s,i,r,a]=o.match(Rs);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Cu=e=>Be(0,255,e),oo={...Et,transform:e=>Math.round(Cu(e))},st={test:Es("rgb","red"),parse:xa("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+oo.transform(e)+", "+oo.transform(t)+", "+oo.transform(n)+", "+$t(Ut.transform(o))+")"};function Su(e){let t="",n="",o="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,o+=o,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:s?parseInt(s,16)/255:1}}const ko={test:Es("#"),parse:Su,transform:st.transform},tn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ke=tn("deg"),Fe=tn("%"),G=tn("px"),bu=tn("vh"),_u=tn("vw"),di={...Fe,parse:e=>Fe.parse(e)/100,transform:e=>Fe.transform(e*100)},ft={test:Es("hsl","hue"),parse:xa("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+Fe.transform($t(t))+", "+Fe.transform($t(n))+", "+$t(Ut.transform(o))+")"},ae={test:e=>st.test(e)||ko.test(e)||ft.test(e),parse:e=>st.test(e)?st.parse(e):ft.test(e)?ft.parse(e):ko.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?st.transform(e):ft.transform(e),getAnimatableNone:e=>{const t=ae.parse(e);return t.alpha=0,ae.transform(t)}},Ru=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Eu(e){return isNaN(e)&&typeof e=="string"&&(e.match(Rs)?.length||0)+(e.match(Ru)?.length||0)>0}const Ca="number",Sa="color",Mu="var",Pu="var(",fi="${}",Tu=/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 Kt(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(Tu,l=>(ae.test(l)?(o.color.push(i),s.push(Sa),n.push(ae.parse(l))):l.startsWith(Pu)?(o.var.push(i),s.push(Mu),n.push(l)):(o.number.push(i),s.push(Ca),n.push(parseFloat(l))),++i,fi)).split(fi);return{values:n,split:a,indexes:o,types:s}}function ba(e){return Kt(e).values}function _a(e){const{split:t,types:n}=Kt(e),o=t.length;return s=>{let i="";for(let r=0;r<o;r++)if(i+=t[r],s[r]!==void 0){const a=n[r];a===Ca?i+=$t(s[r]):a===Sa?i+=ae.transform(s[r]):i+=s[r]}return i}}const Vu=e=>typeof e=="number"?0:ae.test(e)?ae.getAnimatableNone(e):e;function Au(e){const t=ba(e);return _a(e)(t.map(Vu))}const Ze={test:Eu,parse:ba,createTransformer:_a,getAnimatableNone:Au};function so(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 Du({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let s=0,i=0,r=0;if(!t)s=i=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=so(l,a,e+1/3),i=so(l,a,e),r=so(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(r*255),alpha:o}}function Mn(e,t){return n=>n>0?t:e}const oe=(e,t,n)=>e+(t-e)*n,io=(e,t,n)=>{const o=e*e,s=n*(t*t-o)+o;return s<0?0:Math.sqrt(s)},ku=[ko,st,ft],Fu=e=>ku.find(t=>t.test(e));function hi(e){const t=Fu(e);if(Rt(!!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===ft&&(n=Du(n)),n}const gi=(e,t)=>{const n=hi(e),o=hi(t);if(!n||!o)return Mn(e,t);const s={...n};return i=>(s.red=io(n.red,o.red,i),s.green=io(n.green,o.green,i),s.blue=io(n.blue,o.blue,i),s.alpha=oe(n.alpha,o.alpha,i),st.transform(s))},Fo=new Set(["none","hidden"]);function Lu(e,t){return Fo.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Iu(e,t){return n=>oe(e,t,n)}function Ms(e){return typeof e=="number"?Iu:typeof e=="string"?_s(e)?Mn:ae.test(e)?gi:Ou:Array.isArray(e)?Ra:typeof e=="object"?ae.test(e)?gi:ju:Mn}function Ra(e,t){const n=[...e],o=n.length,s=e.map((i,r)=>Ms(i)(i,t[r]));return i=>{for(let r=0;r<o;r++)n[r]=s[r](i);return n}}function ju(e,t){const n={...e,...t},o={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(o[s]=Ms(e[s])(e[s],t[s]));return s=>{for(const i in o)n[i]=o[i](s);return n}}function $u(e,t){const n=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],r=e.indexes[i][o[i]],a=e.values[r]??0;n[s]=a,o[i]++}return n}const Ou=(e,t)=>{const n=Ze.createTransformer(t),o=Kt(e),s=Kt(t);return o.indexes.var.length===s.indexes.var.length&&o.indexes.color.length===s.indexes.color.length&&o.indexes.number.length>=s.indexes.number.length?Fo.has(e)&&!s.values.length||Fo.has(t)&&!o.values.length?Lu(e,t):Qt(Ra($u(o,s),s.values),n):(Rt(!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"),Mn(e,t))};function Ea(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?oe(e,t,n):Ms(e)(e,t)}const Nu=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>te.update(t,n),stop:()=>Ye(t),now:()=>ue.isProcessing?ue.timestamp:ve.now()}},Ma=(e,t,n=10)=>{let o="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)o+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},Pn=2e4;function Ps(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<Pn;)t+=n,o=e.next(t);return t>=Pn?1/0:t}function Bu(e,t=100,n){const o=n({...e,keyframes:[0,t]}),s=Math.min(Ps(o),Pn);return{type:"keyframes",ease:i=>o.next(s*i).value/t,duration:Re(s)}}const zu=5;function Pa(e,t,n){const o=Math.max(t-zu,0);return aa(n-e(o),t-o)}const ne={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},ro=.001;function Hu({duration:e=ne.duration,bounce:t=ne.bounce,velocity:n=ne.velocity,mass:o=ne.mass}){let s,i;Rt(e<=Ae(ne.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=Be(ne.minDamping,ne.maxDamping,r),e=Be(ne.minDuration,ne.maxDuration,Re(e)),r<1?(s=c=>{const u=c*r,d=u*e,f=u-n,h=Lo(c,r),m=Math.exp(-d);return ro-f/h*m},i=c=>{const d=c*r*e,f=d*n+n,h=Math.pow(r,2)*Math.pow(c,2)*e,m=Math.exp(-d),g=Lo(Math.pow(c,2),r);return(-s(c)+ro>0?-1:1)*((f-h)*m)/g}):(s=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-ro+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=Gu(s,i,a);if(e=Ae(e),isNaN(l))return{stiffness:ne.stiffness,damping:ne.damping,duration:e};{const c=Math.pow(l,2)*o;return{stiffness:c,damping:r*2*Math.sqrt(o*c),duration:e}}}const Wu=12;function Gu(e,t,n){let o=n;for(let s=1;s<Wu;s++)o=o-e(o)/t(o);return o}function Lo(e,t){return e*Math.sqrt(1-t*t)}const Uu=["duration","bounce"],Ku=["stiffness","damping","mass"];function mi(e,t){return t.some(n=>e[n]!==void 0)}function qu(e){let t={velocity:ne.velocity,stiffness:ne.stiffness,damping:ne.damping,mass:ne.mass,isResolvedFromDuration:!1,...e};if(!mi(e,Ku)&&mi(e,Uu))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),s=o*o,i=2*Be(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:ne.mass,stiffness:s,damping:i}}else{const n=Hu(e);t={...t,...n,mass:ne.mass},t.isResolvedFromDuration=!0}return t}function Tn(e=ne.visualDuration,t=ne.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:s}=n;const i=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=qu({...n,velocity:-Re(n.velocity||0)}),m=f||0,g=c/(2*Math.sqrt(l*u)),p=r-i,w=Re(Math.sqrt(l/u)),x=Math.abs(p)<5;o||(o=x?ne.restSpeed.granular:ne.restSpeed.default),s||(s=x?ne.restDelta.granular:ne.restDelta.default);let v;if(g<1){const _=Lo(w,g);v=P=>{const V=Math.exp(-g*w*P);return r-V*((m+g*w*p)/_*Math.sin(_*P)+p*Math.cos(_*P))}}else if(g===1)v=_=>r-Math.exp(-w*_)*(p+(m+w*p)*_);else{const _=w*Math.sqrt(g*g-1);v=P=>{const V=Math.exp(-g*w*P),M=Math.min(_*P,300);return r-V*((m+g*w*p)*Math.sinh(M)+_*p*Math.cosh(M))/_}}const S={calculatedDuration:h&&d||null,next:_=>{const P=v(_);if(h)a.done=_>=d;else{let V=_===0?m:0;g<1&&(V=_===0?Ae(m):Pa(v,_,P));const M=Math.abs(V)<=o,A=Math.abs(r-P)<=s;a.done=M&&A}return a.value=a.done?r:P,a},toString:()=>{const _=Math.min(Ps(S),Pn),P=Ma(V=>S.next(_*V).value,_,30);return _+"ms "+P},toTransition:()=>{}};return S}Tn.applyToOptions=e=>{const t=Bu(e,100,Tn);return e.ease=t.ease,e.duration=Ae(t.duration),e.type="keyframes",e};function Io({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=M=>a!==void 0&&M<a||l!==void 0&&M>l,m=M=>a===void 0?l:l===void 0||Math.abs(a-M)<Math.abs(l-M)?a:l;let g=n*t;const p=d+g,w=r===void 0?p:r(p);w!==p&&(g=w-d);const x=M=>-g*Math.exp(-M/o),v=M=>w+x(M),S=M=>{const A=x(M),F=v(M);f.done=Math.abs(A)<=c,f.value=f.done?w:F};let _,P;const V=M=>{h(f.value)&&(_=M,P=Tn({keyframes:[f.value,m(f.value)],velocity:Pa(v,M,f.value),damping:s,stiffness:i,restDelta:c,restSpeed:u}))};return V(0),{calculatedDuration:null,next:M=>{let A=!1;return!P&&_===void 0&&(A=!0,S(M),V(M)),_!==void 0&&M>=_?P.next(M-_):(!A&&S(M),f)}}}function Xu(e,t,n){const o=[],s=n||He.mix||Ea,i=e.length-1;for(let r=0;r<i;r++){let a=s(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||Ee:t;a=Qt(l,a)}o.push(a)}return o}function Yu(e,t,{clamp:n=!0,ease:o,mixer:s}={}){const i=e.length;if(ze(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Xu(t,o,s),l=a.length,c=u=>{if(r&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Gt(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Be(e[0],e[i-1],u)):c}function Zu(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const s=Gt(0,t,o);e.push(oe(n,1,s))}}function Ju(e){const t=[0];return Zu(t,e.length-1),t}function Qu(e,t){return e.map(n=>n*t)}function ed(e,t){return e.map(()=>t||pa).splice(0,e.length-1)}function ht({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const s=fu(o)?o.map(ui):ui(o),i={done:!1,value:t[0]},r=Qu(n&&n.length===t.length?n:Ju(t),e),a=Yu(r,t,{ease:Array.isArray(s)?s:ed(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const td=e=>e!==null;function Ts(e,{repeat:t,repeatType:n="loop"},o,s=1){const i=e.filter(td),a=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||o===void 0?i[a]:o}const nd={decay:Io,inertia:Io,tween:ht,keyframes:ht,spring:Tn};function Ta(e){typeof e.type=="string"&&(e.type=nd[e.type])}class Vs{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 od=e=>e/100;class As extends Vs{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!==ve.now()&&this.tick(ve.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;Ta(t);const{type:n=ht,repeat:o=0,repeatDelay:s=0,repeatType:i,velocity:r=0}=t;let{keyframes:a}=t;const l=n||ht;process.env.NODE_ENV!=="production"&&l!==ht&&ze(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==ht&&typeof a[0]!="number"&&(this.mixKeyframes=Qt(od,Ea(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=Ps(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(o+1)-s,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:o,totalDuration:s,mixKeyframes:i,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return o.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:h,type:m,onUpdate:g,finalKeyframe:p}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-c*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?w<0:w>s;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let v=this.currentTime,S=o;if(d){const M=Math.min(this.currentTime,s)/a;let A=Math.floor(M),F=M%1;!F&&M>=1&&(F=1),F===1&&A--,A=Math.min(A,d+1),!!(A%2)&&(f==="reverse"?(F=1-F,h&&(F-=h/a)):f==="mirror"&&(S=r)),v=Be(0,1,F)*a}const _=x?{done:!1,value:u[0]}:S.next(v);i&&(_.value=i(_.value));let{done:P}=_;!x&&l!==null&&(P=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return V&&m!==Io&&(_.value=Ts(u,this.options,p,this.speed)),g&&g(_.value),V&&this.finish(),_}then(t,n){return this.finished.then(t,n)}get duration(){return Re(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Re(t)}get time(){return Re(this.currentTime)}set time(t){t=Ae(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(ve.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Re(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Nu,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),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(ve.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 sd(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const it=e=>e*180/Math.PI,jo=e=>{const t=it(Math.atan2(e[1],e[0]));return $o(t)},id={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:jo,rotateZ:jo,skewX:e=>it(Math.atan(e[1])),skewY:e=>it(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},$o=e=>(e=e%360,e<0&&(e+=360),e),pi=jo,vi=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),yi=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),rd={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:vi,scaleY:yi,scale:e=>(vi(e)+yi(e))/2,rotateX:e=>$o(it(Math.atan2(e[6],e[5]))),rotateY:e=>$o(it(Math.atan2(-e[2],e[0]))),rotateZ:pi,rotate:pi,skewX:e=>it(Math.atan(e[4])),skewY:e=>it(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Oo(e){return e.includes("scale")?1:0}function No(e,t){if(!e||e==="none")return Oo(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,s;if(n)o=rd,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=id,s=a}if(!s)return Oo(t);const i=o[t],r=s[1].split(",").map(ld);return typeof i=="function"?i(r):r[i]}const ad=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return No(n,t)};function ld(e){return parseFloat(e.trim())}const Mt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Pt=new Set(Mt),wi=e=>e===Et||e===G,cd=new Set(["x","y","z"]),ud=Mt.filter(e=>!cd.has(e));function dd(e){const t=[];return ud.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const rt={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})=>No(t,"x"),y:(e,{transform:t})=>No(t,"y")};rt.translateX=rt.x;rt.translateY=rt.y;const at=new Set;let Bo=!1,zo=!1,Ho=!1;function Va(){if(zo){const e=Array.from(at).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const s=dd(o);s.length&&(n.set(o,s),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const s=n.get(o);s&&s.forEach(([i,r])=>{o.getValue(i)?.set(r)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}zo=!1,Bo=!1,at.forEach(e=>e.complete(Ho)),at.clear()}function Aa(){at.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(zo=!0)})}function fd(){Ho=!0,Aa(),Va(),Ho=!1}class Ds{constructor(t,n,o,s,i,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=s,this.element=i,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(at.add(this),Bo||(Bo=!0,te.read(Aa),te.resolveKeyframes(Va))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:s}=this;if(t[0]===null){const i=s?.get(),r=t[t.length-1];if(i!==void 0)t[0]=i;else if(o&&n){const a=o.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),s&&i===void 0&&s.set(t[0])}sd(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),at.delete(this)}cancel(){this.state==="scheduled"&&(at.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const hd=e=>e.startsWith("--");function gd(e,t,n){hd(t)?e.style.setProperty(t,n):e.style[t]=n}const md=ys(()=>window.ScrollTimeline!==void 0),pd={};function vd(e,t){const n=ys(e);return()=>pd[t]??n()}const Da=vd(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),jt=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,xi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:jt([0,.65,.55,1]),circOut:jt([.55,0,1,.45]),backIn:jt([.31,.01,.66,-.59]),backOut:jt([.33,1.53,.69,.99])};function ka(e,t){if(e)return typeof e=="function"?Da()?Ma(e,t):"ease-out":va(e)?jt(e):Array.isArray(e)?e.map(n=>ka(n,t)||xi.easeOut):xi[e]}function yd(e,t,n,{delay:o=0,duration:s=300,repeat:i=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=ka(a,s);Array.isArray(d)&&(u.easing=d);const f={delay:o,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:r==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function Fa(e){return typeof e=="function"&&"applyToOptions"in e}function wd({type:e,...t}){return Fa(e)&&Da()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class xd extends Vs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:o,keyframes:s,pseudoElement:i,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=r,this.options=t,ze(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=wd(t);this.animation=yd(n,o,s,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Ts(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):gd(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 Re(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Re(t)}get time(){return Re(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ae(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&&md()?(this.animation.timeline=t,Ee):n(this)}}const La={anticipate:ha,backInOut:fa,circInOut:ma};function Cd(e){return e in La}function Sd(e){typeof e.ease=="string"&&Cd(e.ease)&&(e.ease=La[e.ease])}const Ci=10;class bd extends xd{constructor(t){Sd(t),Ta(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:o,onComplete:s,element:i,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new As({...r,autoplay:!1}),l=Ae(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Ci).value,a.sample(l).value,Ci),a.stop()}}const Si=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ze.test(e)||e==="0")&&!e.startsWith("url("));function _d(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 Rd(e,t,n,o){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],r=Si(s,t),a=Si(i,t);return Rt(r===a,`You are trying to animate ${t} from "${s}" to "${i}". "${r?i:s}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:_d(e)||(n==="spring"||Fa(n))&&o}function Wo(e){e.duration=0,e.type="keyframes"}const Ed=new Set(["opacity","clipPath","filter","transform"]),Md=ys(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Pd(e){const{motionValue:t,name:n,repeatDelay:o,repeatType:s,damping:i,type:r}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return Md()&&n&&Ed.has(n)&&(n!=="transform"||!c)&&!l&&!o&&s!=="mirror"&&i!==0&&r!=="inertia"}const Td=40;class Vd extends Vs{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ve.now();const f={autoplay:t,delay:n,type:o,repeat:s,repeatDelay:i,repeatType:r,name:l,motionValue:c,element:u,...d},h=u?.KeyframeResolver||Ds;this.keyframeResolver=new h(a,(m,g,p)=>this.onKeyframesResolved(m,g,f,!p),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,o,s){this.keyframeResolver=void 0;const{name:i,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=o;this.resolvedAt=ve.now(),Rd(t,i,r,a)||((He.instantAnimations||!l)&&u?.(Ts(t,o,n)),t[0]=t[t.length-1],Wo(o),o.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Td?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...o,keyframes:t},h=!c&&Pd(f)?new bd({...f,element:f.motionValue.owner.current}):new As(f);h.finished.then(()=>this.notifyFinished()).catch(Ee),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(),fd()),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 Ad=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Dd(e){const t=Ad.exec(e);if(!t)return[,];const[,n,o,s]=t;return[`--${n??o}`,s]}const kd=4;function Ia(e,t,n=1){ze(n<=kd,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[o,s]=Dd(e);if(!o)return;const i=window.getComputedStyle(t).getPropertyValue(o);if(i){const r=i.trim();return sa(r)?parseFloat(r):r}return _s(s)?Ia(s,t,n+1):s}function ks(e,t){return e?.[t]??e?.default??e}const ja=new Set(["width","height","top","left","right","bottom",...Mt]),Fd={test:e=>e==="auto",parse:e=>e},$a=e=>t=>t.test(e),Oa=[Et,G,Fe,Ke,_u,bu,Fd],bi=e=>Oa.find($a(e));function Ld(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ra(e):!0}const Id=new Set(["brightness","contrast","saturate","opacity"]);function jd(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(Rs)||[];if(!o)return e;const s=n.replace(o,"");let i=Id.has(t)?1:0;return o!==n&&(i*=100),t+"("+i+s+")"}const $d=/\b([a-z-]*)\(.*?\)/gu,Go={...Ze,getAnimatableNone:e=>{const t=e.match($d);return t?t.map(jd).join(" "):e}},_i={...Et,transform:Math.round},Od={rotate:Ke,rotateX:Ke,rotateY:Ke,rotateZ:Ke,scale:cn,scaleX:cn,scaleY:cn,scaleZ:cn,skew:Ke,skewX:Ke,skewY:Ke,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:Ut,originX:di,originY:di,originZ:G},Fs={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,...Od,zIndex:_i,fillOpacity:Ut,strokeOpacity:Ut,numOctaves:_i},Nd={...Fs,color:ae,backgroundColor:ae,outlineColor:ae,fill:ae,stroke:ae,borderColor:ae,borderTopColor:ae,borderRightColor:ae,borderBottomColor:ae,borderLeftColor:ae,filter:Go,WebkitFilter:Go},Na=e=>Nd[e];function Ba(e,t){let n=Na(e);return n!==Go&&(n=Ze),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Bd=new Set(["auto","none","0"]);function zd(e,t,n){let o=0,s;for(;o<e.length&&!s;){const i=e[o];typeof i=="string"&&!Bd.has(i)&&Kt(i).values.length&&(s=e[o]),o++}if(s&&n)for(const i of t)e[i]=Ba(n,s)}class Hd extends Ds{constructor(t,n,o,s,i){super(t,n,o,s,i,!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(),_s(c))){const u=Ia(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!ja.has(o)||t.length!==2)return;const[s,i]=t,r=bi(s),a=bi(i);if(r!==a)if(wi(r)&&wi(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else rt[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let s=0;s<t.length;s++)(t[s]===null||Ld(t[s]))&&o.push(s);o.length&&zd(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=rt[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(o,s).jump(s,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:o}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,r=o[i];o[i]=rt[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 Wd(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const s=n?.[e]??o.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const za=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Ha(e){return ia(e)&&"offsetHeight"in e}const Ri=30,Gd=e=>!isNaN(parseFloat(e));class Ud{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{const s=ve.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ve.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Gd(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&xs(!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 ws);const o=this.events[t].add(n);return t==="change"?()=>{o(),te.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=ve.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Ri)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ri);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 Ct(e,t){return new Ud(e,t)}const{schedule:Ls}=ya(queueMicrotask,!1),Ve={x:!1,y:!1};function Wa(){return Ve.x||Ve.y}function Kd(e){return e==="x"||e==="y"?Ve[e]?null:(Ve[e]=!0,()=>{Ve[e]=!1}):Ve.x||Ve.y?null:(Ve.x=Ve.y=!0,()=>{Ve.x=Ve.y=!1})}function Ga(e,t){const n=Wd(e),o=new AbortController,s={passive:!0,...t,signal:o.signal};return[n,s,()=>o.abort()]}function Ei(e){return!(e.pointerType==="touch"||Wa())}function qd(e,t,n={}){const[o,s,i]=Ga(e,n),r=a=>{if(!Ei(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{Ei(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,s)};return o.forEach(a=>{a.addEventListener("pointerenter",r,s)}),i}const Ua=(e,t)=>t?e===t?!0:Ua(e,t.parentElement):!1,Is=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Xd=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Yd(e){return Xd.has(e.tagName)||e.tabIndex!==-1}const Cn=new WeakSet;function Mi(e){return t=>{t.key==="Enter"&&e(t)}}function ao(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Zd=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=Mi(()=>{if(Cn.has(n))return;ao(n,"down");const s=Mi(()=>{ao(n,"up")}),i=()=>ao(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function Pi(e){return Is(e)&&!Wa()}function Jd(e,t,n={}){const[o,s,i]=Ga(e,n),r=a=>{const l=a.currentTarget;if(!Pi(a))return;Cn.add(l);const c=t(l,a),u=(h,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Cn.has(l)&&Cn.delete(l),Pi(h)&&typeof c=="function"&&c(h,{success:m})},d=h=>{u(h,l===window||l===document||n.useGlobalTarget||Ua(l,h.target))},f=h=>{u(h,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",f,s)};return o.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,s),Ha(a)&&(a.addEventListener("focus",c=>Zd(c,s)),!Yd(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Ka(e){return ia(e)&&"ownerSVGElement"in e}function Qd(e){return Ka(e)&&e.tagName==="svg"}const fe=e=>!!(e&&e.getVelocity),ef=[...Oa,ae,Ze],tf=e=>ef.find($a(e)),js=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ti(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function nf(...e){return t=>{let n=!1;const o=e.map(s=>{const i=Ti(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<o.length;s++){const i=o[s];typeof i=="function"?i():Ti(e[s],null)}}}}function of(...e){return b.useCallback(nf(...e),e)}class sf extends b.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const o=n.offsetParent,s=Ha(o)&&o.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=s-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function rf({children:e,isPresent:t,anchorX:n,root:o}){const s=C.useId(),i=C.useRef(null),r=C.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=C.useContext(js),l=of(i,e?.ref);return C.useInsertionEffect(()=>{const{width:c,height:u,top:d,left:f,right:h}=r.current;if(t||!i.current||!c||!u)return;const m=n==="left"?`left: ${f}`:`right: ${h}`;i.current.dataset.motionPopId=s;const g=document.createElement("style");a&&(g.nonce=a);const p=o??document.head;return p.appendChild(g),g.sheet&&g.sheet.insertRule(`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),k=require("@emotion/css"),C=require("react"),Cs=require("react-dom"),kn=require("@highcharts/react");function ga(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 b=ga(C),Jc=ga(Cs);function Qc(e){const{h:t,w:n,m:o,mx:s,my:i,mt:r,mr:a,mb:l,ml:c,p:u,px:f,py:d,pt:h,pr:p,pb:g,pl:m,gap:w,xGap:x,yGap:y,row:S,flex:_,relative:M,absolute:T,display:P,overflow:D,absoluteFill:F,center:j,justifyContent:$,alignItems:O,alignSelf:V,borderWidth:z,borderBottomWidth:N,borderColor:E,borderRadius:R,borderStyle:A,border:I,zIndex:Y,minWidth:K,minHeight:U,maxWidth:re,maxHeight:J,flexWrap:ne,flexGrow:B,flexShrink:X,flexBasis:oe,backgroundColor:de,position:le,top:ke,right:nt,bottom:ot,left:st,...it}=e;return{spacers:{h:t,w:n,m:o,mx:s,my:i,mt:r,mr:a,mb:l,ml:c,p:u,px:f,py:d,pt:h,pr:p,pb:g,pl:m,gap:w,xGap:x,yGap:y,row:S,flex:_,relative:M,absolute:T,display:P,overflow:D,absoluteFill:F,center:j,justifyContent:$,alignItems:O,alignSelf:V,borderWidth:z,borderBottomWidth:N,borderColor:E,borderRadius:R,borderStyle:A,border:I,zIndex:Y,minWidth:K,minHeight:U,maxWidth:re,maxHeight:J,flexWrap:ne,flexGrow:B,flexShrink:X,flexBasis:oe,backgroundColor:de,position:le,top:ke,right:nt,bottom:ot,left:st},rest:it}}const eu=e=>k.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:s,rest:i}=Qc(n),r=C.useMemo(()=>eu(s),[s]);return v.jsx("div",{ref:o,className:k.cx(r,e),...i,children:t})});L.displayName="Box";const tu="_loader_1qleq_8",nu={loader:tu},pa=({color:e="var(--text-accent)"})=>v.jsx("span",{className:k.cx(nu.loader,k.css({"--loader-color":e}))}),ma=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));function ou(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var io={exports:{}};var Ci;function su(){return Ci||(Ci=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",r=0;r<arguments.length;r++){var a=arguments[r];a&&(i=s(i,o(a)))}return i}function o(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var r="";for(var a in i)t.call(i,a)&&i[a]&&(r=s(r,a));return r}function s(i,r){return r?i?i+" "+r:i+r:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(io)),io.exports}var iu=su();const lt=ou(iu),ru="_rippleOverlay_s2kim_8",au="_ripple_s2kim_8",Si={rippleOverlay:ru,ripple:au},ro="button, a, input, label, [role='button'], [data-ripple]";function lu(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 pt=C.forwardRef(({color:e="rgba(0,0,0,0.18)",duration:t=1e3,radius:n="auto",className:o},s)=>{const i=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,m,w,x)=>{if(typeof window>"u")return;const y=w.getBoundingClientRect(),S=n==="auto"?Math.max(y.width,y.height)*2:n,_=g-x.left,M=m-x.top,T=Math.max(0,y.top-x.top),P=Math.max(0,y.left-x.left),D=Math.max(0,x.right-y.right),F=Math.max(0,x.bottom-y.bottom),$=window.getComputedStyle(w).borderRadius||"0px",O=c.current++,V={id:O,left:_-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(P)},borderRadius:$};a(N=>[...N,V]);const z=window.setTimeout(()=>{a(N=>N.filter(E=>E.id!==O))},t+80);l.current.push(z)},[t,n]),h=C.useCallback(g=>{try{if(!i.current)return;const m=i.current,w=m.parentElement;if(!w)return;const x=lu(g);let y=null;for(const P of x)if(P instanceof Element){if(P===w)break;if(P.matches&&P.matches(ro)){y=P;break}}if(y||(y=w),y.closest&&(y.closest("[disabled]")||y.getAttribute("aria-disabled")==="true"||y.classList.contains("ripple-disabled")))return;const S=g.target;if(S?.closest&&(S.closest("[disabled]")||S.getAttribute?.("aria-disabled")==="true"))return;const _=m.getBoundingClientRect(),{clientX:M}=g,{clientY:T}=g;d(M,T,y,_)}catch{}},[d]),p=C.useCallback(g=>{if(!i.current||!(g.key==="Enter"||g.key===" "))return;const m=i.current,w=m.parentElement;if(!w)return;const x=document.activeElement;let y=null;if(x instanceof Element&&x.matches(ro)&&(y=x),y||(y=w),y.closest&&(y.closest("[disabled]")||y.getAttribute("aria-disabled")==="true"))return;const S=m.getBoundingClientRect(),_=y.getBoundingClientRect().left+y.getBoundingClientRect().width/2,M=y.getBoundingClientRect().top+y.getBoundingClientRect().height/2;d(_,M,y,S)},[d]);return C.useImperativeHandle(s,()=>({trigger:({center:g=!0,x:m,y:w}={})=>{const x=i.current;if(!x)return;const y=x.parentElement;if(!y)return;const S=x.getBoundingClientRect(),_=document.activeElement instanceof Element&&document.activeElement.matches(ro)?document.activeElement:y,M=g?_.getBoundingClientRect().left+_.getBoundingClientRect().width/2:m??S.left+S.width/2,T=g?_.getBoundingClientRect().top+_.getBoundingClientRect().height/2:w??S.top+S.height/2;d(M,T,_,S)}}),[d]),C.useEffect(()=>{const g=i.current;if(!g)return;const m=g.parentElement;if(!m||typeof window>"u")return;const w=window.getComputedStyle(m);let x=!1;return w.position==="static"&&(m.style.position="relative",x=!0,u.current=m),m.addEventListener("pointerdown",h,!0),m.addEventListener("keydown",p),()=>{m.removeEventListener("pointerdown",h,!0),m.removeEventListener("keydown",p),x&&u.current&&(u.current.style.position="",u.current=null),f()}},[h,p]),C.useEffect(()=>()=>f(),[]),v.jsx("div",{ref:i,className:`${Si.rippleOverlay} ${o??""}`,"aria-hidden":!0,children:r.map(g=>v.jsx("span",{className:Si.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,s]=C.useState(t),i=n?e:o,r=C.useCallback(a=>{n||s(a)},[]);return[i,r]}function Wn(e,t,n,o=""){if(n)return e[`${t}_${n}${o}`]}function Xt(e,t,n){return Wn(e,t,n,"Size")}const cu="_button_11ykb_8",uu="_button_primary_11ykb_19",du="_button_secondary_11ykb_22",fu="_button_negative_11ykb_25",hu="_button_positive_11ykb_28",gu="_button_warning_11ykb_31",pu="_button_neutral_11ykb_34",mu="_button_mdSize_11ykb_118",vu="_button_smSize_11ykb_128",yu="_button_xsSize_11ykb_138",ao={button:cu,button_primary:uu,button_secondary:du,button_negative:fu,button_positive:hu,button_warning:gu,button_neutral:pu,"button_neutral-white":"_button_neutral-white_11ykb_37","button_no-bg":"_button_no-bg_11ykb_40",button_mdSize:mu,button_smSize:vu,button_xsSize:yu};function Yt({attr:e,children:t,className:n,type:o="button",color:s="primary",size:i="md",...r}){const a="button";return v.jsxs("button",{...e,...r,type:o,className:lt(ao[a],n,Xt(ao,a,i),Wn(ao,a,s)),children:[v.jsx(pt,{}),t]})}const va=C.createContext({isOpen:!1,onClose:()=>{}}),wu=()=>C.useContext(va),xu="_overlay_1gnp0_8",Cu="_modal_1gnp0_12",Su="_closeButton_1gnp0_28",bu="_size_lg_1gnp0_35",_u="_size_md_1gnp0_38",Ru="_size_sm_1gnp0_41",fn={overlay:xu,modal:Cu,"modal-animation":"_modal-animation_1gnp0_1",closeButton:Su,size_lg:bu,size_md:_u,size_sm:Ru},ya=C.forwardRef(({isOpen:e,onClose:t,overlayClassName:n,modalClassName:o,size:s="md",closeOnBackdropClick:i=!0,closeOnEsc:r=!0,disableBodyScroll:a=!0,showAbsoluteCloseButton:l=!1,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=>{i&&h.target===h.currentTarget&&t()},[i,t]);return e?v.jsx(un,{children:v.jsx(va.Provider,{value:{isOpen:e,onClose:t},children:v.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:k.cx(fn.overlay,n),zIndex:1,children:v.jsxs(L,{ref:u,className:k.cx(fn.modal,fn[`size_${s}`],o),relative:!0,children:[l&&v.jsx(Yt,{className:fn.closeButton,onClick:t,color:"neutral",children:v.jsx(ma,{})}),c]})})})}):null});ya.displayName="Modal";const Eu="_footer_1bo08_8",Pu={footer:Eu},wa=C.forwardRef(({children:e,row:t=!0,flex:n=!0,gap:o="var(--spacing-lg)",p:s="var(--spacing-2xl)",className:i,...r},a)=>v.jsx(L,{flex:n,row:t,gap:o,p:s,className:k.cx(Pu.footer,i),ref:a,...r,children:e}));wa.displayName="ModalFooter";const Ss=C.createContext({});function bs(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const _s=typeof window<"u",xa=_s?C.useLayoutEffect:C.useEffect,Gn=C.createContext(null);function Rs(e,t){e.indexOf(t)===-1&&e.push(t)}function Es(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ze=(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 Vt=()=>{},He=()=>{};process.env.NODE_ENV!=="production"&&(Vt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(No(t,n))},He=(e,t,n)=>{if(!e)throw new Error(No(t,n))});const We={},Ca=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Sa(e){return typeof e=="object"&&e!==null}const ba=e=>/^0[^.\s]+$/u.test(e);function Ps(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ee=e=>e,Mu=(e,t)=>n=>t(e(n)),sn=(...e)=>e.reduce(Mu),Zt=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o};class Ms{constructor(){this.subscriptions=[]}add(t){return Rs(this.subscriptions,t),()=>Es(this.subscriptions,t)}notify(t,n,o){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,o);else for(let i=0;i<s;i++){const r=this.subscriptions[i];r&&r(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ve=e=>e*1e3,Re=e=>e/1e3;function _a(e,t){return t?e*(1e3/t):0}const bi=new Set;function Ts(e,t,n){e||bi.has(t)||(console.warn(No(t,n)),bi.add(t))}const Ra=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Tu=1e-7,Au=12;function Vu(e,t,n,o,s){let i,r,a=0;do r=t+(n-t)/2,i=Ra(r,o,s)-e,i>0?n=r:t=r;while(Math.abs(i)>Tu&&++a<Au);return r}function rn(e,t,n,o){if(e===t&&n===o)return Ee;const s=i=>Vu(i,0,1,e,n);return i=>i===0||i===1?i:Ra(s(i),t,o)}const Ea=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Pa=e=>t=>1-e(1-t),Ma=rn(.33,1.53,.69,.99),As=Pa(Ma),Ta=Ea(As),Aa=e=>(e*=2)<1?.5*As(e):.5*(2-Math.pow(2,-10*(e-1))),Vs=e=>1-Math.sin(Math.acos(e)),Va=Pa(Vs),Da=Ea(Vs),Du=rn(.42,0,1,1),ku=rn(0,0,.58,1),ka=rn(.42,0,.58,1),Fu=e=>Array.isArray(e)&&typeof e[0]!="number",Fa=e=>Array.isArray(e)&&typeof e[0]=="number",_i={linear:Ee,easeIn:Du,easeInOut:ka,easeOut:ku,circIn:Vs,circInOut:Da,circOut:Va,backIn:As,backInOut:Ta,backOut:Ma,anticipate:Aa},Lu=e=>typeof e=="string",Ri=e=>{if(Fa(e)){He(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,o,s]=e;return rn(t,n,o,s)}else if(Lu(e))return He(_i[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),_i[e];return e},hn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Iu(e,t){let n=new Set,o=new Set,s=!1,i=!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 p=d&&s?n:o;return f&&r.add(u),p.has(u)||p.add(u),u},cancel:u=>{o.delete(u),r.delete(u)},process:u=>{if(a=u,s){i=!0;return}s=!0,[n,o]=[o,n],n.forEach(l),n.clear(),s=!1,i&&(i=!1,c.process(u))}};return c}const ju=40;function La(e,t){let n=!1,o=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,r=hn.reduce((y,S)=>(y[S]=Iu(i),y),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:f,preRender:d,render:h,postRender:p}=r,g=()=>{const y=We.useManualTiming?s.timestamp:performance.now();n=!1,We.useManualTiming||(s.delta=o?1e3/60:Math.max(Math.min(y-s.timestamp,ju),1)),s.timestamp=y,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),f.process(s),d.process(s),h.process(s),p.process(s),s.isProcessing=!1,n&&t&&(o=!1,e(g))},m=()=>{n=!0,o=!0,s.isProcessing||e(g)};return{schedule:hn.reduce((y,S)=>{const _=r[S];return y[S]=(M,T=!1,P=!1)=>(n||m(),_.schedule(M,T,P)),y},{}),cancel:y=>{for(let S=0;S<hn.length;S++)r[hn[S]].cancel(y)},state:s,steps:r}}const{schedule:te,cancel:Ye,state:fe,steps:lo}=La(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ee,!0);let En;function $u(){En=void 0}const ye={now:()=>(En===void 0&&ye.set(fe.isProcessing||We.useManualTiming?fe.timestamp:performance.now()),En),set:e=>{En=e,queueMicrotask($u)}},Ia=e=>t=>typeof t=="string"&&t.startsWith(e),ja=Ia("--"),Ou=Ia("var(--"),Ds=e=>Ou(e)?Nu.test(e.split("/*")[0].trim()):!1,Nu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Dt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Jt={...Dt,transform:e=>ze(0,1,e)},gn={...Dt,default:1},Gt=e=>Math.round(e*1e5)/1e5,ks=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Bu(e){return e==null}const zu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Fs=(e,t)=>n=>!!(typeof n=="string"&&zu.test(n)&&n.startsWith(e)||t&&!Bu(n)&&Object.prototype.hasOwnProperty.call(n,t)),$a=(e,t,n)=>o=>{if(typeof o!="string")return o;const[s,i,r,a]=o.match(ks);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Hu=e=>ze(0,255,e),co={...Dt,transform:e=>Math.round(Hu(e))},ct={test:Fs("rgb","red"),parse:$a("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+co.transform(e)+", "+co.transform(t)+", "+co.transform(n)+", "+Gt(Jt.transform(o))+")"};function Wu(e){let t="",n="",o="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,o+=o,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:s?parseInt(s,16)/255:1}}const Bo={test:Fs("#"),parse:Wu,transform:ct.transform},an=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ke=an("deg"),Le=an("%"),G=an("px"),Gu=an("vh"),Uu=an("vw"),Ei={...Le,parse:e=>Le.parse(e)/100,transform:e=>Le.transform(e*100)},xt={test:Fs("hsl","hue"),parse:$a("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+Le.transform(Gt(t))+", "+Le.transform(Gt(n))+", "+Gt(Jt.transform(o))+")"},ae={test:e=>ct.test(e)||Bo.test(e)||xt.test(e),parse:e=>ct.test(e)?ct.parse(e):xt.test(e)?xt.parse(e):Bo.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ct.transform(e):xt.transform(e),getAnimatableNone:e=>{const t=ae.parse(e);return t.alpha=0,ae.transform(t)}},Ku=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function qu(e){return isNaN(e)&&typeof e=="string"&&(e.match(ks)?.length||0)+(e.match(Ku)?.length||0)>0}const Oa="number",Na="color",Xu="var",Yu="var(",Pi="${}",Zu=/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 Qt(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(Zu,l=>(ae.test(l)?(o.color.push(i),s.push(Na),n.push(ae.parse(l))):l.startsWith(Yu)?(o.var.push(i),s.push(Xu),n.push(l)):(o.number.push(i),s.push(Oa),n.push(parseFloat(l))),++i,Pi)).split(Pi);return{values:n,split:a,indexes:o,types:s}}function Ba(e){return Qt(e).values}function za(e){const{split:t,types:n}=Qt(e),o=t.length;return s=>{let i="";for(let r=0;r<o;r++)if(i+=t[r],s[r]!==void 0){const a=n[r];a===Oa?i+=Gt(s[r]):a===Na?i+=ae.transform(s[r]):i+=s[r]}return i}}const Ju=e=>typeof e=="number"?0:ae.test(e)?ae.getAnimatableNone(e):e;function Qu(e){const t=Ba(e);return za(e)(t.map(Ju))}const Ze={test:qu,parse:Ba,createTransformer:za,getAnimatableNone:Qu};function uo(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 ed({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let s=0,i=0,r=0;if(!t)s=i=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=uo(l,a,e+1/3),i=uo(l,a,e),r=uo(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(r*255),alpha:o}}function Fn(e,t){return n=>n>0?t:e}const ie=(e,t,n)=>e+(t-e)*n,fo=(e,t,n)=>{const o=e*e,s=n*(t*t-o)+o;return s<0?0:Math.sqrt(s)},td=[Bo,ct,xt],nd=e=>td.find(t=>t.test(e));function Mi(e){const t=nd(e);if(Vt(!!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===xt&&(n=ed(n)),n}const Ti=(e,t)=>{const n=Mi(e),o=Mi(t);if(!n||!o)return Fn(e,t);const s={...n};return i=>(s.red=fo(n.red,o.red,i),s.green=fo(n.green,o.green,i),s.blue=fo(n.blue,o.blue,i),s.alpha=ie(n.alpha,o.alpha,i),ct.transform(s))},zo=new Set(["none","hidden"]);function od(e,t){return zo.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function sd(e,t){return n=>ie(e,t,n)}function Ls(e){return typeof e=="number"?sd:typeof e=="string"?Ds(e)?Fn:ae.test(e)?Ti:ad:Array.isArray(e)?Ha:typeof e=="object"?ae.test(e)?Ti:id:Fn}function Ha(e,t){const n=[...e],o=n.length,s=e.map((i,r)=>Ls(i)(i,t[r]));return i=>{for(let r=0;r<o;r++)n[r]=s[r](i);return n}}function id(e,t){const n={...e,...t},o={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(o[s]=Ls(e[s])(e[s],t[s]));return s=>{for(const i in o)n[i]=o[i](s);return n}}function rd(e,t){const n=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],r=e.indexes[i][o[i]],a=e.values[r]??0;n[s]=a,o[i]++}return n}const ad=(e,t)=>{const n=Ze.createTransformer(t),o=Qt(e),s=Qt(t);return o.indexes.var.length===s.indexes.var.length&&o.indexes.color.length===s.indexes.color.length&&o.indexes.number.length>=s.indexes.number.length?zo.has(e)&&!s.values.length||zo.has(t)&&!o.values.length?od(e,t):sn(Ha(rd(o,s),s.values),n):(Vt(!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 Wa(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ie(e,t,n):Ls(e)(e,t)}const ld=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>te.update(t,n),stop:()=>Ye(t),now:()=>fe.isProcessing?fe.timestamp:ye.now()}},Ga=(e,t,n=10)=>{let o="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)o+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},Ln=2e4;function Is(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 cd(e,t=100,n){const o=n({...e,keyframes:[0,t]}),s=Math.min(Is(o),Ln);return{type:"keyframes",ease:i=>o.next(s*i).value/t,duration:Re(s)}}const ud=5;function Ua(e,t,n){const o=Math.max(t-ud,0);return _a(n-e(o),t-o)}const se={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},ho=.001;function dd({duration:e=se.duration,bounce:t=se.bounce,velocity:n=se.velocity,mass:o=se.mass}){let s,i;Vt(e<=Ve(se.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=ze(se.minDamping,se.maxDamping,r),e=ze(se.minDuration,se.maxDuration,Re(e)),r<1?(s=c=>{const u=c*r,f=u*e,d=u-n,h=Ho(c,r),p=Math.exp(-f);return ho-d/h*p},i=c=>{const f=c*r*e,d=f*n+n,h=Math.pow(r,2)*Math.pow(c,2)*e,p=Math.exp(-f),g=Ho(Math.pow(c,2),r);return(-s(c)+ho>0?-1:1)*((d-h)*p)/g}):(s=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-ho+u*f},i=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const a=5/e,l=hd(s,i,a);if(e=Ve(e),isNaN(l))return{stiffness:se.stiffness,damping:se.damping,duration:e};{const c=Math.pow(l,2)*o;return{stiffness:c,damping:r*2*Math.sqrt(o*c),duration:e}}}const fd=12;function hd(e,t,n){let o=n;for(let s=1;s<fd;s++)o=o-e(o)/t(o);return o}function Ho(e,t){return e*Math.sqrt(1-t*t)}const gd=["duration","bounce"],pd=["stiffness","damping","mass"];function Ai(e,t){return t.some(n=>e[n]!==void 0)}function md(e){let t={velocity:se.velocity,stiffness:se.stiffness,damping:se.damping,mass:se.mass,isResolvedFromDuration:!1,...e};if(!Ai(e,pd)&&Ai(e,gd))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),s=o*o,i=2*ze(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:se.mass,stiffness:s,damping:i}}else{const n=dd(e);t={...t,...n,mass:se.mass},t.isResolvedFromDuration=!0}return t}function In(e=se.visualDuration,t=se.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:s}=n;const i=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:f,velocity:d,isResolvedFromDuration:h}=md({...n,velocity:-Re(n.velocity||0)}),p=d||0,g=c/(2*Math.sqrt(l*u)),m=r-i,w=Re(Math.sqrt(l/u)),x=Math.abs(m)<5;o||(o=x?se.restSpeed.granular:se.restSpeed.default),s||(s=x?se.restDelta.granular:se.restDelta.default);let y;if(g<1){const _=Ho(w,g);y=M=>{const T=Math.exp(-g*w*M);return r-T*((p+g*w*m)/_*Math.sin(_*M)+m*Math.cos(_*M))}}else if(g===1)y=_=>r-Math.exp(-w*_)*(m+(p+w*m)*_);else{const _=w*Math.sqrt(g*g-1);y=M=>{const T=Math.exp(-g*w*M),P=Math.min(_*M,300);return r-T*((p+g*w*m)*Math.sinh(P)+_*m*Math.cosh(P))/_}}const S={calculatedDuration:h&&f||null,next:_=>{const M=y(_);if(h)a.done=_>=f;else{let T=_===0?p:0;g<1&&(T=_===0?Ve(p):Ua(y,_,M));const P=Math.abs(T)<=o,D=Math.abs(r-M)<=s;a.done=P&&D}return a.value=a.done?r:M,a},toString:()=>{const _=Math.min(Is(S),Ln),M=Ga(T=>S.next(_*T).value,_,30);return _+"ms "+M},toTransition:()=>{}};return S}In.applyToOptions=e=>{const t=cd(e,100,In);return e.ease=t.ease,e.duration=Ve(t.duration),e.type="keyframes",e};function Wo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=e[0],d={done:!1,value:f},h=P=>a!==void 0&&P<a||l!==void 0&&P>l,p=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let g=n*t;const m=f+g,w=r===void 0?m:r(m);w!==m&&(g=w-f);const x=P=>-g*Math.exp(-P/o),y=P=>w+x(P),S=P=>{const D=x(P),F=y(P);d.done=Math.abs(D)<=c,d.value=d.done?w:F};let _,M;const T=P=>{h(d.value)&&(_=P,M=In({keyframes:[d.value,p(d.value)],velocity:Ua(y,P,d.value),damping:s,stiffness:i,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:P=>{let D=!1;return!M&&_===void 0&&(D=!0,S(P),T(P)),_!==void 0&&P>=_?M.next(P-_):(!D&&S(P),d)}}}function vd(e,t,n){const o=[],s=n||We.mix||Wa,i=e.length-1;for(let r=0;r<i;r++){let a=s(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||Ee:t;a=sn(l,a)}o.push(a)}return o}function yd(e,t,{clamp:n=!0,ease:o,mixer:s}={}){const i=e.length;if(He(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=vd(t,o,s),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=Zt(e[f],e[f+1],u);return a[f](d)};return n?u=>c(ze(e[0],e[i-1],u)):c}function wd(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const s=Zt(0,t,o);e.push(ie(n,1,s))}}function xd(e){const t=[0];return wd(t,e.length-1),t}function Cd(e,t){return e.map(n=>n*t)}function Sd(e,t){return e.map(()=>t||ka).splice(0,e.length-1)}function Ct({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const s=Fu(o)?o.map(Ri):Ri(o),i={done:!1,value:t[0]},r=Cd(n&&n.length===t.length?n:xd(t),e),a=yd(r,t,{ease:Array.isArray(s)?s:Sd(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const bd=e=>e!==null;function js(e,{repeat:t,repeatType:n="loop"},o,s=1){const i=e.filter(bd),a=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||o===void 0?i[a]:o}const _d={decay:Wo,inertia:Wo,tween:Ct,keyframes:Ct,spring:In};function Ka(e){typeof e.type=="string"&&(e.type=_d[e.type])}class $s{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 Rd=e=>e/100;class Os extends $s{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!==ye.now()&&this.tick(ye.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;Ka(t);const{type:n=Ct,repeat:o=0,repeatDelay:s=0,repeatType:i,velocity:r=0}=t;let{keyframes:a}=t;const l=n||Ct;process.env.NODE_ENV!=="production"&&l!==Ct&&He(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Ct&&typeof a[0]!="number"&&(this.mixKeyframes=sn(Rd,Wa(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=Is(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(o+1)-s,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:o,totalDuration:s,mixKeyframes:i,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:p,onUpdate:g,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-c*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?w<0:w>s;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let y=this.currentTime,S=o;if(f){const P=Math.min(this.currentTime,s)/a;let D=Math.floor(P),F=P%1;!F&&P>=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)),y=ze(0,1,F)*a}const _=x?{done:!1,value:u[0]}:S.next(y);i&&(_.value=i(_.value));let{done:M}=_;!x&&l!==null&&(M=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return T&&p!==Wo&&(_.value=js(u,this.options,m,this.speed)),g&&g(_.value),T&&this.finish(),_}then(t,n){return this.finished.then(t,n)}get duration(){return Re(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Re(t)}get time(){return Re(this.currentTime)}set time(t){t=Ve(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(ye.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Re(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ld,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),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(ye.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 Ed(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ut=e=>e*180/Math.PI,Go=e=>{const t=ut(Math.atan2(e[1],e[0]));return Uo(t)},Pd={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=>ut(Math.atan(e[1])),skewY:e=>ut(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),Vi=Go,Di=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ki=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Md={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Di,scaleY:ki,scale:e=>(Di(e)+ki(e))/2,rotateX:e=>Uo(ut(Math.atan2(e[6],e[5]))),rotateY:e=>Uo(ut(Math.atan2(-e[2],e[0]))),rotateZ:Vi,rotate:Vi,skewX:e=>ut(Math.atan(e[4])),skewY:e=>ut(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,s;if(n)o=Md,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=Pd,s=a}if(!s)return Ko(t);const i=o[t],r=s[1].split(",").map(Ad);return typeof i=="function"?i(r):r[i]}const Td=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return qo(n,t)};function Ad(e){return parseFloat(e.trim())}const kt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ft=new Set(kt),Fi=e=>e===Dt||e===G,Vd=new Set(["x","y","z"]),Dd=kt.filter(e=>!Vd.has(e));function kd(e){const t=[];return Dd.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const ft={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")};ft.translateX=ft.x;ft.translateY=ft.y;const ht=new Set;let Xo=!1,Yo=!1,Zo=!1;function qa(){if(Yo){const e=Array.from(ht).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const s=kd(o);s.length&&(n.set(o,s),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const s=n.get(o);s&&s.forEach(([i,r])=>{o.getValue(i)?.set(r)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}Yo=!1,Xo=!1,ht.forEach(e=>e.complete(Zo)),ht.clear()}function Xa(){ht.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Yo=!0)})}function Fd(){Zo=!0,Xa(),qa(),Zo=!1}class Ns{constructor(t,n,o,s,i,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=s,this.element=i,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(ht.add(this),Xo||(Xo=!0,te.read(Xa),te.resolveKeyframes(qa))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:s}=this;if(t[0]===null){const i=s?.get(),r=t[t.length-1];if(i!==void 0)t[0]=i;else if(o&&n){const a=o.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),s&&i===void 0&&s.set(t[0])}Ed(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ht.delete(this)}cancel(){this.state==="scheduled"&&(ht.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ld=e=>e.startsWith("--");function Id(e,t,n){Ld(t)?e.style.setProperty(t,n):e.style[t]=n}const jd=Ps(()=>window.ScrollTimeline!==void 0),$d={};function Od(e,t){const n=Ps(e);return()=>$d[t]??n()}const Ya=Od(()=>{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})`,Li={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 Za(e,t){if(e)return typeof e=="function"?Ya()?Ga(e,t):"ease-out":Fa(e)?Wt(e):Array.isArray(e)?e.map(n=>Za(n,t)||Li.easeOut):Li[e]}function Nd(e,t,n,{delay:o=0,duration:s=300,repeat:i=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const f=Za(a,s);Array.isArray(f)&&(u.easing=f);const d={delay:o,duration:s,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:r==="reverse"?"alternate":"normal"};return c&&(d.pseudoElement=c),e.animate(u,d)}function Ja(e){return typeof e=="function"&&"applyToOptions"in e}function Bd({type:e,...t}){return Ja(e)&&Ya()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class zd extends $s{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:o,keyframes:s,pseudoElement:i,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=r,this.options=t,He(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=Bd(t);this.animation=Nd(n,o,s,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=js(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):Id(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 Re(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Re(t)}get time(){return Re(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ve(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&&jd()?(this.animation.timeline=t,Ee):n(this)}}const Qa={anticipate:Aa,backInOut:Ta,circInOut:Da};function Hd(e){return e in Qa}function Wd(e){typeof e.ease=="string"&&Hd(e.ease)&&(e.ease=Qa[e.ease])}const Ii=10;class Gd extends zd{constructor(t){Wd(t),Ka(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:o,onComplete:s,element:i,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Os({...r,autoplay:!1}),l=Ve(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Ii).value,a.sample(l).value,Ii),a.stop()}}const ji=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ze.test(e)||e==="0")&&!e.startsWith("url("));function Ud(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 Kd(e,t,n,o){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],r=ji(s,t),a=ji(i,t);return Vt(r===a,`You are trying to animate ${t} from "${s}" to "${i}". "${r?i:s}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:Ud(e)||(n==="spring"||Ja(n))&&o}function Jo(e){e.duration=0,e.type="keyframes"}const qd=new Set(["opacity","clipPath","filter","transform"]),Xd=Ps(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Yd(e){const{motionValue:t,name:n,repeatDelay:o,repeatType:s,damping:i,type:r}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return Xd()&&n&&qd.has(n)&&(n!=="transform"||!c)&&!l&&!o&&s!=="mirror"&&i!==0&&r!=="inertia"}const Zd=40;class Jd extends $s{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:s=0,repeatDelay:i=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=ye.now();const d={autoplay:t,delay:n,type:o,repeat:s,repeatDelay:i,repeatType:r,name:l,motionValue:c,element:u,...f},h=u?.KeyframeResolver||Ns;this.keyframeResolver=new h(a,(p,g,m)=>this.onKeyframesResolved(p,g,d,!m),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,o,s){this.keyframeResolver=void 0;const{name:i,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=o;this.resolvedAt=ye.now(),Kd(t,i,r,a)||((We.instantAnimations||!l)&&u?.(js(t,o,n)),t[0]=t[t.length-1],Jo(o),o.repeat=0);const d={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Zd?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...o,keyframes:t},h=!c&&Yd(d)?new Gd({...d,element:d.motionValue.owner.current}):new Os(d);h.finished.then(()=>this.notifyFinished()).catch(Ee),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(),Fd()),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 Qd=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ef(e){const t=Qd.exec(e);if(!t)return[,];const[,n,o,s]=t;return[`--${n??o}`,s]}const tf=4;function el(e,t,n=1){He(n<=tf,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[o,s]=ef(e);if(!o)return;const i=window.getComputedStyle(t).getPropertyValue(o);if(i){const r=i.trim();return Ca(r)?parseFloat(r):r}return Ds(s)?el(s,t,n+1):s}function Bs(e,t){return e?.[t]??e?.default??e}const tl=new Set(["width","height","top","left","right","bottom",...kt]),nf={test:e=>e==="auto",parse:e=>e},nl=e=>t=>t.test(e),ol=[Dt,G,Le,Ke,Uu,Gu,nf],$i=e=>ol.find(nl(e));function of(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ba(e):!0}const sf=new Set(["brightness","contrast","saturate","opacity"]);function rf(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(ks)||[];if(!o)return e;const s=n.replace(o,"");let i=sf.has(t)?1:0;return o!==n&&(i*=100),t+"("+i+s+")"}const af=/\b([a-z-]*)\(.*?\)/gu,Qo={...Ze,getAnimatableNone:e=>{const t=e.match(af);return t?t.map(rf).join(" "):e}},Oi={...Dt,transform:Math.round},lf={rotate:Ke,rotateX:Ke,rotateY:Ke,rotateZ:Ke,scale:gn,scaleX:gn,scaleY:gn,scaleZ:gn,skew:Ke,skewX:Ke,skewY:Ke,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:Jt,originX:Ei,originY:Ei,originZ:G},zs={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,...lf,zIndex:Oi,fillOpacity:Jt,strokeOpacity:Jt,numOctaves:Oi},cf={...zs,color:ae,backgroundColor:ae,outlineColor:ae,fill:ae,stroke:ae,borderColor:ae,borderTopColor:ae,borderRightColor:ae,borderBottomColor:ae,borderLeftColor:ae,filter:Qo,WebkitFilter:Qo},sl=e=>cf[e];function il(e,t){let n=sl(e);return n!==Qo&&(n=Ze),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const uf=new Set(["auto","none","0"]);function df(e,t,n){let o=0,s;for(;o<e.length&&!s;){const i=e[o];typeof i=="string"&&!uf.has(i)&&Qt(i).values.length&&(s=e[o]),o++}if(s&&n)for(const i of t)e[i]=il(n,s)}class ff extends Ns{constructor(t,n,o,s,i){super(t,n,o,s,i,!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(),Ds(c))){const u=el(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!tl.has(o)||t.length!==2)return;const[s,i]=t,r=$i(s),a=$i(i);if(r!==a)if(Fi(r)&&Fi(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else ft[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let s=0;s<t.length;s++)(t[s]===null||of(t[s]))&&o.push(s);o.length&&df(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=ft[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(o,s).jump(s,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:o}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,r=o[i];o[i]=ft[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 hf(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const s=n?.[e]??o.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const rl=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function al(e){return Sa(e)&&"offsetHeight"in e}const Ni=30,gf=e=>!isNaN(parseFloat(e));class pf{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{const s=ye.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ye.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=gf(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ts(!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 Ms);const o=this.events[t].add(n);return t==="change"?()=>{o(),te.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=ye.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Ni)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ni);return _a(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 Mt(e,t){return new pf(e,t)}const{schedule:Hs}=La(queueMicrotask,!1),Ae={x:!1,y:!1};function ll(){return Ae.x||Ae.y}function mf(e){return e==="x"||e==="y"?Ae[e]?null:(Ae[e]=!0,()=>{Ae[e]=!1}):Ae.x||Ae.y?null:(Ae.x=Ae.y=!0,()=>{Ae.x=Ae.y=!1})}function cl(e,t){const n=hf(e),o=new AbortController,s={passive:!0,...t,signal:o.signal};return[n,s,()=>o.abort()]}function Bi(e){return!(e.pointerType==="touch"||ll())}function vf(e,t,n={}){const[o,s,i]=cl(e,n),r=a=>{if(!Bi(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=f=>{Bi(f)&&(c(f),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,s)};return o.forEach(a=>{a.addEventListener("pointerenter",r,s)}),i}const ul=(e,t)=>t?e===t?!0:ul(e,t.parentElement):!1,Ws=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,yf=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function wf(e){return yf.has(e.tagName)||e.tabIndex!==-1}const Pn=new WeakSet;function zi(e){return t=>{t.key==="Enter"&&e(t)}}function go(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const xf=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=zi(()=>{if(Pn.has(n))return;go(n,"down");const s=zi(()=>{go(n,"up")}),i=()=>go(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function Hi(e){return Ws(e)&&!ll()}function Cf(e,t,n={}){const[o,s,i]=cl(e,n),r=a=>{const l=a.currentTarget;if(!Hi(a))return;Pn.add(l);const c=t(l,a),u=(h,p)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),Pn.has(l)&&Pn.delete(l),Hi(h)&&typeof c=="function"&&c(h,{success:p})},f=h=>{u(h,l===window||l===document||n.useGlobalTarget||ul(l,h.target))},d=h=>{u(h,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",d,s)};return o.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,s),al(a)&&(a.addEventListener("focus",c=>xf(c,s)),!wf(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function dl(e){return Sa(e)&&"ownerSVGElement"in e}function Sf(e){return dl(e)&&e.tagName==="svg"}const ge=e=>!!(e&&e.getVelocity),bf=[...ol,ae,Ze],_f=e=>bf.find(nl(e)),Gs=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Wi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Rf(...e){return t=>{let n=!1;const o=e.map(s=>{const i=Wi(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<o.length;s++){const i=o[s];typeof i=="function"?i():Wi(e[s],null)}}}}function Ef(...e){return b.useCallback(Rf(...e),e)}class Pf extends b.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const o=n.offsetParent,s=al(o)&&o.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=s-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Mf({children:e,isPresent:t,anchorX:n,root:o}){const s=C.useId(),i=C.useRef(null),r=C.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=C.useContext(Gs),l=Ef(i,e?.ref);return C.useInsertionEffect(()=>{const{width:c,height:u,top:f,left:d,right:h}=r.current;if(t||!i.current||!c||!u)return;const p=n==="left"?`left: ${d}`:`right: ${h}`;i.current.dataset.motionPopId=s;const g=document.createElement("style");a&&(g.nonce=a);const m=o??document.head;return m.appendChild(g),g.sheet&&g.sheet.insertRule(`
|
|
6
2
|
[data-motion-pop-id="${s}"] {
|
|
7
3
|
position: absolute !important;
|
|
8
4
|
width: ${c}px !important;
|
|
9
5
|
height: ${u}px !important;
|
|
10
|
-
${
|
|
11
|
-
top: ${
|
|
6
|
+
${p}px !important;
|
|
7
|
+
top: ${f}px !important;
|
|
12
8
|
}
|
|
13
|
-
`),()=>{p.contains(g)&&p.removeChild(g)}},[t]),y.jsx(sf,{isPresent:t,childRef:i,sizeRef:r,children:b.cloneElement(e,{ref:l})})}const af=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:s,presenceAffectsLayout:i,mode:r,anchorX:a,root:l})=>{const c=gs(lf),u=C.useId();let d=!0,f=C.useMemo(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:s,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 i&&d&&(f={...f}),C.useMemo(()=>{c.forEach((h,m)=>c.set(m,!1))},[n]),b.useEffect(()=>{!n&&!c.size&&o&&o()},[n]),r==="popLayout"&&(e=y.jsx(rf,{isPresent:n,anchorX:a,root:l,children:e})),y.jsx(jn.Provider,{value:f,children:e})};function lf(){return new Map}function qa(e=!0){const t=C.useContext(jn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:s}=t,i=C.useId();C.useEffect(()=>{if(e)return s(i)},[e]);const r=C.useCallback(()=>e&&o&&o(i),[i,o,e]);return!n&&o?[!1,r]:[!0]}const un=e=>e.key||"";function Vi(e){const t=[];return C.Children.forEach(e,n=>{C.isValidElement(n)&&t.push(n)}),t}const cf=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:s=!0,mode:i="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[c,u]=qa(r),d=C.useMemo(()=>Vi(e),[e]),f=r&&!c?[]:d.map(un),h=C.useRef(!0),m=C.useRef(d),g=gs(()=>new Map),[p,w]=C.useState(d),[x,v]=C.useState(d);oa(()=>{h.current=!1,m.current=d;for(let P=0;P<x.length;P++){const V=un(x[P]);f.includes(V)?g.delete(V):g.get(V)!==!0&&g.set(V,!1)}},[x,f.length,f.join("-")]);const S=[];if(d!==p){let P=[...d];for(let V=0;V<x.length;V++){const M=x[V],A=un(M);f.includes(A)||(P.splice(V,0,M),S.push(M))}return i==="wait"&&S.length&&(P=S),v(Vi(P)),w(d),null}process.env.NODE_ENV!=="production"&&i==="wait"&&x.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:_}=C.useContext(hs);return y.jsx(y.Fragment,{children:x.map(P=>{const V=un(P),M=r&&!c?!1:d===x||f.includes(V),A=()=>{if(g.has(V))g.set(V,!0);else return;let F=!0;g.forEach($=>{$||(F=!1)}),F&&(_?.(),v(m.current),r&&u?.(),o&&o())};return y.jsx(af,{isPresent:M,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:l,onExitComplete:M?void 0:A,anchorX:a,children:P},V)})})},Xa=C.createContext({strict:!1}),Ai={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"]},St={};for(const e in Ai)St[e]={isEnabled:t=>Ai[e].some(n=>!!t[n])};function uf(e){for(const t in e)St[t]={...St[t],...e[t]}}const df=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 Vn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||df.has(e)}let Ya=e=>!Vn(e);function ff(e){typeof e=="function"&&(Ya=t=>t.startsWith("on")?!Vn(t):e(t))}try{ff(require("@emotion/is-prop-valid").default)}catch{}function hf(e,t,n){const o={};for(const s in e)s==="values"&&typeof e.values=="object"||(Ya(s)||n===!0&&Vn(s)||!t&&!Vn(s)||e.draggable&&s.startsWith("onDrag"))&&(o[s]=e[s]);return o}const $n=C.createContext({});function On(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function qt(e){return typeof e=="string"||Array.isArray(e)}const $s=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Os=["initial",...$s];function Nn(e){return On(e.animate)||Os.some(t=>qt(e[t]))}function Za(e){return!!(Nn(e)||e.variants)}function gf(e,t){if(Nn(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 mf(e){const{initial:t,animate:n}=gf(e,C.useContext($n));return C.useMemo(()=>({initial:t,animate:n}),[Di(t),Di(n)])}function Di(e){return Array.isArray(e)?e.join(" "):e}const Xt={};function pf(e){for(const t in e)Xt[t]=e[t],bs(t)&&(Xt[t].isCSSVariable=!0)}function Ja(e,{layout:t,layoutId:n}){return Pt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Xt[e]||e==="opacity")}const vf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},yf=Mt.length;function wf(e,t,n){let o="",s=!0;for(let i=0;i<yf;i++){const r=Mt[i],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=za(a,Fs[r]);if(!l){s=!1;const u=vf[r]||r;o+=`${u}(${c}) `}n&&(t[r]=c)}}return o=o.trim(),n?o=n(t,s?"":o):s&&(o="none"),o}function Ns(e,t,n){const{style:o,vars:s,transformOrigin:i}=e;let r=!1,a=!1;for(const l in t){const c=t[l];if(Pt.has(l)){r=!0;continue}else if(bs(l)){s[l]=c;continue}else{const u=za(c,Fs[l]);l.startsWith("origin")?(a=!0,i[l]=u):o[l]=u}}if(t.transform||(r||n?o.transform=wf(t,e.transform,n):o.transform&&(o.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;o.transformOrigin=`${l} ${c} ${u}`}}const Bs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Qa(e,t,n){for(const o in t)!fe(t[o])&&!Ja(o,n)&&(e[o]=t[o])}function xf({transformTemplate:e},t){return C.useMemo(()=>{const n=Bs();return Ns(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Cf(e,t){const n=e.style||{},o={};return Qa(o,n,e),Object.assign(o,xf(e,t)),o}function Sf(e,t){const n={},o=Cf(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 bf={offset:"stroke-dashoffset",array:"stroke-dasharray"},_f={offset:"strokeDashoffset",array:"strokeDasharray"};function Rf(e,t,n=1,o=0,s=!0){e.pathLength=1;const i=s?bf:_f;e[i.offset]=G.transform(-o);const r=G.transform(t),a=G.transform(n);e[i.array]=`${r} ${a}`}function el(e,{attrX:t,attrY:n,attrScale:o,pathLength:s,pathSpacing:i=1,pathOffset:r=0,...a},l,c,u){if(Ns(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),o!==void 0&&(d.scale=o),s!==void 0&&Rf(d,s,i,r,!1)}const tl=()=>({...Bs(),attrs:{}}),nl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Ef(e,t,n,o){const s=C.useMemo(()=>{const i=tl();return el(i,t,nl(o),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Qa(i,e.style,e),s.style={...i,...s.style}}return s}const Mf=["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 zs(e){return typeof e!="string"||e.includes("-")?!1:!!(Mf.indexOf(e)>-1||/[A-Z]/u.test(e))}function Pf(e,t,n,{latestValues:o},s,i=!1){const a=(zs(e)?Ef:Sf)(t,o,s,e),l=hf(t,typeof e=="string",i),c=e!==C.Fragment?{...l,...a,ref:n}:{},{children:u}=t,d=C.useMemo(()=>fe(u)?u.get():u,[u]);return C.createElement(e,{...c,children:d})}function ki(e){const t=[{},{}];return e?.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function Hs(e,t,n,o){if(typeof t=="function"){const[s,i]=ki(o);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=ki(o);t=t(n!==void 0?n:e.custom,s,i)}return t}function Sn(e){return fe(e)?e.get():e}function Tf({scrapeMotionValuesFromProps:e,createRenderState:t},n,o,s){return{latestValues:Vf(n,o,s,e),renderState:t()}}function Vf(e,t,n,o){const s={},i=o(e,{});for(const f in i)s[f]=Sn(i[f]);let{initial:r,animate:a}=e;const l=Nn(e),c=Za(e);t&&c&&!l&&e.inherit!==!1&&(r===void 0&&(r=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const d=u?a:r;if(d&&typeof d!="boolean"&&!On(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const m=Hs(e,f[h]);if(m){const{transitionEnd:g,transition:p,...w}=m;for(const x in w){let v=w[x];if(Array.isArray(v)){const S=u?v.length-1:0;v=v[S]}v!==null&&(s[x]=v)}for(const x in g)s[x]=g[x]}}}return s}const ol=e=>(t,n)=>{const o=C.useContext($n),s=C.useContext(jn),i=()=>Tf(e,t,o,s);return n?i():gs(i)};function Ws(e,t,n){const{style:o}=e,s={};for(const i in o)(fe(o[i])||t.style&&fe(t.style[i])||Ja(i,e)||n?.getValue(i)?.liveStyle!==void 0)&&(s[i]=o[i]);return s}const Af=ol({scrapeMotionValuesFromProps:Ws,createRenderState:Bs});function sl(e,t,n){const o=Ws(e,t,n);for(const s in e)if(fe(e[s])||fe(t[s])){const i=Mt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;o[i]=e[s]}return o}const Df=ol({scrapeMotionValuesFromProps:sl,createRenderState:tl}),kf=Symbol.for("motionComponentSymbol");function gt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ff(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):gt(n)&&(n.current=o))},[t])}const Gs=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Lf="framerAppearId",il="data-"+Gs(Lf),rl=C.createContext({});function If(e,t,n,o,s){const{visualElement:i}=C.useContext($n),r=C.useContext(Xa),a=C.useContext(jn),l=C.useContext(js).reducedMotion,c=C.useRef(null);o=o||r.renderer,!c.current&&o&&(c.current=o(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=C.useContext(rl);u&&!u.projection&&s&&(u.type==="html"||u.type==="svg")&&jf(c.current,n,s,d);const f=C.useRef(!1);C.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const h=n[il],m=C.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return oa(()=>{u&&(f.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 jf(e,t,n,o){const{layoutId:s,layout:i,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:al(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!r||a&>(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:o,crossfade:u,layoutScroll:l,layoutRoot:c})}function al(e){if(e)return e.options.allowProjection!==!1?e.projection:al(e.parent)}function lo(e,{forwardMotionProps:t=!1}={},n,o){n&&uf(n);const s=zs(e)?Df:Af;function i(a,l){let c;const u={...C.useContext(js),...a,layoutId:$f(a)},{isStatic:d}=u,f=mf(a),h=s(a,d);if(!d&&ms){Of(u,n);const m=Nf(u);c=m.MeasureLayout,f.visualElement=If(e,h,u,o,m.ProjectionNode)}return y.jsxs($n.Provider,{value:f,children:[c&&f.visualElement?y.jsx(c,{visualElement:f.visualElement,...u}):null,Pf(e,a,Ff(h,f.visualElement,l),h,d,t)]})}i.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const r=C.forwardRef(i);return r[kf]=e,r}function $f({layoutId:e}){const t=C.useContext(hs).id;return t&&e!==void 0?t+"-"+e:e}function Of(e,t){const n=C.useContext(Xa).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?Rt(!1,o,"lazy-strict-mode"):ze(!1,o,"lazy-strict-mode")}}function Nf(e){const{drag:t,layout:n}=St;if(!t&&!n)return{};const o={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function Bf(e,t){if(typeof Proxy>"u")return lo;const n=new Map,o=(i,r)=>lo(i,r,e,t),s=(i,r)=>(process.env.NODE_ENV!=="production"&&xs(!1,"motion() is deprecated. Use motion.create() instead."),o(i,r));return new Proxy(s,{get:(i,r)=>r==="create"?o:(n.has(r)||n.set(r,lo(r,void 0,e,t)),n.get(r))})}function ll({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function zf({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Hf(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 co(e){return e===void 0||e===1}function Uo({scale:e,scaleX:t,scaleY:n}){return!co(e)||!co(t)||!co(n)}function nt(e){return Uo(e)||cl(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function cl(e){return Fi(e.x)||Fi(e.y)}function Fi(e){return e&&e!=="0%"}function An(e,t,n){const o=e-n,s=t*o;return n+s}function Li(e,t,n,o,s){return s!==void 0&&(e=An(e,s,o)),An(e,n,o)+t}function Ko(e,t=0,n=1,o,s){e.min=Li(e.min,t,n,o,s),e.max=Li(e.max,t,n,o,s)}function ul(e,{x:t,y:n}){Ko(e.x,t.translate,t.scale,t.originPoint),Ko(e.y,n.translate,n.scale,n.originPoint)}const Ii=.999999999999,ji=1.0000000000001;function Wf(e,t,n,o=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,r;for(let a=0;a<s;a++){i=n[a],r=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&i.options.layoutScroll&&i.scroll&&i!==i.root&&pt(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,ul(e,r)),o&&nt(i.latestValues)&&pt(e,i.latestValues))}t.x<ji&&t.x>Ii&&(t.x=1),t.y<ji&&t.y>Ii&&(t.y=1)}function mt(e,t){e.min=e.min+t,e.max=e.max+t}function $i(e,t,n,o,s=.5){const i=oe(e.min,e.max,s);Ko(e,t,n,i,o)}function pt(e,t){$i(e.x,t.x,t.scaleX,t.scale,t.originX),$i(e.y,t.y,t.scaleY,t.scale,t.originY)}function dl(e,t){return ll(Hf(e.getBoundingClientRect(),t))}function Gf(e,t,n){const o=dl(e,n),{scroll:s}=t;return s&&(mt(o.x,s.offset.x),mt(o.y,s.offset.y)),o}const Oi=()=>({translate:0,scale:1,origin:0,originPoint:0}),vt=()=>({x:Oi(),y:Oi()}),Ni=()=>({min:0,max:0}),re=()=>({x:Ni(),y:Ni()}),qo={current:null},fl={current:!1};function Uf(){if(fl.current=!0,!!ms)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>qo.current=e.matches;e.addEventListener("change",t),t()}else qo.current=!1}const Kf=new WeakMap;function qf(e,t,n){for(const o in t){const s=t[o],i=n[o];if(fe(s))e.addValue(o,s);else if(fe(i))e.addValue(o,Ct(s,{owner:e}));else if(i!==s)if(e.hasValue(o)){const r=e.getValue(o);r.liveStyle===!0?r.jump(s):r.hasAnimated||r.set(s)}else{const r=e.getStaticValue(o);e.addValue(o,Ct(r!==void 0?r:s,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const Bi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Xf{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:s,blockInitialAnimation:i,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=Ds,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=ve.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,te.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=s,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Nn(n),this.isVariantNode=Za(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&fe(h)&&h.set(l[f])}}mount(t){this.current=t,Kf.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)),fl.current||Uf(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:qo.current,process.env.NODE_ENV!=="production"&&xs(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(),Ye(this.notifyUpdate),Ye(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=Pt.has(t);o&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&te.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),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 St){const n=St[t];if(!n)continue;const{isEnabled:o,Feature:s}=n;if(!this.features[t]&&s&&o(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):re()}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<Bi.length;o++){const s=Bi[o];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,r=t[i];r&&(this.propEventSubscriptions[s]=this.on(s,r))}this.prevMotionValues=qf(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=Ct(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"&&(sa(o)||ra(o))?o=parseFloat(o):!tf(o)&&Ze.test(n)&&(o=Ba(t,n)),this.setBaseTarget(t,fe(o)?o.get():o)),fe(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 i=Hs(this.props,n,this.presenceContext?.custom);i&&(o=i[t])}if(n&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!fe(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ws),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Ls.render(this.render)}}class hl extends Xf{constructor(){super(...arguments),this.KeyframeResolver=Hd}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;fe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function gl(e,{style:t,vars:n},o,s){const i=e.style;let r;for(r in t)i[r]=t[r];s?.applyProjectionStyles(i,o);for(r in n)i.setProperty(r,n[r])}function Yf(e){return window.getComputedStyle(e)}class Zf extends hl{constructor(){super(...arguments),this.type="html",this.renderInstance=gl}readValueFromInstance(t,n){if(Pt.has(n))return this.projection?.isProjecting?Oo(n):ad(t,n);{const o=Yf(t),s=(bs(n)?o.getPropertyValue(n):o[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return dl(t,n)}build(t,n,o){Ns(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return Ws(t,n,o)}}const ml=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 Jf(e,t,n,o){gl(e,t,void 0,o);for(const s in t.attrs)e.setAttribute(ml.has(s)?s:Gs(s),t.attrs[s])}class Qf extends hl{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=re}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Pt.has(n)){const o=Na(n);return o&&o.default||0}return n=ml.has(n)?n:Gs(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return sl(t,n,o)}build(t,n,o){el(t,n,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,n,o,s){Jf(t,n,o,s)}mount(t){this.isSVGTag=nl(t.tagName),super.mount(t)}}const eh=(e,t)=>zs(e)?new Qf(t):new Zf(t,{allowProjection:e!==C.Fragment});function wt(e,t,n){const o=e.getProps();return Hs(o,t,n!==void 0?n:o.custom,e)}const Xo=e=>Array.isArray(e);function th(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ct(n))}function nh(e){return Xo(e)?e[e.length-1]||0:e}function oh(e,t){const n=wt(e,t);let{transitionEnd:o={},transition:s={},...i}=n||{};i={...i,...o};for(const r in i){const a=nh(i[r]);th(e,r,a)}}function sh(e){return!!(fe(e)&&e.add)}function Yo(e,t){const n=e.getValue("willChange");if(sh(n))return n.add(t);if(!n&&He.WillChange){const o=new He.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function pl(e){return e.props[il]}const ih=e=>e!==null;function rh(e,{repeat:t,repeatType:n="loop"},o){const s=e.filter(ih),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[i]}const ah={type:"spring",stiffness:500,damping:25,restSpeed:10},lh=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ch={type:"keyframes",duration:.8},uh={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},dh=(e,{keyframes:t})=>t.length>2?ch:Pt.has(e)?e.startsWith("scale")?lh(t[1]):ah:uh;function fh({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:s,repeat:i,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Us=(e,t,n,o={},s,i)=>r=>{const a=ks(o,e)||{},l=a.delay||o.delay||0;let{elapsed:c=0}=o;c=c-Ae(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};fh(a)||Object.assign(u,dh(e,u)),u.duration&&(u.duration=Ae(u.duration)),u.repeatDelay&&(u.repeatDelay=Ae(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Wo(u),u.delay===0&&(d=!0)),(He.instantAnimations||He.skipAnimations)&&(d=!0,Wo(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!i&&t.get()!==void 0){const f=rh(u.keyframes,a);if(f!==void 0){te.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new As(u):new Vd(u)};function hh({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function vl(e,t,{delay:n=0,transitionOverride:o,type:s}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:r,...a}=t;o&&(i=o);const l=[],c=s&&e.animationState&&e.animationState.getState()[s];for(const u in a){const d=e.getValue(u,e.latestValues[u]??null),f=a[u];if(f===void 0||c&&hh(c,u))continue;const h={delay:n,...ks(i||{},u)},m=d.get();if(m!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===m&&!h.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const w=pl(e);if(w){const x=window.MotionHandoffAnimation(w,u,te);x!==null&&(h.startTime=x,g=!0)}}Yo(e,u),d.start(Us(u,d,f,e.shouldReduceMotion&&ja.has(u)?{type:!1}:h,e,g));const p=d.animation;p&&l.push(p)}return r&&Promise.all(l).then(()=>{te.update(()=>{r&&oh(e,r)})}),l}function yl(e,t,n,o=0,s=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),r=e.size,a=(r-1)*o;return typeof n=="function"?n(i,r):s===1?i*o:a-i*o}function Zo(e,t,n={}){const o=wt(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(vl(e,o,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=s;return gh(e,t,l,c,u,d,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[l,c]=a==="beforeChildren"?[i,r]:[r,i];return l().then(()=>c())}else return Promise.all([i(),r(n.delay)])}function gh(e,t,n=0,o=0,s=0,i=1,r){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Zo(l,t,{...r,delay:n+(typeof o=="function"?0:o)+yl(e.variantChildren,l,o,s,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function mh(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const s=t.map(i=>Zo(e,i,n));o=Promise.all(s)}else if(typeof t=="string")o=Zo(e,t,n);else{const s=typeof t=="function"?wt(e,t,n.custom):t;o=Promise.all(vl(e,s,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}function wl(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 ph=Os.length;function xl(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?xl(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<ph;n++){const o=Os[n],s=e.props[o];(qt(s)||s===!1)&&(t[o]=s)}return t}const vh=[...$s].reverse(),yh=$s.length;function wh(e){return t=>Promise.all(t.map(({animation:n,options:o})=>mh(e,n,o)))}function xh(e){let t=wh(e),n=zi(),o=!0;const s=l=>(c,u)=>{const d=wt(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:h,...m}=d;c={...c,...m,...h}}return c};function i(l){t=l(e)}function r(l){const{props:c}=e,u=xl(e.parent)||{},d=[],f=new Set;let h={},m=1/0;for(let p=0;p<yh;p++){const w=vh[p],x=n[w],v=c[w]!==void 0?c[w]:u[w],S=qt(v),_=w===l?x.isActive:null;_===!1&&(m=p);let P=v===u[w]&&v!==c[w]&&S;if(P&&o&&e.manuallyAnimateOnMount&&(P=!1),x.protectedKeys={...h},!x.isActive&&_===null||!v&&!x.prevProp||On(v)||typeof v=="boolean")continue;const V=Ch(x.prevProp,v);let M=V||w===l&&x.isActive&&!P&&S||p>m&&S,A=!1;const F=Array.isArray(v)?v:[v];let $=F.reduce(s(w),{});_===!1&&($={});const{prevResolvedValues:z={}}=x,O={...z,...$},D=E=>{M=!0,f.has(E)&&(A=!0,f.delete(E)),x.needsAnimating[E]=!0;const R=e.getValue(E);R&&(R.liveStyle=!1)};for(const E in O){const R=$[E],T=z[E];if(h.hasOwnProperty(E))continue;let L=!1;Xo(R)&&Xo(T)?L=!wl(R,T):L=R!==T,L?R!=null?D(E):f.add(E):R!==void 0&&f.has(E)?D(E):x.protectedKeys[E]=!0}x.prevProp=v,x.prevResolvedValues=$,x.isActive&&(h={...h,...$}),o&&e.blockInitialAnimation&&(M=!1);const B=P&&V;M&&(!B||A)&&d.push(...F.map(E=>{const R={type:w};if(typeof E=="string"&&o&&!B&&e.manuallyAnimateOnMount&&e.parent){const{parent:T}=e,L=wt(T,E);if(T.enteringChildren&&L){const{delayChildren:Y}=L.transition||{};R.delay=yl(T.enteringChildren,e,Y)}}return{animation:E,options:R}}))}if(f.size){const p={};if(typeof c.initial!="boolean"){const w=wt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);w&&w.transition&&(p.transition=w.transition)}f.forEach(w=>{const x=e.getBaseTarget(w),v=e.getValue(w);v&&(v.liveStyle=!0),p[w]=x??null}),d.push({animation:p})}let g=!!d.length;return o&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),o=!1,g?t(d):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),n[l].isActive=c;const u=r(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=zi(),o=!0}}}function Ch(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!wl(t,e):!1}function tt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zi(){return{animate:tt(!0),whileInView:tt(),whileHover:tt(),whileTap:tt(),whileDrag:tt(),whileFocus:tt(),exit:tt()}}class et{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Sh extends et{constructor(t){super(t),t.animationState||(t.animationState=xh(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();On(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 bh=0;class _h extends et{constructor(){super(...arguments),this.id=bh++}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 s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Rh={animation:{Feature:Sh},exit:{Feature:_h}};function Yt(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function nn(e){return{point:{x:e.pageX,y:e.pageY}}}const Eh=e=>t=>Is(t)&&e(t,nn(t));function Ot(e,t,n,o){return Yt(e,t,Eh(n),o)}const Cl=1e-4,Mh=1-Cl,Ph=1+Cl,Sl=.01,Th=0-Sl,Vh=0+Sl;function ge(e){return e.max-e.min}function Ah(e,t,n){return Math.abs(e-t)<=n}function Hi(e,t,n,o=.5){e.origin=o,e.originPoint=oe(t.min,t.max,e.origin),e.scale=ge(n)/ge(t),e.translate=oe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Mh&&e.scale<=Ph||isNaN(e.scale))&&(e.scale=1),(e.translate>=Th&&e.translate<=Vh||isNaN(e.translate))&&(e.translate=0)}function Nt(e,t,n,o){Hi(e.x,t.x,n.x,o?o.originX:void 0),Hi(e.y,t.y,n.y,o?o.originY:void 0)}function Wi(e,t,n){e.min=n.min+t.min,e.max=e.min+ge(t)}function Dh(e,t,n){Wi(e.x,t.x,n.x),Wi(e.y,t.y,n.y)}function Gi(e,t,n){e.min=t.min-n.min,e.max=e.min+ge(t)}function Bt(e,t,n){Gi(e.x,t.x,n.x),Gi(e.y,t.y,n.y)}function _e(e){return[e("x"),e("y")]}const bl=({current:e})=>e?e.ownerDocument.defaultView:null,Ui=(e,t)=>Math.abs(e-t);function kh(e,t){const n=Ui(e.x,t.x),o=Ui(e.y,t.y);return Math.sqrt(n**2+o**2)}class _l{constructor(t,n,{transformPagePoint:o,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=fo(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,m=kh(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!m)return;const{point:g}=f,{timestamp:p}=ue;this.history.push({...g,timestamp:p});const{onStart:w,onMove:x}=this.handlers;h||(w&&w(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=uo(h,this.transformPagePoint),te.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=fo(f.type==="pointercancel"?this.lastMoveEventInfo:uo(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,w),g&&g(f,w)},!Is(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=o,this.distanceThreshold=r,this.contextWindow=s||window;const a=nn(t),l=uo(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=ue;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,fo(l,this.history)),this.removeListeners=Qt(Ot(this.contextWindow,"pointermove",this.handlePointerMove),Ot(this.contextWindow,"pointerup",this.handlePointerUp),Ot(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ye(this.updatePoint)}}function uo(e,t){return t?{point:t(e.point)}:e}function Ki(e,t){return{x:e.x-t.x,y:e.y-t.y}}function fo({point:e},t){return{point:e,delta:Ki(e,Rl(t)),offset:Ki(e,Fh(t)),velocity:Lh(t,.1)}}function Fh(e){return e[0]}function Rl(e){return e[e.length-1]}function Lh(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const s=Rl(e);for(;n>=0&&(o=e[n],!(s.timestamp-o.timestamp>Ae(t)));)n--;if(!o)return{x:0,y:0};const i=Re(s.timestamp-o.timestamp);if(i===0)return{x:0,y:0};const r={x:(s.x-o.x)/i,y:(s.y-o.y)/i};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Ih(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?oe(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?oe(n,e,o.max):Math.min(e,n)),e}function qi(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 jh(e,{top:t,left:n,bottom:o,right:s}){return{x:qi(e.x,n,s),y:qi(e.y,t,o)}}function Xi(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 $h(e,t){return{x:Xi(e.x,t.x),y:Xi(e.y,t.y)}}function Oh(e,t){let n=.5;const o=ge(e),s=ge(t);return s>o?n=Gt(t.min,t.max-o,e.min):o>s&&(n=Gt(e.min,e.max-s,t.min)),Be(0,1,n)}function Nh(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 Jo=.35;function Bh(e=Jo){return e===!1?e=0:e===!0&&(e=Jo),{x:Yi(e,"left","right"),y:Yi(e,"top","bottom")}}function Yi(e,t,n){return{min:Zi(e,t),max:Zi(e,n)}}function Zi(e,t){return typeof e=="number"?e:e[t]||0}const zh=new WeakMap;class Hh{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=re(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:o}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(nn(d).point)},r=(d,f)=>{const{drag:h,dragPropagation:m,onDragStart:g}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Kd(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),_e(w=>{let x=this.getAxisMotionValue(w).get()||0;if(Fe.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const S=v.layout.layoutBox[w];S&&(x=ge(S)*(parseFloat(x)/100))}}this.originPoint[w]=x}),g&&te.postRender(()=>g(d,f)),Yo(this.visualElement,"transform");const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:g,onDrag:p}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:w}=f;if(m&&this.currentDirection===null){this.currentDirection=Wh(w),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,w),this.updateAxis("y",f.point,w),this.visualElement.render(),p&&p(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>_e(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new _l(t,{onSessionStart:i,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:o,contextWindow:bl(this.visualElement)})}stop(t,n){const o=t||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!o)return;const{velocity:r}=s;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&te.postRender(()=>a(o,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,o){const{drag:s}=this.getProps();if(!o||!dn(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let r=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(r=Ih(r,this.constraints[t],this.elastic[t])),i.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,s=this.constraints;t&>(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=jh(o.layoutBox,t):this.constraints=!1,this.elastic=Bh(n),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&_e(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=Nh(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!gt(t))return!1;const o=t.current;ze(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:s}=this.visualElement;if(!s||!s.layout)return!1;const i=Gf(o,s.root,this.visualElement.getTransformPagePoint());let r=$h(s.layout.layoutBox,i);if(n){const a=n(zf(r));this.hasMutatedConstraints=!!a,a&&(r=ll(a))}return r}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:s,dragTransition:i,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=_e(u=>{if(!dn(u,n,this.currentDirection))return;let d=l&&l[u]||{};r&&(d={min:0,max:0});const f=s?200:1e6,h=s?40:1e7,m={type:"inertia",velocity:o?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return Yo(this.visualElement,t),o.start(Us(t,o,0,n,this.visualElement,!1))}stopAnimation(){_e(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){_e(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(),s=o[n];return s||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){_e(n=>{const{drag:o}=this.getProps();if(!dn(n,o,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:r,max:a}=s.layout.layoutBox[n];i.set(t[n]-oe(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!gt(n)||!o||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};_e(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();s[r]=Oh({min:l,max:l},this.constraints[r])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),_e(r=>{if(!dn(r,t,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(oe(l,c,s[r]))})}addListeners(){if(!this.visualElement.current)return;zh.set(this.visualElement,this);const t=this.visualElement.current,n=Ot(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),o=()=>{const{dragConstraints:l}=this.getProps();gt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",o);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),te.read(o);const r=Yt(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(_e(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())}));return()=>{r(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:r=Jo,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:s,dragConstraints:i,dragElastic:r,dragMomentum:a}}}function dn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Wh(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Gh extends et{constructor(t){super(t),this.removeGroupControls=Ee,this.removeListeners=Ee,this.controls=new Hh(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ee}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ji=e=>(t,n)=>{e&&te.postRender(()=>e(t,n))};class Uh extends et{constructor(){super(...arguments),this.removePointerDownListener=Ee}onPointerDown(t){this.session=new _l(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:bl(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:s}=this.node.getProps();return{onSessionStart:Ji(t),onStart:Ji(n),onMove:o,onEnd:(i,r)=>{delete this.session,s&&te.postRender(()=>s(i,r))}}}mount(){this.removePointerDownListener=Ot(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 bn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Qi(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const kt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(G.test(e))e=parseFloat(e);else return e;const n=Qi(e,t.target.x),o=Qi(e,t.target.y);return`${n}% ${o}%`}},Kh={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,s=Ze.parse(e);if(s.length>5)return o;const i=Ze.createTransformer(e),r=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+r]/=a,s[1+r]/=l;const c=oe(a,l,.5);return typeof s[2+r]=="number"&&(s[2+r]/=c),typeof s[3+r]=="number"&&(s[3+r]/=c),i(s)}};let ho=!1;class qh extends C.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:s}=this.props,{projection:i}=t;pf(Xh),i&&(n.group&&n.group.add(i),o&&o.register&&s&&o.register(i),ho&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),bn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:s,isPresent:i}=this.props,{projection:r}=o;return r&&(r.isPresent=i,ho=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?r.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?r.promote():r.relegate()||te.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ls.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:s}=t;ho=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),o&&o.deregister&&o.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function El(e){const[t,n]=qa(),o=C.useContext(hs);return y.jsx(qh,{...e,layoutGroup:o,switchLayoutGroup:C.useContext(rl),isPresent:t,safeToRemove:n})}const Xh={borderRadius:{...kt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:kt,borderTopRightRadius:kt,borderBottomLeftRadius:kt,borderBottomRightRadius:kt,boxShadow:Kh};function Yh(e,t,n){const o=fe(e)?e:Ct(e);return o.start(Us("",o,t,n)),o.animation}const Zh=(e,t)=>e.depth-t.depth;class Jh{constructor(){this.children=[],this.isDirty=!1}add(t){ps(this.children,t),this.isDirty=!0}remove(t){vs(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Zh),this.isDirty=!1,this.children.forEach(t)}}function Qh(e,t){const n=ve.now(),o=({timestamp:s})=>{const i=s-n;i>=t&&(Ye(o),e(i-t))};return te.setup(o,!0),()=>Ye(o)}const Ml=["TopLeft","TopRight","BottomLeft","BottomRight"],eg=Ml.length,er=e=>typeof e=="string"?parseFloat(e):e,tr=e=>typeof e=="number"||G.test(e);function tg(e,t,n,o,s,i){s?(e.opacity=oe(0,n.opacity??1,ng(o)),e.opacityExit=oe(t.opacity??1,0,og(o))):i&&(e.opacity=oe(t.opacity??1,n.opacity??1,o));for(let r=0;r<eg;r++){const a=`border${Ml[r]}Radius`;let l=nr(t,a),c=nr(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||tr(l)===tr(c)?(e[a]=Math.max(oe(er(l),er(c),o),0),(Fe.test(c)||Fe.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=oe(t.rotate||0,n.rotate||0,o))}function nr(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const ng=Pl(0,.5,ga),og=Pl(.5,.95,Ee);function Pl(e,t,n){return o=>o<e?0:o>t?1:n(Gt(e,t,o))}function or(e,t){e.min=t.min,e.max=t.max}function Se(e,t){or(e.x,t.x),or(e.y,t.y)}function sr(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ir(e,t,n,o,s){return e-=t,e=An(e,1/n,o),s!==void 0&&(e=An(e,1/s,o)),e}function sg(e,t=0,n=1,o=.5,s,i=e,r=e){if(Fe.test(t)&&(t=parseFloat(t),t=oe(r.min,r.max,t/100)-r.min),typeof t!="number")return;let a=oe(i.min,i.max,o);e===i&&(a-=t),e.min=ir(e.min,t,n,a,s),e.max=ir(e.max,t,n,a,s)}function rr(e,t,[n,o,s],i,r){sg(e,t[n],t[o],t[s],t.scale,i,r)}const ig=["x","scaleX","originX"],rg=["y","scaleY","originY"];function ar(e,t,n,o){rr(e.x,t,ig,n?n.x:void 0,o?o.x:void 0),rr(e.y,t,rg,n?n.y:void 0,o?o.y:void 0)}function lr(e){return e.translate===0&&e.scale===1}function Tl(e){return lr(e.x)&&lr(e.y)}function cr(e,t){return e.min===t.min&&e.max===t.max}function ag(e,t){return cr(e.x,t.x)&&cr(e.y,t.y)}function ur(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Vl(e,t){return ur(e.x,t.x)&&ur(e.y,t.y)}function dr(e){return ge(e.x)/ge(e.y)}function fr(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class lg{constructor(){this.members=[]}add(t){ps(this.members,t),t.scheduleRender()}remove(t){if(vs(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let o;for(let s=n;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){o=i;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:s}=t.options;s===!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 cg(e,t,n){let o="";const s=e.x.translate/t.x,i=e.y.translate/t.y,r=n?.z||0;if((s||i||r)&&(o=`translate3d(${s}px, ${i}px, ${r}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:m}=n;c&&(o=`perspective(${c}px) ${o}`),u&&(o+=`rotate(${u}deg) `),d&&(o+=`rotateX(${d}deg) `),f&&(o+=`rotateY(${f}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 go=["","X","Y","Z"],ug=1e3;let dg=0;function mo(e,t,n,o){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),o&&(o[e]=0))}function Al(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=pl(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",te,!(s||i))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&Al(o)}function Dl({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:s}){return class{constructor(r={},a=t?.()){this.id=dg++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(gg),this.nodes.forEach(yg),this.nodes.forEach(wg),this.nodes.forEach(mg)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Jh)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new ws),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=Ka(r)&&!Qd(r),this.instance=r;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;te.read(()=>{d=window.innerWidth}),e(r,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,u&&u(),u=Qh(f,250),bn.hasAnimatedSinceResize&&(bn.hasAnimatedSinceResize=!1,this.nodes.forEach(mr)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||_g,{onLayoutAnimationStart:g,onLayoutAnimationComplete:p}=c.getProps(),w=!this.targetLayout||!Vl(this.targetLayout,h),x=!d&&f;if(this.options.layoutRoot||this.resumeFrom||x||d&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...ks(m,"layout"),onPlay:g,onComplete:p};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,x)}else d||mr(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(),Ye(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(xg),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&&Al(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(hr);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(gr);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(vg),this.nodes.forEach(fg),this.nodes.forEach(hg)):this.nodes.forEach(gr),this.clearAllSnapshots();const a=ve.now();ue.delta=Be(0,1e3/60,a-ue.timestamp),ue.timestamp=a,ue.isProcessing=!0,no.update.process(ue),no.preRender.process(ue),no.render.process(ue),ue.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ls.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(pg),this.sharedNodes.forEach(Cg)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,te.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){te.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ge(this.snapshot.measuredBox.x)&&!ge(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=re(),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(!s)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Tl(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(a||nt(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Rg(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return re();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Eg))){const{scroll:c}=this.root;c&&(mt(a.x,c.offset.x),mt(a.y,c.offset.y))}return a}removeElementScroll(r){const a=re();if(Se(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&Se(a,r),mt(a.x,u.offset.x),mt(a.y,u.offset.y))}return a}applyTransform(r,a=!1){const l=re();Se(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&&pt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),nt(u.latestValues)&&pt(l,u.latestValues)}return nt(this.latestValues)&&pt(l,this.latestValues),l}removeTransform(r){const a=re();Se(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!nt(c.latestValues))continue;Uo(c.latestValues)&&c.updateSnapshot();const u=re(),d=c.measurePageBox();Se(u,d),ar(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return nt(this.latestValues)&&ar(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!==ue.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!(!this.layout||!(u||d))){if(this.resolvedRelativeTargetAt=ue.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=re(),this.relativeTargetOrigin=re(),Bt(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),Se(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=re(),this.targetWithTransforms=re()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Dh(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Se(this.target,this.layout.layoutBox),ul(this.target,this.targetDelta)):Se(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=re(),this.relativeTargetOrigin=re(),Bt(this.relativeTargetOrigin,this.target,f.target),Se(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Uo(this.parent.latestValues)||cl(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===ue.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;Se(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;Wf(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=re());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(sr(this.prevProjectionDelta.x,this.projectionDelta.x),sr(this.prevProjectionDelta.y,this.projectionDelta.y)),Nt(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!fr(this.projectionDelta.x,this.prevProjectionDelta.x)||!fr(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=vt(),this.projectionDelta=vt(),this.projectionDeltaWithTransform=vt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=vt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=re(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=h!==m,p=this.getStack(),w=!p||p.members.length<=1,x=!!(g&&!w&&this.options.crossfade===!0&&!this.path.some(bg));this.animationProgress=0;let v;this.mixTargetDelta=S=>{const _=S/1e3;pr(d.x,r.x,_),pr(d.y,r.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Bt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Sg(this.relativeTarget,this.relativeTargetOrigin,f,_),v&&ag(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=re()),Se(v,this.relativeTarget)),g&&(this.animationValues=u,tg(u,c,this.latestValues,_,x,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ye(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=te.update(()=>{bn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ct(0)),this.currentAnimation=Yh(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(ug),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&&kl(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||re();const d=ge(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const f=ge(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}Se(a,l),pt(a,u),Nt(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&&mo("z",r,c,this.animationValues);for(let u=0;u<go.length;u++)mo(`rotate${go[u]}`,r,c,this.animationValues),mo(`skew${go[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=Sn(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=Sn(a?.pointerEvents)||""),this.hasProjected&&!nt(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=cg(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),r.transform=d;const{x:f,y:h}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,c.animationValues?r.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in Xt){if(u[m]===void 0)continue;const{correct:g,applyTo:p,isCSSVariable:w}=Xt[m],x=d==="none"?u[m]:g(u[m],c);if(p){const v=p.length;for(let S=0;S<v;S++)r[p[S]]=x}else w?this.options.visualElement.renderState.vars[m]=x:r[m]=x}this.options.layoutId&&(r.pointerEvents=c===this?Sn(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(hr),this.root.sharedNodes.clear()}}}function fg(e){e.updateLayout()}function hg(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:s}=e.options,i=t.source!==e.layout.source;s==="size"?_e(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=ge(d);d.min=n[u].min,d.max=d.min+f}):kl(s,t.layoutBox,n)&&_e(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=ge(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const r=vt();Nt(r,n,t.layoutBox);const a=vt();i?Nt(a,e.applyTransform(o,!0),t.measuredBox):Nt(a,n,t.layoutBox);const l=!Tl(r);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const h=re();Bt(h,t.layoutBox,d.layoutBox);const m=re();Bt(m,n,f.layoutBox),Vl(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 gg(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 mg(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function pg(e){e.clearSnapshot()}function hr(e){e.clearMeasurements()}function gr(e){e.isLayoutDirty=!1}function vg(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function mr(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function yg(e){e.resolveTargetDelta()}function wg(e){e.calcProjection()}function xg(e){e.resetSkewAndRotation()}function Cg(e){e.removeLeadSnapshot()}function pr(e,t,n){e.translate=oe(t.translate,0,n),e.scale=oe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function vr(e,t,n,o){e.min=oe(t.min,n.min,o),e.max=oe(t.max,n.max,o)}function Sg(e,t,n,o){vr(e.x,t.x,n.x,o),vr(e.y,t.y,n.y,o)}function bg(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const _g={duration:.45,ease:[.4,0,.1,1]},yr=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),wr=yr("applewebkit/")&&!yr("chrome/")?Math.round:Ee;function xr(e){e.min=wr(e.min),e.max=wr(e.max)}function Rg(e){xr(e.x),xr(e.y)}function kl(e,t,n){return e==="position"||e==="preserve-aspect"&&!Ah(dr(t),dr(n),.2)}function Eg(e){return e!==e.root&&e.scroll?.wasRoot}const Mg=Dl({attachResizeListener:(e,t)=>Yt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),po={current:void 0},Fl=Dl({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!po.current){const e=new Mg({});e.mount(window),e.setOptions({layoutScroll:!0}),po.current=e}return po.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Pg={pan:{Feature:Uh},drag:{Feature:Gh,ProjectionNode:Fl,MeasureLayout:El}};function Cr(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=o[s];i&&te.postRender(()=>i(t,nn(t)))}class Tg extends et{mount(){const{current:t}=this.node;t&&(this.unmount=qd(t,(n,o)=>(Cr(this.node,o,"Start"),s=>Cr(this.node,s,"End"))))}unmount(){}}class Vg extends et{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=Qt(Yt(this.node.current,"focus",()=>this.onFocus()),Yt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Sr(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 s="onTap"+(n==="End"?"":n),i=o[s];i&&te.postRender(()=>i(t,nn(t)))}class Ag extends et{mount(){const{current:t}=this.node;t&&(this.unmount=Jd(t,(n,o)=>(Sr(this.node,o,"Start"),(s,{success:i})=>Sr(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Qo=new WeakMap,vo=new WeakMap,Dg=e=>{const t=Qo.get(e.target);t&&t(e)},kg=e=>{e.forEach(Dg)};function Fg({root:e,...t}){const n=e||document;vo.has(n)||vo.set(n,{});const o=vo.get(n),s=JSON.stringify(t);return o[s]||(o[s]=new IntersectionObserver(kg,{root:e,...t})),o[s]}function Lg(e,t,n){const o=Fg(t);return Qo.set(e,n),o.observe(e),()=>{Qo.delete(e),o.unobserve(e)}}const Ig={some:0,all:1};class jg extends et{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:s="some",once:i}=t,r={root:n?n.current:void 0,rootMargin:o,threshold:typeof s=="number"?s:Ig[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return Lg(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($g(t,n))&&this.startObserver()}unmount(){}}function $g({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Og={inView:{Feature:jg},tap:{Feature:Ag},focus:{Feature:Vg},hover:{Feature:Tg}},Ng={layout:{ProjectionNode:Fl,MeasureLayout:El}},Bg={...Rh,...Og,...Pg,...Ng},Bn=Bf(Bg,eh),zg="_primary_13825_8",Hg="_secondary_13825_12",Wg="_tertiary_13825_16",Gg="_positive_13825_20",Ug="_negative_13825_24",Kg="_warning_13825_28",qg="_accent_13825_32",Xg="_inverse_13825_36",Yg="_text_13825_111",Zg="_regular_13825_117",Jg="_medium_13825_121",Qg="_semibold_13825_125",em="_bold_13825_129",fn={primary:zg,secondary:Hg,tertiary:Wg,positive:Gg,negative:Ug,warning:Kg,accent:qg,inverse:Xg,"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:Yg,regular:Zg,medium:Jg,semibold:Qg,bold:em},tm=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"),k.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:s="p",colorName:i="primary",style:r,clickOpacity:a=.5,opacityDuration:l=200,onClick:c,disabled:u,mt:d,mb:f,ml:h,mr:m,flex:g,cursor:p,wordBreak:w,whiteSpace:x,textOverflow:v,decoration:S,color:_,center:P,left:V,right:M,uppercase:A,lowercase:F,capitalize:$,overflow:z,...O},D)=>{const[B,N]=C.useState(!1),E=!!c,R=()=>E&&N(!0),T=()=>E&&N(!1),L=tm({mt:d,mb:f,ml:h,mr:m,flex:g,cursor:p,wordBreak:w,whiteSpace:x,textOverflow:v,decoration:S,color:_,center:P,left:V,right:M,uppercase:A,lowercase:F,capitalize:$,overflow:z}),Y=s,U=E?k.css({opacity:B?a:1,transition:`opacity ${l}ms ease`}):"";return y.jsx(Y,{ref:D,...O,className:k.cx(fn.text,fn[n],fn[i],fn[o],U,t,L),style:r,onClick:c,onMouseDown:R,onMouseUp:T,onMouseLeave:T,onTouchStart:R,onTouchEnd:T,role:E?"button":void 0,tabIndex:E?0:void 0,children:e})});K.displayName="Text";const Ll=Bn(K),nm=k.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}),Ft={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)"},om={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},sm={clear:k.css({backgroundColor:"transparent",border:"none"}),filled:k.css({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:k.css({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},im=(e,t,n,o)=>{if(o)return k.css({cursor:"not-allowed",opacity:.7});const s={transition:"all 0.2s ease",borderRadius:"var(--corner-lg)",border:"none",color:e==="filled"?"var(--text-inverse)":`var(--text-${t})`};switch(e){case"filled":return k.css({...s,backgroundColor:`var(--fill-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${t}-${n}-hover)`}});case"outline":return k.css({...s,backgroundColor:"transparent",border:`1px solid var(--border-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});case"clear":return k.css({...s,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});default:return k.css(s)}},es=({disabled:e,loading:t,wrapperClassName:n,buttonClassName:o,buttonDisabledClassName:s,textClassName:i,children:r,variant:a="filled",backgroundColor:l,textColor:c,textFontWeight:u,borderColor:d,color:f="accent",opacity:h,borderRadius:m,width:g="full",size:p="md",iconLeft:w,iconRight:x,intensity:v="primary",flex:S,type:_="button",...P})=>{const V=C.useMemo(()=>{switch(g){case"full":return"100%";case"auto":return"auto";default:return g}},[g]),M=C.useMemo(()=>l||(a==="filled"?f==="neutral"?"var(--fill-neutral-secondary)":`var(--fill-${f}-${v})`:"transparent"),[a,l,f,v]),A=C.useMemo(()=>{if(v==="primary"){if(f==="neutral")return"var(--text-secondary)";if(a==="filled")return"var(--text-inverse)"}else if(f==="neutral")return"var(--text-secondary)";return`var(--text-${f})`},[v,f,a]),F=C.useMemo(()=>{if(v==="primary"){if(f==="neutral")return"secondary";if(a==="filled")return"inverse"}else if(f==="neutral")return"secondary";return f},[a,f,v]),$=C.useMemo(()=>d||(a==="outline"?`var(--border-${f}-${v})`:"transparent"),[a,d,f,v]),z=C.useMemo(()=>{switch(p){case"lg":return Ft.lg;case"md":case"sm":return Ft.md;case"xs":return Ft.sm;default:return Ft.md}},[p]),O=k.cx(nm,im(a,f,v,e),sm[a],e?s:void 0,k.css({borderRadius:m?Ft[m]:z,backgroundColor:M,borderColor:$,color:c,width:"100%",height:om[p],opacity:h||(e?.7:1)}),o),D=C.useMemo(()=>{switch(p){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[p]);return y.jsx(I,{className:k.cx(n),w:V,flex:S,relative:!0,overflow:"hidden",children:y.jsxs(Bn.button,{...P,whileTap:!e&&!t?{scale:.99,boxShadow:"inset 0 0 0 10000px rgba(0,0,0,0.1)",transition:{duration:0}}:{},disabled:e||t,className:O,children:[t?y.jsx(Jr,{color:A}):y.jsxs(y.Fragment,{children:[w,y.jsx(Ll,{style:{color:c},colorName:F,variant:D,className:i,textOverflow:"ellipsis",overflow:"hidden",children:r}),x]}),y.jsx(ct,{})]})})},rm=e=>b.createElement("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",...e},b.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),am=e=>b.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...e},b.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),lm="_checkbox_22ifd_8",cm="_disabled_22ifd_14",um="_checkbox__ripple_22ifd_14",dm="_checkbox__input_22ifd_26",fm="_checkbox__box_22ifd_33",hm="_secondary_22ifd_46",gm="_checked_22ifd_52",mm="_error_22ifd_61",je={checkbox:lm,disabled:cm,checkbox__ripple:um,checkbox__input:dm,checkbox__box:fm,secondary:hm,checked:gm,error:mm},pm={sm:20,md:24},Ks=C.forwardRef(({checked:e,onChange:t,disabled:n,error:o,indeterminate:s,size:i="md",title:r,titleColor:a,subtitle:l,subtitleColor:c="secondary",name:u,required:d,variant:f="primary",flex:h,readOnly:m},g)=>{const[p,w]=C.useState(!1),x=e!==void 0,v=x?e:p,S=A=>{x||w(A.target.checked),t?.(A)},_=pm[i],P=v||s,V=!!m&&!n,M=n?"not-allowed":V?"auto":"pointer";return y.jsxs("label",{className:k.cx(je.checkbox,k.css({flex:h,cursor:M}),{[je.disabled]:n}),children:[y.jsxs(I,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${_}px`,"--checkbox-size-double":`${_*2}px`},children:[y.jsx("input",{ref:g,type:"checkbox",checked:v,onChange:V?void 0:S,onClick:A=>A.stopPropagation(),disabled:n,readOnly:V,name:u,required:d,className:k.cx(je.checkbox__input,{[je.disabled]:n},k.css({cursor:M}))}),y.jsx("div",{className:k.cx(je.checkbox__box,je[f],{[je.disabled]:n,[je.error]:o,[je.checked]:P}),children:P&&(s?y.jsx(am,{width:_*.75,height:_*.75}):y.jsx(rm,{width:_*.75,height:_*.75}))})]}),(r||l)&&y.jsxs(I,{gap:4,children:[r&&y.jsx(K,{colorName:a,variant:i==="sm"?"body-2":"body-1",children:r}),l&&y.jsx(K,{variant:"body-2",colorName:c,children:l})]})]})});Ks.displayName="Checkbox";const vm=e=>b.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("g",{opacity:.5},b.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"}))),ym="_disabled_19ujt_20",wm="_multiline_19ujt_24",xm="_input_19ujt_8",Cm="_sm_19ujt_74",Sm="_md_19ujt_79",bm="_error_19ujt_84",_m="_white_19ujt_88",Rm="_gray_19ujt_92",pe={"input-container":"_input-container_19ujt_8",disabled:ym,multiline:wm,input:xm,"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:Cm,md:Sm,error:bm,white:_m,gray:Rm,"clear-button":"_clear-button_19ujt_96"};function br(e){return{...new Event("input",{bubbles:!0}),target:e,currentTarget:e}}const Il=C.forwardRef((e,t)=>{const{label:n,prompt:o,error:s,errorText:i,size:r="md",prefix:a,suffix:l,background:c="white",showClearButton:u,disabled:d,value:f,defaultValue:h,inputClassName:m,textAlign:g="left",...p}=e,w=e.multiline===!0,x=C.useRef(null),v=C.useRef(null),[S,_]=Jt(typeof f=="string"||typeof f=="number"?String(f):void 0,h==="string"||h==="number"?String(h):"");C.useImperativeHandle(t,()=>({focus:()=>{x.current?.focus(),v.current?.focus()},blur:()=>{x.current?.blur(),v.current?.blur()},get value(){return x.current?.value||v.current?.value},set value(A){_(A),x.current&&(x.current.value=A),v.current&&(v.current.value=A)}}));const P=A=>{if(_(A.target.value),w){const F=e.onChange;F?.(A)}else{const F=e.onChange;F?.(A)}};C.useEffect(()=>{w&&e.autoResize&&v.current&&(v.current.style.height="auto",v.current.style.height=`${v.current.scrollHeight}px`)},[S,w,e.autoResize]);const V=()=>{if(_(""),!w){const F=x.current;if(F){F.value="";const $=br(F),z=e.onChange;z?.($)}return}const A=v.current;if(A){A.value="";const F=br(A),$=e.onChange;$?.(F)}},M=()=>{if(w){const{rows:z,autoResize:O,onChange:D,multiline:B,...N}=p;return y.jsx("textarea",{ref:v,rows:e.rows??3,className:k.cx(pe.input,m,{[pe.disabled]:d,[pe[`input-text-align_${g}`]]:!!g}),disabled:d,maxLength:e.maxLength,...N,value:S,onChange:P})}const{onChange:A,multiline:F,...$}=p;return y.jsx("input",{...$,ref:x,className:k.cx(pe.input,pe[`input-text-size_${r}`],m,{[pe.disabled]:d,[pe[`input-text-align_${g}`]]:!!g}),disabled:d,type:e.type??"text",value:S,onChange:P})};return y.jsxs(I,{w:"full",gap:"var(--spacing-sm)",children:[n&&y.jsx(K,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:n}),y.jsxs(I,{row:!0,alignItems:w?"flex-start":"center",w:"full",gap:"var(--spacing-md)",className:k.cx(pe["input-container"],pe[c],pe[r],{[pe.error]:s,[pe.disabled]:d,[pe.multiline]:w}),children:[a&&y.jsx(I,{flex:"none",children:a}),y.jsx(I,{flex:"1",children:M()}),u&&S&&!d&&y.jsx(I,{flex:"none",children:y.jsx("span",{className:pe["clear-button"],onClick:V,children:y.jsx(vm,{})})}),l&&y.jsx(I,{flex:"none",children:l})]}),(o||w)&&y.jsxs(I,{row:!0,gap:10,w:"full",children:[typeof o=="string"?y.jsx(K,{variant:"caption-1",colorName:"tertiary",children:o}):o,w&&e.maxLength&&y.jsx(K,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${S.length}/${e.maxLength}`})]}),i&&s&&y.jsx(K,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:i})]})});Il.displayName="Input";const Em="_input_5xq63_8",Mm="_disabled_5xq63_29",Pm="_error_5xq63_37",Tm="_success_5xq63_41",Vm="_white_5xq63_50",Am="_gray_5xq63_54",Dm="_glow_5xq63_58",ut={input:Em,disabled:Mm,error:Pm,success:Tm,white:Vm,gray:Am,glow:Dm};function km(e){const t=C.useRef(void 0);return C.useEffect(()=>{t.current=e},[e]),t.current}const jl=C.forwardRef(({length:e=6,label:t,prompt:n,error:o,errorText:s,success:i,disabled:r,autoFocus:a,center:l,secure:c,loading:u,background:d="gray",numeric:f=!0,className:h,value:m,defaultValue:g,onChange:p,onComplete:w},x)=>{const v=typeof m=="string",S=v?m:g,_=typeof S=="string"?S.slice(0,e):"",[P,V]=Jt(v?m:void 0,_),[M,A]=C.useState(()=>{const E=_.slice(0,e);return Array.from({length:e},(R,T)=>E[T]??"")}),F=C.useRef(void 0),$=km(m),z=C.useRef([]);C.useEffect(()=>{if(!v)return;const E=m??"";if(E===$)return;if(E===F.current){F.current=void 0;return}const R=E.slice(0,e);A(Array.from({length:e},(T,L)=>R[L]??""))},[v,m,e,$]);const O=C.useCallback((E,R)=>{const T=E.slice(0,e);R?.fromInternal&&(F.current=T),V(T),p?.(T),T.length===e&&w?.(T)},[e,p,w,V]);C.useImperativeHandle(x,()=>({focus:()=>{z.current[0]?.focus()},blur:()=>{z.current.forEach(E=>E?.blur())},get value(){return P||""},setValue:E=>{const R=E.slice(0,e);A(Array.from({length:e},(T,L)=>R[L]??"")),O(R,{fromInternal:!0})},clear:()=>{A(Array.from({length:e},()=>"")),O("",{fromInternal:!0})}}),[e,O,P]);const D=C.useCallback((E,R)=>{if(r)return;let T=R;if(f&&(T=T.replace(/\D/g,"")),T.length>1){const q=M.slice(0,E).join("")+T+M.slice(E+1).join(""),me=Array.from({length:e},(j,Z)=>q[Z]??"");A(me),O(q,{fromInternal:!0});const J=Math.min(E+T.length,e-1),se=z.current[J];se?.focus(),se?.select();return}const L=M[E],Y=[...M];Y[E]=T,A(Y);const U=Y.join("");if(O(U,{fromInternal:!0}),!L&&T&&E<e-1){const q=z.current[E+1];q?.focus(),q?.select()}},[M,r,e,f,O]),B=C.useCallback((E,R)=>{if(!r){if(R.key==="Backspace"){R.preventDefault();const T=z.current[E];if(M[E]){const L=[...M];L[E]="",A(L),O(L.join(""),{fromInternal:!0}),T?.focus();return}if(E>0){const L=z.current[E-1];L?.focus(),L?.select()}return}R.key==="ArrowLeft"&&E>0&&(R.preventDefault(),z.current[E-1]?.focus()),R.key==="ArrowRight"&&E<e-1&&(R.preventDefault(),z.current[E+1]?.focus())}},[M,r,e,O]),N=C.useCallback((E,R)=>{if(r)return;R.preventDefault();let T=R.clipboardData.getData("text");if(f&&(T=T.replace(/\D/g,"")),!T)return;const L=e-E,Y=Math.min(T.length,L),U=T.slice(0,Y),q=[...M];for(let j=0;j<Y;j++)q[E+j]=U[j]??"";A(q);const me=q.join("");O(me,{fromInternal:!0});const J=Math.min(E+Y-1,e-1),se=z.current[J];se?.focus(),se?.select()},[M,r,e,f,O]);return y.jsxs(I,{w:"full",gap:"var(--spacing-sm)",className:h,center:l,children:[t&&y.jsx(K,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:t}),y.jsx(I,{row:!0,w:"full",gap:"var(--spacing-sm)",center:l,className:k.cx({[ut.disabled]:r}),children:Array.from({length:e}).map((E,R)=>y.jsxs(I,{relative:!0,display:"inline-block",children:[y.jsx("input",{ref:T=>{z.current[R]=T},className:k.cx(ut.input,ut[d],o&&ut.error,i&&ut.success,M[R]&&k.css({caretColor:"transparent"})),inputMode:f?"numeric":"text",type:c?"password":"text",maxLength:1,autoFocus:a&&R===0,disabled:r||u,value:M[R],onChange:T=>D(R,T.target.value),onKeyDown:T=>B(R,T),onPaste:T=>N(R,T)}),y.jsx(Bn.span,{className:ut.glow,variants:Fm,custom:R,initial:"idle",animate:u?"wave":"idle"})]},R))}),n&&y.jsx(K,{variant:"caption-1",colorName:"tertiary",children:n}),s&&o&&y.jsx(K,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:s})]})}),Fm={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]}})};jl.displayName="OtpInput";const Lm="_primary_svt6d_8",Im="_secondary_svt6d_13",jm="_button_svt6d_18",Ue={primary:Lm,secondary:Im,button:jm,"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 $m({value:e,onChange:t,options:n,variant:o="primary",fullWidth:s=!1,className:i}){return y.jsx(I,{row:!0,alignItems:"center",borderRadius:"var(--corner-md)",p:"var(--spacing-xs)",gap:"var(--spacing-md)",className:k.cx(Ue[o],s&&Ue["full-width"],i),children:n.map(r=>{const a=r.value===e,l=r.disabled,c=r.separatorAfter??!1;return y.jsxs(C.Fragment,{children:[y.jsxs("button",{type:"button",disabled:l,className:k.cx(Ue.button,s&&Ue["full-width"],a&&Ue["button-active"],a&&Ue[`button-${o}`],l&&Ue["button-disabled"]),onClick:()=>!l&&t(r.value),children:[r.icon&&y.jsx(I,{alignItems:"center",justifyContent:"center",className:Ue["icon-container"],children:r.icon}),r.label&&y.jsx(K,{colorName:a?"primary":"tertiary",children:r.label}),!l&&y.jsx(ct,{color:"var(--fill-bg-overlay-primary)"})]}),c&&y.jsx(I,{w:1,h:24,backgroundColor:"var(--fill-bg-tertiary)"})]},r.value)})})}function zn(){return typeof window<"u"}function Tt(e){return $l(e)?(e.nodeName||"").toLowerCase():"#document"}function xe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ie(e){var t;return(t=($l(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $l(e){return zn()?e instanceof Node||e instanceof xe(e).Node:!1}function ee(e){return zn()?e instanceof Element||e instanceof xe(e).Element:!1}function ye(e){return zn()?e instanceof HTMLElement||e instanceof xe(e).HTMLElement:!1}function ts(e){return!zn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xe(e).ShadowRoot}const Om=new Set(["inline","contents"]);function on(e){const{overflow:t,overflowX:n,overflowY:o,display:s}=Me(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!Om.has(s)}const Nm=new Set(["table","td","th"]);function Bm(e){return Nm.has(Tt(e))}const zm=[":popover-open",":modal"];function Hn(e){return zm.some(t=>{try{return e.matches(t)}catch{return!1}})}const Hm=["transform","translate","scale","rotate","perspective"],Wm=["transform","translate","scale","rotate","perspective","filter"],Gm=["paint","layout","strict","content"];function qs(e){const t=Wn(),n=ee(e)?Me(e):e;return Hm.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)||Wm.some(o=>(n.willChange||"").includes(o))||Gm.some(o=>(n.contain||"").includes(o))}function Um(e){let t=We(e);for(;ye(t)&&!Ne(t);){if(qs(t))return t;if(Hn(t))return null;t=We(t)}return null}function Wn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Km=new Set(["html","body","#document"]);function Ne(e){return Km.has(Tt(e))}function Me(e){return xe(e).getComputedStyle(e)}function Gn(e){return ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function We(e){if(Tt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ts(e)&&e.host||Ie(e);return ts(t)?t.host:t}function Ol(e){const t=We(e);return Ne(t)?e.ownerDocument?e.ownerDocument.body:e.body:ye(t)&&on(t)?t:Ol(t)}function Xe(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Ol(e),i=s===((o=e.ownerDocument)==null?void 0:o.body),r=xe(s);if(i){const a=ns(r);return t.concat(r,r.visualViewport||[],on(s)?s:[],a&&n?Xe(a):[])}return t.concat(s,Xe(s,[],n))}function ns(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const bt=Math.min,we=Math.max,Dn=Math.round,hn=Math.floor,Le=e=>({x:e,y:e}),qm={left:"right",right:"left",bottom:"top",top:"bottom"},Xm={start:"end",end:"start"};function _r(e,t,n){return we(e,bt(t,n))}function sn(e,t){return typeof e=="function"?e(t):e}function Je(e){return e.split("-")[0]}function rn(e){return e.split("-")[1]}function Nl(e){return e==="x"?"y":"x"}function Bl(e){return e==="y"?"height":"width"}const Ym=new Set(["top","bottom"]);function Oe(e){return Ym.has(Je(e))?"y":"x"}function zl(e){return Nl(Oe(e))}function Zm(e,t,n){n===void 0&&(n=!1);const o=rn(e),s=zl(e),i=Bl(s);let r=s==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(r=kn(r)),[r,kn(r)]}function Jm(e){const t=kn(e);return[os(e),t,os(t)]}function os(e){return e.replace(/start|end/g,t=>Xm[t])}const Rr=["left","right"],Er=["right","left"],Qm=["top","bottom"],ep=["bottom","top"];function tp(e,t,n){switch(e){case"top":case"bottom":return n?t?Er:Rr:t?Rr:Er;case"left":case"right":return t?Qm:ep;default:return[]}}function np(e,t,n,o){const s=rn(e);let i=tp(Je(e),n==="start",o);return s&&(i=i.map(r=>r+"-"+s),t&&(i=i.concat(i.map(os)))),i}function kn(e){return e.replace(/left|right|bottom|top/g,t=>qm[t])}function op(e){return{top:0,right:0,bottom:0,left:0,...e}}function sp(e){return typeof e!="number"?op(e):{top:e,right:e,bottom:e,left:e}}function Fn(e){const{x:t,y:n,width:o,height:s}=e;return{width:o,height:s,top:n,left:t,right:t+o,bottom:n+s,x:t,y:n}}const Mr="data-floating-ui-focusable",ip="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ss(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ts(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Lt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function yo(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 rp(e){return e.matches("html,body")}function yt(e){return e?.ownerDocument||document}function ap(e){return ye(e)&&e.matches(ip)}function lp(e){return e?e.hasAttribute(Mr)?e:e.querySelector("["+Mr+"]")||e:null}function _n(e,t,n){return n===void 0&&(n=!0),e.filter(s=>{var i;return s.parentId===t&&(!n||((i=s.context)==null?void 0:i.open))}).flatMap(s=>[s,..._n(e,s.id,n)])}function cp(e){return"nativeEvent"in e}function Zt(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var up=typeof document<"u",dp=function(){},_t=up?C.useLayoutEffect:dp;const fp={...b};function gn(e){const t=b.useRef(e);return _t(()=>{t.current=e}),t}const hp=fp.useInsertionEffect,gp=hp||(e=>e());function ke(e){const t=b.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return gp(()=>{t.current=e}),b.useCallback(function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return t.current==null?void 0:t.current(...o)},[])}function Pr(e,t,n){let{reference:o,floating:s}=e;const i=Oe(t),r=zl(t),a=Bl(r),l=Je(t),c=i==="y",u=o.x+o.width/2-s.width/2,d=o.y+o.height/2-s.height/2,f=o[a]/2-s[a]/2;let h;switch(l){case"top":h={x:u,y:o.y-s.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:d};break;case"left":h={x:o.x-s.width,y:d};break;default:h={x:o.x,y:o.y}}switch(rn(t)){case"start":h[r]-=f*(n&&c?-1:1);break;case"end":h[r]+=f*(n&&c?-1:1);break}return h}const mp=async(e,t,n)=>{const{placement:o="bottom",strategy:s="absolute",middleware:i=[],platform:r}=n,a=i.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(t));let c=await r.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:d}=Pr(c,o,l),f=o,h={},m=0;for(let g=0;g<a.length;g++){const{name:p,fn:w}=a[g],{x,y:v,data:S,reset:_}=await w({x:u,y:d,initialPlacement:o,placement:f,strategy:s,middlewareData:h,rects:c,platform:r,elements:{reference:e,floating:t}});u=x??u,d=v??d,h={...h,[p]:{...h[p],...S}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(c=_.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:s}):_.rects),{x:u,y:d}=Pr(c,f,l)),g=-1)}return{x:u,y:d,placement:f,strategy:s,middlewareData:h}};async function Xs(e,t){var n;t===void 0&&(t={});const{x:o,y:s,platform:i,rects:r,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=sn(t,e),m=sp(h),p=a[f?d==="floating"?"reference":"floating":d],w=Fn(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(p)))==null||n?p:p.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="floating"?{x:o,y:s,width:r.floating.width,height:r.floating.height}:r.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},_=Fn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:v,strategy:l}):x);return{top:(w.top-_.top+m.top)/S.y,bottom:(_.bottom-w.bottom+m.bottom)/S.y,left:(w.left-_.left+m.left)/S.x,right:(_.right-w.right+m.right)/S.x}}const pp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:s,middlewareData:i,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...p}=sn(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=Je(s),x=Oe(a),v=Je(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),_=f||(v||!g?[kn(a)]:Jm(a)),P=m!=="none";!f&&P&&_.push(...np(a,g,m,S));const V=[a,..._],M=await Xs(t,p),A=[];let F=((o=i.flip)==null?void 0:o.overflows)||[];if(u&&A.push(M[w]),d){const D=Zm(s,r,S);A.push(M[D[0]],M[D[1]])}if(F=[...F,{placement:s,overflows:A}],!A.every(D=>D<=0)){var $,z;const D=((($=i.flip)==null?void 0:$.index)||0)+1,B=V[D];if(B&&(!(d==="alignment"?x!==Oe(B):!1)||F.every(R=>Oe(R.placement)===x?R.overflows[0]>0:!0)))return{data:{index:D,overflows:F},reset:{placement:B}};let N=(z=F.filter(E=>E.overflows[0]<=0).sort((E,R)=>E.overflows[1]-R.overflows[1])[0])==null?void 0:z.placement;if(!N)switch(h){case"bestFit":{var O;const E=(O=F.filter(R=>{if(P){const T=Oe(R.placement);return T===x||T==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(T=>T>0).reduce((T,L)=>T+L,0)]).sort((R,T)=>R[1]-T[1])[0])==null?void 0:O[0];E&&(N=E);break}case"initialPlacement":N=a;break}if(s!==N)return{reset:{placement:N}}}return{}}}},vp=new Set(["left","top"]);async function yp(e,t){const{placement:n,platform:o,elements:s}=e,i=await(o.isRTL==null?void 0:o.isRTL(s.floating)),r=Je(n),a=rn(n),l=Oe(n)==="y",c=vp.has(r)?-1:1,u=i&&l?-1:1,d=sn(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const wp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:s,y:i,placement:r,middlewareData:a}=t,l=await yp(t,e);return r===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:r}}}}},xp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:s}=t,{mainAxis:i=!0,crossAxis:r=!1,limiter:a={fn:p=>{let{x:w,y:x}=p;return{x:w,y:x}}},...l}=sn(e,t),c={x:n,y:o},u=await Xs(t,l),d=Oe(Je(s)),f=Nl(d);let h=c[f],m=c[d];if(i){const p=f==="y"?"top":"left",w=f==="y"?"bottom":"right",x=h+u[p],v=h-u[w];h=_r(x,h,v)}if(r){const p=d==="y"?"top":"left",w=d==="y"?"bottom":"right",x=m+u[p],v=m-u[w];m=_r(x,m,v)}const g=a.fn({...t,[f]:h,[d]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[f]:i,[d]:r}}}}}},Cp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:s,rects:i,platform:r,elements:a}=t,{apply:l=()=>{},...c}=sn(e,t),u=await Xs(t,c),d=Je(s),f=rn(s),h=Oe(s)==="y",{width:m,height:g}=i.floating;let p,w;d==="top"||d==="bottom"?(p=d,w=f===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(w=d,p=f==="end"?"top":"bottom");const x=g-u.top-u.bottom,v=m-u.left-u.right,S=bt(g-u[p],x),_=bt(m-u[w],v),P=!t.middlewareData.shift;let V=S,M=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=v),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(V=x),P&&!f){const F=we(u.left,0),$=we(u.right,0),z=we(u.top,0),O=we(u.bottom,0);h?M=m-2*(F!==0||$!==0?F+$:we(u.left,u.right)):V=g-2*(z!==0||O!==0?z+O:we(u.top,u.bottom))}await l({...t,availableWidth:M,availableHeight:V});const A=await r.getDimensions(a.floating);return m!==A.width||g!==A.height?{reset:{rects:!0}}:{}}}};function Hl(e){const t=Me(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const s=ye(e),i=s?e.offsetWidth:n,r=s?e.offsetHeight:o,a=Dn(n)!==i||Dn(o)!==r;return a&&(n=i,o=r),{width:n,height:o,$:a}}function Ys(e){return ee(e)?e:e.contextElement}function xt(e){const t=Ys(e);if(!ye(t))return Le(1);const n=t.getBoundingClientRect(),{width:o,height:s,$:i}=Hl(t);let r=(i?Dn(n.width):n.width)/o,a=(i?Dn(n.height):n.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const Sp=Le(0);function Wl(e){const t=xe(e);return!Wn()||!t.visualViewport?Sp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bp(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==xe(e)?!1:t}function lt(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=Ys(e);let r=Le(1);t&&(o?ee(o)&&(r=xt(o)):r=xt(e));const a=bp(i,n,o)?Wl(i):Le(0);let l=(s.left+a.x)/r.x,c=(s.top+a.y)/r.y,u=s.width/r.x,d=s.height/r.y;if(i){const f=xe(i),h=o&&ee(o)?xe(o):o;let m=f,g=ns(m);for(;g&&o&&h!==m;){const p=xt(g),w=g.getBoundingClientRect(),x=Me(g),v=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*p.x,S=w.top+(g.clientTop+parseFloat(x.paddingTop))*p.y;l*=p.x,c*=p.y,u*=p.x,d*=p.y,l+=v,c+=S,m=xe(g),g=ns(m)}}return Fn({width:u,height:d,x:l,y:c})}function Un(e,t){const n=Gn(e).scrollLeft;return t?t.left+n:lt(Ie(e)).left+n}function Gl(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Un(e,n),s=n.top+t.scrollTop;return{x:o,y:s}}function _p(e){let{elements:t,rect:n,offsetParent:o,strategy:s}=e;const i=s==="fixed",r=Ie(o),a=t?Hn(t.floating):!1;if(o===r||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Le(1);const u=Le(0),d=ye(o);if((d||!d&&!i)&&((Tt(o)!=="body"||on(r))&&(l=Gn(o)),ye(o))){const h=lt(o);c=xt(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}const f=r&&!d&&!i?Gl(r,l):Le(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function Rp(e){return Array.from(e.getClientRects())}function Ep(e){const t=Ie(e),n=Gn(e),o=e.ownerDocument.body,s=we(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=we(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+Un(e);const a=-n.scrollTop;return Me(o).direction==="rtl"&&(r+=we(t.clientWidth,o.clientWidth)-s),{width:s,height:i,x:r,y:a}}const Tr=25;function Mp(e,t){const n=xe(e),o=Ie(e),s=n.visualViewport;let i=o.clientWidth,r=o.clientHeight,a=0,l=0;if(s){i=s.width,r=s.height;const u=Wn();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const c=Un(o);if(c<=0){const u=o.ownerDocument,d=u.body,f=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(o.clientWidth-d.clientWidth-h);m<=Tr&&(i-=m)}else c<=Tr&&(i+=c);return{width:i,height:r,x:a,y:l}}const Pp=new Set(["absolute","fixed"]);function Tp(e,t){const n=lt(e,!0,t==="fixed"),o=n.top+e.clientTop,s=n.left+e.clientLeft,i=ye(e)?xt(e):Le(1),r=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,c=o*i.y;return{width:r,height:a,x:l,y:c}}function Vr(e,t,n){let o;if(t==="viewport")o=Mp(e,n);else if(t==="document")o=Ep(Ie(e));else if(ee(t))o=Tp(t,n);else{const s=Wl(e);o={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Fn(o)}function Ul(e,t){const n=We(e);return n===t||!ee(n)||Ne(n)?!1:Me(n).position==="fixed"||Ul(n,t)}function Vp(e,t){const n=t.get(e);if(n)return n;let o=Xe(e,[],!1).filter(a=>ee(a)&&Tt(a)!=="body"),s=null;const i=Me(e).position==="fixed";let r=i?We(e):e;for(;ee(r)&&!Ne(r);){const a=Me(r),l=qs(r);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&Pp.has(s.position)||on(r)&&!l&&Ul(e,r))?o=o.filter(u=>u!==r):s=a,r=We(r)}return t.set(e,o),o}function Ap(e){let{element:t,boundary:n,rootBoundary:o,strategy:s}=e;const r=[...n==="clippingAncestors"?Hn(t)?[]:Vp(t,this._c):[].concat(n),o],a=r[0],l=r.reduce((c,u)=>{const d=Vr(t,u,s);return c.top=we(d.top,c.top),c.right=bt(d.right,c.right),c.bottom=bt(d.bottom,c.bottom),c.left=we(d.left,c.left),c},Vr(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Dp(e){const{width:t,height:n}=Hl(e);return{width:t,height:n}}function kp(e,t,n){const o=ye(t),s=Ie(t),i=n==="fixed",r=lt(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Le(0);function c(){l.x=Un(s)}if(o||!o&&!i)if((Tt(t)!=="body"||on(s))&&(a=Gn(t)),o){const h=lt(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else s&&c();i&&!o&&s&&c();const u=s&&!o&&!i?Gl(s,a):Le(0),d=r.left+a.scrollLeft-l.x-u.x,f=r.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:r.width,height:r.height}}function wo(e){return Me(e).position==="static"}function Ar(e,t){if(!ye(e)||Me(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ie(e)===n&&(n=n.ownerDocument.body),n}function Kl(e,t){const n=xe(e);if(Hn(e))return n;if(!ye(e)){let s=We(e);for(;s&&!Ne(s);){if(ee(s)&&!wo(s))return s;s=We(s)}return n}let o=Ar(e,t);for(;o&&Bm(o)&&wo(o);)o=Ar(o,t);return o&&Ne(o)&&wo(o)&&!qs(o)?n:o||Um(e)||n}const Fp=async function(e){const t=this.getOffsetParent||Kl,n=this.getDimensions,o=await n(e.floating);return{reference:kp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Lp(e){return Me(e).direction==="rtl"}const Ip={convertOffsetParentRelativeRectToViewportRelativeRect:_p,getDocumentElement:Ie,getClippingRect:Ap,getOffsetParent:Kl,getElementRects:Fp,getClientRects:Rp,getDimensions:Dp,getScale:xt,isElement:ee,isRTL:Lp};function ql(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function jp(e,t){let n=null,o;const s=Ie(e);function i(){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),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=c;if(a||t(),!f||!h)return;const m=hn(d),g=hn(s.clientWidth-(u+f)),p=hn(s.clientHeight-(d+h)),w=hn(u),v={rootMargin:-m+"px "+-g+"px "+-p+"px "+-w+"px",threshold:we(0,bt(1,l))||1};let S=!0;function _(P){const V=P[0].intersectionRatio;if(V!==l){if(!S)return r();V?r(!1,V):o=setTimeout(()=>{r(!1,1e-7)},1e3)}V===1&&!ql(c,e.getBoundingClientRect())&&r(),S=!1}try{n=new IntersectionObserver(_,{...v,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,v)}n.observe(e)}return r(!0),i}function Xl(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=Ys(e),u=s||i?[...c?Xe(c):[],...Xe(t)]:[];u.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const d=c&&a?jp(c,n):null;let f=-1,h=null;r&&(h=new ResizeObserver(w=>{let[x]=w;x&&x.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let m,g=l?lt(e):null;l&&p();function p(){const w=lt(e);g&&!ql(g,w)&&n(),g=w,m=requestAnimationFrame(p)}return n(),()=>{var w;u.forEach(x=>{s&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d?.(),(w=h)==null||w.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const $p=wp,Op=xp,Np=pp,Bp=Cp,zp=(e,t,n)=>{const o=new Map,s={platform:Ip,...n},i={...s.platform,_c:o};return mp(e,t,{...s,platform:i})};var Hp=typeof document<"u",Wp=function(){},Rn=Hp?C.useLayoutEffect:Wp;function Ln(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,s;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(!Ln(e[o],t[o]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,s[o]))return!1;for(o=n;o--!==0;){const i=s[o];if(!(i==="_owner"&&e.$$typeof)&&!Ln(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Yl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Dr(e,t){const n=Yl(e);return Math.round(t*n)/n}function xo(e){const t=b.useRef(e);return Rn(()=>{t.current=e}),t}function Gp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:s,elements:{reference:i,floating:r}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=b.useState(o);Ln(f,o)||h(o);const[m,g]=b.useState(null),[p,w]=b.useState(null),x=b.useCallback(R=>{R!==P.current&&(P.current=R,g(R))},[]),v=b.useCallback(R=>{R!==V.current&&(V.current=R,w(R))},[]),S=i||m,_=r||p,P=b.useRef(null),V=b.useRef(null),M=b.useRef(u),A=l!=null,F=xo(l),$=xo(s),z=xo(c),O=b.useCallback(()=>{if(!P.current||!V.current)return;const R={placement:t,strategy:n,middleware:f};$.current&&(R.platform=$.current),zp(P.current,V.current,R).then(T=>{const L={...T,isPositioned:z.current!==!1};D.current&&!Ln(M.current,L)&&(M.current=L,Vc.flushSync(()=>{d(L)}))})},[f,t,n,$,z]);Rn(()=>{c===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,d(R=>({...R,isPositioned:!1})))},[c]);const D=b.useRef(!1);Rn(()=>(D.current=!0,()=>{D.current=!1}),[]),Rn(()=>{if(S&&(P.current=S),_&&(V.current=_),S&&_){if(F.current)return F.current(S,_,O);O()}},[S,_,O,F,A]);const B=b.useMemo(()=>({reference:P,floating:V,setReference:x,setFloating:v}),[x,v]),N=b.useMemo(()=>({reference:S,floating:_}),[S,_]),E=b.useMemo(()=>{const R={position:n,left:0,top:0};if(!N.floating)return R;const T=Dr(N.floating,u.x),L=Dr(N.floating,u.y);return a?{...R,transform:"translate("+T+"px, "+L+"px)",...Yl(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:L}},[n,a,N.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:O,refs:B,elements:N,floatingStyles:E}),[u,O,B,N,E])}const Zl=(e,t)=>({...$p(e),options:[e,t]}),Jl=(e,t)=>({...Op(e),options:[e,t]}),Ql=(e,t)=>({...Np(e),options:[e,t]}),Up=(e,t)=>({...Bp(e),options:[e,t]});function Kp(e){const t=b.useRef(void 0),n=b.useCallback(o=>{const s=e.map(i=>{if(i!=null){if(typeof i=="function"){const r=i,a=r(o);return typeof a=="function"?a:()=>{r(null)}}return i.current=o,()=>{i.current=null}}});return()=>{s.forEach(i=>i?.())}},e);return b.useMemo(()=>e.every(o=>o==null)?null:o=>{t.current&&(t.current(),t.current=void 0),o!=null&&(t.current=n(o))},e)}const qp="data-floating-ui-focusable",kr="active",Fr="selected",Xp={...b};let Lr=!1,Yp=0;const Ir=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Yp++;function Zp(){const[e,t]=b.useState(()=>Lr?Ir():void 0);return _t(()=>{e==null&&t(Ir())},[]),b.useEffect(()=>{Lr=!0},[]),e}const Jp=Xp.useId,ec=Jp||Zp;let is;process.env.NODE_ENV!=="production"&&(is=new Set);function Qp(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];const s="Floating UI: "+n.join(" ");if(!((e=is)!=null&&e.has(s))){var i;(i=is)==null||i.add(s),console.error(s)}}function ev(){const e=new Map;return{emit(t,n){var o;(o=e.get(t))==null||o.forEach(s=>s(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 tv=b.createContext(null),nv=b.createContext(null),Zs=()=>{var e;return((e=b.useContext(tv))==null?void 0:e.id)||null},Js=()=>b.useContext(nv);function tc(e){return"data-floating-ui-"+e}function Pe(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const jr=tc("safe-polygon");function Co(e,t,n){if(n&&!Zt(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 So(e){return typeof e=="function"?e():e}function ov(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:s,events:i,elements:r}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,h=Js(),m=Zs(),g=gn(c),p=gn(l),w=gn(n),x=gn(d),v=b.useRef(),S=b.useRef(-1),_=b.useRef(),P=b.useRef(-1),V=b.useRef(!0),M=b.useRef(!1),A=b.useRef(()=>{}),F=b.useRef(!1),$=ke(()=>{var E;const R=(E=s.current.openEvent)==null?void 0:E.type;return R?.includes("mouse")&&R!=="mousedown"});b.useEffect(()=>{if(!a)return;function E(R){let{open:T}=R;T||(Pe(S),Pe(P),V.current=!0,F.current=!1)}return i.on("openchange",E),()=>{i.off("openchange",E)}},[a,i]),b.useEffect(()=>{if(!a||!g.current||!n)return;function E(T){$()&&o(!1,T,"hover")}const R=yt(r.floating).documentElement;return R.addEventListener("mouseleave",E),()=>{R.removeEventListener("mouseleave",E)}},[r.floating,n,o,a,g,$]);const z=b.useCallback(function(E,R,T){R===void 0&&(R=!0),T===void 0&&(T="hover");const L=Co(p.current,"close",v.current);L&&!_.current?(Pe(S),S.current=window.setTimeout(()=>o(!1,E,T),L)):R&&(Pe(S),o(!1,E,T))},[p,o]),O=ke(()=>{A.current(),_.current=void 0}),D=ke(()=>{if(M.current){const E=yt(r.floating).body;E.style.pointerEvents="",E.removeAttribute(jr),M.current=!1}}),B=ke(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);b.useEffect(()=>{if(!a)return;function E(U){if(Pe(S),V.current=!1,u&&!Zt(v.current)||So(x.current)>0&&!Co(p.current,"open"))return;const q=Co(p.current,"open",v.current);q?S.current=window.setTimeout(()=>{w.current||o(!0,U,"hover")},q):n||o(!0,U,"hover")}function R(U){if(B()){D();return}A.current();const q=yt(r.floating);if(Pe(P),F.current=!1,g.current&&s.current.floatingContext){n||Pe(S),_.current=g.current({...s.current.floatingContext,tree:h,x:U.clientX,y:U.clientY,onClose(){D(),O(),B()||z(U,!0,"safe-polygon")}});const J=_.current;q.addEventListener("mousemove",J),A.current=()=>{q.removeEventListener("mousemove",J)};return}(v.current==="touch"?!ss(r.floating,U.relatedTarget):!0)&&z(U)}function T(U){B()||s.current.floatingContext&&(g.current==null||g.current({...s.current.floatingContext,tree:h,x:U.clientX,y:U.clientY,onClose(){D(),O(),B()||z(U)}})(U))}function L(){Pe(S)}function Y(U){B()||z(U,!1)}if(ee(r.domReference)){const U=r.domReference,q=r.floating;return n&&U.addEventListener("mouseleave",T),f&&U.addEventListener("mousemove",E,{once:!0}),U.addEventListener("mouseenter",E),U.addEventListener("mouseleave",R),q&&(q.addEventListener("mouseleave",T),q.addEventListener("mouseenter",L),q.addEventListener("mouseleave",Y)),()=>{n&&U.removeEventListener("mouseleave",T),f&&U.removeEventListener("mousemove",E),U.removeEventListener("mouseenter",E),U.removeEventListener("mouseleave",R),q&&(q.removeEventListener("mouseleave",T),q.removeEventListener("mouseenter",L),q.removeEventListener("mouseleave",Y))}}},[r,a,e,u,f,z,O,D,o,n,w,h,p,g,s,B,x]),_t(()=>{var E;if(a&&n&&(E=g.current)!=null&&(E=E.__options)!=null&&E.blockPointerEvents&&$()){M.current=!0;const T=r.floating;if(ee(r.domReference)&&T){var R;const L=yt(r.floating).body;L.setAttribute(jr,"");const Y=r.domReference,U=h==null||(R=h.nodesRef.current.find(q=>q.id===m))==null||(R=R.context)==null?void 0:R.elements.floating;return U&&(U.style.pointerEvents=""),L.style.pointerEvents="none",Y.style.pointerEvents="auto",T.style.pointerEvents="auto",()=>{L.style.pointerEvents="",Y.style.pointerEvents="",T.style.pointerEvents=""}}}},[a,n,m,r,h,g,$]),_t(()=>{n||(v.current=void 0,F.current=!1,O(),D())},[n,O,D]),b.useEffect(()=>()=>{O(),Pe(S),Pe(P),D()},[a,r.domReference,O,D]);const N=b.useMemo(()=>{function E(R){v.current=R.pointerType}return{onPointerDown:E,onPointerEnter:E,onMouseMove(R){const{nativeEvent:T}=R;function L(){!V.current&&!w.current&&o(!0,T,"hover")}u&&!Zt(v.current)||n||So(x.current)===0||F.current&&R.movementX**2+R.movementY**2<2||(Pe(P),v.current==="touch"?L():(F.current=!0,P.current=window.setTimeout(L,So(x.current))))}}},[u,o,n,w,x]);return b.useMemo(()=>a?{reference:N}:{},[a,N])}function $r(e){return ye(e.target)&&e.target.tagName==="BUTTON"}function sv(e){return ye(e.target)&&e.target.tagName==="A"}function Or(e){return ap(e)}function iv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:s,elements:{domReference:i}}=e,{enabled:r=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=b.useRef(),h=b.useRef(!1),m=b.useMemo(()=>({onPointerDown(g){f.current=g.pointerType},onMouseDown(g){const p=f.current;g.button===0&&a!=="click"&&(Zt(p,!0)&&c||(n&&l&&(!(s.current.openEvent&&d)||s.current.openEvent.type==="mousedown")?o(!1,g.nativeEvent,"click"):(g.preventDefault(),o(!0,g.nativeEvent,"click"))))},onClick(g){const p=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}Zt(p,!0)&&c||(n&&l&&(!(s.current.openEvent&&d)||s.current.openEvent.type==="click")?o(!1,g.nativeEvent,"click"):o(!0,g.nativeEvent,"click"))},onKeyDown(g){f.current=void 0,!(g.defaultPrevented||!u||$r(g))&&(g.key===" "&&!Or(i)&&(g.preventDefault(),h.current=!0),!sv(g)&&g.key==="Enter"&&o(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||$r(g)||Or(i)||g.key===" "&&h.current&&(h.current=!1,o(!(n&&l),g.nativeEvent,"click"))}}),[s,i,a,c,u,o,n,d,l]);return b.useMemo(()=>r?{reference:m}:{},[r,m])}const rv={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},av={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Nr=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 lv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,elements:s,dataRef:i}=e,{enabled:r=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:m}=t,g=Js(),p=ke(typeof l=="function"?l:()=>!1),w=typeof l=="function"?p:l,x=b.useRef(!1),{escapeKey:v,outsidePress:S}=Nr(h),{escapeKey:_,outsidePress:P}=Nr(m),V=b.useRef(!1),M=ke(D=>{var B;if(!n||!r||!a||D.key!=="Escape"||V.current)return;const N=(B=i.current.floatingContext)==null?void 0:B.nodeId,E=g?_n(g.nodesRef.current,N):[];if(!v&&(D.stopPropagation(),E.length>0)){let R=!0;if(E.forEach(T=>{var L;if((L=T.context)!=null&&L.open&&!T.context.dataRef.current.__escapeKeyBubbles){R=!1;return}}),!R)return}o(!1,cp(D)?D.nativeEvent:D,"escape-key")}),A=ke(D=>{var B;const N=()=>{var E;M(D),(E=Lt(D))==null||E.removeEventListener("keydown",N)};(B=Lt(D))==null||B.addEventListener("keydown",N)}),F=ke(D=>{var B;const N=i.current.insideReactTree;i.current.insideReactTree=!1;const E=x.current;if(x.current=!1,c==="click"&&E||N||typeof w=="function"&&!w(D))return;const R=Lt(D),T="["+tc("inert")+"]",L=yt(s.floating).querySelectorAll(T);let Y=ee(R)?R:null;for(;Y&&!Ne(Y);){const J=We(Y);if(Ne(J)||!ee(J))break;Y=J}if(L.length&&ee(R)&&!rp(R)&&!ss(R,s.floating)&&Array.from(L).every(J=>!ss(Y,J)))return;if(ye(R)&&O){const J=Ne(R),se=Me(R),j=/auto|scroll/,Z=J||j.test(se.overflowX),ie=J||j.test(se.overflowY),he=Z&&R.clientWidth>0&&R.scrollWidth>R.clientWidth,ce=ie&&R.clientHeight>0&&R.scrollHeight>R.clientHeight,Ge=se.direction==="rtl",At=ce&&(Ge?D.offsetX<=R.offsetWidth-R.clientWidth:D.offsetX>R.clientWidth),Dt=he&&D.offsetY>R.clientHeight;if(At||Dt)return}const U=(B=i.current.floatingContext)==null?void 0:B.nodeId,q=g&&_n(g.nodesRef.current,U).some(J=>{var se;return yo(D,(se=J.context)==null?void 0:se.elements.floating)});if(yo(D,s.floating)||yo(D,s.domReference)||q)return;const me=g?_n(g.nodesRef.current,U):[];if(me.length>0){let J=!0;if(me.forEach(se=>{var j;if((j=se.context)!=null&&j.open&&!se.context.dataRef.current.__outsidePressBubbles){J=!1;return}}),!J)return}o(!1,D,"outside-press")}),$=ke(D=>{var B;const N=()=>{var E;F(D),(E=Lt(D))==null||E.removeEventListener(c,N)};(B=Lt(D))==null||B.addEventListener(c,N)});b.useEffect(()=>{if(!n||!r)return;i.current.__escapeKeyBubbles=v,i.current.__outsidePressBubbles=S;let D=-1;function B(L){o(!1,L,"ancestor-scroll")}function N(){window.clearTimeout(D),V.current=!0}function E(){D=window.setTimeout(()=>{V.current=!1},Wn()?5:0)}const R=yt(s.floating);a&&(R.addEventListener("keydown",_?A:M,_),R.addEventListener("compositionstart",N),R.addEventListener("compositionend",E)),w&&R.addEventListener(c,P?$:F,P);let T=[];return f&&(ee(s.domReference)&&(T=Xe(s.domReference)),ee(s.floating)&&(T=T.concat(Xe(s.floating))),!ee(s.reference)&&s.reference&&s.reference.contextElement&&(T=T.concat(Xe(s.reference.contextElement)))),T=T.filter(L=>{var Y;return L!==((Y=R.defaultView)==null?void 0:Y.visualViewport)}),T.forEach(L=>{L.addEventListener("scroll",B,{passive:!0})}),()=>{a&&(R.removeEventListener("keydown",_?A:M,_),R.removeEventListener("compositionstart",N),R.removeEventListener("compositionend",E)),w&&R.removeEventListener(c,P?$:F,P),T.forEach(L=>{L.removeEventListener("scroll",B)}),window.clearTimeout(D)}},[i,s,a,w,c,n,o,f,r,v,S,M,_,A,F,P,$]),b.useEffect(()=>{i.current.insideReactTree=!1},[i,w,c]);const z=b.useMemo(()=>({onKeyDown:M,...u&&{[rv[d]]:D=>{o(!1,D.nativeEvent,"reference-press")},...d!=="click"&&{onClick(D){o(!1,D.nativeEvent,"reference-press")}}}}),[M,o,u,d]),O=b.useMemo(()=>({onKeyDown:M,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[av[c]]:()=>{i.current.insideReactTree=!0}}),[M,c,i]);return b.useMemo(()=>r?{reference:z,floating:O}:{},[r,z,O])}function cv(e){const{open:t=!1,onOpenChange:n,elements:o}=e,s=ec(),i=b.useRef({}),[r]=b.useState(()=>ev()),a=Zs()!=null;if(process.env.NODE_ENV!=="production"){const h=o.reference;h&&!ee(h)&&Qp("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]=b.useState(o.reference),u=ke((h,m,g)=>{i.current.openEvent=h?m:void 0,r.emit("openchange",{open:h,event:m,reason:g,nested:a}),n?.(h,m,g)}),d=b.useMemo(()=>({setPositionReference:c}),[]),f=b.useMemo(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return b.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:r,floatingId:s,refs:d}),[t,u,f,r,s,d])}function nc(e){e===void 0&&(e={});const{nodeId:t}=e,n=cv({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,s=o.elements,[i,r]=b.useState(null),[a,l]=b.useState(null),u=s?.domReference||i,d=b.useRef(null),f=Js();_t(()=>{u&&(d.current=u)},[u]);const h=Gp({...e,elements:{...s,...a&&{reference:a}}}),m=b.useCallback(v=>{const S=ee(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),getClientRects:()=>v.getClientRects(),contextElement:v}:v;l(S),h.refs.setReference(S)},[h.refs]),g=b.useCallback(v=>{(ee(v)||v===null)&&(d.current=v,r(v)),(ee(h.refs.reference.current)||h.refs.reference.current===null||v!==null&&!ee(v))&&h.refs.setReference(v)},[h.refs]),p=b.useMemo(()=>({...h.refs,setReference:g,setPositionReference:m,domReference:d}),[h.refs,g,m]),w=b.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),x=b.useMemo(()=>({...h,...o,refs:p,elements:w,nodeId:t}),[h,p,w,t,o]);return _t(()=>{o.dataRef.current.floatingContext=x;const v=f?.nodesRef.current.find(S=>S.id===t);v&&(v.context=x)}),b.useMemo(()=>({...h,context:x,refs:p,elements:w}),[h,p,w,x])}function bo(e,t,n){const o=new Map,s=n==="item";let i=e;if(s&&e){const{[kr]:r,[Fr]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[qp]:""},...i,...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(!(s&&[kr,Fr].includes(c)))if(c.indexOf("on")===0){if(o.has(c)||o.set(c,[]),typeof u=="function"){var d;(d=o.get(c))==null||d.push(u),r[c]=function(){for(var f,h=arguments.length,m=new Array(h),g=0;g<h;g++)m[g]=arguments[g];return(f=o.get(c))==null?void 0:f.map(p=>p(...m)).find(p=>p!==void 0)}}}else r[c]=u}),r),{})}}function uv(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),o=e.map(a=>a?.item),s=b.useCallback(a=>bo(a,e,"reference"),t),i=b.useCallback(a=>bo(a,e,"floating"),n),r=b.useCallback(a=>bo(a,e,"item"),o);return b.useMemo(()=>({getReferenceProps:s,getFloatingProps:i,getItemProps:r}),[s,i,r])}const dv=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function fv(e,t){var n,o;t===void 0&&(t={});const{open:s,elements:i,floatingId:r}=e,{enabled:a=!0,role:l="dialog"}=t,c=ec(),u=((n=i.domReference)==null?void 0:n.id)||c,d=b.useMemo(()=>{var x;return((x=lp(i.floating))==null?void 0:x.id)||r},[i.floating,r]),f=(o=dv.get(l))!=null?o:l,m=Zs()!=null,g=b.useMemo(()=>f==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:s?d:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":s?d:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:u},...f==="menu"&&m&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,d,m,s,u,l]),p=b.useMemo(()=>{const x={id:d,...f&&{role:f}};return f==="tooltip"||l==="label"?x:{...x,...f==="menu"&&{"aria-labelledby":u}}},[f,d,u,l]),w=b.useCallback(x=>{let{active:v,selected:S}=x;const _={role:"option",...v&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{..._,"aria-selected":S}}return{}},[d,l]);return b.useMemo(()=>a?{reference:g,floating:p,item:w}:{},[a,g,p,w])}const hv=e=>b.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),gv=e=>b.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},b.createElement("g",null,b.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"}))),oc=e=>b.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("g",{opacity:.6},b.createElement("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),_o={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"}},Qs=C.forwardRef(({label:e,color:t="primary",size:n="md",onClick:o,onDelete:s,avatar:i,icon:r,disabled:a,className:l},c)=>{const u=C.useRef(null),d=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]),f=k.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:d.bg}}),h=k.css({display:"inline-flex",cursor:"pointer",opacity:.6,"&:hover":{opacity:1}});return y.jsxs(I,{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:_o[n].h,p:_o[n].p,overflow:"hidden",borderRadius:"var(--corner-sm)",backgroundColor:d.bg,color:d.color,onClick:o,className:k.cx(f,l),children:[o&&y.jsx(ct,{}),i&&y.jsx(I,{w:20,h:20,borderRadius:"50%",overflow:"hidden",children:i}),r&&y.jsx(I,{children:r}),typeof e=="string"?y.jsx(K,{variant:_o[n].text,colorName:t,textOverflow:"ellipsis",overflow:"hidden",children:e}):e,s&&!a&&y.jsx(K,{className:h,colorName:t,onClick:m=>{m.stopPropagation(),s(m)},children:y.jsx(oc,{})})]})});Qs.displayName="Tag";const mv="_disabled_zbo6w_40",pv="_open_zbo6w_48",vv="_error_zbo6w_51",yv="_hidden_zbo6w_87",wv="_visible_zbo6w_90",xv="_selected_zbo6w_163",le={"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:mv,open:pv,"select-arrow":"_select-arrow_zbo6w_48",error:vv,"select-value":"_select-value_zbo6w_62","select-value_xs":"_select-value_xs_zbo6w_74","select-placeholder":"_select-placeholder_zbo6w_81",hidden:yv,visible:wv,"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:xv,"overflow-tooltip-container":"_overflow-tooltip-container_zbo6w_167","overflow-tooltip-text":"_overflow-tooltip-text_zbo6w_172","empty-block":"_empty-block_zbo6w_179"};function sc({value:e,onChange:t,multiple:n=!1,returnedValue:o,renderItem:s,renderInputItem:i,renderSingleInputItem:r,renderMultipleInputItem:a,renderDropdownItem:l,placeholder:c,items:u=[],fullWidth:d,size:f="md",showDefaultItem:h,disabled:m,label:g,firstItem:p,lastItem:w,observer:x,emptyText:v,onBlur:S,prompt:_,error:P,errorText:V}){const[M,A]=Jt(e,n?[]:null),[F,$]=C.useState(!1),{refs:z,floatingStyles:O}=nc({open:F,placement:"bottom-start",strategy:"fixed",middleware:[Zl(4),Ql({crossAxis:!0,fallbackAxisSideDirection:"start"}),Jl({crossAxis:!0,padding:8}),Up({apply({rects:j,availableHeight:Z,elements:ie}){Object.assign(ie.floating.style,{width:`${j.reference.width}px`,maxHeight:typeof Z=="number"?`${Z}px`:"auto"})}})],whileElementsMounted:Xl}),D=C.useMemo(()=>n?M||[]:M!=null?[M]:[],[M,n]),B=C.useCallback(j=>o?o(j):j,[o]),N=C.useMemo(()=>{const j=new Map;return u.forEach(Z=>{j.set(B(Z),Z)}),j},[u,B]),E=!u.length&&!P,R=C.useMemo(()=>D.map(j=>N.get(j)).filter(j=>!!j),[N,D]);C.useEffect(()=>{process.env.NODE_ENV!=="production"&&s&&!l&&console.warn("[Select] `renderItem` deprecated, use `renderDropdownItem` instead.")},[l,s]);const T=C.useCallback((j,Z)=>l?l(j,Z):s?s(j):String(j),[l,s]),L=()=>{$(!1),S?.()},Y=j=>{const Z=B(j);if(n){const ie=D.includes(Z)?D.filter(he=>he!==Z):[...D,Z];A(ie),t?.(ie)}else A(Z),t?.(Z),L()},U=j=>{if(!n)return;const Z=D.filter(ie=>ie!==j);A(Z),t?.(Z)},q=()=>{const j=n?[]:null;A(j),t?.(j),n||L()},me=()=>typeof c=="string"?y.jsx(K,{variant:f==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:c??"Select..."}):c,J=()=>{if(!D.length)return me();if(n)return a?a(R):i?i({mode:"multiple",selectedItems:R}):y.jsx(I,{flexWrap:"wrap",row:!0,gap:10,children:D.map(ie=>{const he=N.get(ie);return he?y.jsx(Qs,{size:"sm",label:s?s(he):String(ie),onDelete:ce=>{ce.stopPropagation(),U(ie)}},ie):null})});const j=N.get(D[0])??null;if(!j)return me();if(r)return r(j);if(i)return i({mode:"single",selectedItem:j});const Z=s?s(j):String(D[0]);return typeof Z=="string"?y.jsx(K,{variant:f==="xs"?"caption-1":"body-2",tag:"p",textOverflow:"ellipsis",overflow:"hidden",children:Z}):y.jsx(y.Fragment,{children:Z})},se=F&&y.jsx(qn,{children:y.jsx(I,{row:!0,top:0,right:0,bottom:0,left:0,position:"fixed",center:!0,flex:1,onClick:L,display:"block",backgroundColor:"transparent",zIndex:1,children:y.jsx(Bn.div,{ref:z.setFloating,className:le["select-dropdown"],initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},style:{...O,zIndex:1},onMouseDown:j=>j.stopPropagation(),onClick:j=>j.stopPropagation(),children:y.jsxs("ul",{className:le["select-menu"],children:[h&&!n&&y.jsx(I,{className:le["select-menu-item"],role:"option",onClick:q,children:y.jsx(K,{variant:"body-2",colorName:"tertiary",children:c})}),p&&y.jsx(I,{className:k.cx(le["select-menu-item"],le["select-menu-item-first"]),children:p}),E&&y.jsxs(I,{className:le["empty-block"],children:[y.jsx(I,{w:20,h:20,children:y.jsx(gv,{})}),y.jsx(K,{variant:"body-2",children:v??"There is nothing yet"})]}),u.map((j,Z)=>{const ie=B(j),he=D.includes(ie),ce=T(j,{item:j,selected:he,index:Z}),Ge=typeof ce=="string";return y.jsxs(I,{row:!0,gap:10,alignItems:"center",className:k.cx(le["select-menu-item"],{[le.selected]:he}),role:"option",relative:!0,onClick:()=>Y(j),children:[n&&y.jsx(Ks,{size:"sm",checked:he}),Ge?y.jsx(K,{variant:"body-2",tag:"p",wordBreak:"break-all",whiteSpace:"break-spaces",children:ce}):ce,y.jsx(ct,{})]},ie)}),x,w&&y.jsx(I,{className:k.cx(le["select-menu-item"],le["select-menu-item-first"]),children:w})]})},"dropdown")})});return y.jsxs(I,{relative:!0,display:"inline-block",minWidth:120,w:d?"full":"auto",onMouseDown:j=>j.stopPropagation(),onClick:j=>j.stopPropagation(),children:[typeof g=="string"?y.jsx(K,{variant:"body-2",colorName:"tertiary",fontWeight:"regular",mb:f==="sm"?4:8,children:g}):g,y.jsxs(I,{ref:z.setReference,row:!0,gap:10,tabIndex:m?-1:0,role:"button",alignItems:"flex-start","aria-haspopup":"listbox",relative:!0,w:"100%",className:k.cx(le["select-input"],le[`size-${f}`],{[le.error]:P,[le.disabled]:m,[le.open]:F}),onClick:()=>!m&&$(j=>!j),children:[y.jsx(I,{className:k.cx(le["select-value"]),children:J()}),y.jsx(I,{className:k.cx(le["select-arrow"],le[`select-arrow_${f}`]),children:y.jsx(hv,{})})]}),typeof _=="string"?y.jsx(K,{variant:"caption-1",colorName:"tertiary",mt:4,children:_}):_,P&&V&&y.jsx(K,{tag:"p",colorName:"negative",variant:"body-2",mt:5,children:V}),y.jsx(cf,{children:se})]})}const Cv=e=>b.createElement("svg",{width:10,height:10,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.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"})),Sv=e=>b.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.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"})),bv="_container_e7tan_8",_v="_disabled_e7tan_17",Rv="_reverse_e7tan_21",Ev="_input_e7tan_25",Mv="_switchContainer_e7tan_35",Pv="_variant_accent_e7tan_43",Tv="_variant_secondary_e7tan_47",Vv="_thumb_e7tan_51",Av="_variant_theme_e7tan_54",Dv="_moon_e7tan_58",kv="_fire_e7tan_61",Fv="_size_sm_e7tan_74",Lv="_size_md_e7tan_80",Iv="_size_lg_e7tan_86",Te={container:bv,disabled:_v,reverse:Rv,input:Ev,switchContainer:Mv,variant_accent:Pv,variant_secondary:Tv,switch:"_switch_e7tan_35",thumb:Vv,variant_theme:Av,moon:Dv,fire:kv,size_sm:Fv,size_md:Lv,size_lg:Iv},ic=C.forwardRef(({title:e,text:t,icon:n,disabled:o,onChange:s,checked:i,defaultValue:r,className:a,size:l="md",variant:c="accent",reverse:u=!1,w:d="auto",...f},h)=>{const[m,g]=Jt(i,r),p=C.useRef(null);C.useImperativeHandle(h,()=>({focus:()=>{p.current?.focus()},blur:()=>{p.current?.blur()},get checked(){return m??!1},setChecked:S=>{g(S),s?.(S)},toggle:()=>{const S=!m;g(S),s?.(S)},isFocused:()=>document.activeElement===p.current,isDisabled:()=>o??!1,getInputElement:()=>p.current,checkValidity:()=>p.current?.checkValidity()??!0,reset:()=>{const S=r??!1;g(S),s?.(S)}}),[m,g,s,o,r]);const w=C.useCallback(S=>{g(S.target.checked),s?.(S.target.checked)},[s]),x=C.useMemo(()=>typeof e=="string"?y.jsx(K,{variant:"body-1",colorName:"primary",fontWeight:"medium",children:e}):e,[e]),v=C.useMemo(()=>typeof t=="string"?y.jsx(K,{variant:"body-2",colorName:"secondary",fontWeight:"regular",children:t}):t,[t]);return y.jsxs(I,{row:!0,w:d,gap:"var(--spacing-sm)",children:[y.jsxs("label",{className:k.cx(Te.container,a,{[Te.disabled]:o,[Te.reverse]:u}),children:[y.jsxs(I,{className:k.cx(Te.switchContainer,Te[`size_${l}`],Te[`variant_${c}`]),children:[y.jsx("input",{ref:p,type:"checkbox",checked:m,className:Te.input,onChange:w,disabled:o,...f}),y.jsx("div",{className:Te.switch,children:y.jsx("div",{className:Te.thumb,children:c==="theme"&&y.jsxs(y.Fragment,{children:[y.jsx(Sv,{className:Te.moon}),y.jsx(Cv,{className:Te.fire})]})})})]}),y.jsxs(I,{gap:"var(--spacing-xs)",children:[x,v]})]}),n]})});ic.displayName="Switch";const jv=k.css({cursor:"pointer",userSelect:"none"}),$v=k.css({cursor:"not-allowed",opacity:.5}),Ov=k.css({transition:"color 0.2s ease"}),Nv=C.forwardRef(({label:e,selected:t,disabled:n,fullWidth:o,onClick:s},i)=>y.jsx(I,{w:o?"full":void 0,justifyContent:"center",alignItems:"center",ref:i,py:"var(--spacing-md)",px:"var(--spacing-xl)",onClick:s,className:k.cx(jv,{[$v]:n}),children:y.jsx(K,{className:Ov,colorName:t?"primary":"tertiary",fontWeight:"medium",variant:"body-2",children:e})})),Bv=k.css({borderBottom:"1px solid var(--border-neutral-alpha-basic)"}),rc=({value:e,onChange:t,options:n,fullWidth:o=!1,className:s})=>{const[i,r]=C.useState({left:0,width:0}),a=C.useRef([]),l=u=>d=>{a.current[u]=d};C.useEffect(()=>{const u=n.findIndex(f=>f.value===e),d=a.current[u];d&&r({left:d.offsetLeft,width:d.offsetWidth})},[e,n]);const c=(u,d=!1)=>()=>!d&&t(u);return y.jsxs(I,{row:!0,w:o?"full":"auto",relative:!0,className:k.cx(Bv,s),children:[n.map((u,d)=>y.jsx(Nv,{selected:e===u.value,onClick:c(u.value,u.disabled),ref:l(d),label:u.label,disabled:u.disabled,fullWidth:o},u.value)),y.jsx(I,{h:2,w:i.width,absolute:!0,bottom:-1,left:i.left,backgroundColor:"var(--border-accent-primary)",className:k.css({transition:"left 0.2s ease, width 0.2s ease"})})]})};rc.displayName="Tabs";const zv="_header_446to_8",Hv={header:zv},ac=C.forwardRef(({title:e,subtitle:t,w:n="full",p:o,py:s,px:i="var(--spacing-2xl)",pt:r="var(--spacing-2xl)",pb:a="var(--spacing-lg)",row:l=!0,justifyContent:c="space-between",showCloseButton:u=!0},d)=>{const{onClose:f}=Zc();return y.jsxs(I,{w:n,p:o,py:s,px:i,pt:r,pb:a,row:l,justifyContent:c,ref:d,className:Hv.header,children:[y.jsxs(I,{gap:"var(--spacing-sm)",children:[y.jsx(K,{variant:"title-3",colorName:"primary",fontWeight:"semibold",children:e}),y.jsx(K,{variant:"body-1",colorName:"tertiary",fontWeight:"medium",children:t})]}),u&&y.jsx(I,{children:y.jsx(Wt,{onClick:f,color:"neutral",children:y.jsx(Qr,{})})})]})});ac.displayName="ModalHeader";function dt(e,t,n){let o=n.initialDeps??[],s;function i(){var r,a,l,c;let u;n.key&&((r=n.debug)!=null&&r.call(n))&&(u=Date.now());const d=e();if(!(d.length!==o.length||d.some((m,g)=>o[g]!==m)))return s;o=d;let h;if(n.key&&((a=n.debug)!=null&&a.call(n))&&(h=Date.now()),s=t(...d),n.key&&((l=n.debug)!=null&&l.call(n))){const m=Math.round((Date.now()-u)*100)/100,g=Math.round((Date.now()-h)*100)/100,p=g/16,w=(x,v)=>{for(x=String(x);x.length<v;)x=" "+x;return x};console.info(`%c⏱ ${w(g,5)} /${w(m,5)} ms`,`
|
|
9
|
+
`),()=>{m.contains(g)&&m.removeChild(g)}},[t]),v.jsx(Pf,{isPresent:t,childRef:i,sizeRef:r,children:b.cloneElement(e,{ref:l})})}const Tf=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:s,presenceAffectsLayout:i,mode:r,anchorX:a,root:l})=>{const c=bs(Af),u=C.useId();let f=!0,d=C.useMemo(()=>(f=!1,{id:u,initial:t,isPresent:n,custom:s,onExitComplete:h=>{c.set(h,!0);for(const p of c.values())if(!p)return;o&&o()},register:h=>(c.set(h,!1),()=>c.delete(h))}),[n,c,o]);return i&&f&&(d={...d}),C.useMemo(()=>{c.forEach((h,p)=>c.set(p,!1))},[n]),b.useEffect(()=>{!n&&!c.size&&o&&o()},[n]),r==="popLayout"&&(e=v.jsx(Mf,{isPresent:n,anchorX:a,root:l,children:e})),v.jsx(Gn.Provider,{value:d,children:e})};function Af(){return new Map}function fl(e=!0){const t=C.useContext(Gn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:s}=t,i=C.useId();C.useEffect(()=>{if(e)return s(i)},[e]);const r=C.useCallback(()=>e&&o&&o(i),[i,o,e]);return!n&&o?[!1,r]:[!0]}const pn=e=>e.key||"";function Gi(e){const t=[];return C.Children.forEach(e,n=>{C.isValidElement(n)&&t.push(n)}),t}const Vf=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:s=!0,mode:i="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[c,u]=fl(r),f=C.useMemo(()=>Gi(e),[e]),d=r&&!c?[]:f.map(pn),h=C.useRef(!0),p=C.useRef(f),g=bs(()=>new Map),[m,w]=C.useState(f),[x,y]=C.useState(f);xa(()=>{h.current=!1,p.current=f;for(let M=0;M<x.length;M++){const T=pn(x[M]);d.includes(T)?g.delete(T):g.get(T)!==!0&&g.set(T,!1)}},[x,d.length,d.join("-")]);const S=[];if(f!==m){let M=[...f];for(let T=0;T<x.length;T++){const P=x[T],D=pn(P);d.includes(D)||(M.splice(T,0,P),S.push(P))}return i==="wait"&&S.length&&(M=S),y(Gi(M)),w(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&x.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:_}=C.useContext(Ss);return v.jsx(v.Fragment,{children:x.map(M=>{const T=pn(M),P=r&&!c?!1:f===x||d.includes(T),D=()=>{if(g.has(T))g.set(T,!0);else return;let F=!0;g.forEach(j=>{j||(F=!1)}),F&&(_?.(),y(p.current),r&&u?.(),o&&o())};return v.jsx(Tf,{isPresent:P,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:l,onExitComplete:P?void 0:D,anchorX:a,children:M},T)})})},hl=C.createContext({strict:!1}),Ui={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"]},Tt={};for(const e in Ui)Tt[e]={isEnabled:t=>Ui[e].some(n=>!!t[n])};function Df(e){for(const t in e)Tt[t]={...Tt[t],...e[t]}}const kf=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")||kf.has(e)}let gl=e=>!jn(e);function Ff(e){typeof e=="function"&&(gl=t=>t.startsWith("on")?!jn(t):e(t))}try{Ff(require("@emotion/is-prop-valid").default)}catch{}function Lf(e,t,n){const o={};for(const s in e)s==="values"&&typeof e.values=="object"||(gl(s)||n===!0&&jn(s)||!t&&!jn(s)||e.draggable&&s.startsWith("onDrag"))&&(o[s]=e[s]);return o}const Un=C.createContext({});function Kn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function en(e){return typeof e=="string"||Array.isArray(e)}const Us=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ks=["initial",...Us];function qn(e){return Kn(e.animate)||Ks.some(t=>en(e[t]))}function pl(e){return!!(qn(e)||e.variants)}function If(e,t){if(qn(e)){const{initial:n,animate:o}=e;return{initial:n===!1||en(n)?n:void 0,animate:en(o)?o:void 0}}return e.inherit!==!1?t:{}}function jf(e){const{initial:t,animate:n}=If(e,C.useContext(Un));return C.useMemo(()=>({initial:t,animate:n}),[Ki(t),Ki(n)])}function Ki(e){return Array.isArray(e)?e.join(" "):e}function qi(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=qi(e,t.target.x),o=qi(e,t.target.y);return`${n}% ${o}%`}},$f={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,s=Ze.parse(e);if(s.length>5)return o;const i=Ze.createTransformer(e),r=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+r]/=a,s[1+r]/=l;const c=ie(a,l,.5);return typeof s[2+r]=="number"&&(s[2+r]/=c),typeof s[3+r]=="number"&&(s[3+r]/=c),i(s)}},es={borderRadius:{...Nt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Nt,borderTopRightRadius:Nt,borderBottomLeftRadius:Nt,borderBottomRightRadius:Nt,boxShadow:$f};function ml(e,{layout:t,layoutId:n}){return Ft.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!es[e]||e==="opacity")}const Of={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Nf=kt.length;function Bf(e,t,n){let o="",s=!0;for(let i=0;i<Nf;i++){const r=kt[i],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=rl(a,zs[r]);if(!l){s=!1;const u=Of[r]||r;o+=`${u}(${c}) `}n&&(t[r]=c)}}return o=o.trim(),n?o=n(t,s?"":o):s&&(o="none"),o}function qs(e,t,n){const{style:o,vars:s,transformOrigin:i}=e;let r=!1,a=!1;for(const l in t){const c=t[l];if(Ft.has(l)){r=!0;continue}else if(ja(l)){s[l]=c;continue}else{const u=rl(c,zs[l]);l.startsWith("origin")?(a=!0,i[l]=u):o[l]=u}}if(t.transform||(r||n?o.transform=Bf(t,e.transform,n):o.transform&&(o.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;o.transformOrigin=`${l} ${c} ${u}`}}const Xs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function vl(e,t,n){for(const o in t)!ge(t[o])&&!ml(o,n)&&(e[o]=t[o])}function zf({transformTemplate:e},t){return C.useMemo(()=>{const n=Xs();return qs(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Hf(e,t){const n=e.style||{},o={};return vl(o,n,e),Object.assign(o,zf(e,t)),o}function Wf(e,t){const n={},o=Hf(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 Gf={offset:"stroke-dashoffset",array:"stroke-dasharray"},Uf={offset:"strokeDashoffset",array:"strokeDasharray"};function Kf(e,t,n=1,o=0,s=!0){e.pathLength=1;const i=s?Gf:Uf;e[i.offset]=G.transform(-o);const r=G.transform(t),a=G.transform(n);e[i.array]=`${r} ${a}`}function yl(e,{attrX:t,attrY:n,attrScale:o,pathLength:s,pathSpacing:i=1,pathOffset:r=0,...a},l,c,u){if(qs(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),s!==void 0&&Kf(f,s,i,r,!1)}const wl=()=>({...Xs(),attrs:{}}),xl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function qf(e,t,n,o){const s=C.useMemo(()=>{const i=wl();return yl(i,t,xl(o),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};vl(i,e.style,e),s.style={...i,...s.style}}return s}const Xf=["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 Ys(e){return typeof e!="string"||e.includes("-")?!1:!!(Xf.indexOf(e)>-1||/[A-Z]/u.test(e))}function Yf(e,t,n,{latestValues:o},s,i=!1){const a=(Ys(e)?qf:Wf)(t,o,s,e),l=Lf(t,typeof e=="string",i),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 Xi(e){const t=[{},{}];return e?.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function Zs(e,t,n,o){if(typeof t=="function"){const[s,i]=Xi(o);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=Xi(o);t=t(n!==void 0?n:e.custom,s,i)}return t}function Mn(e){return ge(e)?e.get():e}function Zf({scrapeMotionValuesFromProps:e,createRenderState:t},n,o,s){return{latestValues:Jf(n,o,s,e),renderState:t()}}function Jf(e,t,n,o){const s={},i=o(e,{});for(const d in i)s[d]=Mn(i[d]);let{initial:r,animate:a}=e;const l=qn(e),c=pl(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"&&!Kn(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const p=Zs(e,d[h]);if(p){const{transitionEnd:g,transition:m,...w}=p;for(const x in w){let y=w[x];if(Array.isArray(y)){const S=u?y.length-1:0;y=y[S]}y!==null&&(s[x]=y)}for(const x in g)s[x]=g[x]}}}return s}const Cl=e=>(t,n)=>{const o=C.useContext(Un),s=C.useContext(Gn),i=()=>Zf(e,t,o,s);return n?i():bs(i)};function Js(e,t,n){const{style:o}=e,s={};for(const i in o)(ge(o[i])||t.style&&ge(t.style[i])||ml(i,e)||n?.getValue(i)?.liveStyle!==void 0)&&(s[i]=o[i]);return s}const Qf=Cl({scrapeMotionValuesFromProps:Js,createRenderState:Xs});function Sl(e,t,n){const o=Js(e,t,n);for(const s in e)if(ge(e[s])||ge(t[s])){const i=kt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;o[i]=e[s]}return o}const eh=Cl({scrapeMotionValuesFromProps:Sl,createRenderState:wl}),th=Symbol.for("motionComponentSymbol");function St(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function nh(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 Qs=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),oh="framerAppearId",bl="data-"+Qs(oh),_l=C.createContext({});function sh(e,t,n,o,s){const{visualElement:i}=C.useContext(Un),r=C.useContext(hl),a=C.useContext(Gn),l=C.useContext(Gs).reducedMotion,c=C.useRef(null);o=o||r.renderer,!c.current&&o&&(c.current=o(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=C.useContext(_l);u&&!u.projection&&s&&(u.type==="html"||u.type==="svg")&&ih(c.current,n,s,f);const d=C.useRef(!1);C.useInsertionEffect(()=>{u&&d.current&&u.update(n,a)});const h=n[bl],p=C.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return xa(()=>{u&&(d.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),p.current&&u.animationState&&u.animationState.animateChanges())}),C.useEffect(()=>{u&&(!p.current&&u.animationState&&u.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),p.current=!1),u.enteringChildren=void 0)}),u}function ih(e,t,n,o){const{layoutId:s,layout:i,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Rl(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!r||a&&St(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:o,crossfade:u,layoutScroll:l,layoutRoot:c})}function Rl(e){if(e)return e.options.allowProjection!==!1?e.projection:Rl(e.parent)}function po(e,{forwardMotionProps:t=!1}={},n,o){n&&Df(n);const s=Ys(e)?eh:Qf;function i(a,l){let c;const u={...C.useContext(Gs),...a,layoutId:rh(a)},{isStatic:f}=u,d=jf(a),h=s(a,f);if(!f&&_s){ah(u,n);const p=lh(u);c=p.MeasureLayout,d.visualElement=sh(e,h,u,o,p.ProjectionNode)}return v.jsxs(Un.Provider,{value:d,children:[c&&d.visualElement?v.jsx(c,{visualElement:d.visualElement,...u}):null,Yf(e,a,nh(h,d.visualElement,l),h,f,t)]})}i.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const r=C.forwardRef(i);return r[th]=e,r}function rh({layoutId:e}){const t=C.useContext(Ss).id;return t&&e!==void 0?t+"-"+e:e}function ah(e,t){const n=C.useContext(hl).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?Vt(!1,o,"lazy-strict-mode"):He(!1,o,"lazy-strict-mode")}}function lh(e){const{drag:t,layout:n}=Tt;if(!t&&!n)return{};const o={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function ch(e,t){if(typeof Proxy>"u")return po;const n=new Map,o=(i,r)=>po(i,r,e,t),s=(i,r)=>(process.env.NODE_ENV!=="production"&&Ts(!1,"motion() is deprecated. Use motion.create() instead."),o(i,r));return new Proxy(s,{get:(i,r)=>r==="create"?o:(n.has(r)||n.set(r,po(r,void 0,e,t)),n.get(r))})}function El({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function uh({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function dh(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 ts({scale:e,scaleX:t,scaleY:n}){return!mo(e)||!mo(t)||!mo(n)}function at(e){return ts(e)||Pl(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Pl(e){return Yi(e.x)||Yi(e.y)}function Yi(e){return e&&e!=="0%"}function $n(e,t,n){const o=e-n,s=t*o;return n+s}function Zi(e,t,n,o,s){return s!==void 0&&(e=$n(e,s,o)),$n(e,n,o)+t}function ns(e,t=0,n=1,o,s){e.min=Zi(e.min,t,n,o,s),e.max=Zi(e.max,t,n,o,s)}function Ml(e,{x:t,y:n}){ns(e.x,t.translate,t.scale,t.originPoint),ns(e.y,n.translate,n.scale,n.originPoint)}const Ji=.999999999999,Qi=1.0000000000001;function fh(e,t,n,o=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,r;for(let a=0;a<s;a++){i=n[a],r=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&i.options.layoutScroll&&i.scroll&&i!==i.root&&_t(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,Ml(e,r)),o&&at(i.latestValues)&&_t(e,i.latestValues))}t.x<Qi&&t.x>Ji&&(t.x=1),t.y<Qi&&t.y>Ji&&(t.y=1)}function bt(e,t){e.min=e.min+t,e.max=e.max+t}function er(e,t,n,o,s=.5){const i=ie(e.min,e.max,s);ns(e,t,n,i,o)}function _t(e,t){er(e.x,t.x,t.scaleX,t.scale,t.originX),er(e.y,t.y,t.scaleY,t.scale,t.originY)}function Tl(e,t){return El(dh(e.getBoundingClientRect(),t))}function hh(e,t,n){const o=Tl(e,n),{scroll:s}=t;return s&&(bt(o.x,s.offset.x),bt(o.y,s.offset.y)),o}const tr=()=>({translate:0,scale:1,origin:0,originPoint:0}),Rt=()=>({x:tr(),y:tr()}),nr=()=>({min:0,max:0}),ce=()=>({x:nr(),y:nr()}),os={current:null},Al={current:!1};function gh(){if(Al.current=!0,!!_s)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>os.current=e.matches;e.addEventListener("change",t),t()}else os.current=!1}const ph=new WeakMap;function mh(e,t,n){for(const o in t){const s=t[o],i=n[o];if(ge(s))e.addValue(o,s);else if(ge(i))e.addValue(o,Mt(s,{owner:e}));else if(i!==s)if(e.hasValue(o)){const r=e.getValue(o);r.liveStyle===!0?r.jump(s):r.hasAnimated||r.set(s)}else{const r=e.getStaticValue(o);e.addValue(o,Mt(r!==void 0?r:s,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const or=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class vh{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:s,blockInitialAnimation:i,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=Ns,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=ye.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,te.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=s,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=qn(n),this.isVariantNode=pl(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,ph.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)),Al.current||gh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:os.current,process.env.NODE_ENV!=="production"&&Ts(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(),Ye(this.notifyUpdate),Ye(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=Ft.has(t);o&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&te.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),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 Tt){const n=Tt[t];if(!n)continue;const{isEnabled:o,Feature:s}=n;if(!this.features[t]&&s&&o(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.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<or.length;o++){const s=or[o];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,r=t[i];r&&(this.propEventSubscriptions[s]=this.on(s,r))}this.prevMotionValues=mh(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=Mt(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"&&(Ca(o)||ba(o))?o=parseFloat(o):!_f(o)&&Ze.test(n)&&(o=il(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 i=Zs(this.props,n,this.presenceContext?.custom);i&&(o=i[t])}if(n&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!ge(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ms),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Hs.render(this.render)}}class Vl extends vh{constructor(){super(...arguments),this.KeyframeResolver=ff}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 Dl(e,{style:t,vars:n},o,s){const i=e.style;let r;for(r in t)i[r]=t[r];s?.applyProjectionStyles(i,o);for(r in n)i.setProperty(r,n[r])}function yh(e){return window.getComputedStyle(e)}class wh extends Vl{constructor(){super(...arguments),this.type="html",this.renderInstance=Dl}readValueFromInstance(t,n){if(Ft.has(n))return this.projection?.isProjecting?Ko(n):Td(t,n);{const o=yh(t),s=(ja(n)?o.getPropertyValue(n):o[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Tl(t,n)}build(t,n,o){qs(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return Js(t,n,o)}}const kl=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 xh(e,t,n,o){Dl(e,t,void 0,o);for(const s in t.attrs)e.setAttribute(kl.has(s)?s:Qs(s),t.attrs[s])}class Ch extends Vl{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ce}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ft.has(n)){const o=sl(n);return o&&o.default||0}return n=kl.has(n)?n:Qs(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return Sl(t,n,o)}build(t,n,o){yl(t,n,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,n,o,s){xh(t,n,o,s)}mount(t){this.isSVGTag=xl(t.tagName),super.mount(t)}}const Sh=(e,t)=>Ys(e)?new Ch(t):new wh(t,{allowProjection:e!==C.Fragment});function Et(e,t,n){const o=e.getProps();return Zs(o,t,n!==void 0?n:o.custom,e)}const ss=e=>Array.isArray(e);function bh(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Mt(n))}function _h(e){return ss(e)?e[e.length-1]||0:e}function Rh(e,t){const n=Et(e,t);let{transitionEnd:o={},transition:s={},...i}=n||{};i={...i,...o};for(const r in i){const a=_h(i[r]);bh(e,r,a)}}function Eh(e){return!!(ge(e)&&e.add)}function is(e,t){const n=e.getValue("willChange");if(Eh(n))return n.add(t);if(!n&&We.WillChange){const o=new We.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function Fl(e){return e.props[bl]}const Ph=e=>e!==null;function Mh(e,{repeat:t,repeatType:n="loop"},o){const s=e.filter(Ph),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[i]}const Th={type:"spring",stiffness:500,damping:25,restSpeed:10},Ah=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Vh={type:"keyframes",duration:.8},Dh={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},kh=(e,{keyframes:t})=>t.length>2?Vh:Ft.has(e)?e.startsWith("scale")?Ah(t[1]):Th:Dh;function Fh({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:s,repeat:i,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const ei=(e,t,n,o={},s,i)=>r=>{const a=Bs(o,e)||{},l=a.delay||o.delay||0;let{elapsed:c=0}=o;c=c-Ve(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:i?void 0:s};Fh(a)||Object.assign(u,kh(e,u)),u.duration&&(u.duration=Ve(u.duration)),u.repeatDelay&&(u.repeatDelay=Ve(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)),(We.instantAnimations||We.skipAnimations)&&(f=!0,Jo(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!i&&t.get()!==void 0){const d=Mh(u.keyframes,a);if(d!==void 0){te.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new Os(u):new Jd(u)};function Lh({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function Ll(e,t,{delay:n=0,transitionOverride:o,type:s}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:r,...a}=t;o&&(i=o);const l=[],c=s&&e.animationState&&e.animationState.getState()[s];for(const u in a){const f=e.getValue(u,e.latestValues[u]??null),d=a[u];if(d===void 0||c&&Lh(c,u))continue;const h={delay:n,...Bs(i||{},u)},p=f.get();if(p!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===p&&!h.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const w=Fl(e);if(w){const x=window.MotionHandoffAnimation(w,u,te);x!==null&&(h.startTime=x,g=!0)}}is(e,u),f.start(ei(u,f,d,e.shouldReduceMotion&&tl.has(u)?{type:!1}:h,e,g));const m=f.animation;m&&l.push(m)}return r&&Promise.all(l).then(()=>{te.update(()=>{r&&Rh(e,r)})}),l}function Il(e,t,n,o=0,s=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),r=e.size,a=(r-1)*o;return typeof n=="function"?n(i,r):s===1?i*o:a-i*o}function rs(e,t,n={}){const o=Et(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(Ll(e,o,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:f}=s;return Ih(e,t,l,c,u,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[l,c]=a==="beforeChildren"?[i,r]:[r,i];return l().then(()=>c())}else return Promise.all([i(),r(n.delay)])}function Ih(e,t,n=0,o=0,s=0,i=1,r){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(rs(l,t,{...r,delay:n+(typeof o=="function"?0:o)+Il(e.variantChildren,l,o,s,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function jh(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const s=t.map(i=>rs(e,i,n));o=Promise.all(s)}else if(typeof t=="string")o=rs(e,t,n);else{const s=typeof t=="function"?Et(e,t,n.custom):t;o=Promise.all(Ll(e,s,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}function jl(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 $h=Ks.length;function $l(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?$l(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<$h;n++){const o=Ks[n],s=e.props[o];(en(s)||s===!1)&&(t[o]=s)}return t}const Oh=[...Us].reverse(),Nh=Us.length;function Bh(e){return t=>Promise.all(t.map(({animation:n,options:o})=>jh(e,n,o)))}function zh(e){let t=Bh(e),n=sr(),o=!0;const s=l=>(c,u)=>{const f=Et(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:h,...p}=f;c={...c,...p,...h}}return c};function i(l){t=l(e)}function r(l){const{props:c}=e,u=$l(e.parent)||{},f=[],d=new Set;let h={},p=1/0;for(let m=0;m<Nh;m++){const w=Oh[m],x=n[w],y=c[w]!==void 0?c[w]:u[w],S=en(y),_=w===l?x.isActive:null;_===!1&&(p=m);let M=y===u[w]&&y!==c[w]&&S;if(M&&o&&e.manuallyAnimateOnMount&&(M=!1),x.protectedKeys={...h},!x.isActive&&_===null||!y&&!x.prevProp||Kn(y)||typeof y=="boolean")continue;const T=Hh(x.prevProp,y);let P=T||w===l&&x.isActive&&!M&&S||m>p&&S,D=!1;const F=Array.isArray(y)?y:[y];let j=F.reduce(s(w),{});_===!1&&(j={});const{prevResolvedValues:$={}}=x,O={...$,...j},V=E=>{P=!0,d.has(E)&&(D=!0,d.delete(E)),x.needsAnimating[E]=!0;const R=e.getValue(E);R&&(R.liveStyle=!1)};for(const E in O){const R=j[E],A=$[E];if(h.hasOwnProperty(E))continue;let I=!1;ss(R)&&ss(A)?I=!jl(R,A):I=R!==A,I?R!=null?V(E):d.add(E):R!==void 0&&d.has(E)?V(E):x.protectedKeys[E]=!0}x.prevProp=y,x.prevResolvedValues=j,x.isActive&&(h={...h,...j}),o&&e.blockInitialAnimation&&(P=!1);const z=M&&T;P&&(!z||D)&&f.push(...F.map(E=>{const R={type:w};if(typeof E=="string"&&o&&!z&&e.manuallyAnimateOnMount&&e.parent){const{parent:A}=e,I=Et(A,E);if(A.enteringChildren&&I){const{delayChildren:Y}=I.transition||{};R.delay=Il(A.enteringChildren,e,Y)}}return{animation:E,options:R}}))}if(d.size){const m={};if(typeof c.initial!="boolean"){const w=Et(e,Array.isArray(c.initial)?c.initial[0]:c.initial);w&&w.transition&&(m.transition=w.transition)}d.forEach(w=>{const x=e.getBaseTarget(w),y=e.getValue(w);y&&(y.liveStyle=!0),m[w]=x??null}),f.push({animation:m})}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:i,getState:()=>n,reset:()=>{n=sr()}}}function Hh(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!jl(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 tt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Wh extends tt{constructor(t){super(t),t.animationState||(t.animationState=zh(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Kn(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 Gh=0;class Uh extends tt{constructor(){super(...arguments),this.id=Gh++}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 s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Kh={animation:{Feature:Wh},exit:{Feature:Uh}};function tn(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function ln(e){return{point:{x:e.pageX,y:e.pageY}}}const qh=e=>t=>Ws(t)&&e(t,ln(t));function Ut(e,t,n,o){return tn(e,t,qh(n),o)}const Ol=1e-4,Xh=1-Ol,Yh=1+Ol,Nl=.01,Zh=0-Nl,Jh=0+Nl;function pe(e){return e.max-e.min}function Qh(e,t,n){return Math.abs(e-t)<=n}function ir(e,t,n,o=.5){e.origin=o,e.originPoint=ie(t.min,t.max,e.origin),e.scale=pe(n)/pe(t),e.translate=ie(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Xh&&e.scale<=Yh||isNaN(e.scale))&&(e.scale=1),(e.translate>=Zh&&e.translate<=Jh||isNaN(e.translate))&&(e.translate=0)}function Kt(e,t,n,o){ir(e.x,t.x,n.x,o?o.originX:void 0),ir(e.y,t.y,n.y,o?o.originY:void 0)}function rr(e,t,n){e.min=n.min+t.min,e.max=e.min+pe(t)}function eg(e,t,n){rr(e.x,t.x,n.x),rr(e.y,t.y,n.y)}function ar(e,t,n){e.min=t.min-n.min,e.max=e.min+pe(t)}function On(e,t,n){ar(e.x,t.x,n.x),ar(e.y,t.y,n.y)}function _e(e){return[e("x"),e("y")]}const Bl=({current:e})=>e?e.ownerDocument.defaultView:null,lr=(e,t)=>Math.abs(e-t);function tg(e,t){const n=lr(e.x,t.x),o=lr(e.y,t.y);return Math.sqrt(n**2+o**2)}class zl{constructor(t,n,{transformPagePoint:o,contextWindow:s=window,dragSnapToOrigin:i=!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=yo(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=tg(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!p)return;const{point:g}=d,{timestamp:m}=fe;this.history.push({...g,timestamp:m});const{onStart:w,onMove:x}=this.handlers;h||(w&&w(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=vo(h,this.transformPagePoint),te.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=yo(d.type==="pointercancel"?this.lastMoveEventInfo:vo(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,w),g&&g(d,w)},!Ws(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=o,this.distanceThreshold=r,this.contextWindow=s||window;const a=ln(t),l=vo(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=fe;this.history=[{...c,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,yo(l,this.history)),this.removeListeners=sn(Ut(this.contextWindow,"pointermove",this.handlePointerMove),Ut(this.contextWindow,"pointerup",this.handlePointerUp),Ut(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ye(this.updatePoint)}}function vo(e,t){return t?{point:t(e.point)}:e}function cr(e,t){return{x:e.x-t.x,y:e.y-t.y}}function yo({point:e},t){return{point:e,delta:cr(e,Hl(t)),offset:cr(e,ng(t)),velocity:og(t,.1)}}function ng(e){return e[0]}function Hl(e){return e[e.length-1]}function og(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const s=Hl(e);for(;n>=0&&(o=e[n],!(s.timestamp-o.timestamp>Ve(t)));)n--;if(!o)return{x:0,y:0};const i=Re(s.timestamp-o.timestamp);if(i===0)return{x:0,y:0};const r={x:(s.x-o.x)/i,y:(s.y-o.y)/i};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function sg(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?ie(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?ie(n,e,o.max):Math.min(e,n)),e}function ur(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 ig(e,{top:t,left:n,bottom:o,right:s}){return{x:ur(e.x,n,s),y:ur(e.y,t,o)}}function dr(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 rg(e,t){return{x:dr(e.x,t.x),y:dr(e.y,t.y)}}function ag(e,t){let n=.5;const o=pe(e),s=pe(t);return s>o?n=Zt(t.min,t.max-o,e.min):o>s&&(n=Zt(e.min,e.max-s,t.min)),ze(0,1,n)}function lg(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 as=.35;function cg(e=as){return e===!1?e=0:e===!0&&(e=as),{x:fr(e,"left","right"),y:fr(e,"top","bottom")}}function fr(e,t,n){return{min:hr(e,t),max:hr(e,n)}}function hr(e,t){return typeof e=="number"?e:e[t]||0}const ug=new WeakMap;class dg{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:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ln(f).point)},r=(f,d)=>{const{drag:h,dragPropagation:p,onDragStart:g}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=mf(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),_e(w=>{let x=this.getAxisMotionValue(w).get()||0;if(Le.test(x)){const{projection:y}=this.visualElement;if(y&&y.layout){const S=y.layout.layoutBox[w];S&&(x=pe(S)*(parseFloat(x)/100))}}this.originPoint[w]=x}),g&&te.postRender(()=>g(f,d)),is(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:g,onDrag:m}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:w}=d;if(p&&this.currentDirection===null){this.currentDirection=fg(w),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",d.point,w),this.updateAxis("y",d.point,w),this.visualElement.render(),m&&m(f,d)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>_e(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new zl(t,{onSessionStart:i,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:o,contextWindow:Bl(this.visualElement)})}stop(t,n){const o=t||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!o)return;const{velocity:r}=s;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&te.postRender(()=>a(o,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,o){const{drag:s}=this.getProps();if(!o||!mn(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let r=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(r=sg(r,this.constraints[t],this.elastic[t])),i.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,s=this.constraints;t&&St(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=ig(o.layoutBox,t):this.constraints=!1,this.elastic=cg(n),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&_e(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=lg(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!St(t))return!1;const o=t.current;He(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:s}=this.visualElement;if(!s||!s.layout)return!1;const i=hh(o,s.root,this.visualElement.getTransformPagePoint());let r=rg(s.layout.layoutBox,i);if(n){const a=n(uh(r));this.hasMutatedConstraints=!!a,a&&(r=El(a))}return r}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:s,dragTransition:i,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=_e(u=>{if(!mn(u,n,this.currentDirection))return;let f=l&&l[u]||{};r&&(f={min:0,max:0});const d=s?200:1e6,h=s?40:1e7,p={type:"inertia",velocity:o?t[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return is(this.visualElement,t),o.start(ei(t,o,0,n,this.visualElement,!1))}stopAnimation(){_e(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){_e(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(),s=o[n];return s||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){_e(n=>{const{drag:o}=this.getProps();if(!mn(n,o,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:r,max:a}=s.layout.layoutBox[n];i.set(t[n]-ie(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 s={x:0,y:0};_e(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();s[r]=ag({min:l,max:l},this.constraints[r])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),_e(r=>{if(!mn(r,t,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(ie(l,c,s[r]))})}addListeners(){if(!this.visualElement.current)return;ug.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:s}=this.visualElement,i=s.addEventListener("measure",o);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),te.read(o);const r=tn(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(_e(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(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:r=as,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:s,dragConstraints:i,dragElastic:r,dragMomentum:a}}}function mn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function fg(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class hg extends tt{constructor(t){super(t),this.removeGroupControls=Ee,this.removeListeners=Ee,this.controls=new dg(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ee}unmount(){this.removeGroupControls(),this.removeListeners()}}const gr=e=>(t,n)=>{e&&te.postRender(()=>e(t,n))};class gg extends tt{constructor(){super(...arguments),this.removePointerDownListener=Ee}onPointerDown(t){this.session=new zl(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Bl(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:s}=this.node.getProps();return{onSessionStart:gr(t),onStart:gr(n),onMove:o,onEnd:(i,r)=>{delete this.session,s&&te.postRender(()=>s(i,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 Tn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let wo=!1;class pg extends C.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:s}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),o&&o.register&&s&&o.register(i),wo&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Tn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:s,isPresent:i}=this.props,{projection:r}=o;return r&&(r.isPresent=i,wo=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?r.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?r.promote():r.relegate()||te.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Hs.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:s}=t;wo=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),o&&o.deregister&&o.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Wl(e){const[t,n]=fl(),o=C.useContext(Ss);return v.jsx(pg,{...e,layoutGroup:o,switchLayoutGroup:C.useContext(_l),isPresent:t,safeToRemove:n})}function mg(e,t,n){const o=ge(e)?e:Mt(e);return o.start(ei("",o,t,n)),o.animation}const vg=(e,t)=>e.depth-t.depth;class yg{constructor(){this.children=[],this.isDirty=!1}add(t){Rs(this.children,t),this.isDirty=!0}remove(t){Es(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(vg),this.isDirty=!1,this.children.forEach(t)}}function wg(e,t){const n=ye.now(),o=({timestamp:s})=>{const i=s-n;i>=t&&(Ye(o),e(i-t))};return te.setup(o,!0),()=>Ye(o)}const Gl=["TopLeft","TopRight","BottomLeft","BottomRight"],xg=Gl.length,pr=e=>typeof e=="string"?parseFloat(e):e,mr=e=>typeof e=="number"||G.test(e);function Cg(e,t,n,o,s,i){s?(e.opacity=ie(0,n.opacity??1,Sg(o)),e.opacityExit=ie(t.opacity??1,0,bg(o))):i&&(e.opacity=ie(t.opacity??1,n.opacity??1,o));for(let r=0;r<xg;r++){const a=`border${Gl[r]}Radius`;let l=vr(t,a),c=vr(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||mr(l)===mr(c)?(e[a]=Math.max(ie(pr(l),pr(c),o),0),(Le.test(c)||Le.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=ie(t.rotate||0,n.rotate||0,o))}function vr(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Sg=Ul(0,.5,Va),bg=Ul(.5,.95,Ee);function Ul(e,t,n){return o=>o<e?0:o>t?1:n(Zt(e,t,o))}function yr(e,t){e.min=t.min,e.max=t.max}function Me(e,t){yr(e.x,t.x),yr(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 xr(e,t,n,o,s){return e-=t,e=$n(e,1/n,o),s!==void 0&&(e=$n(e,1/s,o)),e}function _g(e,t=0,n=1,o=.5,s,i=e,r=e){if(Le.test(t)&&(t=parseFloat(t),t=ie(r.min,r.max,t/100)-r.min),typeof t!="number")return;let a=ie(i.min,i.max,o);e===i&&(a-=t),e.min=xr(e.min,t,n,a,s),e.max=xr(e.max,t,n,a,s)}function Cr(e,t,[n,o,s],i,r){_g(e,t[n],t[o],t[s],t.scale,i,r)}const Rg=["x","scaleX","originX"],Eg=["y","scaleY","originY"];function Sr(e,t,n,o){Cr(e.x,t,Rg,n?n.x:void 0,o?o.x:void 0),Cr(e.y,t,Eg,n?n.y:void 0,o?o.y:void 0)}function br(e){return e.translate===0&&e.scale===1}function Kl(e){return br(e.x)&&br(e.y)}function _r(e,t){return e.min===t.min&&e.max===t.max}function Pg(e,t){return _r(e.x,t.x)&&_r(e.y,t.y)}function Rr(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ql(e,t){return Rr(e.x,t.x)&&Rr(e.y,t.y)}function Er(e){return pe(e.x)/pe(e.y)}function Pr(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Mg{constructor(){this.members=[]}add(t){Rs(this.members,t),t.scheduleRender()}remove(t){if(Es(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let o;for(let s=n;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){o=i;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:s}=t.options;s===!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 Tg(e,t,n){let o="";const s=e.x.translate/t.x,i=e.y.translate/t.y,r=n?.z||0;if((s||i||r)&&(o=`translate3d(${s}px, ${i}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:p}=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) `),p&&(o+=`skewY(${p}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"],Ag=1e3;let Vg=0;function Co(e,t,n,o){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),o&&(o[e]=0))}function Xl(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Fl(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",te,!(s||i))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&Xl(o)}function Yl({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:s}){return class{constructor(r={},a=t?.()){this.id=Vg++,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(Fg),this.nodes.forEach($g),this.nodes.forEach(Og),this.nodes.forEach(Lg)},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 yg)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Ms),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=dl(r)&&!Sf(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;te.read(()=>{f=window.innerWidth}),e(r,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,u&&u(),u=wg(d,250),Tn.hasAnimatedSinceResize&&(Tn.hasAnimatedSinceResize=!1,this.nodes.forEach(Ar)))})}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 p=this.options.transition||c.getDefaultTransition()||Wg,{onLayoutAnimationStart:g,onLayoutAnimationComplete:m}=c.getProps(),w=!this.targetLayout||!ql(this.targetLayout,h),x=!f&&d;if(this.options.layoutRoot||this.resumeFrom||x||f&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...Bs(p,"layout"),onPlay:g,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(u,x)}else f||Ar(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(),Ye(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ng),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&&Xl(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(Mr);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Tr);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(jg),this.nodes.forEach(Dg),this.nodes.forEach(kg)):this.nodes.forEach(Tr),this.clearAllSnapshots();const a=ye.now();fe.delta=ze(0,1e3/60,a-fe.timestamp),fe.timestamp=a,fe.isProcessing=!0,lo.update.process(fe),lo.preRender.process(fe),lo.render.process(fe),fe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Hs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ig),this.sharedNodes.forEach(Bg)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,te.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){te.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(!s)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Kl(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(a||at(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Gg(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(Ug))){const{scroll:c}=this.root;c&&(bt(a.x,c.offset.x),bt(a.y,c.offset.y))}return a}removeElementScroll(r){const a=ce();if(Me(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&&Me(a,r),bt(a.x,u.offset.x),bt(a.y,u.offset.y))}return a}applyTransform(r,a=!1){const l=ce();Me(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();Me(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!at(c.latestValues))continue;ts(c.latestValues)&&c.updateSnapshot();const u=ce(),f=c.measurePageBox();Me(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(),eg(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Me(this.target,this.layout.layoutBox),Ml(this.target,this.targetDelta)):Me(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||ts(this.parent.latestValues)||Pl(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(),On(this.relativeTargetOrigin,a,l),Me(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;Me(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;fh(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||!Pr(this.projectionDelta.x,this.prevProjectionDelta.x)||!Pr(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=Rt(),this.projectionDelta=Rt(),this.projectionDeltaWithTransform=Rt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=Rt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=ce(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=h!==p,m=this.getStack(),w=!m||m.members.length<=1,x=!!(g&&!w&&this.options.crossfade===!0&&!this.path.some(Hg));this.animationProgress=0;let y;this.mixTargetDelta=S=>{const _=S/1e3;Vr(f.x,r.x,_),Vr(f.y,r.y,_),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(On(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),zg(this.relativeTarget,this.relativeTargetOrigin,d,_),y&&Pg(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=ce()),Me(y,this.relativeTarget)),g&&(this.animationValues=u,Cg(u,c,this.latestValues,_,x,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ye(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=te.update(()=>{Tn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Mt(0)),this.currentAnimation=mg(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(Ag),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&&Zl(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}Me(a,l),_t(a,u),Kt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Mg),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&&Co("z",r,c,this.animationValues);for(let u=0;u<xo.length;u++)Co(`rotate${xo[u]}`,r,c,this.animationValues),Co(`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=Mn(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=Mn(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=Tg(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 p in es){if(u[p]===void 0)continue;const{correct:g,applyTo:m,isCSSVariable:w}=es[p],x=f==="none"?u[p]:g(u[p],c);if(m){const y=m.length;for(let S=0;S<y;S++)r[m[S]]=x}else w?this.options.visualElement.renderState.vars[p]=x:r[p]=x}this.options.layoutId&&(r.pointerEvents=c===this?Mn(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Mr),this.root.sharedNodes.clear()}}}function Dg(e){e.updateLayout()}function kg(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:s}=e.options,i=t.source!==e.layout.source;s==="size"?_e(u=>{const f=i?t.measuredBox[u]:t.layoutBox[u],d=pe(f);f.min=n[u].min,f.max=f.min+d}):Zl(s,t.layoutBox,n)&&_e(u=>{const f=i?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=Rt();Kt(r,n,t.layoutBox);const a=Rt();i?Kt(a,e.applyTransform(o,!0),t.measuredBox):Kt(a,n,t.layoutBox);const l=!Kl(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();On(h,t.layoutBox,f.layoutBox);const p=ce();On(p,n,d.layoutBox),ql(h,p)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=h,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Fg(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 Lg(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ig(e){e.clearSnapshot()}function Mr(e){e.clearMeasurements()}function Tr(e){e.isLayoutDirty=!1}function jg(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ar(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function $g(e){e.resolveTargetDelta()}function Og(e){e.calcProjection()}function Ng(e){e.resetSkewAndRotation()}function Bg(e){e.removeLeadSnapshot()}function Vr(e,t,n){e.translate=ie(t.translate,0,n),e.scale=ie(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Dr(e,t,n,o){e.min=ie(t.min,n.min,o),e.max=ie(t.max,n.max,o)}function zg(e,t,n,o){Dr(e.x,t.x,n.x,o),Dr(e.y,t.y,n.y,o)}function Hg(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Wg={duration:.45,ease:[.4,0,.1,1]},kr=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Fr=kr("applewebkit/")&&!kr("chrome/")?Math.round:Ee;function Lr(e){e.min=Fr(e.min),e.max=Fr(e.max)}function Gg(e){Lr(e.x),Lr(e.y)}function Zl(e,t,n){return e==="position"||e==="preserve-aspect"&&!Qh(Er(t),Er(n),.2)}function Ug(e){return e!==e.root&&e.scroll?.wasRoot}const Kg=Yl({attachResizeListener:(e,t)=>tn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),So={current:void 0},Jl=Yl({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!So.current){const e=new Kg({});e.mount(window),e.setOptions({layoutScroll:!0}),So.current=e}return So.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),qg={pan:{Feature:gg},drag:{Feature:hg,ProjectionNode:Jl,MeasureLayout:Wl}};function Ir(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=o[s];i&&te.postRender(()=>i(t,ln(t)))}class Xg extends tt{mount(){const{current:t}=this.node;t&&(this.unmount=vf(t,(n,o)=>(Ir(this.node,o,"Start"),s=>Ir(this.node,s,"End"))))}unmount(){}}class Yg extends tt{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=sn(tn(this.node.current,"focus",()=>this.onFocus()),tn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function jr(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 s="onTap"+(n==="End"?"":n),i=o[s];i&&te.postRender(()=>i(t,ln(t)))}class Zg extends tt{mount(){const{current:t}=this.node;t&&(this.unmount=Cf(t,(n,o)=>(jr(this.node,o,"Start"),(s,{success:i})=>jr(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ls=new WeakMap,bo=new WeakMap,Jg=e=>{const t=ls.get(e.target);t&&t(e)},Qg=e=>{e.forEach(Jg)};function ep({root:e,...t}){const n=e||document;bo.has(n)||bo.set(n,{});const o=bo.get(n),s=JSON.stringify(t);return o[s]||(o[s]=new IntersectionObserver(Qg,{root:e,...t})),o[s]}function tp(e,t,n){const o=ep(t);return ls.set(e,n),o.observe(e),()=>{ls.delete(e),o.unobserve(e)}}const np={some:0,all:1};class op extends tt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:s="some",once:i}=t,r={root:n?n.current:void 0,rootMargin:o,threshold:typeof s=="number"?s:np[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!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 tp(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(sp(t,n))&&this.startObserver()}unmount(){}}function sp({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const ip={inView:{Feature:op},tap:{Feature:Zg},focus:{Feature:Yg},hover:{Feature:Xg}},rp={layout:{ProjectionNode:Jl,MeasureLayout:Wl}},ap={...Kh,...ip,...qg,...rp},Xn=ch(ap,Sh),lp="_primary_13825_8",cp="_secondary_13825_12",up="_tertiary_13825_16",dp="_positive_13825_20",fp="_negative_13825_24",hp="_warning_13825_28",gp="_accent_13825_32",pp="_inverse_13825_36",mp="_text_13825_111",vp="_regular_13825_117",yp="_medium_13825_121",wp="_semibold_13825_125",xp="_bold_13825_129",vn={primary:lp,secondary:cp,tertiary:up,positive:dp,negative:fp,warning:hp,accent:gp,inverse:pp,"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:mp,regular:vp,medium:yp,semibold:wp,bold:xp},Cp=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"),k.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})},q=C.forwardRef(({children:e,className:t,variant:n="body-1",fontWeight:o="medium",tag:s="p",colorName:i="primary",style:r,clickOpacity:a=.5,opacityDuration:l=200,onClick:c,disabled:u,mt:f,mb:d,ml:h,mr:p,flex:g,cursor:m,wordBreak:w,whiteSpace:x,textOverflow:y,decoration:S,color:_,center:M,left:T,right:P,uppercase:D,lowercase:F,capitalize:j,overflow:$,...O},V)=>{const[z,N]=C.useState(!1),E=!!c,R=()=>E&&N(!0),A=()=>E&&N(!1),I=Cp({mt:f,mb:d,ml:h,mr:p,flex:g,cursor:m,wordBreak:w,whiteSpace:x,textOverflow:y,decoration:S,color:_,center:M,left:T,right:P,uppercase:D,lowercase:F,capitalize:j,overflow:$}),Y=s,K=E?k.css({opacity:z?a:1,transition:`opacity ${l}ms ease`}):"";return v.jsx(Y,{ref:V,...O,className:k.cx(vn.text,vn[n],vn[i],vn[o],K,t,I),style:r,onClick:c,onMouseDown:R,onMouseUp:A,onMouseLeave:A,onTouchStart:R,onTouchEnd:A,role:E?"button":void 0,tabIndex:E?0:void 0,children:e})});q.displayName="Text";const Ql=Xn(q),Sp=k.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)"},bp={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},_p={clear:k.css({backgroundColor:"transparent",border:"none"}),filled:k.css({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:k.css({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},Rp=(e,t,n,o)=>{if(o)return k.css({cursor:"not-allowed",opacity:.7});const s={transition:"all 0.2s ease",borderRadius:"var(--corner-lg)",border:"none",color:e==="filled"?"var(--text-inverse)":`var(--text-${t})`};switch(e){case"filled":return k.css({...s,backgroundColor:`var(--fill-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${t}-${n}-hover)`}});case"outline":return k.css({...s,backgroundColor:"transparent",border:`1px solid var(--border-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});case"clear":return k.css({...s,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});default:return k.css(s)}},cs=({disabled:e,loading:t,wrapperClassName:n,buttonClassName:o,buttonDisabledClassName:s,textClassName:i,children:r,variant:a="filled",backgroundColor:l,textColor:c,textFontWeight:u,borderColor:f,color:d="accent",opacity:h,borderRadius:p,width:g="full",size:m="md",iconLeft:w,iconRight:x,intensity:y="primary",flex:S,type:_="button",...M})=>{const T=C.useMemo(()=>{switch(g){case"full":return"100%";case"auto":return"auto";default:return g}},[g]),P=C.useMemo(()=>l||(a==="filled"?d==="neutral"?"var(--fill-neutral-secondary)":`var(--fill-${d}-${y})`:"transparent"),[a,l,d,y]),D=C.useMemo(()=>{if(y==="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})`},[y,d,a]),F=C.useMemo(()=>{if(y==="primary"){if(d==="neutral")return"secondary";if(a==="filled")return"inverse"}else if(d==="neutral")return"secondary";return d},[a,d,y]),j=C.useMemo(()=>f||(a==="outline"?`var(--border-${d}-${y})`:"transparent"),[a,f,d,y]),$=C.useMemo(()=>{switch(m){case"lg":return Bt.lg;case"md":case"sm":return Bt.md;case"xs":return Bt.sm;default:return Bt.md}},[m]),O=k.cx(Sp,Rp(a,d,y,e),_p[a],e?s:void 0,k.css({borderRadius:p?Bt[p]:$,backgroundColor:P,borderColor:j,color:c,width:"100%",height:bp[m],opacity:h||(e?.7:1)}),o),V=C.useMemo(()=>{switch(m){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[m]);return v.jsx(L,{className:k.cx(n),w:T,flex:S,relative:!0,overflow:"hidden",children:v.jsxs(Xn.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:O,children:[t?v.jsx(pa,{color:D}):v.jsxs(v.Fragment,{children:[w,v.jsx(Ql,{style:{color:c},colorName:F,variant:V,className:i,textOverflow:"ellipsis",overflow:"hidden",children:r}),x]}),v.jsx(pt,{})]})})},Ep=e=>b.createElement("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",...e},b.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),Pp=e=>b.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...e},b.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),Mp="_checkbox_22ifd_8",Tp="_disabled_22ifd_14",Ap="_checkbox__ripple_22ifd_14",Vp="_checkbox__input_22ifd_26",Dp="_checkbox__box_22ifd_33",kp="_secondary_22ifd_46",Fp="_checked_22ifd_52",Lp="_error_22ifd_61",$e={checkbox:Mp,disabled:Tp,checkbox__ripple:Ap,checkbox__input:Vp,checkbox__box:Dp,secondary:kp,checked:Fp,error:Lp},Ip={sm:20,md:24},ti=C.forwardRef(({checked:e,onChange:t,disabled:n,error:o,indeterminate:s,size:i="md",title:r,titleColor:a,subtitle:l,subtitleColor:c="secondary",name:u,required:f,variant:d="primary",flex:h,readOnly:p},g)=>{const[m,w]=C.useState(!1),x=e!==void 0,y=x?e:m,S=D=>{x||w(D.target.checked),t?.(D)},_=Ip[i],M=y||s,T=!!p&&!n,P=n?"not-allowed":T?"auto":"pointer";return v.jsxs("label",{className:k.cx($e.checkbox,k.css({flex:h,cursor:P}),{[$e.disabled]:n}),children:[v.jsxs(L,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${_}px`,"--checkbox-size-double":`${_*2}px`},children:[v.jsx("input",{ref:g,type:"checkbox",checked:y,onChange:T?void 0:S,onClick:D=>D.stopPropagation(),disabled:n,readOnly:T,name:u,required:f,className:k.cx($e.checkbox__input,{[$e.disabled]:n},k.css({cursor:P}))}),v.jsx("div",{className:k.cx($e.checkbox__box,$e[d],{[$e.disabled]:n,[$e.error]:o,[$e.checked]:M}),children:M&&(s?v.jsx(Pp,{width:_*.75,height:_*.75}):v.jsx(Ep,{width:_*.75,height:_*.75}))})]}),(r||l)&&v.jsxs(L,{gap:4,children:[r&&v.jsx(q,{colorName:a,variant:i==="sm"?"body-2":"body-1",children:r}),l&&v.jsx(q,{variant:"body-2",colorName:c,children:l})]})]})});ti.displayName="Checkbox";const jp=e=>b.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("g",{opacity:.5},b.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"}))),$p="_disabled_19ujt_20",Op="_multiline_19ujt_24",Np="_input_19ujt_8",Bp="_sm_19ujt_74",zp="_md_19ujt_79",Hp="_error_19ujt_84",Wp="_white_19ujt_88",Gp="_gray_19ujt_92",ve={"input-container":"_input-container_19ujt_8",disabled:$p,multiline:Op,input:Np,"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:Bp,md:zp,error:Hp,white:Wp,gray:Gp,"clear-button":"_clear-button_19ujt_96"};function $r(e){return{...new Event("input",{bubbles:!0}),target:e,currentTarget:e}}const ec=C.forwardRef((e,t)=>{const{label:n,prompt:o,error:s,errorText:i,size:r="md",prefix:a,suffix:l,background:c="white",showClearButton:u,disabled:f,value:d,defaultValue:h,inputClassName:p,textAlign:g="left",...m}=e,w=e.multiline===!0,x=C.useRef(null),y=C.useRef(null),[S,_]=mt(typeof d=="string"||typeof d=="number"?String(d):void 0,h==="string"||h==="number"?String(h):"");C.useImperativeHandle(t,()=>({focus:()=>{x.current?.focus(),y.current?.focus()},blur:()=>{x.current?.blur(),y.current?.blur()},get value(){return x.current?.value||y.current?.value},set value(D){_(D),x.current&&(x.current.value=D),y.current&&(y.current.value=D)}}));const M=D=>{if(_(D.target.value),w){const F=e.onChange;F?.(D)}else{const F=e.onChange;F?.(D)}};C.useEffect(()=>{w&&e.autoResize&&y.current&&(y.current.style.height="auto",y.current.style.height=`${y.current.scrollHeight}px`)},[S,w,e.autoResize]);const T=()=>{if(_(""),!w){const F=x.current;if(F){F.value="";const j=$r(F),$=e.onChange;$?.(j)}return}const D=y.current;if(D){D.value="";const F=$r(D),j=e.onChange;j?.(F)}},P=()=>{if(w){const{rows:$,autoResize:O,onChange:V,multiline:z,...N}=m;return v.jsx("textarea",{ref:y,rows:e.rows??3,className:k.cx(ve.input,p,{[ve.disabled]:f,[ve[`input-text-align_${g}`]]:!!g}),disabled:f,maxLength:e.maxLength,...N,value:S,onChange:M})}const{onChange:D,multiline:F,...j}=m;return v.jsx("input",{...j,ref:x,className:k.cx(ve.input,ve[`input-text-size_${r}`],p,{[ve.disabled]:f,[ve[`input-text-align_${g}`]]:!!g}),disabled:f,type:e.type??"text",value:S,onChange:M})};return v.jsxs(L,{w:"full",gap:"var(--spacing-sm)",children:[n&&v.jsx(q,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:n}),v.jsxs(L,{row:!0,alignItems:w?"flex-start":"center",w:"full",gap:"var(--spacing-md)",className:k.cx(ve["input-container"],ve[c],ve[r],{[ve.error]:s,[ve.disabled]:f,[ve.multiline]:w}),children:[a&&v.jsx(L,{flex:"none",children:a}),v.jsx(L,{flex:"1",children:P()}),u&&S&&!f&&v.jsx(L,{flex:"none",children:v.jsx("span",{className:ve["clear-button"],onClick:T,children:v.jsx(jp,{})})}),l&&v.jsx(L,{flex:"none",children:l})]}),(o||w)&&v.jsxs(L,{row:!0,gap:10,w:"full",children:[typeof o=="string"?v.jsx(q,{variant:"caption-1",colorName:"tertiary",children:o}):o,w&&e.maxLength&&v.jsx(q,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${S.length}/${e.maxLength}`})]}),i&&s&&v.jsx(q,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:i})]})});ec.displayName="Input";const Up="_input_5xq63_8",Kp="_disabled_5xq63_29",qp="_error_5xq63_37",Xp="_success_5xq63_41",Yp="_white_5xq63_50",Zp="_gray_5xq63_54",Jp="_glow_5xq63_58",vt={input:Up,disabled:Kp,error:qp,success:Xp,white:Yp,gray:Zp,glow:Jp};function Qp(e){const t=C.useRef(void 0);return C.useEffect(()=>{t.current=e},[e]),t.current}const tc=C.forwardRef(({length:e=6,label:t,prompt:n,error:o,errorText:s,success:i,disabled:r,autoFocus:a,center:l,secure:c,loading:u,background:f="gray",numeric:d=!0,className:h,value:p,defaultValue:g,onChange:m,onComplete:w},x)=>{const y=typeof p=="string",S=y?p:g,_=typeof S=="string"?S.slice(0,e):"",[M,T]=mt(y?p:void 0,_),[P,D]=C.useState(()=>{const E=_.slice(0,e);return Array.from({length:e},(R,A)=>E[A]??"")}),F=C.useRef(void 0),j=Qp(p),$=C.useRef([]);C.useEffect(()=>{if(!y)return;const E=p??"";if(E===j)return;if(E===F.current){F.current=void 0;return}const R=E.slice(0,e);D(Array.from({length:e},(A,I)=>R[I]??""))},[y,p,e,j]);const O=C.useCallback((E,R)=>{const A=E.slice(0,e);R?.fromInternal&&(F.current=A),T(A),m?.(A),A.length===e&&w?.(A)},[e,m,w,T]);C.useImperativeHandle(x,()=>({focus:()=>{$.current[0]?.focus()},blur:()=>{$.current.forEach(E=>E?.blur())},get value(){return M||""},setValue:E=>{const R=E.slice(0,e);D(Array.from({length:e},(A,I)=>R[I]??"")),O(R,{fromInternal:!0})},clear:()=>{D(Array.from({length:e},()=>"")),O("",{fromInternal:!0})}}),[e,O,M]);const V=C.useCallback((E,R)=>{if(r)return;let A=R;if(d&&(A=A.replace(/\D/g,"")),A.length>1){const U=P.slice(0,E).join("")+A+P.slice(E+1).join(""),re=Array.from({length:e},(B,X)=>U[X]??"");D(re),O(U,{fromInternal:!0});const J=Math.min(E+A.length,e-1),ne=$.current[J];ne?.focus(),ne?.select();return}const I=P[E],Y=[...P];Y[E]=A,D(Y);const K=Y.join("");if(O(K,{fromInternal:!0}),!I&&A&&E<e-1){const U=$.current[E+1];U?.focus(),U?.select()}},[P,r,e,d,O]),z=C.useCallback((E,R)=>{if(!r){if(R.key==="Backspace"){R.preventDefault();const A=$.current[E];if(P[E]){const I=[...P];I[E]="",D(I),O(I.join(""),{fromInternal:!0}),A?.focus();return}if(E>0){const I=$.current[E-1];I?.focus(),I?.select()}return}R.key==="ArrowLeft"&&E>0&&(R.preventDefault(),$.current[E-1]?.focus()),R.key==="ArrowRight"&&E<e-1&&(R.preventDefault(),$.current[E+1]?.focus())}},[P,r,e,O]),N=C.useCallback((E,R)=>{if(r)return;R.preventDefault();let A=R.clipboardData.getData("text");if(d&&(A=A.replace(/\D/g,"")),!A)return;const I=e-E,Y=Math.min(A.length,I),K=A.slice(0,Y),U=[...P];for(let B=0;B<Y;B++)U[E+B]=K[B]??"";D(U);const re=U.join("");O(re,{fromInternal:!0});const J=Math.min(E+Y-1,e-1),ne=$.current[J];ne?.focus(),ne?.select()},[P,r,e,d,O]);return v.jsxs(L,{w:"full",gap:"var(--spacing-sm)",className:h,center:l,children:[t&&v.jsx(q,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:t}),v.jsx(L,{row:!0,w:"full",gap:"var(--spacing-sm)",center:l,className:k.cx({[vt.disabled]:r}),children:Array.from({length:e}).map((E,R)=>v.jsxs(L,{relative:!0,display:"inline-block",children:[v.jsx("input",{ref:A=>{$.current[R]=A},className:k.cx(vt.input,vt[f],o&&vt.error,i&&vt.success,P[R]&&k.css({caretColor:"transparent"})),inputMode:d?"numeric":"text",type:c?"password":"text",maxLength:1,autoFocus:a&&R===0,disabled:r||u,value:P[R],onChange:A=>V(R,A.target.value),onKeyDown:A=>z(R,A),onPaste:A=>N(R,A)}),v.jsx(Xn.span,{className:vt.glow,variants:em,custom:R,initial:"idle",animate:u?"wave":"idle"})]},R))}),n&&v.jsx(q,{variant:"caption-1",colorName:"tertiary",children:n}),s&&o&&v.jsx(q,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:s})]})}),em={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]}})};tc.displayName="OtpInput";const nc=C.createContext(null),tm=()=>C.useContext(nc),nm="_radio_zru2j_8",om="_disabled_zru2j_16",sm="_side_right_zru2j_21",zt={radio:nm,disabled:om,side_right:sm,"read-only":"_read-only_zru2j_26"},Or={sm:{inner:12,outer:20},md:{inner:16,outer:24}},oc=C.forwardRef(({value:e,children:t,checked:n,defaultChecked:o,onChange:s,disabled:i,className:r,description:a,size:l,side:c,readOnly:u,error:f},d)=>{const h=tm(),p=!!h,g=n!==void 0,[m,w]=mt(n,o),x=p?h.value===e:g?n:m,y=h?.disabled||i,S=l??h?.size??"md",_=c??h?.side??"left",M=u??h?.readOnly??!1,T=f??h?.error??!1,P=Or[S].outer,D=Or[S].inner,F=()=>{y||M||(p?h.setValue?.(e):(g||w(!x),s?.(!x)))},j=x&&T?"var(--fill-negative-tint)":x?"var(--fill-accent-tint)":"var(--fill-bg-secondary)",$=x&&T?"var(--fill-negative-primary)":x?"var(--fill-accent-primary)":void 0,O=x&&T||T&&!x?"var(--border-negative-secondary)":"var(--border-neutral-alpha-low)";return v.jsxs("button",{ref:d,role:"radio",type:"button","data-value":e,"aria-checked":x,"aria-disabled":y||void 0,tabIndex:x?0:-1,className:k.cx([zt.radio,x&&zt.checked,y&&zt.disabled,_==="right"&&zt.side_right,M&&zt["read-only"],r]),onClick:F,children:[v.jsx(L,{w:P,h:P,backgroundColor:j,borderWidth:x?0:1,borderColor:O,borderStyle:"solid",center:!0,borderRadius:"var(--corner-full-round)",children:v.jsx(L,{w:D,h:D,backgroundColor:$,borderRadius:"var(--corner-full-round)","aria-hidden":!0})}),v.jsxs(L,{alignItems:"flex-start",children:[v.jsx(q,{variant:S==="sm"?"body-2":"body-1",tag:"span",left:!0,children:t}),a&&v.jsx(q,{tag:"span",variant:"body-2",colorName:"secondary",children:a})]})]})});oc.displayName="Radio";const sc=C.forwardRef(({label:e,value:t,defaultValue:n,onChange:o,children:s,className:i,error:r=!1,disabled:a=!1,readOnly:l=!1,side:c="left",size:u="md"},f)=>{const[d,h]=mt(t,n),p=t!==void 0,g=p?t:d,m=C.useCallback(x=>{p||h(x),o?.(x)},[p,o,h]),w=C.useRef(null);return C.useImperativeHandle(f,()=>w.current),v.jsx(nc.Provider,{value:{value:g,readOnly:l,disabled:a,setValue:m,size:u,side:c,error:r},children:v.jsxs(L,{gap:"var(--spacing-sm)",ref:w,role:"radiogroup","aria-invalid":r||void 0,className:i,children:[typeof e=="string"?v.jsx(q,{colorName:"secondary",children:e}):e,v.jsx(L,{gap:"var(--spacing-lg)",children:s})]})})});sc.displayName="RadioGroup";const im="_primary_svt6d_8",rm="_secondary_svt6d_13",am="_button_svt6d_18",Ue={primary:im,secondary:rm,button:am,"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 lm({value:e,onChange:t,options:n,variant:o="primary",fullWidth:s=!1,className:i}){return v.jsx(L,{row:!0,alignItems:"center",borderRadius:"var(--corner-md)",p:"var(--spacing-xs)",gap:"var(--spacing-md)",className:k.cx(Ue[o],s&&Ue["full-width"],i),children:n.map(r=>{const a=r.value===e,l=r.disabled,c=r.separatorAfter??!1;return v.jsxs(C.Fragment,{children:[v.jsxs("button",{type:"button",disabled:l,className:k.cx(Ue.button,s&&Ue["full-width"],a&&Ue["button-active"],a&&Ue[`button-${o}`],l&&Ue["button-disabled"]),onClick:()=>!l&&t(r.value),children:[r.icon&&v.jsx(L,{alignItems:"center",justifyContent:"center",className:Ue["icon-container"],children:r.icon}),r.label&&v.jsx(q,{colorName:a?"primary":"tertiary",children:r.label}),!l&&v.jsx(pt,{color:"var(--fill-bg-overlay-primary)"})]}),c&&v.jsx(L,{w:1,h:24,backgroundColor:"var(--fill-bg-tertiary)"})]},r.value)})})}function Yn(){return typeof window<"u"}function Lt(e){return ic(e)?(e.nodeName||"").toLowerCase():"#document"}function we(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function je(e){var t;return(t=(ic(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ic(e){return Yn()?e instanceof Node||e instanceof we(e).Node:!1}function Q(e){return Yn()?e instanceof Element||e instanceof we(e).Element:!1}function me(e){return Yn()?e instanceof HTMLElement||e instanceof we(e).HTMLElement:!1}function us(e){return!Yn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof we(e).ShadowRoot}const cm=new Set(["inline","contents"]);function cn(e){const{overflow:t,overflowX:n,overflowY:o,display:s}=Pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!cm.has(s)}const um=new Set(["table","td","th"]);function dm(e){return um.has(Lt(e))}const fm=[":popover-open",":modal"];function Zn(e){return fm.some(t=>{try{return e.matches(t)}catch{return!1}})}const hm=["transform","translate","scale","rotate","perspective"],gm=["transform","translate","scale","rotate","perspective","filter"],pm=["paint","layout","strict","content"];function ni(e){const t=Jn(),n=Q(e)?Pe(e):e;return hm.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)||gm.some(o=>(n.willChange||"").includes(o))||pm.some(o=>(n.contain||"").includes(o))}function mm(e){let t=Ge(e);for(;me(t)&&!Be(t);){if(ni(t))return t;if(Zn(t))return null;t=Ge(t)}return null}function Jn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const vm=new Set(["html","body","#document"]);function Be(e){return vm.has(Lt(e))}function Pe(e){return we(e).getComputedStyle(e)}function Qn(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ge(e){if(Lt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||us(e)&&e.host||je(e);return us(t)?t.host:t}function rc(e){const t=Ge(e);return Be(t)?e.ownerDocument?e.ownerDocument.body:e.body:me(t)&&cn(t)?t:rc(t)}function Xe(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=rc(e),i=s===((o=e.ownerDocument)==null?void 0:o.body),r=we(s);if(i){const a=ds(r);return t.concat(r,r.visualViewport||[],cn(s)?s:[],a&&n?Xe(a):[])}return t.concat(s,Xe(s,[],n))}function ds(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Je=Math.min,xe=Math.max,Nn=Math.round,yn=Math.floor,Ie=e=>({x:e,y:e}),ym={left:"right",right:"left",bottom:"top",top:"bottom"},wm={start:"end",end:"start"};function fs(e,t,n){return xe(e,Je(t,n))}function It(e,t){return typeof e=="function"?e(t):e}function Qe(e){return e.split("-")[0]}function jt(e){return e.split("-")[1]}function ac(e){return e==="x"?"y":"x"}function oi(e){return e==="y"?"height":"width"}const xm=new Set(["top","bottom"]);function Ne(e){return xm.has(Qe(e))?"y":"x"}function si(e){return ac(Ne(e))}function Cm(e,t,n){n===void 0&&(n=!1);const o=jt(e),s=si(e),i=oi(s);let r=s==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(r=Bn(r)),[r,Bn(r)]}function Sm(e){const t=Bn(e);return[hs(e),t,hs(t)]}function hs(e){return e.replace(/start|end/g,t=>wm[t])}const Nr=["left","right"],Br=["right","left"],bm=["top","bottom"],_m=["bottom","top"];function Rm(e,t,n){switch(e){case"top":case"bottom":return n?t?Br:Nr:t?Nr:Br;case"left":case"right":return t?bm:_m;default:return[]}}function Em(e,t,n,o){const s=jt(e);let i=Rm(Qe(e),n==="start",o);return s&&(i=i.map(r=>r+"-"+s),t&&(i=i.concat(i.map(hs)))),i}function Bn(e){return e.replace(/left|right|bottom|top/g,t=>ym[t])}function Pm(e){return{top:0,right:0,bottom:0,left:0,...e}}function lc(e){return typeof e!="number"?Pm(e):{top:e,right:e,bottom:e,left:e}}function zn(e){const{x:t,y:n,width:o,height:s}=e;return{width:o,height:s,top:n,left:t,right:t+o,bottom:n+s,x:t,y:n}}function Mm(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Tm(){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 Am(){return/apple/i.test(navigator.vendor)}function Vm(){return Mm().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Dm(){return Tm().includes("jsdom/")}const zr="data-floating-ui-focusable",km="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Hr(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 nn(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&us(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function wt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function _o(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 Fm(e){return e.matches("html,body")}function dt(e){return e?.ownerDocument||document}function cc(e){return me(e)&&e.matches(km)}function Lm(e){if(!e||Dm())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Im(e){return e?e.hasAttribute(zr)?e:e.querySelector("["+zr+"]")||e:null}function An(e,t,n){return n===void 0&&(n=!0),e.filter(s=>{var i;return s.parentId===t&&(!n||((i=s.context)==null?void 0:i.open))}).flatMap(s=>[s,...An(e,s.id,n)])}function jm(e){return"nativeEvent"in e}function on(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var $m=typeof document<"u",Om=function(){},At=$m?C.useLayoutEffect:Om;const Nm={...b};function wn(e){const t=b.useRef(e);return At(()=>{t.current=e}),t}const Bm=Nm.useInsertionEffect,zm=Bm||(e=>e());function Fe(e){const t=b.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return zm(()=>{t.current=e}),b.useCallback(function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return t.current==null?void 0:t.current(...o)},[])}function Wr(e,t,n){let{reference:o,floating:s}=e;const i=Ne(t),r=si(t),a=oi(r),l=Qe(t),c=i==="y",u=o.x+o.width/2-s.width/2,f=o.y+o.height/2-s.height/2,d=o[a]/2-s[a]/2;let h;switch(l){case"top":h={x:u,y:o.y-s.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-s.width,y:f};break;default:h={x:o.x,y:o.y}}switch(jt(t)){case"start":h[r]-=d*(n&&c?-1:1);break;case"end":h[r]+=d*(n&&c?-1:1);break}return h}const Hm=async(e,t,n)=>{const{placement:o="bottom",strategy:s="absolute",middleware:i=[],platform:r}=n,a=i.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(t));let c=await r.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:f}=Wr(c,o,l),d=o,h={},p=0;for(let g=0;g<a.length;g++){const{name:m,fn:w}=a[g],{x,y,data:S,reset:_}=await w({x:u,y:f,initialPlacement:o,placement:d,strategy:s,middlewareData:h,rects:c,platform:r,elements:{reference:e,floating:t}});u=x??u,f=y??f,h={...h,[m]:{...h[m],...S}},_&&p<=50&&(p++,typeof _=="object"&&(_.placement&&(d=_.placement),_.rects&&(c=_.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:s}):_.rects),{x:u,y:f}=Wr(c,d,l)),g=-1)}return{x:u,y:f,placement:d,strategy:s,middlewareData:h}};async function ii(e,t){var n;t===void 0&&(t={});const{x:o,y:s,platform:i,rects:r,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=It(t,e),p=lc(h),m=a[d?f==="floating"?"reference":"floating":f],w=zn(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=f==="floating"?{x:o,y:s,width:r.floating.width,height:r.floating.height}:r.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},_=zn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:y,strategy:l}):x);return{top:(w.top-_.top+p.top)/S.y,bottom:(_.bottom-w.bottom+p.bottom)/S.y,left:(w.left-_.left+p.left)/S.x,right:(_.right-w.right+p.right)/S.x}}const Wm=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:s,rects:i,platform:r,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=It(e,t)||{};if(c==null)return{};const f=lc(u),d={x:n,y:o},h=si(s),p=oi(h),g=await r.getDimensions(c),m=h==="y",w=m?"top":"left",x=m?"bottom":"right",y=m?"clientHeight":"clientWidth",S=i.reference[p]+i.reference[h]-d[h]-i.floating[p],_=d[h]-i.reference[h],M=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c));let T=M?M[y]:0;(!T||!await(r.isElement==null?void 0:r.isElement(M)))&&(T=a.floating[y]||i.floating[p]);const P=S/2-_/2,D=T/2-g[p]/2-1,F=Je(f[w],D),j=Je(f[x],D),$=F,O=T-g[p]-j,V=T/2-g[p]/2+P,z=fs($,V,O),N=!l.arrow&&jt(s)!=null&&V!==z&&i.reference[p]/2-(V<$?F:j)-g[p]/2<0,E=N?V<$?V-$:V-O:0;return{[h]:d[h]+E,data:{[h]:z,centerOffset:V-z-E,...N&&{alignmentOffset:E}},reset:N}}}),Gm=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:s,middlewareData:i,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...m}=It(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=Qe(s),x=Ne(a),y=Qe(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),_=d||(y||!g?[Bn(a)]:Sm(a)),M=p!=="none";!d&&M&&_.push(...Em(a,g,p,S));const T=[a,..._],P=await ii(t,m),D=[];let F=((o=i.flip)==null?void 0:o.overflows)||[];if(u&&D.push(P[w]),f){const V=Cm(s,r,S);D.push(P[V[0]],P[V[1]])}if(F=[...F,{placement:s,overflows:D}],!D.every(V=>V<=0)){var j,$;const V=(((j=i.flip)==null?void 0:j.index)||0)+1,z=T[V];if(z&&(!(f==="alignment"?x!==Ne(z):!1)||F.every(R=>Ne(R.placement)===x?R.overflows[0]>0:!0)))return{data:{index:V,overflows:F},reset:{placement:z}};let N=($=F.filter(E=>E.overflows[0]<=0).sort((E,R)=>E.overflows[1]-R.overflows[1])[0])==null?void 0:$.placement;if(!N)switch(h){case"bestFit":{var O;const E=(O=F.filter(R=>{if(M){const A=Ne(R.placement);return A===x||A==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(A=>A>0).reduce((A,I)=>A+I,0)]).sort((R,A)=>R[1]-A[1])[0])==null?void 0:O[0];E&&(N=E);break}case"initialPlacement":N=a;break}if(s!==N)return{reset:{placement:N}}}return{}}}},Um=new Set(["left","top"]);async function Km(e,t){const{placement:n,platform:o,elements:s}=e,i=await(o.isRTL==null?void 0:o.isRTL(s.floating)),r=Qe(n),a=jt(n),l=Ne(n)==="y",c=Um.has(r)?-1:1,u=i&&l?-1:1,f=It(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:d*c}:{x:d*c,y:h*u}}const qm=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:s,y:i,placement:r,middlewareData:a}=t,l=await Km(t,e);return r===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:r}}}}},Xm=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:s}=t,{mainAxis:i=!0,crossAxis:r=!1,limiter:a={fn:m=>{let{x:w,y:x}=m;return{x:w,y:x}}},...l}=It(e,t),c={x:n,y:o},u=await ii(t,l),f=Ne(Qe(s)),d=ac(f);let h=c[d],p=c[f];if(i){const m=d==="y"?"top":"left",w=d==="y"?"bottom":"right",x=h+u[m],y=h-u[w];h=fs(x,h,y)}if(r){const m=f==="y"?"top":"left",w=f==="y"?"bottom":"right",x=p+u[m],y=p-u[w];p=fs(x,p,y)}const g=a.fn({...t,[d]:h,[f]:p});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[d]:i,[f]:r}}}}}},Ym=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:s,rects:i,platform:r,elements:a}=t,{apply:l=()=>{},...c}=It(e,t),u=await ii(t,c),f=Qe(s),d=jt(s),h=Ne(s)==="y",{width:p,height:g}=i.floating;let m,w;f==="top"||f==="bottom"?(m=f,w=d===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(w=f,m=d==="end"?"top":"bottom");const x=g-u.top-u.bottom,y=p-u.left-u.right,S=Je(g-u[m],x),_=Je(p-u[w],y),M=!t.middlewareData.shift;let T=S,P=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=y),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(T=x),M&&!d){const F=xe(u.left,0),j=xe(u.right,0),$=xe(u.top,0),O=xe(u.bottom,0);h?P=p-2*(F!==0||j!==0?F+j:xe(u.left,u.right)):T=g-2*($!==0||O!==0?$+O:xe(u.top,u.bottom))}await l({...t,availableWidth:P,availableHeight:T});const D=await r.getDimensions(a.floating);return p!==D.width||g!==D.height?{reset:{rects:!0}}:{}}}};function uc(e){const t=Pe(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const s=me(e),i=s?e.offsetWidth:n,r=s?e.offsetHeight:o,a=Nn(n)!==i||Nn(o)!==r;return a&&(n=i,o=r),{width:n,height:o,$:a}}function ri(e){return Q(e)?e:e.contextElement}function Pt(e){const t=ri(e);if(!me(t))return Ie(1);const n=t.getBoundingClientRect(),{width:o,height:s,$:i}=uc(t);let r=(i?Nn(n.width):n.width)/o,a=(i?Nn(n.height):n.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const Zm=Ie(0);function dc(e){const t=we(e);return!Jn()||!t.visualViewport?Zm:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Jm(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==we(e)?!1:t}function gt(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=ri(e);let r=Ie(1);t&&(o?Q(o)&&(r=Pt(o)):r=Pt(e));const a=Jm(i,n,o)?dc(i):Ie(0);let l=(s.left+a.x)/r.x,c=(s.top+a.y)/r.y,u=s.width/r.x,f=s.height/r.y;if(i){const d=we(i),h=o&&Q(o)?we(o):o;let p=d,g=ds(p);for(;g&&o&&h!==p;){const m=Pt(g),w=g.getBoundingClientRect(),x=Pe(g),y=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*m.x,S=w.top+(g.clientTop+parseFloat(x.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,f*=m.y,l+=y,c+=S,p=we(g),g=ds(p)}}return zn({width:u,height:f,x:l,y:c})}function eo(e,t){const n=Qn(e).scrollLeft;return t?t.left+n:gt(je(e)).left+n}function fc(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-eo(e,n),s=n.top+t.scrollTop;return{x:o,y:s}}function Qm(e){let{elements:t,rect:n,offsetParent:o,strategy:s}=e;const i=s==="fixed",r=je(o),a=t?Zn(t.floating):!1;if(o===r||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Ie(1);const u=Ie(0),f=me(o);if((f||!f&&!i)&&((Lt(o)!=="body"||cn(r))&&(l=Qn(o)),me(o))){const h=gt(o);c=Pt(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}const d=r&&!f&&!i?fc(r,l):Ie(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 ev(e){return Array.from(e.getClientRects())}function tv(e){const t=je(e),n=Qn(e),o=e.ownerDocument.body,s=xe(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=xe(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+eo(e);const a=-n.scrollTop;return Pe(o).direction==="rtl"&&(r+=xe(t.clientWidth,o.clientWidth)-s),{width:s,height:i,x:r,y:a}}const Gr=25;function nv(e,t){const n=we(e),o=je(e),s=n.visualViewport;let i=o.clientWidth,r=o.clientHeight,a=0,l=0;if(s){i=s.width,r=s.height;const u=Jn();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const c=eo(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,p=Math.abs(o.clientWidth-f.clientWidth-h);p<=Gr&&(i-=p)}else c<=Gr&&(i+=c);return{width:i,height:r,x:a,y:l}}const ov=new Set(["absolute","fixed"]);function sv(e,t){const n=gt(e,!0,t==="fixed"),o=n.top+e.clientTop,s=n.left+e.clientLeft,i=me(e)?Pt(e):Ie(1),r=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,c=o*i.y;return{width:r,height:a,x:l,y:c}}function Ur(e,t,n){let o;if(t==="viewport")o=nv(e,n);else if(t==="document")o=tv(je(e));else if(Q(t))o=sv(t,n);else{const s=dc(e);o={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return zn(o)}function hc(e,t){const n=Ge(e);return n===t||!Q(n)||Be(n)?!1:Pe(n).position==="fixed"||hc(n,t)}function iv(e,t){const n=t.get(e);if(n)return n;let o=Xe(e,[],!1).filter(a=>Q(a)&&Lt(a)!=="body"),s=null;const i=Pe(e).position==="fixed";let r=i?Ge(e):e;for(;Q(r)&&!Be(r);){const a=Pe(r),l=ni(r);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&ov.has(s.position)||cn(r)&&!l&&hc(e,r))?o=o.filter(u=>u!==r):s=a,r=Ge(r)}return t.set(e,o),o}function rv(e){let{element:t,boundary:n,rootBoundary:o,strategy:s}=e;const r=[...n==="clippingAncestors"?Zn(t)?[]:iv(t,this._c):[].concat(n),o],a=r[0],l=r.reduce((c,u)=>{const f=Ur(t,u,s);return c.top=xe(f.top,c.top),c.right=Je(f.right,c.right),c.bottom=Je(f.bottom,c.bottom),c.left=xe(f.left,c.left),c},Ur(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function av(e){const{width:t,height:n}=uc(e);return{width:t,height:n}}function lv(e,t,n){const o=me(t),s=je(t),i=n==="fixed",r=gt(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Ie(0);function c(){l.x=eo(s)}if(o||!o&&!i)if((Lt(t)!=="body"||cn(s))&&(a=Qn(t)),o){const h=gt(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else s&&c();i&&!o&&s&&c();const u=s&&!o&&!i?fc(s,a):Ie(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 Pe(e).position==="static"}function Kr(e,t){if(!me(e)||Pe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return je(e)===n&&(n=n.ownerDocument.body),n}function gc(e,t){const n=we(e);if(Zn(e))return n;if(!me(e)){let s=Ge(e);for(;s&&!Be(s);){if(Q(s)&&!Ro(s))return s;s=Ge(s)}return n}let o=Kr(e,t);for(;o&&dm(o)&&Ro(o);)o=Kr(o,t);return o&&Be(o)&&Ro(o)&&!ni(o)?n:o||mm(e)||n}const cv=async function(e){const t=this.getOffsetParent||gc,n=this.getDimensions,o=await n(e.floating);return{reference:lv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function uv(e){return Pe(e).direction==="rtl"}const dv={convertOffsetParentRelativeRectToViewportRelativeRect:Qm,getDocumentElement:je,getClippingRect:rv,getOffsetParent:gc,getElementRects:cv,getClientRects:ev,getDimensions:av,getScale:Pt,isElement:Q,isRTL:uv};function pc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function fv(e,t){let n=null,o;const s=je(e);function i(){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),i();const c=e.getBoundingClientRect(),{left:u,top:f,width:d,height:h}=c;if(a||t(),!d||!h)return;const p=yn(f),g=yn(s.clientWidth-(u+d)),m=yn(s.clientHeight-(f+h)),w=yn(u),y={rootMargin:-p+"px "+-g+"px "+-m+"px "+-w+"px",threshold:xe(0,Je(1,l))||1};let S=!0;function _(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&&!pc(c,e.getBoundingClientRect())&&r(),S=!1}try{n=new IntersectionObserver(_,{...y,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,y)}n.observe(e)}return r(!0),i}function ai(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=ri(e),u=s||i?[...c?Xe(c):[],...Xe(t)]:[];u.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const f=c&&a?fv(c,n):null;let d=-1,h=null;r&&(h=new ResizeObserver(w=>{let[x]=w;x&&x.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,g=l?gt(e):null;l&&m();function m(){const w=gt(e);g&&!pc(g,w)&&n(),g=w,p=requestAnimationFrame(m)}return n(),()=>{var w;u.forEach(x=>{s&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),f?.(),(w=h)==null||w.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const hv=qm,gv=Xm,pv=Gm,mv=Ym,qr=Wm,vv=(e,t,n)=>{const o=new Map,s={platform:dv,...n},i={...s.platform,_c:o};return Hm(e,t,{...s,platform:i})};var yv=typeof document<"u",wv=function(){},Vn=yv?C.useLayoutEffect:wv;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,s;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(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,s[o]))return!1;for(o=n;o--!==0;){const i=s[o];if(!(i==="_owner"&&e.$$typeof)&&!Hn(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function mc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xr(e,t){const n=mc(e);return Math.round(t*n)/n}function Eo(e){const t=b.useRef(e);return Vn(()=>{t.current=e}),t}function xv(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:s,elements:{reference:i,floating:r}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,f]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=b.useState(o);Hn(d,o)||h(o);const[p,g]=b.useState(null),[m,w]=b.useState(null),x=b.useCallback(R=>{R!==M.current&&(M.current=R,g(R))},[]),y=b.useCallback(R=>{R!==T.current&&(T.current=R,w(R))},[]),S=i||p,_=r||m,M=b.useRef(null),T=b.useRef(null),P=b.useRef(u),D=l!=null,F=Eo(l),j=Eo(s),$=Eo(c),O=b.useCallback(()=>{if(!M.current||!T.current)return;const R={placement:t,strategy:n,middleware:d};j.current&&(R.platform=j.current),vv(M.current,T.current,R).then(A=>{const I={...A,isPositioned:$.current!==!1};V.current&&!Hn(P.current,I)&&(P.current=I,Jc.flushSync(()=>{f(I)}))})},[d,t,n,j,$]);Vn(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(R=>({...R,isPositioned:!1})))},[c]);const V=b.useRef(!1);Vn(()=>(V.current=!0,()=>{V.current=!1}),[]),Vn(()=>{if(S&&(M.current=S),_&&(T.current=_),S&&_){if(F.current)return F.current(S,_,O);O()}},[S,_,O,F,D]);const z=b.useMemo(()=>({reference:M,floating:T,setReference:x,setFloating:y}),[x,y]),N=b.useMemo(()=>({reference:S,floating:_}),[S,_]),E=b.useMemo(()=>{const R={position:n,left:0,top:0};if(!N.floating)return R;const A=Xr(N.floating,u.x),I=Xr(N.floating,u.y);return a?{...R,transform:"translate("+A+"px, "+I+"px)",...mc(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:I}},[n,a,N.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:O,refs:z,elements:N,floatingStyles:E}),[u,O,z,N,E])}const Cv=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:s}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?qr({element:o.current,padding:s}).fn(n):{}:o?qr({element:o,padding:s}).fn(n):{}}}},li=(e,t)=>({...hv(e),options:[e,t]}),ci=(e,t)=>({...gv(e),options:[e,t]}),ui=(e,t)=>({...pv(e),options:[e,t]}),Sv=(e,t)=>({...mv(e),options:[e,t]}),bv=(e,t)=>({...Cv(e),options:[e,t]});function vc(e){const t=b.useRef(void 0),n=b.useCallback(o=>{const s=e.map(i=>{if(i!=null){if(typeof i=="function"){const r=i,a=r(o);return typeof a=="function"?a:()=>{r(null)}}return i.current=o,()=>{i.current=null}}});return()=>{s.forEach(i=>i?.())}},e);return b.useMemo(()=>e.every(o=>o==null)?null:o=>{t.current&&(t.current(),t.current=void 0),o!=null&&(t.current=n(o))},e)}const _v="data-floating-ui-focusable",Yr="active",Zr="selected",Rv={...b};let Jr=!1,Ev=0;const Qr=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ev++;function Pv(){const[e,t]=b.useState(()=>Jr?Qr():void 0);return At(()=>{e==null&&t(Qr())},[]),b.useEffect(()=>{Jr=!0},[]),e}const Mv=Rv.useId,yc=Mv||Pv;let gs;process.env.NODE_ENV!=="production"&&(gs=new Set);function Tv(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];const s="Floating UI: "+n.join(" ");if(!((e=gs)!=null&&e.has(s))){var i;(i=gs)==null||i.add(s),console.error(s)}}function Av(){const e=new Map;return{emit(t,n){var o;(o=e.get(t))==null||o.forEach(s=>s(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 Vv=b.createContext(null),Dv=b.createContext(null),di=()=>{var e;return((e=b.useContext(Vv))==null?void 0:e.id)||null},fi=()=>b.useContext(Dv);function hi(e){return"data-floating-ui-"+e}function be(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const ea=hi("safe-polygon");function Po(e,t,n){if(n&&!on(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 Mo(e){return typeof e=="function"?e():e}function wc(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:s,events:i,elements:r}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:d=!0}=t,h=fi(),p=di(),g=wn(c),m=wn(l),w=wn(n),x=wn(f),y=b.useRef(),S=b.useRef(-1),_=b.useRef(),M=b.useRef(-1),T=b.useRef(!0),P=b.useRef(!1),D=b.useRef(()=>{}),F=b.useRef(!1),j=Fe(()=>{var E;const R=(E=s.current.openEvent)==null?void 0:E.type;return R?.includes("mouse")&&R!=="mousedown"});b.useEffect(()=>{if(!a)return;function E(R){let{open:A}=R;A||(be(S),be(M),T.current=!0,F.current=!1)}return i.on("openchange",E),()=>{i.off("openchange",E)}},[a,i]),b.useEffect(()=>{if(!a||!g.current||!n)return;function E(A){j()&&o(!1,A,"hover")}const R=dt(r.floating).documentElement;return R.addEventListener("mouseleave",E),()=>{R.removeEventListener("mouseleave",E)}},[r.floating,n,o,a,g,j]);const $=b.useCallback(function(E,R,A){R===void 0&&(R=!0),A===void 0&&(A="hover");const I=Po(m.current,"close",y.current);I&&!_.current?(be(S),S.current=window.setTimeout(()=>o(!1,E,A),I)):R&&(be(S),o(!1,E,A))},[m,o]),O=Fe(()=>{D.current(),_.current=void 0}),V=Fe(()=>{if(P.current){const E=dt(r.floating).body;E.style.pointerEvents="",E.removeAttribute(ea),P.current=!1}}),z=Fe(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);b.useEffect(()=>{if(!a)return;function E(K){if(be(S),T.current=!1,u&&!on(y.current)||Mo(x.current)>0&&!Po(m.current,"open"))return;const U=Po(m.current,"open",y.current);U?S.current=window.setTimeout(()=>{w.current||o(!0,K,"hover")},U):n||o(!0,K,"hover")}function R(K){if(z()){V();return}D.current();const U=dt(r.floating);if(be(M),F.current=!1,g.current&&s.current.floatingContext){n||be(S),_.current=g.current({...s.current.floatingContext,tree:h,x:K.clientX,y:K.clientY,onClose(){V(),O(),z()||$(K,!0,"safe-polygon")}});const J=_.current;U.addEventListener("mousemove",J),D.current=()=>{U.removeEventListener("mousemove",J)};return}(y.current!=="touch"||!nn(r.floating,K.relatedTarget))&&$(K)}function A(K){z()||s.current.floatingContext&&(g.current==null||g.current({...s.current.floatingContext,tree:h,x:K.clientX,y:K.clientY,onClose(){V(),O(),z()||$(K)}})(K))}function I(){be(S)}function Y(K){z()||$(K,!1)}if(Q(r.domReference)){const K=r.domReference,U=r.floating;return n&&K.addEventListener("mouseleave",A),d&&K.addEventListener("mousemove",E,{once:!0}),K.addEventListener("mouseenter",E),K.addEventListener("mouseleave",R),U&&(U.addEventListener("mouseleave",A),U.addEventListener("mouseenter",I),U.addEventListener("mouseleave",Y)),()=>{n&&K.removeEventListener("mouseleave",A),d&&K.removeEventListener("mousemove",E),K.removeEventListener("mouseenter",E),K.removeEventListener("mouseleave",R),U&&(U.removeEventListener("mouseleave",A),U.removeEventListener("mouseenter",I),U.removeEventListener("mouseleave",Y))}}},[r,a,e,u,d,$,O,V,o,n,w,h,m,g,s,z,x]),At(()=>{var E;if(a&&n&&(E=g.current)!=null&&(E=E.__options)!=null&&E.blockPointerEvents&&j()){P.current=!0;const A=r.floating;if(Q(r.domReference)&&A){var R;const I=dt(r.floating).body;I.setAttribute(ea,"");const Y=r.domReference,K=h==null||(R=h.nodesRef.current.find(U=>U.id===p))==null||(R=R.context)==null?void 0:R.elements.floating;return K&&(K.style.pointerEvents=""),I.style.pointerEvents="none",Y.style.pointerEvents="auto",A.style.pointerEvents="auto",()=>{I.style.pointerEvents="",Y.style.pointerEvents="",A.style.pointerEvents=""}}}},[a,n,p,r,h,g,j]),At(()=>{n||(y.current=void 0,F.current=!1,O(),V())},[n,O,V]),b.useEffect(()=>()=>{O(),be(S),be(M),V()},[a,r.domReference,O,V]);const N=b.useMemo(()=>{function E(R){y.current=R.pointerType}return{onPointerDown:E,onPointerEnter:E,onMouseMove(R){const{nativeEvent:A}=R;function I(){!T.current&&!w.current&&o(!0,A,"hover")}u&&!on(y.current)||n||Mo(x.current)===0||F.current&&R.movementX**2+R.movementY**2<2||(be(M),y.current==="touch"?I():(F.current=!0,M.current=window.setTimeout(I,Mo(x.current))))}}},[u,o,n,w,x]);return b.useMemo(()=>a?{reference:N}:{},[a,N])}function ta(e){return me(e.target)&&e.target.tagName==="BUTTON"}function kv(e){return me(e.target)&&e.target.tagName==="A"}function na(e){return cc(e)}function Fv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:s,elements:{domReference:i}}=e,{enabled:r=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:f=!0}=t,d=b.useRef(),h=b.useRef(!1),p=b.useMemo(()=>({onPointerDown(g){d.current=g.pointerType},onMouseDown(g){const m=d.current;g.button===0&&a!=="click"&&(on(m,!0)&&c||(n&&l&&(!(s.current.openEvent&&f)||s.current.openEvent.type==="mousedown")?o(!1,g.nativeEvent,"click"):(g.preventDefault(),o(!0,g.nativeEvent,"click"))))},onClick(g){const m=d.current;if(a==="mousedown"&&d.current){d.current=void 0;return}on(m,!0)&&c||(n&&l&&(!(s.current.openEvent&&f)||s.current.openEvent.type==="click")?o(!1,g.nativeEvent,"click"):o(!0,g.nativeEvent,"click"))},onKeyDown(g){d.current=void 0,!(g.defaultPrevented||!u||ta(g))&&(g.key===" "&&!na(i)&&(g.preventDefault(),h.current=!0),!kv(g)&&g.key==="Enter"&&o(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||ta(g)||na(i)||g.key===" "&&h.current&&(h.current=!1,o(!(n&&l),g.nativeEvent,"click"))}}),[s,i,a,c,u,o,n,f,l]);return b.useMemo(()=>r?{reference:p}:{},[r,p])}const Lv={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Iv={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},oa=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 xc(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,elements:s,dataRef:i}=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:p}=t,g=fi(),m=Fe(typeof l=="function"?l:()=>!1),w=typeof l=="function"?m:l,x=b.useRef(!1),{escapeKey:y,outsidePress:S}=oa(h),{escapeKey:_,outsidePress:M}=oa(p),T=b.useRef(!1),P=Fe(V=>{var z;if(!n||!r||!a||V.key!=="Escape"||T.current)return;const N=(z=i.current.floatingContext)==null?void 0:z.nodeId,E=g?An(g.nodesRef.current,N):[];if(!y&&(V.stopPropagation(),E.length>0)){let R=!0;if(E.forEach(A=>{var I;if((I=A.context)!=null&&I.open&&!A.context.dataRef.current.__escapeKeyBubbles){R=!1;return}}),!R)return}o(!1,jm(V)?V.nativeEvent:V,"escape-key")}),D=Fe(V=>{var z;const N=()=>{var E;P(V),(E=wt(V))==null||E.removeEventListener("keydown",N)};(z=wt(V))==null||z.addEventListener("keydown",N)}),F=Fe(V=>{var z;const N=i.current.insideReactTree;i.current.insideReactTree=!1;const E=x.current;if(x.current=!1,c==="click"&&E||N||typeof w=="function"&&!w(V))return;const R=wt(V),A="["+hi("inert")+"]",I=dt(s.floating).querySelectorAll(A);let Y=Q(R)?R:null;for(;Y&&!Be(Y);){const J=Ge(Y);if(Be(J)||!Q(J))break;Y=J}if(I.length&&Q(R)&&!Fm(R)&&!nn(R,s.floating)&&Array.from(I).every(J=>!nn(Y,J)))return;if(me(R)&&O){const J=Be(R),ne=Pe(R),B=/auto|scroll/,X=J||B.test(ne.overflowX),oe=J||B.test(ne.overflowY),de=X&&R.clientWidth>0&&R.scrollWidth>R.clientWidth,le=oe&&R.clientHeight>0&&R.scrollHeight>R.clientHeight,ke=ne.direction==="rtl",nt=le&&(ke?V.offsetX<=R.offsetWidth-R.clientWidth:V.offsetX>R.clientWidth),ot=de&&V.offsetY>R.clientHeight;if(nt||ot)return}const K=(z=i.current.floatingContext)==null?void 0:z.nodeId,U=g&&An(g.nodesRef.current,K).some(J=>{var ne;return _o(V,(ne=J.context)==null?void 0:ne.elements.floating)});if(_o(V,s.floating)||_o(V,s.domReference)||U)return;const re=g?An(g.nodesRef.current,K):[];if(re.length>0){let J=!0;if(re.forEach(ne=>{var B;if((B=ne.context)!=null&&B.open&&!ne.context.dataRef.current.__outsidePressBubbles){J=!1;return}}),!J)return}o(!1,V,"outside-press")}),j=Fe(V=>{var z;const N=()=>{var E;F(V),(E=wt(V))==null||E.removeEventListener(c,N)};(z=wt(V))==null||z.addEventListener(c,N)});b.useEffect(()=>{if(!n||!r)return;i.current.__escapeKeyBubbles=y,i.current.__outsidePressBubbles=S;let V=-1;function z(I){o(!1,I,"ancestor-scroll")}function N(){window.clearTimeout(V),T.current=!0}function E(){V=window.setTimeout(()=>{T.current=!1},Jn()?5:0)}const R=dt(s.floating);a&&(R.addEventListener("keydown",_?D:P,_),R.addEventListener("compositionstart",N),R.addEventListener("compositionend",E)),w&&R.addEventListener(c,M?j:F,M);let A=[];return d&&(Q(s.domReference)&&(A=Xe(s.domReference)),Q(s.floating)&&(A=A.concat(Xe(s.floating))),!Q(s.reference)&&s.reference&&s.reference.contextElement&&(A=A.concat(Xe(s.reference.contextElement)))),A=A.filter(I=>{var Y;return I!==((Y=R.defaultView)==null?void 0:Y.visualViewport)}),A.forEach(I=>{I.addEventListener("scroll",z,{passive:!0})}),()=>{a&&(R.removeEventListener("keydown",_?D:P,_),R.removeEventListener("compositionstart",N),R.removeEventListener("compositionend",E)),w&&R.removeEventListener(c,M?j:F,M),A.forEach(I=>{I.removeEventListener("scroll",z)}),window.clearTimeout(V)}},[i,s,a,w,c,n,o,d,r,y,S,P,_,D,F,M,j]),b.useEffect(()=>{i.current.insideReactTree=!1},[i,w,c]);const $=b.useMemo(()=>({onKeyDown:P,...u&&{[Lv[f]]:V=>{o(!1,V.nativeEvent,"reference-press")},...f!=="click"&&{onClick(V){o(!1,V.nativeEvent,"reference-press")}}}}),[P,o,u,f]),O=b.useMemo(()=>({onKeyDown:P,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[Iv[c]]:()=>{i.current.insideReactTree=!0}}),[P,c,i]);return b.useMemo(()=>r?{reference:$,floating:O}:{},[r,$,O])}function jv(e){const{open:t=!1,onOpenChange:n,elements:o}=e,s=yc(),i=b.useRef({}),[r]=b.useState(()=>Av()),a=di()!=null;if(process.env.NODE_ENV!=="production"){const h=o.reference;h&&!Q(h)&&Tv("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]=b.useState(o.reference),u=Fe((h,p,g)=>{i.current.openEvent=h?p:void 0,r.emit("openchange",{open:h,event:p,reason:g,nested:a}),n?.(h,p,g)}),f=b.useMemo(()=>({setPositionReference:c}),[]),d=b.useMemo(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return b.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:d,events:r,floatingId:s,refs:f}),[t,u,d,r,s,f])}function gi(e){e===void 0&&(e={});const{nodeId:t}=e,n=jv({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,s=o.elements,[i,r]=b.useState(null),[a,l]=b.useState(null),u=s?.domReference||i,f=b.useRef(null),d=fi();At(()=>{u&&(f.current=u)},[u]);const h=xv({...e,elements:{...s,...a&&{reference:a}}}),p=b.useCallback(y=>{const S=Q(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),getClientRects:()=>y.getClientRects(),contextElement:y}:y;l(S),h.refs.setReference(S)},[h.refs]),g=b.useCallback(y=>{(Q(y)||y===null)&&(f.current=y,r(y)),(Q(h.refs.reference.current)||h.refs.reference.current===null||y!==null&&!Q(y))&&h.refs.setReference(y)},[h.refs]),m=b.useMemo(()=>({...h.refs,setReference:g,setPositionReference:p,domReference:f}),[h.refs,g,p]),w=b.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),x=b.useMemo(()=>({...h,...o,refs:m,elements:w,nodeId:t}),[h,m,w,t,o]);return At(()=>{o.dataRef.current.floatingContext=x;const y=d?.nodesRef.current.find(S=>S.id===t);y&&(y.context=x)}),b.useMemo(()=>({...h,context:x,refs:m,elements:w}),[h,m,w,x])}function To(){return Vm()&&Am()}function $v(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,events:s,dataRef:i,elements:r}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=b.useRef(!1),u=b.useRef(-1),f=b.useRef(!0);b.useEffect(()=>{if(!a)return;const h=we(r.domReference);function p(){!n&&me(r.domReference)&&r.domReference===Hr(dt(r.domReference))&&(c.current=!0)}function g(){f.current=!0}function m(){f.current=!1}return h.addEventListener("blur",p),To()&&(h.addEventListener("keydown",g,!0),h.addEventListener("pointerdown",m,!0)),()=>{h.removeEventListener("blur",p),To()&&(h.removeEventListener("keydown",g,!0),h.removeEventListener("pointerdown",m,!0))}},[r.domReference,n,a]),b.useEffect(()=>{if(!a)return;function h(p){let{reason:g}=p;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return s.on("openchange",h),()=>{s.off("openchange",h)}},[s,a]),b.useEffect(()=>()=>{be(u)},[]);const d=b.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=wt(h.nativeEvent);if(l&&Q(p)){if(To()&&!h.relatedTarget){if(!f.current&&!cc(p))return}else if(!Lm(p))return}o(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,g=h.nativeEvent,m=Q(p)&&p.hasAttribute(hi("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var w;const x=Hr(r.domReference?r.domReference.ownerDocument:document);!p&&x===r.domReference||nn((w=i.current.floatingContext)==null?void 0:w.refs.floating.current,x)||nn(r.domReference,x)||m||o(!1,g,"focus")})}}),[i,r.domReference,o,l]);return b.useMemo(()=>a?{reference:d}:{},[a,d])}function Ao(e,t,n){const o=new Map,s=n==="item";let i=e;if(s&&e){const{[Yr]:r,[Zr]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[_v]:""},...i,...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(!(s&&[Yr,Zr].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,p=new Array(h),g=0;g<h;g++)p[g]=arguments[g];return(d=o.get(c))==null?void 0:d.map(m=>m(...p)).find(m=>m!==void 0)}}}else r[c]=u}),r),{})}}function Cc(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),o=e.map(a=>a?.item),s=b.useCallback(a=>Ao(a,e,"reference"),t),i=b.useCallback(a=>Ao(a,e,"floating"),n),r=b.useCallback(a=>Ao(a,e,"item"),o);return b.useMemo(()=>({getReferenceProps:s,getFloatingProps:i,getItemProps:r}),[s,i,r])}const Ov=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Sc(e,t){var n,o;t===void 0&&(t={});const{open:s,elements:i,floatingId:r}=e,{enabled:a=!0,role:l="dialog"}=t,c=yc(),u=((n=i.domReference)==null?void 0:n.id)||c,f=b.useMemo(()=>{var x;return((x=Im(i.floating))==null?void 0:x.id)||r},[i.floating,r]),d=(o=Ov.get(l))!=null?o:l,p=di()!=null,g=b.useMemo(()=>d==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:s?f:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":d==="alertdialog"?"dialog":d,"aria-controls":s?f:void 0,...d==="listbox"&&{role:"combobox"},...d==="menu"&&{id:u},...d==="menu"&&p&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[d,f,p,s,u,l]),m=b.useMemo(()=>{const x={id:f,...d&&{role:d}};return d==="tooltip"||l==="label"?x:{...x,...d==="menu"&&{"aria-labelledby":u}}},[d,f,u,l]),w=b.useCallback(x=>{let{active:y,selected:S}=x;const _={role:"option",...y&&{id:f+"-fui-option"}};switch(l){case"select":case"combobox":return{..._,"aria-selected":S}}return{}},[f,l]);return b.useMemo(()=>a?{reference:g,floating:m,item:w}:{},[a,g,m,w])}const Nv=e=>b.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Bv=e=>b.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},b.createElement("g",null,b.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"}))),bc=e=>b.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("g",{opacity:.6},b.createElement("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),Vo={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"}},pi=C.forwardRef(({label:e,color:t="primary",size:n="md",onClick:o,onDelete:s,avatar:i,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=k.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=k.css({display:"inline-flex",cursor:"pointer",opacity:.6,"&:hover":{opacity:1}});return v.jsxs(L,{ref:p=>{u.current=p,typeof c=="function"?c(p):c&&(c.current=p)},row:!0,alignItems:"center",justifyContent:"center",gap:"var(--spacing-sm)",h:Vo[n].h,p:Vo[n].p,overflow:"hidden",borderRadius:"var(--corner-sm)",backgroundColor:f.bg,color:f.color,onClick:o,className:k.cx(d,l),children:[o&&v.jsx(pt,{}),i&&v.jsx(L,{w:20,h:20,borderRadius:"50%",overflow:"hidden",children:i}),r&&v.jsx(L,{children:r}),typeof e=="string"?v.jsx(q,{variant:Vo[n].text,colorName:t,textOverflow:"ellipsis",overflow:"hidden",children:e}):e,s&&!a&&v.jsx(q,{className:h,colorName:t,onClick:p=>{p.stopPropagation(),s(p)},children:v.jsx(bc,{})})]})});pi.displayName="Tag";const zv="_disabled_zbo6w_40",Hv="_open_zbo6w_48",Wv="_error_zbo6w_51",Gv="_hidden_zbo6w_87",Uv="_visible_zbo6w_90",Kv="_selected_zbo6w_163",ue={"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:zv,open:Hv,"select-arrow":"_select-arrow_zbo6w_48",error:Wv,"select-value":"_select-value_zbo6w_62","select-value_xs":"_select-value_xs_zbo6w_74","select-placeholder":"_select-placeholder_zbo6w_81",hidden:Gv,visible:Uv,"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:Kv,"overflow-tooltip-container":"_overflow-tooltip-container_zbo6w_167","overflow-tooltip-text":"_overflow-tooltip-text_zbo6w_172","empty-block":"_empty-block_zbo6w_179"};function _c({value:e,onChange:t,multiple:n=!1,returnedValue:o,renderItem:s,renderInputItem:i,renderSingleInputItem:r,renderMultipleInputItem:a,renderDropdownItem:l,placeholder:c,items:u=[],fullWidth:f,size:d="md",showDefaultItem:h,disabled:p,label:g,firstItem:m,lastItem:w,observer:x,emptyText:y,onBlur:S,prompt:_,error:M,errorText:T}){const[P,D]=mt(e,n?[]:null),[F,j]=C.useState(!1),{refs:$,floatingStyles:O}=gi({open:F,placement:"bottom-start",strategy:"fixed",middleware:[li(4),ui({crossAxis:!0,fallbackAxisSideDirection:"start"}),ci({crossAxis:!0,padding:8}),Sv({apply({rects:B,availableHeight:X,elements:oe}){Object.assign(oe.floating.style,{width:`${B.reference.width}px`,maxHeight:typeof X=="number"?`${X}px`:"auto"})}})],whileElementsMounted:ai}),V=C.useMemo(()=>n?P||[]:P!=null?[P]:[],[P,n]),z=C.useCallback(B=>o?o(B):B,[o]),N=C.useMemo(()=>{const B=new Map;return u.forEach(X=>{B.set(z(X),X)}),B},[u,z]),E=!u.length&&!M,R=C.useMemo(()=>V.map(B=>N.get(B)).filter(B=>!!B),[N,V]);C.useEffect(()=>{process.env.NODE_ENV!=="production"&&s&&!l&&console.warn("[Select] `renderItem` deprecated, use `renderDropdownItem` instead.")},[l,s]);const A=C.useCallback((B,X)=>l?l(B,X):s?s(B):String(B),[l,s]),I=()=>{j(!1),S?.()},Y=B=>{const X=z(B);if(n){const oe=V.includes(X)?V.filter(de=>de!==X):[...V,X];D(oe),t?.(oe)}else D(X),t?.(X),I()},K=B=>{if(!n)return;const X=V.filter(oe=>oe!==B);D(X),t?.(X)},U=()=>{const B=n?[]:null;D(B),t?.(B),n||I()},re=()=>typeof c=="string"?v.jsx(q,{variant:d==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:c??"Select..."}):c,J=()=>{if(!V.length)return re();if(n)return a?a(R):i?i({mode:"multiple",selectedItems:R}):v.jsx(L,{flexWrap:"wrap",row:!0,gap:10,children:V.map(oe=>{const de=N.get(oe);return de?v.jsx(pi,{size:"sm",label:s?s(de):String(oe),onDelete:le=>{le.stopPropagation(),K(oe)}},oe):null})});const B=N.get(V[0])??null;if(!B)return re();if(r)return r(B);if(i)return i({mode:"single",selectedItem:B});const X=s?s(B):String(V[0]);return typeof X=="string"?v.jsx(q,{variant:d==="xs"?"caption-1":"body-2",tag:"p",textOverflow:"ellipsis",overflow:"hidden",children:X}):v.jsx(v.Fragment,{children:X})},ne=F&&v.jsx(un,{children:v.jsx(L,{row:!0,top:0,right:0,bottom:0,left:0,position:"fixed",center:!0,flex:1,onClick:I,display:"block",backgroundColor:"transparent",zIndex:1,children:v.jsx(Xn.div,{ref:$.setFloating,className:ue["select-dropdown"],initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},style:{...O,zIndex:1},onMouseDown:B=>B.stopPropagation(),onClick:B=>B.stopPropagation(),children:v.jsxs("ul",{className:ue["select-menu"],children:[h&&!n&&v.jsx(L,{className:ue["select-menu-item"],role:"option",onClick:U,children:v.jsx(q,{variant:"body-2",colorName:"tertiary",children:c})}),m&&v.jsx(L,{className:k.cx(ue["select-menu-item"],ue["select-menu-item-first"]),children:m}),E&&v.jsxs(L,{className:ue["empty-block"],children:[v.jsx(L,{w:20,h:20,children:v.jsx(Bv,{})}),v.jsx(q,{variant:"body-2",children:y??"There is nothing yet"})]}),u.map((B,X)=>{const oe=z(B),de=V.includes(oe),le=A(B,{item:B,selected:de,index:X}),ke=typeof le=="string";return v.jsxs(L,{row:!0,gap:10,alignItems:"center",className:k.cx(ue["select-menu-item"],{[ue.selected]:de}),role:"option",relative:!0,onClick:()=>Y(B),children:[n&&v.jsx(ti,{size:"sm",checked:de}),ke?v.jsx(q,{variant:"body-2",tag:"p",wordBreak:"break-all",whiteSpace:"break-spaces",children:le}):le,v.jsx(pt,{})]},oe)}),x,w&&v.jsx(L,{className:k.cx(ue["select-menu-item"],ue["select-menu-item-first"]),children:w})]})},"dropdown")})});return v.jsxs(L,{relative:!0,display:"inline-block",minWidth:120,w:f?"full":"auto",onMouseDown:B=>B.stopPropagation(),onClick:B=>B.stopPropagation(),children:[typeof g=="string"?v.jsx(q,{variant:"body-2",colorName:"tertiary",fontWeight:"regular",mb:d==="sm"?4:8,children:g}):g,v.jsxs(L,{ref:$.setReference,row:!0,gap:10,tabIndex:p?-1:0,role:"button",alignItems:"flex-start","aria-haspopup":"listbox",relative:!0,w:"100%",className:k.cx(ue["select-input"],ue[`size-${d}`],{[ue.error]:M,[ue.disabled]:p,[ue.open]:F}),onClick:()=>!p&&j(B=>!B),children:[v.jsx(L,{className:k.cx(ue["select-value"]),children:J()}),v.jsx(L,{className:k.cx(ue["select-arrow"],ue[`select-arrow_${d}`]),children:v.jsx(Nv,{})})]}),typeof _=="string"?v.jsx(q,{variant:"caption-1",colorName:"tertiary",mt:4,children:_}):_,M&&T&&v.jsx(q,{tag:"p",colorName:"negative",variant:"body-2",mt:5,children:T}),v.jsx(Vf,{children:ne})]})}const qv=e=>b.createElement("svg",{width:10,height:10,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.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"})),Xv=e=>b.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.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"})),Yv="_container_e7tan_8",Zv="_disabled_e7tan_17",Jv="_reverse_e7tan_21",Qv="_input_e7tan_25",ey="_switchContainer_e7tan_35",ty="_variant_accent_e7tan_43",ny="_variant_secondary_e7tan_47",oy="_thumb_e7tan_51",sy="_variant_theme_e7tan_54",iy="_moon_e7tan_58",ry="_fire_e7tan_61",ay="_size_sm_e7tan_74",ly="_size_md_e7tan_80",cy="_size_lg_e7tan_86",Te={container:Yv,disabled:Zv,reverse:Jv,input:Qv,switchContainer:ey,variant_accent:ty,variant_secondary:ny,switch:"_switch_e7tan_35",thumb:oy,variant_theme:sy,moon:iy,fire:ry,size_sm:ay,size_md:ly,size_lg:cy},Rc=C.forwardRef(({title:e,text:t,icon:n,disabled:o,onChange:s,checked:i,defaultValue:r,className:a,size:l="md",variant:c="accent",reverse:u=!1,w:f="auto",...d},h)=>{const[p,g]=mt(i,r),m=C.useRef(null);C.useImperativeHandle(h,()=>({focus:()=>{m.current?.focus()},blur:()=>{m.current?.blur()},get checked(){return p??!1},setChecked:S=>{g(S),s?.(S)},toggle:()=>{const S=!p;g(S),s?.(S)},isFocused:()=>document.activeElement===m.current,isDisabled:()=>o??!1,getInputElement:()=>m.current,checkValidity:()=>m.current?.checkValidity()??!0,reset:()=>{const S=r??!1;g(S),s?.(S)}}),[p,g,s,o,r]);const w=C.useCallback(S=>{g(S.target.checked),s?.(S.target.checked)},[s]),x=C.useMemo(()=>typeof e=="string"?v.jsx(q,{variant:"body-1",colorName:"primary",fontWeight:"medium",children:e}):e,[e]),y=C.useMemo(()=>typeof t=="string"?v.jsx(q,{variant:"body-2",colorName:"secondary",fontWeight:"regular",children:t}):t,[t]);return v.jsxs(L,{row:!0,w:f,gap:"var(--spacing-sm)",children:[v.jsxs("label",{className:k.cx(Te.container,a,{[Te.disabled]:o,[Te.reverse]:u}),children:[v.jsxs(L,{className:k.cx(Te.switchContainer,Te[`size_${l}`],Te[`variant_${c}`]),children:[v.jsx("input",{ref:m,type:"checkbox",checked:p,className:Te.input,onChange:w,disabled:o,...d}),v.jsx("div",{className:Te.switch,children:v.jsx("div",{className:Te.thumb,children:c==="theme"&&v.jsxs(v.Fragment,{children:[v.jsx(Xv,{className:Te.moon}),v.jsx(qv,{className:Te.fire})]})})})]}),v.jsxs(L,{gap:"var(--spacing-xs)",children:[x,y]})]}),n]})});Rc.displayName="Switch";const uy=k.css({cursor:"pointer",userSelect:"none"}),dy=k.css({cursor:"not-allowed",opacity:.5}),fy=k.css({transition:"color 0.2s ease"}),hy=C.forwardRef(({label:e,selected:t,disabled:n,fullWidth:o,onClick:s},i)=>v.jsx(L,{w:o?"full":void 0,justifyContent:"center",alignItems:"center",ref:i,py:"var(--spacing-md)",px:"var(--spacing-xl)",onClick:s,className:k.cx(uy,{[dy]:n}),children:v.jsx(q,{className:fy,colorName:t?"primary":"tertiary",fontWeight:"medium",variant:"body-2",children:e})})),gy=k.css({borderBottom:"1px solid var(--border-neutral-alpha-basic)"}),Ec=({value:e,onChange:t,options:n,fullWidth:o=!1,className:s})=>{const[i,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 v.jsxs(L,{row:!0,w:o?"full":"auto",relative:!0,className:k.cx(gy,s),children:[n.map((u,f)=>v.jsx(hy,{selected:e===u.value,onClick:c(u.value,u.disabled),ref:l(f),label:u.label,disabled:u.disabled,fullWidth:o},u.value)),v.jsx(L,{h:2,w:i.width,absolute:!0,bottom:-1,left:i.left,backgroundColor:"var(--border-accent-primary)",className:k.css({transition:"left 0.2s ease, width 0.2s ease"})})]})};Ec.displayName="Tabs";const py="_header_446to_8",my={header:py},Pc=C.forwardRef(({title:e,subtitle:t,w:n="full",p:o,py:s,px:i="var(--spacing-2xl)",pt:r="var(--spacing-2xl)",pb:a="var(--spacing-lg)",row:l=!0,justifyContent:c="space-between",showCloseButton:u=!0},f)=>{const{onClose:d}=wu();return v.jsxs(L,{w:n,p:o,py:s,px:i,pt:r,pb:a,row:l,justifyContent:c,ref:f,className:my.header,children:[v.jsxs(L,{gap:"var(--spacing-sm)",children:[v.jsx(q,{variant:"title-3",colorName:"primary",fontWeight:"semibold",children:e}),v.jsx(q,{variant:"body-1",colorName:"tertiary",fontWeight:"medium",children:t})]}),u&&v.jsx(L,{children:v.jsx(Yt,{onClick:d,color:"neutral",children:v.jsx(ma,{})})})]})});Pc.displayName="ModalHeader";function yt(e,t,n){let o=n.initialDeps??[],s,i=!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((p,g)=>o[g]!==p)))return s;o=f;let h;if(n.key&&((l=n.debug)!=null&&l.call(n))&&(h=Date.now()),s=t(...f),n.key&&((c=n.debug)!=null&&c.call(n))){const p=Math.round((Date.now()-u)*100)/100,g=Math.round((Date.now()-h)*100)/100,m=g/16,w=(x,y)=>{for(x=String(x);x.length<y;)x=" "+x;return x};console.info(`%c⏱ ${w(g,5)} /${w(p,5)} ms`,`
|
|
14
10
|
font-size: .6rem;
|
|
15
11
|
font-weight: bold;
|
|
16
|
-
color: hsl(${Math.max(0,Math.min(120-120*p,120))}deg 100% 31%);`,n?.key)}return(c=n?.onChange)==null||c.call(n,s),s}return i.updateDeps=r=>{o=r},i}function Br(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Wv=(e,t)=>Math.abs(e-t)<1.01,Gv=(e,t,n)=>{let o;return function(...s){e.clearTimeout(o),o=e.setTimeout(()=>t.apply(this,s),n)}},zr=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Uv=e=>e,Kv=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let s=t;s<=n;s++)o.push(s);return o},qv=(e,t)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;const s=r=>{const{width:a,height:l}=r;t({width:Math.round(a),height:Math.round(l)})};if(s(zr(n)),!o.ResizeObserver)return()=>{};const i=new o.ResizeObserver(r=>{const a=()=>{const l=r[0];if(l?.borderBoxSize){const c=l.borderBoxSize[0];if(c){s({width:c.inlineSize,height:c.blockSize});return}}s(zr(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},Hr={passive:!0},Wr=typeof window>"u"?!0:"onscrollend"in window,Xv=(e,t)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;let s=0;const i=e.options.useScrollendEvent&&Wr?()=>{}:Gv(o,()=>{t(s,!1)},e.options.isScrollingResetDelay),r=u=>()=>{const{horizontal:d,isRtl:f}=e.options;s=d?n.scrollLeft*(f&&-1||1):n.scrollTop,i(),t(s,u)},a=r(!0),l=r(!1);l(),n.addEventListener("scroll",a,Hr);const c=e.options.useScrollendEvent&&Wr;return c&&n.addEventListener("scrollend",l,Hr),()=>{n.removeEventListener("scroll",a),c&&n.removeEventListener("scrollend",l)}},Yv=(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"]},Zv=(e,{adjustments:t=0,behavior:n},o)=>{var s,i;const r=e+t;(i=(s=o.scrollElement)==null?void 0:s.scrollTo)==null||i.call(s,{[o.options.horizontal?"left":"top"]:r,behavior:n})};class Jv{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const o=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(i=>{const r=()=>{this._measureElement(i.target,i)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()})}));return{disconnect:()=>{var s;(s=o())==null||s.disconnect(),n=null},observe:s=>{var i;return(i=o())==null?void 0:i.observe(s,{box:"border-box"})},unobserve:s=>{var i;return(i=o())==null?void 0:i.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([o,s])=>{typeof s>"u"&&delete n[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Uv,rangeExtractor:Kv,onChange:()=>{},measureElement:Yv,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,s;(s=(o=this.options).onChange)==null||s.call(o,this,n)},this.maybeNotify=dt(()=>(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(s=>{this.observer.observe(s)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=i,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 s=new Map,i=new Map;for(let r=o-1;r>=0;r--){const a=n[r];if(s.has(a.lane))continue;const l=i.get(a.lane);if(l==null||a.end>l.end?i.set(a.lane,a):a.end<l.end&&s.set(a.lane,!0),s.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((r,a)=>r.end===a.end?r.index-a.index:r.end-a.end)[0]:void 0},this.getMeasurementOptions=dt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,o,s,i,r)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:o,scrollMargin:s,getItemKey:i,enabled:r}),{key:!1}),this.getMeasurements=dt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:o,scrollMargin:s,getItemKey:i,enabled:r},a)=>{if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(u=>{this.itemSizeCache.set(u.key,u.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,l);for(let u=l;u<n;u++){const d=i(u),f=this.options.lanes===1?c[u-1]:this.getFurthestMeasurement(c,u),h=f?f.end+this.options.gap:o+s,m=a.get(d),g=typeof m=="number"?m:this.options.estimateSize(u),p=h+g,w=f?f.lane:u%this.options.lanes;c[u]={index:u,start:h,size:g,end:p,key:d,lane:w}}return this.measurementsCache=c,c},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=dt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,o,s,i)=>this.range=n.length>0&&o>0?Qv({measurements:n,outerSize:o,scrollOffset:s,lanes:i}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=dt(()=>{let n=null,o=null;const s=this.calculateRange();return s&&(n=s.startIndex,o=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,o]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,o]},(n,o,s,i,r)=>i===null||r===null?[]:n({startIndex:i,endIndex:r,overscan:o,count:s}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const o=this.options.indexAttribute,s=n.getAttribute(o);return s?parseInt(s,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(n,o)=>{const s=this.indexFromElement(n),i=this.measurementsCache[s];if(!i)return;const r=i.key,a=this.elementsCache.get(r);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(r,n)),n.isConnected&&this.resizeItem(s,this.options.measureElement(n,o,this))},this.resizeItem=(n,o)=>{const s=this.measurementsCache[n];if(!s)return;const i=this.itemSizeCache.get(s.key)??s.size,r=o-i;r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,r,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",r),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,o)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((o,s)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(s))});return}this._measureElement(n,void 0)},this.getVirtualItems=dt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,o)=>{const s=[];for(let i=0,r=n.length;i<r;i++){const a=n[i],l=o[a];s.push(l)}return s},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const o=this.getMeasurements();if(o.length!==0)return Br(o[lc(0,o.length-1,s=>Br(o[s]).start,n)])},this.getOffsetForAlignment=(n,o,s=0)=>{const i=this.getSize(),r=this.getScrollOffset();o==="auto"&&(o=n>=r+i?"end":"start"),o==="center"?n+=(s-i)/2:o==="end"&&(n-=i);const a=this.getTotalSize()+this.options.scrollMargin-i;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 s=this.measurementsCache[n];if(!s)return;const i=this.getSize(),r=this.getScrollOffset();if(o==="auto")if(s.end>=r+i-this.options.scrollPaddingEnd)o="end";else if(s.start<=r+this.options.scrollPaddingStart)o="start";else return[r,o];const a=o==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,o,s.size),o]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:o="start",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,o),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:o="auto",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let i=0;const r=10,a=c=>{if(!this.targetWindow)return;const u=this.getOffsetForIndex(n,c);if(!u){console.warn("Failed to get offset for index:",n);return}const[d,f]=u;this._scrollToOffset(d,{adjustments:void 0,behavior:s}),this.targetWindow.requestAnimationFrame(()=>{const h=this.getScrollOffset(),m=this.getOffsetForIndex(n,f);if(!m){console.warn("Failed to get offset for index:",n);return}Wv(m[0],h)||l(f)})},l=c=>{this.targetWindow&&(i++,i<r?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",i,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 s;if(o.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=o[o.length-1])==null?void 0:n.end)??0;else{const i=Array(this.options.lanes).fill(null);let r=o.length-1;for(;r>=0&&i.some(a=>a===null);){const a=o[r];i[a.lane]===null&&(i[a.lane]=a.end),r--}s=Math.max(...i.filter(a=>a!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:o,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:o},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const lc=(e,t,n,o)=>{for(;e<=t;){const s=(e+t)/2|0,i=n(s);if(i<o)e=s+1;else if(i>o)t=s-1;else return s}return e>0?e-1:0};function Qv({measurements:e,outerSize:t,scrollOffset:n,lanes:o}){const s=e.length-1,i=l=>e[l].start;if(e.length<=o)return{startIndex:0,endIndex:s};let r=lc(0,s,i,n),a=r;if(o===1)for(;a<s&&e[a].end<n+t;)a++;else if(o>1){const l=Array(o).fill(0);for(;a<s&&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(s,a+(o-1-a%o))}return{startIndex:r,endIndex:a}}const Gr=typeof document<"u"?b.useLayoutEffect:b.useEffect;function ey(e){const t=b.useReducer(()=>({}),{})[1],n={...e,onChange:(s,i)=>{var r;i?fs.flushSync(t):t(),(r=e.onChange)==null||r.call(e,s,i)}},[o]=b.useState(()=>new Jv(n));return o.setOptions(n),Gr(()=>o._didMount(),[]),Gr(()=>o._willUpdate()),o}function ty(e){return ey({observeElementRect:qv,observeElementOffset:Xv,scrollToFn:Zv,...e})}const ny="_main_1qx2l_8",Ur={main:ny},cc=C.forwardRef(({children:e,className:t,row:n=!1,estimatedItemHeight:o=100,virtualize:s=!1,maxHeight:i=448},r)=>{const a=C.useRef(null),l=C.useMemo(()=>C.Children.toArray(e),[e]),c=ty({count:l.length,getScrollElement:()=>a.current,estimateSize:()=>o,measureElement:d=>d.getBoundingClientRect().height});return C.useImperativeHandle(r,()=>({scrollToTop:()=>c.scrollToOffset(0,{behavior:"smooth"}),scrollToBottom:()=>c.scrollToOffset(c.getTotalSize(),{behavior:"smooth"}),scrollToIndex:(d,f={})=>c.scrollToIndex(d,{behavior:"smooth",...f}),scrollToOffset:(d,f={})=>c.scrollToOffset(d,{behavior:"smooth",...f}),scrollBy:d=>{const f=c.scrollOffset||0;c.scrollToOffset(f+d,{behavior:"smooth"})},getElement:()=>a.current,getScrollOffset:()=>c.scrollOffset||0,getTotalSize:()=>c.getTotalSize()}),[c]),C.useMemo(()=>s||l.length>50,[s,l])&&l.length>0?y.jsx(I,{ref:a,row:n,maxHeight:i,className:k.cx(Ur.main,t),w:"full",p:"var(--spacing-2xl)",children:y.jsx(I,{relative:!0,h:c.getTotalSize(),children:c.getVirtualItems().map(d=>y.jsx(I,{"data-index":d.index,ref:c.measureElement,w:"full",absolute:!0,style:{top:0,left:0,transform:`translateY(${d.start}px)`},children:l[d.index]},d.key))})}):y.jsx(I,{ref:a,className:k.cx(Ur.main,t),w:"full",row:n,pl:"var(--spacing-2xl)",pr:"var(--spacing-xs)",children:y.jsx(I,{py:"var(--spacing-2xl)",pr:"var(--spacing-xl)",children:e})})});cc.displayName="ModalMain";const Kn=ta;Kn.Header=ac;Kn.Main=cc;Kn.Footer=na;const uc=C.createContext(null),oy=()=>C.useContext(uc),qn=({children:e})=>{const[t,n]=C.useState(null),o=oy();return C.useEffect(()=>{if(typeof document>"u")return;const s=o?.current??document.body;if(!s)return;let i=s.querySelector("[data-portal-root]")??void 0;i||(i=document.createElement("div"),i.setAttribute("data-portal-root","true"),s.appendChild(i)),n(i)},[o]),t?fs.createPortal(e,t):null};/**
|
|
17
|
-
* table-core
|
|
18
|
-
*
|
|
19
|
-
* Copyright (c) TanStack
|
|
20
|
-
*
|
|
21
|
-
* This source code is licensed under the MIT license found in the
|
|
22
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
23
|
-
*
|
|
24
|
-
* @license MIT
|
|
25
|
-
*/function dc(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function qe(e,t){return typeof e=="function"?e(t):e}function Ce(e,t){return n=>{t.setState(o=>({...o,[e]:qe(n,o[e])}))}}function Xn(e){return e instanceof Function}function sy(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function iy(e,t){const n=[],o=s=>{s.forEach(i=>{n.push(i);const r=t(i);r!=null&&r.length&&o(r)})};return o(e),n}function H(e,t,n){let o=[],s;return i=>{let r;n.key&&n.debug&&(r=Date.now());const a=e(i);if(!(a.length!==o.length||a.some((u,d)=>o[d]!==u)))return s;o=a;let c;if(n.key&&n.debug&&(c=Date.now()),s=t(...a),n==null||n.onChange==null||n.onChange(s),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-r)*100)/100,d=Math.round((Date.now()-c)*100)/100,f=d/16,h=(m,g)=>{for(m=String(m);m.length<g;)m=" "+m;return m};console.info(`%c⏱ ${h(d,5)} /${h(u,5)} ms`,`
|
|
12
|
+
color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(i&&n.skipInitialOnChange)&&n.onChange(s),i=!1,s}return r.updateDeps=a=>{o=a},r}function sa(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const vy=(e,t)=>Math.abs(e-t)<1.01,yy=(e,t,n)=>{let o;return function(...s){e.clearTimeout(o),o=e.setTimeout(()=>t.apply(this,s),n)}},ia=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},wy=e=>e,xy=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let s=t;s<=n;s++)o.push(s);return o},Cy=(e,t)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;const s=r=>{const{width:a,height:l}=r;t({width:Math.round(a),height:Math.round(l)})};if(s(ia(n)),!o.ResizeObserver)return()=>{};const i=new o.ResizeObserver(r=>{const a=()=>{const l=r[0];if(l?.borderBoxSize){const c=l.borderBoxSize[0];if(c){s({width:c.inlineSize,height:c.blockSize});return}}s(ia(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},ra={passive:!0},aa=typeof window>"u"?!0:"onscrollend"in window,Sy=(e,t)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;let s=0;const i=e.options.useScrollendEvent&&aa?()=>{}:yy(o,()=>{t(s,!1)},e.options.isScrollingResetDelay),r=u=>()=>{const{horizontal:f,isRtl:d}=e.options;s=f?n.scrollLeft*(d&&-1||1):n.scrollTop,i(),t(s,u)},a=r(!0),l=r(!1);l(),n.addEventListener("scroll",a,ra);const c=e.options.useScrollendEvent&&aa;return c&&n.addEventListener("scrollend",l,ra),()=>{n.removeEventListener("scroll",a),c&&n.removeEventListener("scrollend",l)}},by=(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"]},_y=(e,{adjustments:t=0,behavior:n},o)=>{var s,i;const r=e+t;(i=(s=o.scrollElement)==null?void 0:s.scrollTo)==null||i.call(s,{[o.options.horizontal?"left":"top"]:r,behavior:n})};class Ry{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(s=>{s.forEach(i=>{const r=()=>{this._measureElement(i.target,i)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()})}));return{disconnect:()=>{var s;(s=o())==null||s.disconnect(),n=null},observe:s=>{var i;return(i=o())==null?void 0:i.observe(s,{box:"border-box"})},unobserve:s=>{var i;return(i=o())==null?void 0:i.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([o,s])=>{typeof s>"u"&&delete n[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:wy,rangeExtractor:xy,onChange:()=>{},measureElement:by,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,s;(s=(o=this.options).onChange)==null||s.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(s=>{this.observer.observe(s)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=i,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 s=new Map,i=new Map;for(let r=o-1;r>=0;r--){const a=n[r];if(s.has(a.lane))continue;const l=i.get(a.lane);if(l==null||a.end>l.end?i.set(a.lane,a):a.end<l.end&&s.set(a.lane,!0),s.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.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,s,i,r,a)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:o,scrollMargin:s,getItemKey:i,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:s,getItemKey:i,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=i(d),p=this.laneAssignments.get(d);let g,m;if(p!==void 0&&this.options.lanes>1){g=p;const S=f[g],_=S!==void 0?u[S]:void 0;m=_?_.end+this.options.gap:o+s}else{const S=this.options.lanes===1?u[d-1]:this.getFurthestMeasurement(u,d);m=S?S.end+this.options.gap:o+s,g=S?S.lane:d%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(d,g)}const w=l.get(h),x=typeof w=="number"?w:this.options.estimateSize(d),y=m+x;u[d]={index:d,start:m,size:x,end:y,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,s,i)=>this.range=n.length>0&&o>0?Ey({measurements:n,outerSize:o,scrollOffset:s,lanes:i}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=yt(()=>{let n=null,o=null;const s=this.calculateRange();return s&&(n=s.startIndex,o=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,o]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,o]},(n,o,s,i,r)=>i===null||r===null?[]:n({startIndex:i,endIndex:r,overscan:o,count:s}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const o=this.options.indexAttribute,s=n.getAttribute(o);return s?parseInt(s,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(n,o)=>{const s=this.indexFromElement(n),i=this.measurementsCache[s];if(!i)return;const r=i.key,a=this.elementsCache.get(r);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(r,n)),n.isConnected&&this.resizeItem(s,this.options.measureElement(n,o,this))},this.resizeItem=(n,o)=>{const s=this.measurementsCache[n];if(!s)return;const i=this.itemSizeCache.get(s.key)??s.size,r=o-i;r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,r,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",r),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,o)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((o,s)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(s))});return}this._measureElement(n,void 0)},this.getVirtualItems=yt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,o)=>{const s=[];for(let i=0,r=n.length;i<r;i++){const a=n[i],l=o[a];s.push(l)}return s},{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[Mc(0,o.length-1,s=>sa(o[s]).start,n)])},this.getOffsetForAlignment=(n,o,s=0)=>{const i=this.getSize(),r=this.getScrollOffset();o==="auto"&&(o=n>=r+i?"end":"start"),o==="center"?n+=(s-i)/2:o==="end"&&(n-=i);const a=this.getTotalSize()+this.options.scrollMargin-i;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 s=this.measurementsCache[n];if(!s)return;const i=this.getSize(),r=this.getScrollOffset();if(o==="auto")if(s.end>=r+i-this.options.scrollPaddingEnd)o="end";else if(s.start<=r+this.options.scrollPaddingStart)o="start";else return[r,o];const a=o==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,o,s.size),o]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:o="start",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,o),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:o="auto",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let i=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:s}),this.targetWindow.requestAnimationFrame(()=>{const h=this.getScrollOffset(),p=this.getOffsetForIndex(n,d);if(!p){console.warn("Failed to get offset for index:",n);return}vy(p[0],h)||l(d)})},l=c=>{this.targetWindow&&(i++,i<r?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",i,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 s;if(o.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=o[o.length-1])==null?void 0:n.end)??0;else{const i=Array(this.options.lanes).fill(null);let r=o.length-1;for(;r>=0&&i.some(a=>a===null);){const a=o[r];i[a.lane]===null&&(i[a.lane]=a.end),r--}s=Math.max(...i.filter(a=>a!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:o,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:o},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}}const Mc=(e,t,n,o)=>{for(;e<=t;){const s=(e+t)/2|0,i=n(s);if(i<o)e=s+1;else if(i>o)t=s-1;else return s}return e>0?e-1:0};function Ey({measurements:e,outerSize:t,scrollOffset:n,lanes:o}){const s=e.length-1,i=l=>e[l].start;if(e.length<=o)return{startIndex:0,endIndex:s};let r=Mc(0,s,i,n),a=r;if(o===1)for(;a<s&&e[a].end<n+t;)a++;else if(o>1){const l=Array(o).fill(0);for(;a<s&&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(s,a+(o-1-a%o))}return{startIndex:r,endIndex:a}}const la=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Py(e){const t=b.useReducer(()=>({}),{})[1],n={...e,onChange:(s,i)=>{var r;i?Cs.flushSync(t):t(),(r=e.onChange)==null||r.call(e,s,i)}},[o]=b.useState(()=>new Ry(n));return o.setOptions(n),la(()=>o._didMount(),[]),la(()=>o._willUpdate()),o}function My(e){return Py({observeElementRect:Cy,observeElementOffset:Sy,scrollToFn:_y,...e})}const Ty="_main_1qx2l_8",ca={main:Ty},Tc=C.forwardRef(({children:e,className:t,row:n=!1,estimatedItemHeight:o=100,virtualize:s=!1,maxHeight:i=448},r)=>{const a=C.useRef(null),l=C.useMemo(()=>C.Children.toArray(e),[e]),c=My({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(()=>s||l.length>50,[s,l])&&l.length>0?v.jsx(L,{ref:a,row:n,maxHeight:i,className:k.cx(ca.main,t),w:"full",p:"var(--spacing-2xl)",children:v.jsx(L,{relative:!0,h:c.getTotalSize(),children:c.getVirtualItems().map(f=>v.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))})}):v.jsx(L,{ref:a,className:k.cx(ca.main,t),w:"full",row:n,pl:"var(--spacing-2xl)",pr:"var(--spacing-xs)",children:v.jsx(L,{py:"var(--spacing-2xl)",pr:"var(--spacing-xl)",children:e})})});Tc.displayName="ModalMain";const to=ya;to.Header=Pc;to.Main=Tc;to.Footer=wa;const Ac=C.createContext(null),Ay=()=>C.useContext(Ac),un=({children:e})=>{const[t,n]=C.useState(null),o=Ay();return C.useEffect(()=>{if(typeof document>"u")return;const s=o?.current??document.body;if(!s)return;let i=s.querySelector("[data-portal-root]")??void 0;i||(i=document.createElement("div"),i.setAttribute("data-portal-root","true"),s.appendChild(i)),n(i)},[o]),t?Cs.createPortal(e,t):null};function Vc(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function qe(e,t){return typeof e=="function"?e(t):e}function Ce(e,t){return n=>{t.setState(o=>({...o,[e]:qe(n,o[e])}))}}function no(e){return e instanceof Function}function Vy(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Dy(e,t){const n=[],o=s=>{s.forEach(i=>{n.push(i);const r=t(i);r!=null&&r.length&&o(r)})};return o(e),n}function H(e,t,n){let o=[],s;return i=>{let r;n.key&&n.debug&&(r=Date.now());const a=e(i);if(!(a.length!==o.length||a.some((u,f)=>o[f]!==u)))return s;o=a;let c;if(n.key&&n.debug&&(c=Date.now()),s=t(...a),n==null||n.onChange==null||n.onChange(s),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-r)*100)/100,f=Math.round((Date.now()-c)*100)/100,d=f/16,h=(p,g)=>{for(p=String(p);p.length<g;)p=" "+p;return p};console.info(`%c⏱ ${h(f,5)} /${h(u,5)} ms`,`
|
|
26
13
|
font-size: .6rem;
|
|
27
14
|
font-weight: bold;
|
|
28
|
-
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n?.key)}return s}}function W(e,t,n,o){return{debug:()=>{var s;return(s=e?.debugAll)!=null?s:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:o}}function ry(e,t,n,o){const s=()=>{var r;return(r=i.getValue())!=null?r:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(o),renderValue:s,getContext:H(()=>[e,n,t,i],(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(i,n,t,e)},{}),i}function ay(e,t,n,o){var s,i;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(s=(i=a.id)!=null?i:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?s:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:l&&(l.includes(".")?u=f=>{let h=f;for(const g of l.split(".")){var 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=f=>f[a.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let d={id:`${String(c)}`,accessorFn:u,parent:o,depth:n,columnDef:a,columns:[],getFlatColumns:H(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(h=>h.getFlatColumns())]},W(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:H(()=>[e._getOrderColumnsFn()],f=>{var h;if((h=d.columns)!=null&&h.length){let m=d.columns.flatMap(g=>g.getLeafColumns());return f(m)}return[d]},W(e.options,"debugColumns","column.getLeafColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(d,e);return d}const de="debugHeaders";function Kr(e,t,n){var o;let i={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(i),r},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(r=>{r.createHeader==null||r.createHeader(i,e)}),i}const ly={createTable:e=>{e.getHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o,s)=>{var i,r;const a=(i=o?.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?i:[],l=(r=s?.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?r:[],c=n.filter(d=>!(o!=null&&o.includes(d.id))&&!(s!=null&&s.includes(d.id)));return mn(t,[...a,...c,...l],e)},W(e.options,de,"getHeaderGroups")),e.getCenterHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o,s)=>(n=n.filter(i=>!(o!=null&&o.includes(i.id))&&!(s!=null&&s.includes(i.id))),mn(t,n,e,"center")),W(e.options,de,"getCenterHeaderGroups")),e.getLeftHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,o)=>{var s;const i=(s=o?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?s:[];return mn(t,i,e,"left")},W(e.options,de,"getLeftHeaderGroups")),e.getRightHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,o)=>{var s;const i=(s=o?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?s:[];return mn(t,i,e,"right")},W(e.options,de,"getRightHeaderGroups")),e.getFooterGroups=H(()=>[e.getHeaderGroups()],t=>[...t].reverse(),W(e.options,de,"getFooterGroups")),e.getLeftFooterGroups=H(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),W(e.options,de,"getLeftFooterGroups")),e.getCenterFooterGroups=H(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),W(e.options,de,"getCenterFooterGroups")),e.getRightFooterGroups=H(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),W(e.options,de,"getRightFooterGroups")),e.getFlatHeaders=H(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,de,"getFlatHeaders")),e.getLeftFlatHeaders=H(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,de,"getLeftFlatHeaders")),e.getCenterFlatHeaders=H(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,de,"getCenterFlatHeaders")),e.getRightFlatHeaders=H(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,de,"getRightFlatHeaders")),e.getCenterLeafHeaders=H(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),W(e.options,de,"getCenterLeafHeaders")),e.getLeftLeafHeaders=H(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),W(e.options,de,"getLeftLeafHeaders")),e.getRightLeafHeaders=H(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),W(e.options,de,"getRightLeafHeaders")),e.getLeafHeaders=H(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,o)=>{var s,i,r,a,l,c;return[...(s=(i=t[0])==null?void 0:i.headers)!=null?s:[],...(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,de,"getLeafHeaders"))}};function mn(e,t,n,o){var s,i;let r=0;const a=function(f,h){h===void 0&&(h=1),r=Math.max(r,h),f.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=(f,h)=>{const m={depth:h,id:[o,`${h}`].filter(Boolean).join("_"),headers:[]},g=[];f.forEach(p=>{const w=[...g].reverse()[0],x=p.column.depth===m.depth;let v,S=!1;if(x&&p.column.parent?v=p.column.parent:(v=p.column,S=!0),w&&w?.column===v)w.subHeaders.push(p);else{const _=Kr(n,v,{id:[o,h,v.id,p?.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${g.filter(P=>P.column===v).length}`:void 0,depth:h,index:g.length});_.subHeaders.push(p),g.push(_)}m.headers.push(p),p.headerGroup=m}),l.push(m),h>0&&c(g,h-1)},u=t.map((f,h)=>Kr(n,f,{depth:r,index:h}));c(u,r-1),l.reverse();const d=f=>f.filter(m=>m.column.getIsVisible()).map(m=>{let g=0,p=0,w=[0];m.subHeaders&&m.subHeaders.length?(w=[],d(m.subHeaders).forEach(v=>{let{colSpan:S,rowSpan:_}=v;g+=S,w.push(_)})):g=1;const x=Math.min(...w);return p=p+x,m.colSpan=g,m.rowSpan=p,{colSpan:g,rowSpan:p}});return d((s=(i=l[0])==null?void 0:i.headers)!=null?s:[]),l}const cy=(e,t,n,o,s,i,r)=>{let a={id:t,index:o,original:n,depth:s,parentId:r,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return a._valuesCache[l]=c.accessorFn(a.original,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:()=>iy(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=>ry(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},uy={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()}}},fc=(e,t,n)=>{var o,s;const i=n==null||(o=n.toString())==null?void 0:o.toLowerCase();return!!(!((s=e.getValue(t))==null||(s=s.toString())==null||(s=s.toLowerCase())==null)&&s.includes(i))};fc.autoRemove=e=>De(e);const hc=(e,t,n)=>{var o;return!!(!((o=e.getValue(t))==null||(o=o.toString())==null)&&o.includes(n))};hc.autoRemove=e=>De(e);const gc=(e,t,n)=>{var o;return((o=e.getValue(t))==null||(o=o.toString())==null?void 0:o.toLowerCase())===n?.toLowerCase()};gc.autoRemove=e=>De(e);const mc=(e,t,n)=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(n)};mc.autoRemove=e=>De(e);const pc=(e,t,n)=>!n.some(o=>{var s;return!((s=e.getValue(t))!=null&&s.includes(o))});pc.autoRemove=e=>De(e)||!(e!=null&&e.length);const vc=(e,t,n)=>n.some(o=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(o)});vc.autoRemove=e=>De(e)||!(e!=null&&e.length);const yc=(e,t,n)=>e.getValue(t)===n;yc.autoRemove=e=>De(e);const wc=(e,t,n)=>e.getValue(t)==n;wc.autoRemove=e=>De(e);const ei=(e,t,n)=>{let[o,s]=n;const i=e.getValue(t);return i>=o&&i<=s};ei.resolveFilterValue=e=>{let[t,n]=e,o=typeof t!="number"?parseFloat(t):t,s=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(o)?-1/0:o,r=n===null||Number.isNaN(s)?1/0:s;if(i>r){const a=i;i=r,r=a}return[i,r]};ei.autoRemove=e=>De(e)||De(e[0])&&De(e[1]);const $e={includesString:fc,includesStringSensitive:hc,equalsString:gc,arrIncludes:mc,arrIncludesAll:pc,arrIncludesSome:vc,equals:yc,weakEquals:wc,inNumberRange:ei};function De(e){return e==null||e===""}const dy={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ce("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"?$e.includesString:typeof o=="number"?$e.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?$e.equals:Array.isArray(o)?$e.arrIncludes:$e.weakEquals},e.getFilterFn=()=>{var n,o;return Xn(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:$e[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,o,s;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((o=t.options.enableColumnFilters)!=null?o:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(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(s=>s.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(o=>{const s=e.getFilterFn(),i=o?.find(u=>u.id===e.id),r=qe(n,i?i.value:void 0);if(qr(s,r,e)){var a;return(a=o?.filter(u=>u.id!==e.id))!=null?a:[]}const l={id:e.id,value:r};if(i){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=s=>{var i;return(i=qe(t,s))==null?void 0:i.filter(r=>{const a=n.find(l=>l.id===r.id);if(a){const l=a.getFilterFn();if(qr(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 qr(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const fy=(e,t,n)=>n.reduce((o,s)=>{const i=s.getValue(e);return o+(typeof i=="number"?i:0)},0),hy=(e,t,n)=>{let o;return n.forEach(s=>{const i=s.getValue(e);i!=null&&(o>i||o===void 0&&i>=i)&&(o=i)}),o},gy=(e,t,n)=>{let o;return n.forEach(s=>{const i=s.getValue(e);i!=null&&(o<i||o===void 0&&i>=i)&&(o=i)}),o},my=(e,t,n)=>{let o,s;return n.forEach(i=>{const r=i.getValue(e);r!=null&&(o===void 0?r>=r&&(o=s=r):(o>r&&(o=r),s<r&&(s=r)))}),[o,s]},py=(e,t)=>{let n=0,o=0;if(t.forEach(s=>{let i=s.getValue(e);i!=null&&(i=+i)>=i&&(++n,o+=i)}),n)return o/n},vy=(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!sy(n))return;if(n.length===1)return n[0];const o=Math.floor(n.length/2),s=n.sort((i,r)=>i-r);return n.length%2!==0?s[o]:(s[o-1]+s[o])/2},yy=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),wy=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,xy=(e,t)=>t.length,Ro={sum:fy,min:hy,max:gy,extent:my,mean:py,median:vy,unique:yy,uniqueCount:wy,count:xy},Cy={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:Ce("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 Ro.sum;if(Object.prototype.toString.call(o)==="[object Date]")return Ro.extent},e.getAggregationFn=()=>{var n,o;if(!e)throw new Error;return Xn(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:Ro[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 s;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((s=n.subRows)!=null&&s.length)}}};function Sy(e,t,n){if(!(t!=null&&t.length)||!n)return e;const o=e.filter(i=>!t.includes(i.id));return n==="remove"?o:[...t.map(i=>e.find(r=>r.id===i)).filter(Boolean),...o]}const by={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ce("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=H(n=>[zt(t,n)],n=>n.findIndex(o=>o.id===e.id),W(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var o;return((o=zt(t,n)[0])==null?void 0:o.id)===e.id},e.getIsLastColumn=n=>{var o;const s=zt(t,n);return((o=s[s.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)=>s=>{let i=[];if(!(t!=null&&t.length))i=s;else{const r=[...t],a=[...s];for(;a.length&&r.length;){const l=r.shift(),c=a.findIndex(u=>u.id===l);c>-1&&i.push(a.splice(c,1)[0])}i=[...i,...a]}return Sy(i,n,o)},W(e.options,"debugTable","_getOrderColumnsFn"))}},Eo=()=>({left:[],right:[]}),_y={getInitialState:e=>({columnPinning:Eo(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ce("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const o=e.getLeafColumns().map(s=>s.id).filter(Boolean);t.setColumnPinning(s=>{var i,r;if(n==="right"){var a,l;return{left:((a=s?.left)!=null?a:[]).filter(d=>!(o!=null&&o.includes(d))),right:[...((l=s?.right)!=null?l:[]).filter(d=>!(o!=null&&o.includes(d))),...o]}}if(n==="left"){var c,u;return{left:[...((c=s?.left)!=null?c:[]).filter(d=>!(o!=null&&o.includes(d))),...o],right:((u=s?.right)!=null?u:[]).filter(d=>!(o!=null&&o.includes(d)))}}return{left:((i=s?.left)!=null?i:[]).filter(d=>!(o!=null&&o.includes(d))),right:((r=s?.right)!=null?r:[]).filter(d=>!(o!=null&&o.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(o=>{var s,i,r;return((s=o.columnDef.enablePinning)!=null?s:!0)&&((i=(r=t.options.enableColumnPinning)!=null?r:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:o,right:s}=t.getState().columnPinning,i=n.some(a=>o?.includes(a)),r=n.some(a=>s?.includes(a));return i?"left":r?"right":!1},e.getPinnedIndex=()=>{var n,o;const s=e.getIsPinned();return s?(n=(o=t.getState().columnPinning)==null||(o=o[s])==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,s)=>{const i=[...o??[],...s??[]];return n.filter(r=>!i.includes(r.column.id))},W(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,o)=>(o??[]).map(i=>n.find(r=>r.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),W(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,o)=>(o??[]).map(i=>n.find(r=>r.column.id===i)).filter(Boolean).map(i=>({...i,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?Eo():(n=(o=e.initialState)==null?void 0:o.columnPinning)!=null?n:Eo())},e.getIsSomeColumnsPinned=t=>{var n;const o=e.getState().columnPinning;if(!t){var s,i;return!!((s=o.left)!=null&&s.length||(i=o.right)!=null&&i.length)}return!!((n=o[t])!=null&&n.length)},e.getLeftLeafColumns=H(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(o=>t.find(s=>s.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(s=>s.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 s=[...n??[],...o??[]];return t.filter(i=>!s.includes(i.id))},W(e.options,"debugColumns","getCenterLeafColumns"))}};function Ry(e){return e||(typeof document<"u"?document:null)}const pn={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Mo=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Ey={getDefaultColumnDef:()=>pn,getInitialState:e=>({columnSizing:{},columnSizingInfo:Mo(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ce("columnSizing",e),onColumnSizingInfoChange:Ce("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,o,s;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:pn.minSize,(o=i??e.columnDef.size)!=null?o:pn.size),(s=e.columnDef.maxSize)!=null?s:pn.maxSize)},e.getStart=H(n=>[n,zt(t,n),t.getState().columnSizing],(n,o)=>o.slice(0,e.getIndex(n)).reduce((s,i)=>s+i.getSize(),0),W(t.options,"debugColumns","getStart")),e.getAfter=H(n=>[n,zt(t,n),t.getState().columnSizing],(n,o)=>o.slice(e.getIndex(n)+1).reduce((s,i)=>s+i.getSize(),0),W(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:o,...s}=n;return s})},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=s=>{if(s.subHeaders.length)s.subHeaders.forEach(o);else{var i;n+=(i=s.column.getSize())!=null?i: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),s=o?.getCanResize();return i=>{if(!o||!s||(i.persist==null||i.persist(),Po(i)&&i.touches&&i.touches.length>1))return;const r=e.getSize(),a=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[o.id,o.getSize()]],l=Po(i)?Math.round(i.touches[0].clientX):i.clientX,c={},u=(w,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(v=>{var S,_;const P=t.options.columnResizeDirection==="rtl"?-1:1,V=(x-((S=v?.startOffset)!=null?S:0))*P,M=Math.max(V/((_=v?.startSize)!=null?_:0),-.999999);return v.columnSizingStart.forEach(A=>{let[F,$]=A;c[F]=Math.round(Math.max($+$*M,0)*100)/100}),{...v,deltaOffset:V,deltaPercentage:M}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(v=>({...v,...c})))},d=w=>u("move",w),f=w=>{u("end",w),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=Ry(n),m={moveHandler:w=>d(w.clientX),upHandler:w=>{h?.removeEventListener("mousemove",m.moveHandler),h?.removeEventListener("mouseup",m.upHandler),f(w.clientX)}},g={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),d(w.touches[0].clientX),!1),upHandler:w=>{var x;h?.removeEventListener("touchmove",g.moveHandler),h?.removeEventListener("touchend",g.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),f((x=w.touches[0])==null?void 0:x.clientX)}},p=My()?{passive:!1}:!1;Po(i)?(h?.addEventListener("touchmove",g.moveHandler,p),h?.addEventListener("touchend",g.upHandler,p)):(h?.addEventListener("mousemove",m.moveHandler,p),h?.addEventListener("mouseup",m.upHandler,p)),t.setColumnSizingInfo(w=>({...w,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?Mo():(n=e.initialState.columnSizingInfo)!=null?n:Mo())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((o,s)=>o+s.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((o,s)=>o+s.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((o,s)=>o+s.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((o,s)=>o+s.getSize(),0))!=null?t:0}}};let vn=null;function My(){if(typeof vn=="boolean")return vn;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 vn=e,vn}function Po(e){return e.type==="touchstart"}const Py={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ce("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 s=e.columns;return(n=s.length?s.some(i=>i.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,s)=>[...n,...o,...s],W(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,o)=>H(()=>[o(),o().filter(s=>s.getIsVisible()).map(s=>s.id).join("_")],s=>s.filter(i=>i.getIsVisible==null?void 0:i.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((s,i)=>({...s,[i.id]:n||!(i.getCanHide!=null&&i.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 zt(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Ty={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()}}},Vy={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Ce("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,s,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((o=t.options.enableGlobalFilter)!=null?o:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>$e.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:o}=e.options;return Xn(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[o])!=null?t:$e[o]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Ay={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ce("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var o,s;if(!t){e._queue(()=>{t=!0});return}if((o=(s=e.options.autoResetAll)!=null?s: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 s,i;e.setExpanded(o?{}:(s=(i=e.initialState)==null?void 0:i.expanded)!=null?s:{})},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(s=>!s.getIsExpanded()))},e.getExpandedDepth=()=>{let o=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const r=i.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 s;const i=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=(s=n)!=null?s:!i,!i&&n)return{...r,[e.id]:!0};if(i&&!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,s;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((o=t.options.enableExpanding)!=null?o:!0)&&!!((s=e.subRows)!=null&&s.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()}}}},rs=0,as=10,To=()=>({pageIndex:rs,pageSize:as}),Dy={getInitialState:e=>({...e,pagination:{...To(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ce("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var o,s;if(!t){e._queue(()=>{t=!0});return}if((o=(s=e.options.autoResetAll)!=null?s:e.options.autoResetPageIndex)!=null?o:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=o=>{const s=i=>qe(o,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=o=>{var s;e.setPagination(o?To():(s=e.initialState.pagination)!=null?s:To())},e.setPageIndex=o=>{e.setPagination(s=>{let i=qe(o,s.pageIndex);const r=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,r)),{...s,pageIndex:i}})},e.resetPageIndex=o=>{var s,i;e.setPageIndex(o?rs:(s=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?s:rs)},e.resetPageSize=o=>{var s,i;e.setPageSize(o?as:(s=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?s:as)},e.setPageSize=o=>{e.setPagination(s=>{const i=Math.max(1,qe(o,s.pageSize)),r=s.pageSize*s.pageIndex,a=Math.floor(r/i);return{...s,pageIndex:a,pageSize:i}})},e.setPageCount=o=>e.setPagination(s=>{var i;let r=qe(o,(i=e.options.pageCount)!=null?i:-1);return typeof r=="number"&&(r=Math.max(-1,r)),{...s,pageCount:r}}),e.getPageOptions=H(()=>[e.getPageCount()],o=>{let s=[];return o&&o>0&&(s=[...new Array(o)].fill(null).map((i,r)=>r)),s},W(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:o}=e.getState().pagination,s=e.getPageCount();return s===-1?!0:s===0?!1:o<s-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}}},Vo=()=>({top:[],bottom:[]}),ky={getInitialState:e=>({rowPinning:Vo(),...e}),getDefaultOptions:e=>({onRowPinningChange:Ce("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,o,s)=>{const i=o?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],r=s?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...r,e.id,...i]);t.setRowPinning(l=>{var c,u;if(n==="bottom"){var d,f;return{top:((d=l?.top)!=null?d:[]).filter(g=>!(a!=null&&a.has(g))),bottom:[...((f=l?.bottom)!=null?f:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)]}}if(n==="top"){var h,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:s}=t.options;return typeof o=="function"?o(e):(n=o??s)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:o,bottom:s}=t.getState().rowPinning,i=n.some(a=>o?.includes(a)),r=n.some(a=>s?.includes(a));return i?"top":r?"bottom":!1},e.getPinnedIndex=()=>{var n,o;const s=e.getIsPinned();if(!s)return-1;const i=(n=s==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(r=>{let{id:a}=r;return a});return(o=i?.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?Vo():(n=(o=e.initialState)==null?void 0:o.rowPinning)!=null?n:Vo())},e.getIsSomeRowsPinned=t=>{var n;const o=e.getState().rowPinning;if(!t){var s,i;return!!((s=o.top)!=null&&s.length||(i=o.bottom)!=null&&i.length)}return!!((n=o[t])!=null&&n.length)},e._getPinnedRows=(t,n,o)=>{var s;return((s=e.options.keepPinnedRows)==null||s?(n??[]).map(r=>{const a=e.getRow(r,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(r=>t.find(a=>a.id===r))).filter(Boolean).map(r=>({...r,position: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 s=new Set([...n??[],...o??[]]);return t.filter(i=>!s.has(i.id))},W(e.options,"debugRows","getCenterRows"))}},Fy={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ce("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},s=e.getPreGroupedRowModel().flatRows;return t?s.forEach(i=>{i.getCanSelect()&&(o[i.id]=!0)}):s.forEach(i=>{delete o[i.id]}),o})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const o=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),s={...n};return e.getRowModel().rows.forEach(i=>{ls(s,i.id,o,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=H(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Ao(e,n):{rows:[],flatRows:[],rowsById:{}},W(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=H(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Ao(e,n):{rows:[],flatRows:[],rowsById:{}},W(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=H(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Ao(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(s=>s.getCanSelect()&&!n[s.id])&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(s=>s.getCanSelect()),{rowSelection:n}=e.getState();let o=!!t.length;return o&&t.some(s=>!n[s.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 s=e.getIsSelected();t.setRowSelection(i=>{var r;if(n=typeof n<"u"?n:!s,e.getCanSelect()&&s===n)return i;const a={...i};return ls(a,e.id,n,(r=o?.selectChildren)!=null?r:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return ti(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return cs(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return cs(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 s;n&&e.toggleSelected((s=o.target)==null?void 0:s.checked)}}}},ls=(e,t,n,o,s)=>{var i;const r=s.getRow(t,!0);n?(r.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),r.getCanSelect()&&(e[t]=!0)):delete e[t],o&&(i=r.subRows)!=null&&i.length&&r.getCanSelectSubRows()&&r.subRows.forEach(a=>ls(e,a.id,n,o,s))};function Ao(e,t){const n=e.getState().rowSelection,o=[],s={},i=function(r,a){return r.map(l=>{var c;const u=ti(l,n);if(u&&(o.push(l),s[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:i(l.subRows)}),u)return l}).filter(Boolean)};return{rows:i(t.rows),flatRows:o,rowsById:s}}function ti(e,t){var n;return(n=t[e.id])!=null?n:!1}function cs(e,t,n){var o;if(!((o=e.subRows)!=null&&o.length))return!1;let s=!0,i=!1;return e.subRows.forEach(r=>{if(!(i&&!s)&&(r.getCanSelect()&&(ti(r,t)?i=!0:s=!1),r.subRows&&r.subRows.length)){const a=cs(r,t);a==="all"?i=!0:(a==="some"&&(i=!0),s=!1)}}),s?"all":i?"some":!1}const us=/([0-9]+)/gm,Ly=(e,t,n)=>xc(Qe(e.getValue(n)).toLowerCase(),Qe(t.getValue(n)).toLowerCase()),Iy=(e,t,n)=>xc(Qe(e.getValue(n)),Qe(t.getValue(n))),jy=(e,t,n)=>ni(Qe(e.getValue(n)).toLowerCase(),Qe(t.getValue(n)).toLowerCase()),$y=(e,t,n)=>ni(Qe(e.getValue(n)),Qe(t.getValue(n))),Oy=(e,t,n)=>{const o=e.getValue(n),s=t.getValue(n);return o>s?1:o<s?-1:0},Ny=(e,t,n)=>ni(e.getValue(n),t.getValue(n));function ni(e,t){return e===t?0:e>t?1:-1}function Qe(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function xc(e,t){const n=e.split(us).filter(Boolean),o=t.split(us).filter(Boolean);for(;n.length&&o.length;){const s=n.shift(),i=o.shift(),r=parseInt(s,10),a=parseInt(i,10),l=[r,a].sort();if(isNaN(l[0])){if(s>i)return 1;if(i>s)return-1;continue}if(isNaN(l[1]))return isNaN(r)?-1:1;if(r>a)return 1;if(a>r)return-1}return n.length-o.length}const It={alphanumeric:Ly,alphanumericCaseSensitive:Iy,text:jy,textCaseSensitive:$y,datetime:Oy,basic:Ny},By={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ce("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const s of n){const i=s?.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return It.datetime;if(typeof i=="string"&&(o=!0,i.split(us).length>1))return It.alphanumeric}return o?It.text:It.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,o;if(!e)throw new Error;return Xn(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:It[e.columnDef.sortingFn]},e.toggleSorting=(n,o)=>{const s=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(r=>{const a=r?.find(h=>h.id===e.id),l=r?.findIndex(h=>h.id===e.id);let c=[],u,d=i?n:s==="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"&&(i||s||(u="remove")),u==="add"){var f;c=[...r,{id:e.id,desc:d}],c.splice(0,c.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=r.map(h=>h.id===e.id?{...h,desc:d}:h):u==="remove"?c=r.filter(h=>h.id!==e.id):c=[{id:e.id,desc:d}];return c})},e.getFirstSortDir=()=>{var n,o;return((n=(o=e.columnDef.sortDescFirst)!=null?o:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var o,s;const i=e.getFirstSortDir(),r=e.getIsSorted();return r?r!==i&&((o=t.options.enableSortingRemoval)==null||o)&&(!(n&&(s=t.options.enableMultiRemove)!=null)||s)?!1:r==="desc"?"asc":"desc":i},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(s=>s.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(s=>s.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())}},zy=[ly,Py,by,_y,uy,dy,Ty,Vy,By,Cy,Ay,Dy,ky,Fy,Ey];function Hy(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const o=[...zy,...(t=e._features)!=null?t:[]];let s={_features:o};const i=s._features.reduce((f,h)=>Object.assign(f,h.getDefaultOptions==null?void 0:h.getDefaultOptions(s)),{}),r=f=>s.options.mergeOptions?s.options.mergeOptions(i,f):{...i,...f};let l={...{},...(n=e.initialState)!=null?n:{}};s._features.forEach(f=>{var h;l=(h=f.getInitialState==null?void 0:f.getInitialState(l))!=null?h:l});const c=[];let u=!1;const d={_features:o,options:{...i,...e},initialState:l,_queue:f=>{c.push(f),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{s.setState(s.initialState)},setOptions:f=>{const h=qe(f,s.options);s.options=r(h)},getState:()=>s.options.state,setState:f=>{s.options.onStateChange==null||s.options.onStateChange(f)},_getRowId:(f,h,m)=>{var g;return(g=s.options.getRowId==null?void 0:s.options.getRowId(f,h,m))!=null?g:`${m?[m.id,h].join("."):h}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(f,h)=>{let m=(h?s.getPrePaginationRowModel():s.getRowModel()).rowsById[f];if(!m&&(m=s.getCoreRowModel().rowsById[f],!m))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${f}`):new Error;return m},_getDefaultColumnDef:H(()=>[s.options.defaultColumn],f=>{var h;return f=(h=f)!=null?h:{},{header:m=>{const g=m.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:m=>{var g,p;return(g=(p=m.renderValue())==null||p.toString==null?void 0:p.toString())!=null?g:null},...s._features.reduce((m,g)=>Object.assign(m,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...f}},W(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>s.options.columns,getAllColumns:H(()=>[s._getColumnDefs()],f=>{const h=function(m,g,p){return p===void 0&&(p=0),m.map(w=>{const x=ay(s,w,p,g),v=w;return x.columns=v.columns?h(v.columns,x,p+1):[],x})};return h(f)},W(e,"debugColumns","getAllColumns")),getAllFlatColumns:H(()=>[s.getAllColumns()],f=>f.flatMap(h=>h.getFlatColumns()),W(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:H(()=>[s.getAllFlatColumns()],f=>f.reduce((h,m)=>(h[m.id]=m,h),{}),W(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:H(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(f,h)=>{let m=f.flatMap(g=>g.getLeafColumns());return h(m)},W(e,"debugColumns","getAllLeafColumns")),getColumn:f=>{const h=s._getAllFlatColumnsById()[f];return process.env.NODE_ENV!=="production"&&!h&&console.error(`[Table] Column with id '${f}' does not exist.`),h}};Object.assign(s,d);for(let f=0;f<s._features.length;f++){const h=s._features[f];h==null||h.createTable==null||h.createTable(s)}return s}function Wy(){return e=>H(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(s,i,r){i===void 0&&(i=0);const a=[];for(let c=0;c<s.length;c++){const u=cy(e,e._getRowId(s[c],c,r),s[c],c,i,void 0,r?.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),e.options.getSubRows){var l;u.originalSubRows=e.options.getSubRows(s[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=o(u.originalSubRows,i+1,u))}}return a};return n.rows=o(t),n},W(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Gy(e){const t=[],n=o=>{var s;t.push(o),(s=o.subRows)!=null&&s.length&&o.getIsExpanded()&&o.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function Uy(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:s,pageIndex:i}=n;let{rows:r,flatRows:a,rowsById:l}=o;const c=s*i,u=c+s;r=r.slice(c,u);let d;t.options.paginateExpandedRows?d={rows:r,flatRows:a,rowsById:l}:d=Gy({rows:r,flatRows:a,rowsById:l}),d.flatRows=[];const f=h=>{d.flatRows.push(h),h.subRows.length&&h.subRows.forEach(f)};return d.rows.forEach(f),d},W(t.options,"debugTable","getPaginationRowModel"))}function Ky(){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,s=[],i=o.filter(l=>{var c;return(c=e.getColumn(l.id))==null?void 0:c.getCanSort()}),r={};i.forEach(l=>{const c=e.getColumn(l.id);c&&(r[l.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const a=l=>{const c=l.map(u=>({...u}));return c.sort((u,d)=>{for(let h=0;h<i.length;h+=1){var f;const m=i[h],g=r[m.id],p=g.sortUndefined,w=(f=m?.desc)!=null?f:!1;let x=0;if(p){const v=u.getValue(m.id),S=d.getValue(m.id),_=v===void 0,P=S===void 0;if(_||P){if(p==="first")return _?-1:1;if(p==="last")return _?1:-1;x=_&&P?0:_?p:-p}}if(x===0&&(x=g.sortingFn(u,d,m.id)),x!==0)return w&&(x*=-1),g.invertSorting&&(x*=-1),x}return u.index-d.index}),c.forEach(u=>{var d;s.push(u),(d=u.subRows)!=null&&d.length&&(u.subRows=a(u.subRows))}),c};return{rows:a(n.rows),flatRows:s,rowsById:n.rowsById}},W(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
|
|
29
|
-
* react-table
|
|
30
|
-
*
|
|
31
|
-
* Copyright (c) TanStack
|
|
32
|
-
*
|
|
33
|
-
* This source code is licensed under the MIT license found in the
|
|
34
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
35
|
-
*
|
|
36
|
-
* @license MIT
|
|
37
|
-
*/function Xr(e,t){return e?qy(e)?b.createElement(e,t):e:null}function qy(e){return Xy(e)||typeof e=="function"||Yy(e)}function Xy(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Yy(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Zy(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=b.useState(()=>({current:Hy(t)})),[o,s]=b.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...o,...e.state},onStateChange:r=>{s(r),e.onStateChange==null||e.onStateChange(r)}})),n.current}const Jy=e=>b.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("style",null,`
|
|
15
|
+
color: hsl(${Math.max(0,Math.min(120-120*d,120))}deg 100% 31%);`,n?.key)}return s}}function W(e,t,n,o){return{debug:()=>{var s;return(s=e?.debugAll)!=null?s:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:o}}function ky(e,t,n,o){const s=()=>{var r;return(r=i.getValue())!=null?r:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(o),renderValue:s,getContext:H(()=>[e,n,t,i],(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(i,n,t,e)},{}),i}function Fy(e,t,n,o){var s,i;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(s=(i=a.id)!=null?i:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?s:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:l&&(l.includes(".")?u=d=>{let h=d;for(const g of l.split(".")){var p;h=(p=h)==null?void 0:p[g],process.env.NODE_ENV!=="production"&&h===void 0&&console.warn(`"${g}" in deeply nested key "${l}" returned undefined.`)}return h}:u=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 p=f.columns.flatMap(g=>g.getLeafColumns());return d(p)}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 ua(e,t,n){var o;let i={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(i),r},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(r=>{r.createHeader==null||r.createHeader(i,e)}),i}const Ly={createTable:e=>{e.getHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o,s)=>{var i,r;const a=(i=o?.map(f=>n.find(d=>d.id===f)).filter(Boolean))!=null?i:[],l=(r=s?.map(f=>n.find(d=>d.id===f)).filter(Boolean))!=null?r:[],c=n.filter(f=>!(o!=null&&o.includes(f.id))&&!(s!=null&&s.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,s)=>(n=n.filter(i=>!(o!=null&&o.includes(i.id))&&!(s!=null&&s.includes(i.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 s;const i=(s=o?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?s:[];return xn(t,i,e,"left")},W(e.options,he,"getLeftHeaderGroups")),e.getRightHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,o)=>{var s;const i=(s=o?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?s:[];return xn(t,i,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 s,i,r,a,l,c;return[...(s=(i=t[0])==null?void 0:i.headers)!=null?s:[],...(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 s,i;let r=0;const a=function(d,h){h===void 0&&(h=1),r=Math.max(r,h),d.filter(p=>p.getIsVisible()).forEach(p=>{var g;(g=p.columns)!=null&&g.length&&a(p.columns,h+1)},0)};a(e);let l=[];const c=(d,h)=>{const p={depth:h,id:[o,`${h}`].filter(Boolean).join("_"),headers:[]},g=[];d.forEach(m=>{const w=[...g].reverse()[0],x=m.column.depth===p.depth;let y,S=!1;if(x&&m.column.parent?y=m.column.parent:(y=m.column,S=!0),w&&w?.column===y)w.subHeaders.push(m);else{const _=ua(n,y,{id:[o,h,y.id,m?.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${g.filter(M=>M.column===y).length}`:void 0,depth:h,index:g.length});_.subHeaders.push(m),g.push(_)}p.headers.push(m),m.headerGroup=p}),l.push(p),h>0&&c(g,h-1)},u=t.map((d,h)=>ua(n,d,{depth:r,index:h}));c(u,r-1),l.reverse();const f=d=>d.filter(p=>p.column.getIsVisible()).map(p=>{let g=0,m=0,w=[0];p.subHeaders&&p.subHeaders.length?(w=[],f(p.subHeaders).forEach(y=>{let{colSpan:S,rowSpan:_}=y;g+=S,w.push(_)})):g=1;const x=Math.min(...w);return m=m+x,p.colSpan=g,p.rowSpan=m,{colSpan:g,rowSpan:m}});return f((s=(i=l[0])==null?void 0:i.headers)!=null?s:[]),l}const Iy=(e,t,n,o,s,i,r)=>{let a={id:t,index:o,original:n,depth:s,parentId:r,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return a._valuesCache[l]=c.accessorFn(a.original,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:()=>Dy(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=>ky(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},jy={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()}}},Dc=(e,t,n)=>{var o,s;const i=n==null||(o=n.toString())==null?void 0:o.toLowerCase();return!!(!((s=e.getValue(t))==null||(s=s.toString())==null||(s=s.toLowerCase())==null)&&s.includes(i))};Dc.autoRemove=e=>De(e);const kc=(e,t,n)=>{var o;return!!(!((o=e.getValue(t))==null||(o=o.toString())==null)&&o.includes(n))};kc.autoRemove=e=>De(e);const Fc=(e,t,n)=>{var o;return((o=e.getValue(t))==null||(o=o.toString())==null?void 0:o.toLowerCase())===n?.toLowerCase()};Fc.autoRemove=e=>De(e);const Lc=(e,t,n)=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(n)};Lc.autoRemove=e=>De(e);const Ic=(e,t,n)=>!n.some(o=>{var s;return!((s=e.getValue(t))!=null&&s.includes(o))});Ic.autoRemove=e=>De(e)||!(e!=null&&e.length);const jc=(e,t,n)=>n.some(o=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(o)});jc.autoRemove=e=>De(e)||!(e!=null&&e.length);const $c=(e,t,n)=>e.getValue(t)===n;$c.autoRemove=e=>De(e);const Oc=(e,t,n)=>e.getValue(t)==n;Oc.autoRemove=e=>De(e);const mi=(e,t,n)=>{let[o,s]=n;const i=e.getValue(t);return i>=o&&i<=s};mi.resolveFilterValue=e=>{let[t,n]=e,o=typeof t!="number"?parseFloat(t):t,s=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(o)?-1/0:o,r=n===null||Number.isNaN(s)?1/0:s;if(i>r){const a=i;i=r,r=a}return[i,r]};mi.autoRemove=e=>De(e)||De(e[0])&&De(e[1]);const Oe={includesString:Dc,includesStringSensitive:kc,equalsString:Fc,arrIncludes:Lc,arrIncludesAll:Ic,arrIncludesSome:jc,equals:$c,weakEquals:Oc,inNumberRange:mi};function De(e){return e==null||e===""}const $y={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ce("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"?Oe.includesString:typeof o=="number"?Oe.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?Oe.equals:Array.isArray(o)?Oe.arrIncludes:Oe.weakEquals},e.getFilterFn=()=>{var n,o;return no(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:Oe[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,o,s;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((o=t.options.enableColumnFilters)!=null?o:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(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(s=>s.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(o=>{const s=e.getFilterFn(),i=o?.find(u=>u.id===e.id),r=qe(n,i?i.value:void 0);if(da(s,r,e)){var a;return(a=o?.filter(u=>u.id!==e.id))!=null?a:[]}const l={id:e.id,value:r};if(i){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=s=>{var i;return(i=qe(t,s))==null?void 0:i.filter(r=>{const a=n.find(l=>l.id===r.id);if(a){const l=a.getFilterFn();if(da(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 da(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Oy=(e,t,n)=>n.reduce((o,s)=>{const i=s.getValue(e);return o+(typeof i=="number"?i:0)},0),Ny=(e,t,n)=>{let o;return n.forEach(s=>{const i=s.getValue(e);i!=null&&(o>i||o===void 0&&i>=i)&&(o=i)}),o},By=(e,t,n)=>{let o;return n.forEach(s=>{const i=s.getValue(e);i!=null&&(o<i||o===void 0&&i>=i)&&(o=i)}),o},zy=(e,t,n)=>{let o,s;return n.forEach(i=>{const r=i.getValue(e);r!=null&&(o===void 0?r>=r&&(o=s=r):(o>r&&(o=r),s<r&&(s=r)))}),[o,s]},Hy=(e,t)=>{let n=0,o=0;if(t.forEach(s=>{let i=s.getValue(e);i!=null&&(i=+i)>=i&&(++n,o+=i)}),n)return o/n},Wy=(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!Vy(n))return;if(n.length===1)return n[0];const o=Math.floor(n.length/2),s=n.sort((i,r)=>i-r);return n.length%2!==0?s[o]:(s[o-1]+s[o])/2},Gy=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Uy=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Ky=(e,t)=>t.length,Do={sum:Oy,min:Ny,max:By,extent:zy,mean:Hy,median:Wy,unique:Gy,uniqueCount:Uy,count:Ky},qy={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:Ce("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 Do.sum;if(Object.prototype.toString.call(o)==="[object Date]")return Do.extent},e.getAggregationFn=()=>{var n,o;if(!e)throw new Error;return no(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:Do[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 s;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((s=n.subRows)!=null&&s.length)}}};function Xy(e,t,n){if(!(t!=null&&t.length)||!n)return e;const o=e.filter(i=>!t.includes(i.id));return n==="remove"?o:[...t.map(i=>e.find(r=>r.id===i)).filter(Boolean),...o]}const Yy={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ce("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 s=qt(t,n);return((o=s[s.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)=>s=>{let i=[];if(!(t!=null&&t.length))i=s;else{const r=[...t],a=[...s];for(;a.length&&r.length;){const l=r.shift(),c=a.findIndex(u=>u.id===l);c>-1&&i.push(a.splice(c,1)[0])}i=[...i,...a]}return Xy(i,n,o)},W(e.options,"debugTable","_getOrderColumnsFn"))}},ko=()=>({left:[],right:[]}),Zy={getInitialState:e=>({columnPinning:ko(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ce("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const o=e.getLeafColumns().map(s=>s.id).filter(Boolean);t.setColumnPinning(s=>{var i,r;if(n==="right"){var a,l;return{left:((a=s?.left)!=null?a:[]).filter(f=>!(o!=null&&o.includes(f))),right:[...((l=s?.right)!=null?l:[]).filter(f=>!(o!=null&&o.includes(f))),...o]}}if(n==="left"){var c,u;return{left:[...((c=s?.left)!=null?c:[]).filter(f=>!(o!=null&&o.includes(f))),...o],right:((u=s?.right)!=null?u:[]).filter(f=>!(o!=null&&o.includes(f)))}}return{left:((i=s?.left)!=null?i:[]).filter(f=>!(o!=null&&o.includes(f))),right:((r=s?.right)!=null?r:[]).filter(f=>!(o!=null&&o.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(o=>{var s,i,r;return((s=o.columnDef.enablePinning)!=null?s:!0)&&((i=(r=t.options.enableColumnPinning)!=null?r:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:o,right:s}=t.getState().columnPinning,i=n.some(a=>o?.includes(a)),r=n.some(a=>s?.includes(a));return i?"left":r?"right":!1},e.getPinnedIndex=()=>{var n,o;const s=e.getIsPinned();return s?(n=(o=t.getState().columnPinning)==null||(o=o[s])==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,s)=>{const i=[...o??[],...s??[]];return n.filter(r=>!i.includes(r.column.id))},W(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,o)=>(o??[]).map(i=>n.find(r=>r.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),W(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,o)=>(o??[]).map(i=>n.find(r=>r.column.id===i)).filter(Boolean).map(i=>({...i,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 s,i;return!!((s=o.left)!=null&&s.length||(i=o.right)!=null&&i.length)}return!!((n=o[t])!=null&&n.length)},e.getLeftLeafColumns=H(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(o=>t.find(s=>s.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(s=>s.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 s=[...n??[],...o??[]];return t.filter(i=>!s.includes(i.id))},W(e.options,"debugColumns","getCenterLeafColumns"))}};function Jy(e){return e||(typeof document<"u"?document:null)}const Cn={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Fo=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Qy={getDefaultColumnDef:()=>Cn,getInitialState:e=>({columnSizing:{},columnSizingInfo:Fo(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ce("columnSizing",e),onColumnSizingInfoChange:Ce("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,o,s;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Cn.minSize,(o=i??e.columnDef.size)!=null?o:Cn.size),(s=e.columnDef.maxSize)!=null?s:Cn.maxSize)},e.getStart=H(n=>[n,qt(t,n),t.getState().columnSizing],(n,o)=>o.slice(0,e.getIndex(n)).reduce((s,i)=>s+i.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((s,i)=>s+i.getSize(),0),W(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:o,...s}=n;return s})},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=s=>{if(s.subHeaders.length)s.subHeaders.forEach(o);else{var i;n+=(i=s.column.getSize())!=null?i: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),s=o?.getCanResize();return i=>{if(!o||!s||(i.persist==null||i.persist(),Lo(i)&&i.touches&&i.touches.length>1))return;const r=e.getSize(),a=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[o.id,o.getSize()]],l=Lo(i)?Math.round(i.touches[0].clientX):i.clientX,c={},u=(w,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(y=>{var S,_;const M=t.options.columnResizeDirection==="rtl"?-1:1,T=(x-((S=y?.startOffset)!=null?S:0))*M,P=Math.max(T/((_=y?.startSize)!=null?_:0),-.999999);return y.columnSizingStart.forEach(D=>{let[F,j]=D;c[F]=Math.round(Math.max(j+j*P,0)*100)/100}),{...y,deltaOffset:T,deltaPercentage:P}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(y=>({...y,...c})))},f=w=>u("move",w),d=w=>{u("end",w),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=Jy(n),p={moveHandler:w=>f(w.clientX),upHandler:w=>{h?.removeEventListener("mousemove",p.moveHandler),h?.removeEventListener("mouseup",p.upHandler),d(w.clientX)}},g={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),f(w.touches[0].clientX),!1),upHandler:w=>{var x;h?.removeEventListener("touchmove",g.moveHandler),h?.removeEventListener("touchend",g.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),d((x=w.touches[0])==null?void 0:x.clientX)}},m=e0()?{passive:!1}:!1;Lo(i)?(h?.addEventListener("touchmove",g.moveHandler,m),h?.addEventListener("touchend",g.upHandler,m)):(h?.addEventListener("mousemove",p.moveHandler,m),h?.addEventListener("mouseup",p.upHandler,m)),t.setColumnSizingInfo(w=>({...w,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?Fo():(n=e.initialState.columnSizingInfo)!=null?n:Fo())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((o,s)=>o+s.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((o,s)=>o+s.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((o,s)=>o+s.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((o,s)=>o+s.getSize(),0))!=null?t:0}}};let Sn=null;function e0(){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 Lo(e){return e.type==="touchstart"}const t0={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ce("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 s=e.columns;return(n=s.length?s.some(i=>i.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,s)=>[...n,...o,...s],W(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,o)=>H(()=>[o(),o().filter(s=>s.getIsVisible()).map(s=>s.id).join("_")],s=>s.filter(i=>i.getIsVisible==null?void 0:i.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((s,i)=>({...s,[i.id]:n||!(i.getCanHide!=null&&i.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 n0={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()}}},o0={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Ce("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,s,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((o=t.options.enableGlobalFilter)!=null?o:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Oe.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:o}=e.options;return no(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[o])!=null?t:Oe[o]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},s0={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ce("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var o,s;if(!t){e._queue(()=>{t=!0});return}if((o=(s=e.options.autoResetAll)!=null?s: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 s,i;e.setExpanded(o?{}:(s=(i=e.initialState)==null?void 0:i.expanded)!=null?s:{})},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(s=>!s.getIsExpanded()))},e.getExpandedDepth=()=>{let o=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const r=i.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 s;const i=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=(s=n)!=null?s:!i,!i&&n)return{...r,[e.id]:!0};if(i&&!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,s;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((o=t.options.enableExpanding)!=null?o:!0)&&!!((s=e.subRows)!=null&&s.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()}}}},ps=0,ms=10,Io=()=>({pageIndex:ps,pageSize:ms}),i0={getInitialState:e=>({...e,pagination:{...Io(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ce("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var o,s;if(!t){e._queue(()=>{t=!0});return}if((o=(s=e.options.autoResetAll)!=null?s:e.options.autoResetPageIndex)!=null?o:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=o=>{const s=i=>qe(o,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=o=>{var s;e.setPagination(o?Io():(s=e.initialState.pagination)!=null?s:Io())},e.setPageIndex=o=>{e.setPagination(s=>{let i=qe(o,s.pageIndex);const r=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,r)),{...s,pageIndex:i}})},e.resetPageIndex=o=>{var s,i;e.setPageIndex(o?ps:(s=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?s:ps)},e.resetPageSize=o=>{var s,i;e.setPageSize(o?ms:(s=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?s:ms)},e.setPageSize=o=>{e.setPagination(s=>{const i=Math.max(1,qe(o,s.pageSize)),r=s.pageSize*s.pageIndex,a=Math.floor(r/i);return{...s,pageIndex:a,pageSize:i}})},e.setPageCount=o=>e.setPagination(s=>{var i;let r=qe(o,(i=e.options.pageCount)!=null?i:-1);return typeof r=="number"&&(r=Math.max(-1,r)),{...s,pageCount:r}}),e.getPageOptions=H(()=>[e.getPageCount()],o=>{let s=[];return o&&o>0&&(s=[...new Array(o)].fill(null).map((i,r)=>r)),s},W(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:o}=e.getState().pagination,s=e.getPageCount();return s===-1?!0:s===0?!1:o<s-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}}},jo=()=>({top:[],bottom:[]}),r0={getInitialState:e=>({rowPinning:jo(),...e}),getDefaultOptions:e=>({onRowPinningChange:Ce("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,o,s)=>{const i=o?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],r=s?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...r,e.id,...i]);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,p;return{top:[...((h=l?.top)!=null?h:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)],bottom:((p=l?.bottom)!=null?p:[]).filter(g=>!(a!=null&&a.has(g)))}}return{top:((c=l?.top)!=null?c:[]).filter(g=>!(a!=null&&a.has(g))),bottom:((u=l?.bottom)!=null?u:[]).filter(g=>!(a!=null&&a.has(g)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:s}=t.options;return typeof o=="function"?o(e):(n=o??s)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:o,bottom:s}=t.getState().rowPinning,i=n.some(a=>o?.includes(a)),r=n.some(a=>s?.includes(a));return i?"top":r?"bottom":!1},e.getPinnedIndex=()=>{var n,o;const s=e.getIsPinned();if(!s)return-1;const i=(n=s==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(r=>{let{id:a}=r;return a});return(o=i?.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?jo():(n=(o=e.initialState)==null?void 0:o.rowPinning)!=null?n:jo())},e.getIsSomeRowsPinned=t=>{var n;const o=e.getState().rowPinning;if(!t){var s,i;return!!((s=o.top)!=null&&s.length||(i=o.bottom)!=null&&i.length)}return!!((n=o[t])!=null&&n.length)},e._getPinnedRows=(t,n,o)=>{var s;return((s=e.options.keepPinnedRows)==null||s?(n??[]).map(r=>{const a=e.getRow(r,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(r=>t.find(a=>a.id===r))).filter(Boolean).map(r=>({...r,position: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 s=new Set([...n??[],...o??[]]);return t.filter(i=>!s.has(i.id))},W(e.options,"debugRows","getCenterRows"))}},a0={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ce("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},s=e.getPreGroupedRowModel().flatRows;return t?s.forEach(i=>{i.getCanSelect()&&(o[i.id]=!0)}):s.forEach(i=>{delete o[i.id]}),o})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const o=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),s={...n};return e.getRowModel().rows.forEach(i=>{vs(s,i.id,o,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=H(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?$o(e,n):{rows:[],flatRows:[],rowsById:{}},W(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=H(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?$o(e,n):{rows:[],flatRows:[],rowsById:{}},W(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=H(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?$o(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(s=>s.getCanSelect()&&!n[s.id])&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(s=>s.getCanSelect()),{rowSelection:n}=e.getState();let o=!!t.length;return o&&t.some(s=>!n[s.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 s=e.getIsSelected();t.setRowSelection(i=>{var r;if(n=typeof n<"u"?n:!s,e.getCanSelect()&&s===n)return i;const a={...i};return vs(a,e.id,n,(r=o?.selectChildren)!=null?r:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return vi(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return ys(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return ys(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 s;n&&e.toggleSelected((s=o.target)==null?void 0:s.checked)}}}},vs=(e,t,n,o,s)=>{var i;const r=s.getRow(t,!0);n?(r.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),r.getCanSelect()&&(e[t]=!0)):delete e[t],o&&(i=r.subRows)!=null&&i.length&&r.getCanSelectSubRows()&&r.subRows.forEach(a=>vs(e,a.id,n,o,s))};function $o(e,t){const n=e.getState().rowSelection,o=[],s={},i=function(r,a){return r.map(l=>{var c;const u=vi(l,n);if(u&&(o.push(l),s[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:i(l.subRows)}),u)return l}).filter(Boolean)};return{rows:i(t.rows),flatRows:o,rowsById:s}}function vi(e,t){var n;return(n=t[e.id])!=null?n:!1}function ys(e,t,n){var o;if(!((o=e.subRows)!=null&&o.length))return!1;let s=!0,i=!1;return e.subRows.forEach(r=>{if(!(i&&!s)&&(r.getCanSelect()&&(vi(r,t)?i=!0:s=!1),r.subRows&&r.subRows.length)){const a=ys(r,t);a==="all"?i=!0:(a==="some"&&(i=!0),s=!1)}}),s?"all":i?"some":!1}const ws=/([0-9]+)/gm,l0=(e,t,n)=>Nc(et(e.getValue(n)).toLowerCase(),et(t.getValue(n)).toLowerCase()),c0=(e,t,n)=>Nc(et(e.getValue(n)),et(t.getValue(n))),u0=(e,t,n)=>yi(et(e.getValue(n)).toLowerCase(),et(t.getValue(n)).toLowerCase()),d0=(e,t,n)=>yi(et(e.getValue(n)),et(t.getValue(n))),f0=(e,t,n)=>{const o=e.getValue(n),s=t.getValue(n);return o>s?1:o<s?-1:0},h0=(e,t,n)=>yi(e.getValue(n),t.getValue(n));function yi(e,t){return e===t?0:e>t?1:-1}function et(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Nc(e,t){const n=e.split(ws).filter(Boolean),o=t.split(ws).filter(Boolean);for(;n.length&&o.length;){const s=n.shift(),i=o.shift(),r=parseInt(s,10),a=parseInt(i,10),l=[r,a].sort();if(isNaN(l[0])){if(s>i)return 1;if(i>s)return-1;continue}if(isNaN(l[1]))return isNaN(r)?-1:1;if(r>a)return 1;if(a>r)return-1}return n.length-o.length}const Ht={alphanumeric:l0,alphanumericCaseSensitive:c0,text:u0,textCaseSensitive:d0,datetime:f0,basic:h0},g0={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ce("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const s of n){const i=s?.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return Ht.datetime;if(typeof i=="string"&&(o=!0,i.split(ws).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 no(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 s=e.getNextSortingOrder(),i=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=i?n:s==="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"&&(i||s||(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,s;const i=e.getFirstSortDir(),r=e.getIsSorted();return r?r!==i&&((o=t.options.enableSortingRemoval)==null||o)&&(!(n&&(s=t.options.enableMultiRemove)!=null)||s)?!1:r==="desc"?"asc":"desc":i},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(s=>s.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(s=>s.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())}},p0=[Ly,t0,Yy,Zy,jy,$y,n0,o0,g0,qy,s0,i0,r0,a0,Qy];function m0(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const o=[...p0,...(t=e._features)!=null?t:[]];let s={_features:o};const i=s._features.reduce((d,h)=>Object.assign(d,h.getDefaultOptions==null?void 0:h.getDefaultOptions(s)),{}),r=d=>s.options.mergeOptions?s.options.mergeOptions(i,d):{...i,...d};let l={...{},...(n=e.initialState)!=null?n:{}};s._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:{...i,...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:()=>{s.setState(s.initialState)},setOptions:d=>{const h=qe(d,s.options);s.options=r(h)},getState:()=>s.options.state,setState:d=>{s.options.onStateChange==null||s.options.onStateChange(d)},_getRowId:(d,h,p)=>{var g;return(g=s.options.getRowId==null?void 0:s.options.getRowId(d,h,p))!=null?g:`${p?[p.id,h].join("."):h}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(d,h)=>{let p=(h?s.getPrePaginationRowModel():s.getRowModel()).rowsById[d];if(!p&&(p=s.getCoreRowModel().rowsById[d],!p))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${d}`):new Error;return p},_getDefaultColumnDef:H(()=>[s.options.defaultColumn],d=>{var h;return d=(h=d)!=null?h:{},{header:p=>{const g=p.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:p=>{var g,m;return(g=(m=p.renderValue())==null||m.toString==null?void 0:m.toString())!=null?g:null},...s._features.reduce((p,g)=>Object.assign(p,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...d}},W(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>s.options.columns,getAllColumns:H(()=>[s._getColumnDefs()],d=>{const h=function(p,g,m){return m===void 0&&(m=0),p.map(w=>{const x=Fy(s,w,m,g),y=w;return x.columns=y.columns?h(y.columns,x,m+1):[],x})};return h(d)},W(e,"debugColumns","getAllColumns")),getAllFlatColumns:H(()=>[s.getAllColumns()],d=>d.flatMap(h=>h.getFlatColumns()),W(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:H(()=>[s.getAllFlatColumns()],d=>d.reduce((h,p)=>(h[p.id]=p,h),{}),W(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:H(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(d,h)=>{let p=d.flatMap(g=>g.getLeafColumns());return h(p)},W(e,"debugColumns","getAllLeafColumns")),getColumn:d=>{const h=s._getAllFlatColumnsById()[d];return process.env.NODE_ENV!=="production"&&!h&&console.error(`[Table] Column with id '${d}' does not exist.`),h}};Object.assign(s,f);for(let d=0;d<s._features.length;d++){const h=s._features[d];h==null||h.createTable==null||h.createTable(s)}return s}function v0(){return e=>H(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(s,i,r){i===void 0&&(i=0);const a=[];for(let c=0;c<s.length;c++){const u=Iy(e,e._getRowId(s[c],c,r),s[c],c,i,void 0,r?.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),e.options.getSubRows){var l;u.originalSubRows=e.options.getSubRows(s[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=o(u.originalSubRows,i+1,u))}}return a};return n.rows=o(t),n},W(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function y0(e){const t=[],n=o=>{var s;t.push(o),(s=o.subRows)!=null&&s.length&&o.getIsExpanded()&&o.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function w0(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:s,pageIndex:i}=n;let{rows:r,flatRows:a,rowsById:l}=o;const c=s*i,u=c+s;r=r.slice(c,u);let f;t.options.paginateExpandedRows?f={rows:r,flatRows:a,rowsById:l}:f=y0({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 x0(){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,s=[],i=o.filter(l=>{var c;return(c=e.getColumn(l.id))==null?void 0:c.getCanSort()}),r={};i.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<i.length;h+=1){var d;const p=i[h],g=r[p.id],m=g.sortUndefined,w=(d=p?.desc)!=null?d:!1;let x=0;if(m){const y=u.getValue(p.id),S=f.getValue(p.id),_=y===void 0,M=S===void 0;if(_||M){if(m==="first")return _?-1:1;if(m==="last")return _?1:-1;x=_&&M?0:_?m:-m}}if(x===0&&(x=g.sortingFn(u,f,p.id)),x!==0)return w&&(x*=-1),g.invertSorting&&(x*=-1),x}return u.index-f.index}),c.forEach(u=>{var f;s.push(u),(f=u.subRows)!=null&&f.length&&(u.subRows=a(u.subRows))}),c};return{rows:a(n.rows),flatRows:s,rowsById:n.rowsById}},W(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function fa(e,t){return e?C0(e)?b.createElement(e,t):e:null}function C0(e){return S0(e)||typeof e=="function"||b0(e)}function S0(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function b0(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function _0(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=b.useState(()=>({current:m0(t)})),[o,s]=b.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...o,...e.state},onStateChange:r=>{s(r),e.onStateChange==null||e.onStateChange(r)}})),n.current}const R0=e=>b.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("style",null,`
|
|
38
16
|
@keyframes spin {
|
|
39
17
|
from {
|
|
40
18
|
transform: rotate(0deg);
|
|
@@ -47,12 +25,15 @@
|
|
|
47
25
|
transform-origin: center;
|
|
48
26
|
animation: spin 1s linear infinite;
|
|
49
27
|
}
|
|
50
|
-
`),b.createElement("g",{className:"spinner"},b.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}),b.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"}))),Qy=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("g",{clipPath:"url(#clip0_2074_3858)"},b.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"})),b.createElement("defs",null,b.createElement("clipPath",{id:"clip0_2074_3858"},b.createElement("rect",{width:24,height:24,fill:"white"})))),e0="_table_19yhs_8",t0={table:e0},Cc=C.forwardRef(({children:e,className:t,style:n,...o},s)=>y.jsx("td",{ref:s,className:k.cx(t),style:n,...o,children:e}));Cc.displayName="TableBodyCell";const Sc=C.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:o="center",py:s="var(--spacing-sm)",px:i="var(--spacing-md)",minHeight:r="56px",...a},l)=>y.jsx(I,{row:t,justifyContent:n,alignItems:o,py:s,px:i,minHeight:r,ref:l,...a,children:e}));Sc.displayName="TableBodyCellContent";const bc=C.forwardRef(({children:e,className:t,showBorders:n=!1,isSelected:o=!1,...s},i)=>{const r=k.css({borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return y.jsx("tr",{ref:i,className:k.cx(r,t),...s,children:e})});bc.displayName="TableBodyRow";const n0=C.forwardRef(({children:e,className:t,style:n,justifyContent:o="flex-start",alignItems:s="flex-start",...i},r)=>{const a=k.css({justifyContent:o,alignItems:s,fontWeight:"inherit"});return y.jsx("th",{ref:r,className:k.cx(a,t),style:n,...i,children:e})}),oi=C.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:o="center",py:s="var(--spacing-sm)",px:i="var(--spacing-md)",minHeight:r="56px",...a},l)=>y.jsx(I,{row:t,justifyContent:n,alignItems:o,py:s,px:i,minHeight:r,ref:l,...a,children:e}));oi.displayName="TableHeadCellContent";const o0=e=>b.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M8.75 0.75L4.75 4.75L0.75 0.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),s0=e=>b.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M8.75 4.75L4.75 0.75L0.75 4.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),i0=({sortDirection:e,gap:t="5px",...n})=>y.jsxs(I,{gap:t,...n,children:[y.jsx(s0,{style:{color:e==="asc"?"var(--icon-accent)":"var(--icon-tertiary)"}}),y.jsx(o0,{style:{color:e==="desc"?"var(--icon-accent)":"var(--icon-tertiary)"}})]}),_c=({children:e,tableProps:t,gap:n="10px",...o})=>{const s=t.column.getIsSorted();return y.jsxs(oi,{style:{cursor:"pointer",userSelect:"none"},gap:n,...o,children:[e,y.jsx(i0,{sortDirection:s})]})};_c.displayName="TableHeadCellContentSortable";const Rc=C.forwardRef(({children:e,className:t,showBorders:n=!1,...o},s)=>{const i=k.css({backgroundColor:"var(--fill-bg-secondary)",borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return y.jsx("tr",{ref:s,className:k.cx(i,t),...o,children:e})});Rc.displayName="TableHeadRow";const r0=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),a0=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),l0=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.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"}),b.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"}),b.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"})),c0=(e,t)=>{const n=[];if(t<=10){for(let i=1;i<=t;i++)n.push(i);return n}const o=2,s=[];for(let i=Math.max(2,e+1-o);i<=Math.min(t-1,e+1+o);i++)s.push(i);return e+1-o>2?n.push(1,"..."):n.push(1),n.push(...s),e+1+o<t-1?n.push("...",t):t>1&&n.push(t),n},u0=({pageIndex:e,pageSize:t,totalCount:n,onPageChange:o,onPageSizeChange:s,pageSizeOptions:i=[10,20,50,100],showPageSizeSelector:r=!0,renderPageSizeSelectorDropdownItem:a=c=>c.label,renderPageSizeSelectorInputItem:l})=>{const c=Math.ceil(n/t),u=e>0,d=e<c-1,f=()=>{u&&o(e-1)},h=()=>{d&&o(e+1)},m=p=>{s(Number(p))},g=c0(e,c);return n===0?null:y.jsxs(I,{row:!0,justifyContent:"space-between",children:[y.jsxs(I,{row:!0,gap:"var(--spacing-sm)",children:[y.jsx(Wt,{onClick:f,disabled:!u,color:"neutral",size:"sm",children:y.jsx(r0,{})}),y.jsx(I,{row:!0,gap:"var(--spacing-sm)",children:g.map(p=>y.jsx(d0,{isDots:p==="...",isCurrentPage:p===e+1,disabled:p==="...",onClick:()=>o(p-1),children:p},p))}),y.jsx(Wt,{color:"neutral",size:"sm",onClick:h,disabled:!d,children:y.jsx(a0,{})})]}),r&&y.jsx(I,{children:y.jsx(sc,{value:t.toString(),size:"sm",items:i.map(p=>({value:p.toString(),label:p.toString()})),returnedValue:p=>p.value,renderDropdownItem:a,renderSingleInputItem:l,onChange:p=>m(p)})})]})},d0=({children:e,isCurrentPage:t=!1,onClick:n,isDots:o=!1,disabled:s=!1})=>{const i=k.css({cursor:s?"not-allowed":"pointer",userSelect:"none",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:t?"var(--fill-accent-secondary)":"var(--fill-bg-secondary)",borderRadius:"var(--corner-sm)",border:t?"1px solid var(--fill-accent-secondary-hover)":"1px solid var(--border-neutral-alpha-basic)"}),r=k.css({width:"24px",height:"24px",color:t?"var(--icon-secondary)":"var(--icon-tertiary)"});return y.jsx(I,{className:i,onClick:s?void 0:n,children:o?y.jsx(l0,{className:r}):y.jsx(K,{center:!0,variant:"body-2",fontWeight:"medium",children:e})})},f0=k.css({position:"relative",borderRadius:"var(--corner-md)",overflow:"hidden","&::before, &::after":{content:'""',position:"absolute",top:0,bottom:14,width:96,pointerEvents:"none",zIndex:2,transition:"opacity 0.2s ease"},"&::before":{left:0,background:"linear-gradient(to left, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"},"&::after":{right:0,background:"linear-gradient(to right, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"}}),h0=k.css({overflowX:"auto",scrollbarWidth:"thin",scrollbarColor:"var(--gray-86) var(--gray-96)"}),Ec=C.memo(({data:e,children:t,className:n,showBorders:o=!1,...s})=>{const[i,r]=C.useState(!1),[a,l]=C.useState(!1),c=C.useRef(null),u=C.useCallback(()=>{const f=c.current;if(!f)return;const{scrollLeft:h,scrollWidth:m,clientWidth:g}=f,p=m>g;r(p&&h>0),l(p&&h<m-g-1)},[]);C.useEffect(()=>{const f=c.current;if(!f)return;u();const h=new ResizeObserver(u);return h.observe(f),f.addEventListener("scroll",u),()=>{h.disconnect(),f.removeEventListener("scroll",u)}},[u,e]);const d=k.css({border:o?"1px solid var(--border-neutral-alpha-low)":"transparent","&::before":{opacity:i?1:0},"&::after":{opacity:a?1:0}});return y.jsx(I,{className:k.cx(f0,d,n),...s,children:y.jsx(I,{ref:c,className:h0,children:t})})});Ec.displayName="TableWrapper";const g0=k.css({width:"100%",maxWidth:"100%",minWidth:"max-content",borderCollapse:"collapse",borderSpacing:0,backgroundColor:"var(--fill-bg-primary)"}),m0=k.css({backgroundColor:"var(--fill-bg-secondary)",color:"var(--text-tertiary)"}),Vt=({ref:e,data:t,columns:n,showBorders:o=!0,enableSorting:s=!1,enablePagination:i=!1,enableRowSelection:r=!1,enableMultiRowSelection:a=!1,sorting:l,onSortingChange:c,columnFilters:u,onColumnFiltersChange:d,columnVisibility:f,onColumnVisibilityChange:h,pagination:m,onPaginationChange:g,rowSelection:p,onRowSelectionChange:w,totalCount:x,loading:v=!1,emptyLabels:S={title:"Nothing found",description:"No results found for “result”",action:"Reset"},loadingLabels:_={title:"Loading...",description:"Please wait or reset your promt",action:"Reset"},className:P,containerClassName:V,tableOptions:M={},onRowClick:A,getRowId:F,headCellComponent:$=n0,bodyCellComponent:z=Cc,headRowComponent:O=Rc,bodyRowComponent:D=bc,onReset:B,renderPageSizeSelectorDropdownItem:N,renderPageSizeSelectorInputItem:E})=>{const[R,T]=C.useState([]),[L,Y]=C.useState([]),[U,q]=C.useState({}),[me,J]=C.useState({pageIndex:0,pageSize:10}),[se,j]=C.useState({}),Z=l??R,ie=u??L,he=f??U,ce=m??me,Ge=p??se,At=X=>{const Q=typeof X=="function"?X(Z):X;c?c(Q):T(Q)},Dt=X=>{const Q=typeof X=="function"?X(ie):X;d?d(Q):Y(Q)},Pc=X=>{const Q=typeof X=="function"?X(he):X;h?h(Q):q(Q)},Yn=X=>{const Q=typeof X=="function"?X(ce):X;g?g(Q):J(Q)},Zn=Zy({data:t,columns:n,state:{sorting:Z,columnFilters:ie,columnVisibility:he,pagination:ce,rowSelection:Ge},onSortingChange:At,onColumnFiltersChange:Dt,onColumnVisibilityChange:Pc,onPaginationChange:Yn,onRowSelectionChange:X=>{const Q=typeof X=="function"?X(Ge):X;w?w(Q):j(Q)},getCoreRowModel:Wy(),getSortedRowModel:s?Ky():void 0,getPaginationRowModel:i?Uy():void 0,enableRowSelection:r,enableMultiRowSelection:a,getRowId:F,manualPagination:!!x,pageCount:x?Math.ceil(x/ce.pageSize):void 0,...M});C.useImperativeHandle(e,()=>Zn);const{rows:ii}=Zn.getRowModel(),Tc=(X,Q)=>{A&&A(X.original,Q)};return v?y.jsxs(I,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:k.cx(V),children:[y.jsx(Jy,{width:32,height:32,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),y.jsx(K,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:_.title}),y.jsx(K,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:_.description}),typeof _.action=="string"?y.jsx(es,{width:"auto",onClick:B,intensity:"secondary",color:"accent",children:_.action}):_.action]}):ii.length?y.jsxs(I,{w:"full",gap:"var(--spacing-xl)",className:k.cx(V),children:[y.jsx(Ec,{data:t,showBorders:o,children:y.jsxs("table",{className:k.cx(g0,t0.table,P),children:[y.jsx("thead",{className:m0,children:Zn.getHeaderGroups().map(X=>y.jsx(O,{showBorders:o,children:X.headers.map(Q=>y.jsx($,{style:{width:Q.getSize()},onClick:Q.column.getToggleSortingHandler(),children:Q.isPlaceholder?null:Xr(Q.column.columnDef.header,Q.getContext())},Q.id))},X.id))}),y.jsx("tbody",{children:ii.map((X,Q)=>y.jsx(D,{showBorders:o,isSelected:X.getIsSelected(),onClick:()=>Tc(X,Q),children:X.getVisibleCells().map(Jn=>y.jsx(z,{children:Xr(Jn.column.columnDef.cell,Jn.getContext())},Jn.id))},X.id))})]})}),i&&!v&&y.jsx(u0,{pageIndex:ce.pageIndex,pageSize:ce.pageSize,totalCount:x||t.length,renderPageSizeSelectorDropdownItem:N,renderPageSizeSelectorInputItem:E,onPageChange:X=>Yn({...ce,pageIndex:X}),onPageSizeChange:X=>Yn({...ce,pageSize:X,pageIndex:0})})]}):y.jsxs(I,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:k.cx(V),children:[y.jsx(Qy,{width:24,height:24,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),y.jsx(K,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:S.title}),y.jsx(K,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:S.description}),typeof S.action=="string"?y.jsx(es,{width:"auto",onClick:B,intensity:"secondary",color:"accent",children:S.action}):S.action]})};Vt.displayName="Table";Vt.HeadCellContent=oi;Vt.BodyCellContent=Sc;Vt.HeadCellContentSortable=_c;Vt.createColumnHelper=dc;const p0=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M9 17L14 12L9 7",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),v0="_link_aolvt_8",y0="_separator_aolvt_19",w0="_nav_aolvt_23",En={link:v0,separator:y0,nav:w0,"nav-item":"_nav-item_aolvt_29"},si=({children:e,separator:t=y.jsx(p0,{className:En.separator})})=>{const n=C.Children.toArray(e).filter(o=>C.isValidElement(o));return y.jsx("nav",{"aria-label":"breadcrumb",className:En.nav,children:n.map((o,s)=>{const i=s===n.length-1;return y.jsxs(K,{tag:"span",className:En["nav-item"],children:[C.cloneElement(o,{active:o.props.active??i}),!i&&t]},s)})})},x0=({children:e,href:t,active:n,className:o,activeClassName:s,activeElement:i,onClick:r})=>n?i||y.jsx(K,{tag:"span",variant:"body-2",fontWeight:"medium",colorName:"primary",className:k.cx(o,s),onClick:r,children:e}):y.jsx("a",{href:t,className:k.cx(En.link,o),onClick:r,children:e});si.Item=x0;si.displayName="Breadcrumbs";const C0=si,S0="_avatar_wstms_8",b0="_fullRound_wstms_15",_0="_avatar_primary_wstms_25",R0="_avatar_secondary_wstms_28",E0="_avatar_negative_wstms_31",M0="_avatar_positive_wstms_34",P0="_avatar_warning_wstms_37",T0="_avatar_neutral_wstms_40",V0="_avatar_2xsSize_wstms_83",A0="_avatar_xsSize_wstms_97",D0="_avatar_smSize_wstms_111",k0="_avatar_mdSize_wstms_125",F0="_avatar_lgSize_wstms_139",L0="_avatar_xlSize_wstms_153",I0="_avatar_2xlSize_wstms_167",yn={avatar:S0,fullRound:b0,avatar_primary:_0,avatar_secondary:R0,avatar_negative:E0,avatar_positive:M0,avatar_warning:P0,avatar_neutral:T0,avatar_2xsSize:V0,avatar_xsSize:A0,avatar_smSize:D0,avatar_mdSize:k0,avatar_lgSize:F0,avatar_xlSize:L0,avatar_2xlSize:I0};function j0({attr:e,children:t,className:n,color:o="primary",size:s="md",fullRound:i=!1,...r}){const a="avatar";return y.jsx("div",{...e,...r,className:ot(yn[a],n,Ht(yn,a,s),In(yn,a,o),{[yn.fullRound]:i}),children:t})}const ds={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"}},wn={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)"}},$0=(e,t,n,o)=>{const s=ds[t];let i=s.bg,r="none";const a=s.color;switch(e){case"outline":i="transparent",r=`1px solid ${s.border}`;break;case"clear":i="transparent";break;case"filled":default:i=s.bg;break}return k.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:i,color:a,border:r})},O0=k.css({display:"inline-flex",cursor:"pointer",opacity:.6,"&:hover":{opacity:1}}),Mc=({label:e,color:t="neutral",size:n="md",variant:o="filled",leftElement:s,rightElement:i,disabled:r,onClick:a,onDelete:l,className:c})=>{const u=$0(o,t,r,a);return y.jsxs(I,{row:!0,alignItems:"center",gap:"var(--spacing-sm)",p:wn[n].p,h:wn[n].h,overflow:"hidden",borderRadius:wn[n].corner,onClick:a,className:k.cx(u,c),children:[a&&y.jsx(ct,{}),s,y.jsx(K,{variant:wn[n].text,colorName:ds[t].colorName,textOverflow:"ellipsis",children:e}),i,l&&!r&&y.jsx(K,{className:O0,colorName:ds[t].colorName,onClick:d=>{d.stopPropagation(),l(d)},children:y.jsx(oc,{})})]})};Mc.displayName="Badge";const N0=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),b.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Yr=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.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}),b.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"}),b.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"})),B0=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),b.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),z0=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"black",...e},b.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"})),H0="_hint_prca1_8",W0="_md_prca1_19",G0="_sm_prca1_24",U0="_icon_prca1_29",K0="_content_prca1_40",q0="_title_prca1_46",X0="_subtitle_prca1_50",Y0="_disabled_prca1_55",Z0="_warning_prca1_60",J0="_solid_prca1_60",Q0="_negative_prca1_65",ew="_positive_prca1_70",tw="_accent_prca1_75",nw="_neutral_prca1_80",ow="_soft_prca1_85",be={hint:H0,md:W0,sm:G0,icon:U0,content:K0,title:q0,subtitle:X0,disabled:Y0,warning:Z0,solid:J0,negative:Q0,positive:ew,accent:tw,neutral:nw,soft:ow},sw={negative:y.jsx(B0,{}),positive:y.jsx(N0,{}),accent:y.jsx(Yr,{}),warning:y.jsx(Yr,{}),neutral:y.jsx(z0,{})},iw=({title:e,subtitle:t,color:n="warning",variant:o="soft",size:s="md",icon:i,disabled:r=!1,className:a,style:l})=>{const c=i||sw[n];return y.jsxs("div",{className:ot(be.hint,be[n],be[o],be[s],r&&be.disabled,a),style:l,"aria-disabled":r,children:[c&&y.jsx("span",{className:ot(be.icon,be[n]),children:c}),y.jsxs("div",{className:be.content,children:[e&&y.jsx(K,{className:ot(be.title,Ht(be,"title",s)),variant:s==="md"?"body-1":"caption-2",children:e}),t&&y.jsx(K,{className:ot(be.subtitle,Ht(be,"subtitle",s)),variant:s==="md"?"body-2":"caption-1",children:t})]})]})},rw=k.keyframes`
|
|
28
|
+
`),b.createElement("g",{className:"spinner"},b.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}),b.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"}))),E0=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("g",{clipPath:"url(#clip0_2074_3858)"},b.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"})),b.createElement("defs",null,b.createElement("clipPath",{id:"clip0_2074_3858"},b.createElement("rect",{width:24,height:24,fill:"white"})))),P0="_table_19yhs_8",M0={table:P0},Bc=C.forwardRef(({children:e,className:t,style:n,...o},s)=>v.jsx("td",{ref:s,className:k.cx(t),style:n,...o,children:e}));Bc.displayName="TableBodyCell";const zc=C.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:o="center",py:s="var(--spacing-sm)",px:i="var(--spacing-md)",minHeight:r="56px",...a},l)=>v.jsx(L,{row:t,justifyContent:n,alignItems:o,py:s,px:i,minHeight:r,ref:l,...a,children:e}));zc.displayName="TableBodyCellContent";const Hc=C.forwardRef(({children:e,className:t,showBorders:n=!1,isSelected:o=!1,...s},i)=>{const r=k.css({borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return v.jsx("tr",{ref:i,className:k.cx(r,t),...s,children:e})});Hc.displayName="TableBodyRow";const T0=C.forwardRef(({children:e,className:t,style:n,justifyContent:o="flex-start",alignItems:s="flex-start",...i},r)=>{const a=k.css({justifyContent:o,alignItems:s,fontWeight:"inherit"});return v.jsx("th",{ref:r,className:k.cx(a,t),style:n,...i,children:e})}),wi=C.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:o="center",py:s="var(--spacing-sm)",px:i="var(--spacing-md)",minHeight:r="56px",...a},l)=>v.jsx(L,{row:t,justifyContent:n,alignItems:o,py:s,px:i,minHeight:r,ref:l,...a,children:e}));wi.displayName="TableHeadCellContent";const A0=e=>b.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M8.75 0.75L4.75 4.75L0.75 0.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),V0=e=>b.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M8.75 4.75L4.75 0.75L0.75 4.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),D0=({sortDirection:e,gap:t="5px",...n})=>v.jsxs(L,{gap:t,...n,children:[v.jsx(V0,{style:{color:e==="asc"?"var(--icon-accent)":"var(--icon-tertiary)"}}),v.jsx(A0,{style:{color:e==="desc"?"var(--icon-accent)":"var(--icon-tertiary)"}})]}),Wc=({children:e,tableProps:t,gap:n="10px",...o})=>{const s=t.column.getIsSorted();return v.jsxs(wi,{style:{cursor:"pointer",userSelect:"none"},gap:n,...o,children:[e,v.jsx(D0,{sortDirection:s})]})};Wc.displayName="TableHeadCellContentSortable";const Gc=C.forwardRef(({children:e,className:t,showBorders:n=!1,...o},s)=>{const i=k.css({backgroundColor:"var(--fill-bg-secondary)",borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return v.jsx("tr",{ref:s,className:k.cx(i,t),...o,children:e})});Gc.displayName="TableHeadRow";const k0=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),F0=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),L0=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.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"}),b.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"}),b.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"})),I0=(e,t)=>{const n=[];if(t<=10){for(let i=1;i<=t;i++)n.push(i);return n}const o=2,s=[];for(let i=Math.max(2,e+1-o);i<=Math.min(t-1,e+1+o);i++)s.push(i);return e+1-o>2?n.push(1,"..."):n.push(1),n.push(...s),e+1+o<t-1?n.push("...",t):t>1&&n.push(t),n},j0=({pageIndex:e,pageSize:t,totalCount:n,onPageChange:o,onPageSizeChange:s,pageSizeOptions:i=[10,20,50,100],showPageSizeSelector:r=!0,renderPageSizeSelectorDropdownItem:a=c=>c.label,renderPageSizeSelectorInputItem:l})=>{const c=Math.ceil(n/t),u=e>0,f=e<c-1,d=()=>{u&&o(e-1)},h=()=>{f&&o(e+1)},p=m=>{s(Number(m))},g=I0(e,c);return n===0?null:v.jsxs(L,{row:!0,justifyContent:"space-between",children:[v.jsxs(L,{row:!0,gap:"var(--spacing-sm)",children:[v.jsx(Yt,{onClick:d,disabled:!u,color:"neutral",size:"sm",children:v.jsx(k0,{})}),v.jsx(L,{row:!0,gap:"var(--spacing-sm)",children:g.map(m=>v.jsx($0,{isDots:m==="...",isCurrentPage:m===e+1,disabled:m==="...",onClick:()=>o(m-1),children:m},m))}),v.jsx(Yt,{color:"neutral",size:"sm",onClick:h,disabled:!f,children:v.jsx(F0,{})})]}),r&&v.jsx(L,{children:v.jsx(_c,{value:t.toString(),size:"sm",items:i.map(m=>({value:m.toString(),label:m.toString()})),returnedValue:m=>m.value,renderDropdownItem:a,renderSingleInputItem:l,onChange:m=>p(m)})})]})},$0=({children:e,isCurrentPage:t=!1,onClick:n,isDots:o=!1,disabled:s=!1})=>{const i=k.css({cursor:s?"not-allowed":"pointer",userSelect:"none",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:t?"var(--fill-accent-secondary)":"var(--fill-bg-secondary)",borderRadius:"var(--corner-sm)",border:t?"1px solid var(--fill-accent-secondary-hover)":"1px solid var(--border-neutral-alpha-basic)"}),r=k.css({width:"24px",height:"24px",color:t?"var(--icon-secondary)":"var(--icon-tertiary)"});return v.jsx(L,{className:i,onClick:s?void 0:n,children:o?v.jsx(L0,{className:r}):v.jsx(q,{center:!0,variant:"body-2",fontWeight:"medium",children:e})})},O0=k.css({position:"relative",borderRadius:"var(--corner-md)",overflow:"hidden","&::before, &::after":{content:'""',position:"absolute",top:0,bottom:14,width:96,pointerEvents:"none",zIndex:2,transition:"opacity 0.2s ease"},"&::before":{left:0,background:"linear-gradient(to left, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"},"&::after":{right:0,background:"linear-gradient(to right, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"}}),N0=k.css({overflowX:"auto",scrollbarWidth:"thin",scrollbarColor:"var(--gray-86) var(--gray-96)"}),Uc=C.memo(({data:e,children:t,className:n,showBorders:o=!1,...s})=>{const[i,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:p,clientWidth:g}=d,m=p>g;r(m&&h>0),l(m&&h<p-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=k.css({border:o?"1px solid var(--border-neutral-alpha-low)":"transparent","&::before":{opacity:i?1:0},"&::after":{opacity:a?1:0}});return v.jsx(L,{className:k.cx(O0,f,n),...s,children:v.jsx(L,{ref:c,className:N0,children:t})})});Uc.displayName="TableWrapper";const B0=k.css({width:"100%",maxWidth:"100%",minWidth:"max-content",borderCollapse:"collapse",borderSpacing:0,backgroundColor:"var(--fill-bg-primary)"}),z0=k.css({backgroundColor:"var(--fill-bg-secondary)",color:"var(--text-tertiary)"}),$t=({ref:e,data:t,columns:n,showBorders:o=!0,enableSorting:s=!1,enablePagination:i=!1,enableRowSelection:r=!1,enableMultiRowSelection:a=!1,sorting:l,onSortingChange:c,columnFilters:u,onColumnFiltersChange:f,columnVisibility:d,onColumnVisibilityChange:h,pagination:p,onPaginationChange:g,rowSelection:m,onRowSelectionChange:w,totalCount:x,loading:y=!1,emptyLabels:S={title:"Nothing found",description:"No results found for “result”",action:"Reset"},loadingLabels:_={title:"Loading...",description:"Please wait or reset your promt",action:"Reset"},className:M,containerClassName:T,tableOptions:P={},onRowClick:D,getRowId:F,headCellComponent:j=T0,bodyCellComponent:$=Bc,headRowComponent:O=Gc,bodyRowComponent:V=Hc,onReset:z,renderPageSizeSelectorDropdownItem:N,renderPageSizeSelectorInputItem:E})=>{const[R,A]=C.useState([]),[I,Y]=C.useState([]),[K,U]=C.useState({}),[re,J]=C.useState({pageIndex:0,pageSize:10}),[ne,B]=C.useState({}),X=l??R,oe=u??I,de=d??K,le=p??re,ke=m??ne,nt=Z=>{const ee=typeof Z=="function"?Z(X):Z;c?c(ee):A(ee)},ot=Z=>{const ee=typeof Z=="function"?Z(oe):Z;f?f(ee):Y(ee)},st=Z=>{const ee=typeof Z=="function"?Z(de):Z;h?h(ee):U(ee)},it=Z=>{const ee=typeof Z=="function"?Z(le):Z;g?g(ee):J(ee)},Ot=_0({data:t,columns:n,state:{sorting:X,columnFilters:oe,columnVisibility:de,pagination:le,rowSelection:ke},onSortingChange:nt,onColumnFiltersChange:ot,onColumnVisibilityChange:st,onPaginationChange:it,onRowSelectionChange:Z=>{const ee=typeof Z=="function"?Z(ke):Z;w?w(ee):B(ee)},getCoreRowModel:v0(),getSortedRowModel:s?x0():void 0,getPaginationRowModel:i?w0():void 0,enableRowSelection:r,enableMultiRowSelection:a,getRowId:F,manualPagination:!!x,pageCount:x?Math.ceil(x/le.pageSize):void 0,...P});C.useImperativeHandle(e,()=>Ot);const{rows:dn}=Ot.getRowModel(),Zc=(Z,ee)=>{D&&D(Z.original,ee)};return y?v.jsxs(L,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:k.cx(T),children:[v.jsx(R0,{width:32,height:32,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),v.jsx(q,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:_.title}),v.jsx(q,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:_.description}),typeof _.action=="string"?v.jsx(cs,{width:"auto",onClick:z,intensity:"secondary",color:"accent",children:_.action}):_.action]}):dn.length?v.jsxs(L,{w:"full",gap:"var(--spacing-xl)",className:k.cx(T),children:[v.jsx(Uc,{data:t,showBorders:o,children:v.jsxs("table",{className:k.cx(B0,M0.table,M),children:[v.jsx("thead",{className:z0,children:Ot.getHeaderGroups().map(Z=>v.jsx(O,{showBorders:o,children:Z.headers.map(ee=>v.jsx(j,{style:{width:ee.getSize()},onClick:ee.column.getToggleSortingHandler(),children:ee.isPlaceholder?null:fa(ee.column.columnDef.header,ee.getContext())},ee.id))},Z.id))}),v.jsx("tbody",{children:dn.map((Z,ee)=>v.jsx(V,{showBorders:o,isSelected:Z.getIsSelected(),onClick:()=>Zc(Z,ee),children:Z.getVisibleCells().map(so=>v.jsx($,{children:fa(so.column.columnDef.cell,so.getContext())},so.id))},Z.id))})]})}),i&&!y&&v.jsx(j0,{pageIndex:le.pageIndex,pageSize:le.pageSize,totalCount:x||t.length,renderPageSizeSelectorDropdownItem:N,renderPageSizeSelectorInputItem:E,onPageChange:Z=>it({...le,pageIndex:Z}),onPageSizeChange:Z=>it({...le,pageSize:Z,pageIndex:0})})]}):v.jsxs(L,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:k.cx(T),children:[v.jsx(E0,{width:24,height:24,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),v.jsx(q,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:S.title}),v.jsx(q,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:S.description}),typeof S.action=="string"?v.jsx(cs,{width:"auto",onClick:z,intensity:"secondary",color:"accent",children:S.action}):S.action]})};$t.displayName="Table";$t.HeadCellContent=wi;$t.BodyCellContent=zc;$t.HeadCellContentSortable=Wc;$t.createColumnHelper=Vc;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}},H0={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)"]]}}},W0=(e,t,n,o,s)=>({...Oo,plotOptions:{areaspline:{marker:{enabled:!1,states:{hover:{enabled:s}}},allowPointSelect:!1}},xAxis:{...Oo.xAxis,...n},yAxis:{...Oo.yAxis,...o},series:[{type:"areaspline",data:t,...H0[e]}]}),G0=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}),Kc=({color:e="positive",data:t=[],xAxis:n,yAxis:o,containerProps:s,highcharts:i,tooltip:r})=>{const a=C.useRef(null);C.useEffect(()=>()=>{typeof a=="object"&&a?.current?.chart&&a.current.chart.destroy()},[]);const l=C.useMemo(()=>W0(e,t,n,o,!!r),[e,t,n,o,r]),c=C.useMemo(()=>r?G0(r):{enabled:!1},[r]);return v.jsx(kn.Chart,{highcharts:i,ref:a,options:l,containerProps:s,children:v.jsx(kn.Tooltip,{...c})})};Kc.displayName="LineChart";const U0={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}},K0={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)"]}},q0=(e,t)=>({...U0,series:[{type:"pie",data:[{name:"",y:Math.min(e,100)},{name:"",y:Math.max(100-e,0)}],...K0[t]}]}),qc=C.forwardRef(({highcharts:e,color:t="positive",percentage:n,label:o=r=>`${r}%`,containerProps:s},i)=>{const r=C.useRef(null),a=i||r;C.useEffect(()=>()=>{typeof a=="object"&&a?.current?.chart&&a.current.chart.destroy()},[a]);const l=C.useMemo(()=>q0(n,t),[n,t]);return v.jsx(kn.Chart,{highcharts:e,ref:a,options:l,containerProps:s,children:v.jsx(kn.Title,{children:o?.(n)})})});qc.displayName="PieProgressChart";const X0=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M9 17L14 12L9 7",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Y0="_link_aolvt_8",Z0="_separator_aolvt_19",J0="_nav_aolvt_23",Dn={link:Y0,separator:Z0,nav:J0,"nav-item":"_nav-item_aolvt_29"},xi=({children:e,separator:t=v.jsx(X0,{className:Dn.separator})})=>{const n=C.Children.toArray(e).filter(o=>C.isValidElement(o));return v.jsx("nav",{"aria-label":"breadcrumb",className:Dn.nav,children:n.map((o,s)=>{const i=s===n.length-1;return v.jsxs(q,{tag:"span",className:Dn["nav-item"],children:[C.cloneElement(o,{active:o.props.active??i}),!i&&t]},s)})})},Q0=({children:e,href:t,active:n,className:o,activeClassName:s,activeElement:i,onClick:r})=>n?i||v.jsx(q,{tag:"span",variant:"body-2",fontWeight:"medium",colorName:"primary",className:k.cx(o,s),onClick:r,children:e}):v.jsx("a",{href:t,className:k.cx(Dn.link,o),onClick:r,children:e});xi.Item=Q0;xi.displayName="Breadcrumbs";const ew=xi,tw="_avatar_wstms_8",nw="_fullRound_wstms_15",ow="_avatar_primary_wstms_25",sw="_avatar_secondary_wstms_28",iw="_avatar_negative_wstms_31",rw="_avatar_positive_wstms_34",aw="_avatar_warning_wstms_37",lw="_avatar_neutral_wstms_40",cw="_avatar_2xsSize_wstms_83",uw="_avatar_xsSize_wstms_97",dw="_avatar_smSize_wstms_111",fw="_avatar_mdSize_wstms_125",hw="_avatar_lgSize_wstms_139",gw="_avatar_xlSize_wstms_153",pw="_avatar_2xlSize_wstms_167",bn={avatar:tw,fullRound:nw,avatar_primary:ow,avatar_secondary:sw,avatar_negative:iw,avatar_positive:rw,avatar_warning:aw,avatar_neutral:lw,avatar_2xsSize:cw,avatar_xsSize:uw,avatar_smSize:dw,avatar_mdSize:fw,avatar_lgSize:hw,avatar_xlSize:gw,avatar_2xlSize:pw};function mw({attr:e,children:t,className:n,color:o="primary",size:s="md",fullRound:i=!1,...r}){const a="avatar";return v.jsx("div",{...e,...r,className:lt(bn[a],n,Xt(bn,a,s),Wn(bn,a,o),{[bn.fullRound]:i}),children:t})}const xs={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"}},_n={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)"}},vw=(e,t,n,o)=>{const s=xs[t];let i=s.bg,r="none";const a=s.color;switch(e){case"outline":i="transparent",r=`1px solid ${s.border}`;break;case"clear":i="transparent";break;default:i=s.bg;break}return k.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:i,color:a,border:r})},yw=k.css({display:"inline-flex",cursor:"pointer",opacity:.6,"&:hover":{opacity:1}}),Xc=({label:e,color:t="neutral",size:n="md",variant:o="filled",leftElement:s,rightElement:i,disabled:r,onClick:a,onDelete:l,className:c})=>{const u=vw(o,t,r,a);return v.jsxs(L,{row:!0,alignItems:"center",gap:"var(--spacing-sm)",p:_n[n].p,h:_n[n].h,overflow:"hidden",borderRadius:_n[n].corner,onClick:a,className:k.cx(u,c),children:[a&&v.jsx(pt,{}),s,v.jsx(q,{variant:_n[n].text,colorName:xs[t].colorName,textOverflow:"ellipsis",children:e}),i,l&&!r&&v.jsx(q,{className:yw,colorName:xs[t].colorName,onClick:f=>{f.stopPropagation(),l(f)},children:v.jsx(bc,{})})]})};Xc.displayName="Badge";const ww=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),b.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),ha=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.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}),b.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"}),b.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"})),xw=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),b.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),Cw=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"black",...e},b.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"})),Sw="_hint_prca1_8",bw="_md_prca1_19",_w="_sm_prca1_24",Rw="_icon_prca1_29",Ew="_content_prca1_40",Pw="_title_prca1_46",Mw="_subtitle_prca1_50",Tw="_disabled_prca1_55",Aw="_warning_prca1_60",Vw="_solid_prca1_60",Dw="_negative_prca1_65",kw="_positive_prca1_70",Fw="_accent_prca1_75",Lw="_neutral_prca1_80",Iw="_soft_prca1_85",Se={hint:Sw,md:bw,sm:_w,icon:Rw,content:Ew,title:Pw,subtitle:Mw,disabled:Tw,warning:Aw,solid:Vw,negative:Dw,positive:kw,accent:Fw,neutral:Lw,soft:Iw},jw={negative:v.jsx(xw,{}),positive:v.jsx(ww,{}),accent:v.jsx(ha,{}),warning:v.jsx(ha,{}),neutral:v.jsx(Cw,{})},$w=({title:e,subtitle:t,color:n="warning",variant:o="soft",size:s="md",icon:i,disabled:r=!1,className:a,style:l})=>{const c=i||jw[n];return v.jsxs("div",{className:lt(Se.hint,Se[n],Se[o],Se[s],r&&Se.disabled,a),style:l,"aria-disabled":r,children:[c&&v.jsx("span",{className:lt(Se.icon,Se[n]),children:c}),v.jsxs("div",{className:Se.content,children:[e&&v.jsx(q,{className:lt(Se.title,Xt(Se,"title",s)),variant:s==="md"?"body-1":"caption-2",children:e}),t&&v.jsx(q,{className:lt(Se.subtitle,Xt(Se,"subtitle",s)),variant:s==="md"?"body-2":"caption-1",children:t})]})]})},Ow=k.keyframes`
|
|
51
29
|
from {
|
|
52
30
|
opacity: 0;
|
|
53
31
|
}
|
|
54
32
|
to {
|
|
55
33
|
opacity: 1;
|
|
56
34
|
}
|
|
57
|
-
`,
|
|
35
|
+
`,Nw=k.css({animation:`${Ow} 0.2s ease-out`,boxShadow:"0 4px 20px 0 var(--effect-shadow-s)"}),Bw=({children:e,className:t,...n})=>v.jsx(L,{relative:!0,backgroundColor:"var(--fill-bg-primary)",borderRadius:"var(--corner-md)",className:k.cx(Nw,t),...n,children:e}),zw=({children:e,content:t,initialOpen:n=!1,open:o,onChange:s,placement:i="bottom",trigger:r="click",offset:a=12,closeOnBackdropClick:l=!0,closeOnEsc:c=!0,className:u,contentClassName:f,style:d,openDelay:h=200,closeDelay:p=200,zIndex:g=1,popoverContentComponent:m=Bw})=>{const[w,x]=C.useState(n),y=o??w,S=s??x,_=C.useCallback(E=>{l&&E.target===E.currentTarget&&S(!1)},[l,S]),{context:M,refs:T,floatingStyles:P}=gi({placement:i,open:y,onOpenChange:S,whileElementsMounted:ai,middleware:[li(a),ui({crossAxis:i.includes("-"),fallbackAxisSideDirection:i.includes("start")?"start":"end",padding:a}),ci({padding:a})]}),D=Fv(M,{enabled:r==="click"}),F=wc(M,{enabled:r==="hover",delay:{open:h,close:p}}),j=xc(M,{enabled:c,escapeKey:!0}),$=Sc(M),O=Cc([D,F,j,$]),V=e.ref,z=vc([T.setReference,V]),N=C.cloneElement(e,O.getReferenceProps({...e.props,ref:z,"data-state":M.open?"open":"closed"}));return v.jsxs(v.Fragment,{children:[N,y&&v.jsxs(un,{children:[r!=="hover"&&l&&v.jsx(L,{position:"fixed",top:0,right:0,bottom:0,left:0,display:"block",backgroundColor:"transparent",onClick:_,zIndex:g}),v.jsx(L,{absolute:!0,zIndex:g,className:u,ref:T.setFloating,style:{...P,...d},...O.getFloatingProps(),children:v.jsx(m,{className:f,children:t})})]})]})},Hw={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%)"},Ww=10,Gw=6,Rn=1,Uw=(e,t)=>(e==="top"||e==="bottom")&&t?`${e}-${t}`:e,Kw=(e,t,n)=>n?(e==="top"||e==="bottom")&&t?{[e==="top"?t==="start"?"borderBottomLeftRadius":"borderBottomRightRadius":t==="start"?"borderTopLeftRadius":"borderTopRightRadius"]:0}:{}:{},qw=(e,t,n)=>e==="left"||e==="right"?{width:6,height:n}:t?{width:8,height:6}:{width:n,height:6},Xw=(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},Yw=k.keyframes`
|
|
36
|
+
from { opacity: 0; transform: translateY(2px); }
|
|
37
|
+
to { opacity: 1; transform: translateY(0); }
|
|
38
|
+
`,Zw=k.css({backgroundColor:"var(--fill-bg-primary)",boxShadow:"0 4px 20px 0 var(--effect-shadow-m)",animation:`${Yw} 0.16s ease-out`,color:"var(--text-primary)",fontSize:"12px",lineHeight:"16px",fontWeight:"500",wordBreak:"break-word"}),Jw=k.css({position:"absolute",backgroundColor:"var(--fill-bg-primary)",clipPath:"var(--tooltip-arrow-shape)"}),Yc=({children:e,content:t,disabled:n=!1,initialOpen:o=!1,open:s,onChange:i,placement:r="top",trigger:a="hover",offset:l=5,showArrow:c=!0,openDelay:u=400,closeDelay:f=0,closeOnEsc:d=!0,zIndex:h=1,maxWidth:p,className:g,contentClassName:m,style:w,id:x,p:y="var(--spacing-md)",borderRadius:S="var(--corner-sm)"})=>{const[_,M]=C.useState(o),[T,P]=C.useState(null),D=s??_,F=i??M,j=C.useId(),$=x??`tooltip-${j}`,O=t==null||t==="",V=!n&&!O,z=C.useCallback(dn=>{V&&F(dn)},[V,F]),N=l+(c?Gw:0),{context:E,refs:R,floatingStyles:A,middlewareData:I,placement:Y}=gi({placement:r,open:V?D:!1,onOpenChange:z,whileElementsMounted:ai,middleware:[li(N),ui({crossAxis:r.includes("-"),fallbackAxisSideDirection:r.includes("start")?"start":"end",padding:N}),ci({padding:N}),...c&&T?[bv({element:T,padding:0})]:[]]}),K=I.arrow,U=Y.split("-")[0],re=Y.includes("-")?Y.split("-")[1]:null,J=Xw(K,U,re),ne=Uw(U,re),B=Kw(U,re,c),X=qw(U,re,Ww),oe=k.css({...B}),de=k.css({left:J.x??void 0,top:J.y??void 0,width:X.width,height:X.height,"--tooltip-arrow-shape":Hw[ne],...U==="top"&&{bottom:-X.height+Rn},...U==="bottom"&&{top:-X.height+Rn},...U==="left"&&{right:-X.width+Rn},...U==="right"&&{left:-X.width+Rn},...re==="end"&&(U==="top"||U==="bottom")&&{left:"auto",right:0}}),le=wc(E,{enabled:a==="hover"&&V,delay:{open:u,close:f},move:!1}),ke=$v(E,{enabled:a==="hover"&&V}),nt=xc(E,{enabled:d&&V,escapeKey:!0}),ot=Sc(E,{role:"tooltip"}),st=Cc([le,ke,nt,ot]),it=e.ref,oo=vc([R.setReference,it]),Ot=C.useMemo(()=>C.cloneElement(e,st.getReferenceProps({...e.props,ref:oo,"data-state":E.open?"open":"closed",...E.open?{"aria-describedby":$}:{}})),[e,st,E.open,$,oo]);return v.jsxs(v.Fragment,{children:[Ot,V&&D&&v.jsx(un,{children:v.jsx(L,{absolute:!0,zIndex:h,className:g,ref:R.setFloating,style:{...A,...w},...st.getFloatingProps({id:$}),children:v.jsxs(L,{relative:!0,maxWidth:p,p:y,borderRadius:S,className:k.cx(Zw,oe,m),children:[c&&v.jsx(L,{ref:P,className:k.cx(Jw,de)}),typeof t=="string"?v.jsx(q,{colorName:"primary",variant:"caption-1",fontWeight:"medium",children:t}):t]})})})]})};Yc.displayName="Tooltip";const Qw="_themeProviderScoped_wp43s_9",ex={themeProviderScoped:Qw};function tx({className:e,children:t,theme:n}){const o=C.useRef(null);return v.jsx(Ac.Provider,{value:o,children:v.jsx("div",{ref:o,className:lt(ex.themeProviderScoped,e),id:"theme-provider-scoped","data-theme":n,children:t})})}exports.AnimatedText=Ql;exports.Avatar=mw;exports.Badge=Xc;exports.Box=L;exports.Breadcrumbs=ew;exports.Button=cs;exports.Checkbox=ti;exports.Hint=$w;exports.IconButton=Yt;exports.Input=ec;exports.LineChart=Kc;exports.Loader=pa;exports.Modal=to;exports.OtpInput=tc;exports.PieProgressChart=qc;exports.Popover=zw;exports.Portal=un;exports.Radio=oc;exports.RadioGroup=sc;exports.Ripple=pt;exports.SegmentControl=lm;exports.Select=_c;exports.Switch=Rc;exports.Table=$t;exports.Tabs=Ec;exports.Tag=pi;exports.Text=q;exports.ThemeProviderScoped=tx;exports.Tooltip=Yc;exports.createColumnHelper=Vc;exports.getSizeClass=Xt;exports.getStyleClass=Wn;exports.useControlled=mt;
|
|
58
39
|
//# sourceMappingURL=ui-kit.cjs.js.map
|