@workokay/atom 0.2.32 → 0.2.33

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/index.cjs CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),Mr=require("react-dom");function Vc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const y=Vc(x),Fc=Vc(Mr);var Kn={exports:{}},mn={};var Sa;function ph(){if(Sa)return mn;Sa=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var i in o)i!=="key"&&(s[i]=o[i])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:s}}return mn.Fragment=t,mn.jsx=n,mn.jsxs=n,mn}var hn={};var Da;function gh(){return Da||(Da=1,process.env.NODE_ENV!=="production"&&(function(){function e(P){if(P==null)return null;if(typeof P=="function")return P.$$typeof===j?null:P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case g:return"Fragment";case C:return"Profiler";case v:return"StrictMode";case T:return"Suspense";case E:return"SuspenseList";case M:return"Activity"}if(typeof P=="object")switch(typeof P.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),P.$$typeof){case h:return"Portal";case S:return P.displayName||"Context";case w:return(P._context.displayName||"Context")+".Consumer";case k:var Y=P.render;return P=P.displayName,P||(P=Y.displayName||Y.name||"",P=P!==""?"ForwardRef("+P+")":"ForwardRef"),P;case D:return Y=P.displayName||null,Y!==null?Y:e(P.type)||"Memo";case A:Y=P._payload,P=P._init;try{return e(P(Y))}catch{}}return null}function t(P){return""+P}function n(P){try{t(P);var Y=!1}catch{Y=!0}if(Y){Y=console;var G=Y.error,X=typeof Symbol=="function"&&Symbol.toStringTag&&P[Symbol.toStringTag]||P.constructor.name||"Object";return G.call(Y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",X),t(P)}}function r(P){if(P===g)return"<>";if(typeof P=="object"&&P!==null&&P.$$typeof===A)return"<...>";try{var Y=e(P);return Y?"<"+Y+">":"<...>"}catch{return"<...>"}}function o(){var P=_.A;return P===null?null:P.getOwner()}function s(){return Error("react-stack-top-frame")}function a(P){if(B.call(P,"key")){var Y=Object.getOwnPropertyDescriptor(P,"key").get;if(Y&&Y.isReactWarning)return!1}return P.key!==void 0}function i(P,Y){function G(){$||($=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Y))}G.isReactWarning=!0,Object.defineProperty(P,"key",{get:G,configurable:!0})}function c(){var P=e(this.type);return W[P]||(W[P]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),P=this.props.ref,P!==void 0?P:null}function l(P,Y,G,X,xe,Pe){var R=G.ref;return P={$$typeof:b,type:P,key:Y,props:G,_owner:X},(R!==void 0?R:null)!==null?Object.defineProperty(P,"ref",{enumerable:!1,get:c}):Object.defineProperty(P,"ref",{enumerable:!1,value:null}),P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(P,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(P,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:xe}),Object.defineProperty(P,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Pe}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P}function u(P,Y,G,X,xe,Pe){var R=Y.children;if(R!==void 0)if(X)if(z(R)){for(X=0;X<R.length;X++)d(R[X]);Object.freeze&&Object.freeze(R)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(R);if(B.call(Y,"key")){R=e(P);var U=Object.keys(Y).filter(function(Z){return Z!=="key"});X=0<U.length?"{key: someKey, "+U.join(": ..., ")+": ...}":"{key: someKey}",ee[R+X]||(U=0<U.length?"{"+U.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),Fn=require("react-dom");function Wc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const g=Wc(w),Bc=Wc(Fn);var Qn={exports:{}},hn={};var Ea;function Nh(){if(Ea)return hn;Ea=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var i in o)i!=="key"&&(s[i]=o[i])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:s}}return hn.Fragment=t,hn.jsx=n,hn.jsxs=n,hn}var pn={};var Pa;function Ah(){return Pa||(Pa=1,process.env.NODE_ENV!=="production"&&(function(){function e(P){if(P==null)return null;if(typeof P=="function")return P.$$typeof===j?null:P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case b:return"Fragment";case C:return"Profiler";case v:return"StrictMode";case T:return"Suspense";case E:return"SuspenseList";case M:return"Activity"}if(typeof P=="object")switch(typeof P.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),P.$$typeof){case p:return"Portal";case k:return P.displayName||"Context";case x:return(P._context.displayName||"Context")+".Consumer";case S:var Y=P.render;return P=P.displayName,P||(P=Y.displayName||Y.name||"",P=P!==""?"ForwardRef("+P+")":"ForwardRef"),P;case D:return Y=P.displayName||null,Y!==null?Y:e(P.type)||"Memo";case N:Y=P._payload,P=P._init;try{return e(P(Y))}catch{}}return null}function t(P){return""+P}function n(P){try{t(P);var Y=!1}catch{Y=!0}if(Y){Y=console;var G=Y.error,X=typeof Symbol=="function"&&Symbol.toStringTag&&P[Symbol.toStringTag]||P.constructor.name||"Object";return G.call(Y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",X),t(P)}}function r(P){if(P===b)return"<>";if(typeof P=="object"&&P!==null&&P.$$typeof===N)return"<...>";try{var Y=e(P);return Y?"<"+Y+">":"<...>"}catch{return"<...>"}}function o(){var P=_.A;return P===null?null:P.getOwner()}function s(){return Error("react-stack-top-frame")}function a(P){if(B.call(P,"key")){var Y=Object.getOwnPropertyDescriptor(P,"key").get;if(Y&&Y.isReactWarning)return!1}return P.key!==void 0}function i(P,Y){function G(){$||($=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Y))}G.isReactWarning=!0,Object.defineProperty(P,"key",{get:G,configurable:!0})}function c(){var P=e(this.type);return W[P]||(W[P]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),P=this.props.ref,P!==void 0?P:null}function l(P,Y,G,X,we,Pe){var A=G.ref;return P={$$typeof:y,type:P,key:Y,props:G,_owner:X},(A!==void 0?A:null)!==null?Object.defineProperty(P,"ref",{enumerable:!1,get:c}):Object.defineProperty(P,"ref",{enumerable:!1,value:null}),P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(P,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(P,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:we}),Object.defineProperty(P,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Pe}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P}function u(P,Y,G,X,we,Pe){var A=Y.children;if(A!==void 0)if(X)if(z(A)){for(X=0;X<A.length;X++)d(A[X]);Object.freeze&&Object.freeze(A)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(A);if(B.call(Y,"key")){A=e(P);var U=Object.keys(Y).filter(function(Z){return Z!=="key"});X=0<U.length?"{key: someKey, "+U.join(": ..., ")+": ...}":"{key: someKey}",ee[A+X]||(U=0<U.length?"{"+U.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
2
  let props = %s;
3
3
  <%s {...props} />
4
4
  React keys must be passed directly to JSX without using spread:
5
5
  let props = %s;
6
- <%s key={someKey} {...props} />`,X,R,U,R),ee[R+X]=!0)}if(R=null,G!==void 0&&(n(G),R=""+G),a(Y)&&(n(Y.key),R=""+Y.key),"key"in Y){G={};for(var ne in Y)ne!=="key"&&(G[ne]=Y[ne])}else G=Y;return R&&i(G,typeof P=="function"?P.displayName||P.name||"Unknown":P),l(P,R,G,o(),xe,Pe)}function d(P){f(P)?P._store&&(P._store.validated=1):typeof P=="object"&&P!==null&&P.$$typeof===A&&(P._payload.status==="fulfilled"?f(P._payload.value)&&P._payload.value._store&&(P._payload.value._store.validated=1):P._store&&(P._store.validated=1))}function f(P){return typeof P=="object"&&P!==null&&P.$$typeof===b}var m=x,b=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),S=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),j=Symbol.for("react.client.reference"),_=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=Object.prototype.hasOwnProperty,z=Array.isArray,K=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(P){return P()}};var $,W={},N=m.react_stack_bottom_frame.bind(m,s)(),H=K(r(s)),ee={};hn.Fragment=g,hn.jsx=function(P,Y,G){var X=1e4>_.recentlyCreatedOwnerStacks++;return u(P,Y,G,!1,X?Error("react-stack-top-frame"):N,X?K(r(P)):H)},hn.jsxs=function(P,Y,G){var X=1e4>_.recentlyCreatedOwnerStacks++;return u(P,Y,G,!0,X?Error("react-stack-top-frame"):N,X?K(r(P)):H)}})()),hn}var Ta;function yh(){return Ta||(Ta=1,process.env.NODE_ENV==="production"?Kn.exports=ph():Kn.exports=gh()),Kn.exports}var p=yh();function Lc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Lc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Wc(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Lc(e))&&(r&&(r+=" "),r+=t);return r}const Ea=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Pa=Wc,te=(e,t)=>n=>{var r;if(t?.variants==null)return Pa(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(l=>{const u=n?.[l],d=s?.[l];if(u===null)return null;const f=Ea(u)||Ea(d);return o[l][f]}),i=n&&Object.entries(n).reduce((l,u)=>{let[d,f]=u;return f===void 0||(l[d]=f),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,u)=>{let{class:d,className:f,...m}=u;return Object.entries(m).every(b=>{let[h,g]=b;return Array.isArray(g)?g.includes({...s,...i}[h]):{...s,...i}[h]===g})?[...l,d,f]:l},[]);return Pa(e,a,c,n?.class,n?.className)};function Ma(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Vn(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Ma(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Ma(e[o],null)}}}}function ke(...e){return y.useCallback(Vn(...e),e)}var bh=Symbol.for("react.lazy"),pr=y[" use ".trim().toString()];function vh(e){return typeof e=="object"&&e!==null&&"then"in e}function Bc(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===bh&&"_payload"in e&&vh(e._payload)}function xh(e){const t=wh(e),n=y.forwardRef((r,o)=>{let{children:s,...a}=r;Bc(s)&&typeof pr=="function"&&(s=pr(s._payload));const i=y.Children.toArray(s),c=i.find(kh);if(c){const l=c.props.children,u=i.map(d=>d===c?y.Children.count(l)>1?y.Children.only(null):y.isValidElement(l)?l.props.children:null:d);return p.jsx(t,{...a,ref:o,children:y.isValidElement(l)?y.cloneElement(l,void 0,u):null})}return p.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var je=xh("Slot");function wh(e){const t=y.forwardRef((n,r)=>{let{children:o,...s}=n;if(Bc(o)&&typeof pr=="function"&&(o=pr(o._payload)),y.isValidElement(o)){const a=Dh(o),i=Sh(s,o.props);return o.type!==y.Fragment&&(i.ref=r?Vn(r,a):a),y.cloneElement(o,i)}return y.Children.count(o)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ch=Symbol("radix.slottable");function kh(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ch}function Sh(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Dh(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Th=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Eh=(e,t)=>({classGroupId:e,validator:t}),$c=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),gr="-",Aa=[],Ph="arbitrary..",Mh=e=>{const t=Rh(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Ah(a);const i=a.split(gr),c=i[0]===""&&i.length>1?1:0;return zc(i,c,t)},getConflictingClassGroupIds:(a,i)=>{if(i){const c=r[a],l=n[a];return c?l?Th(l,c):c:l||Aa}return n[a]||Aa}}},zc=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const l=zc(e,t+1,s);if(l)return l}const a=n.validators;if(a===null)return;const i=t===0?e.join(gr):e.slice(t).join(gr),c=a.length;for(let l=0;l<c;l++){const u=a[l];if(u.validator(i))return u.classGroupId}},Ah=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Ph+r:void 0})(),Rh=e=>{const{theme:t,classGroups:n}=e;return Nh(n,t)},Nh=(e,t)=>{const n=$c();for(const r in e){const o=e[r];ds(o,n,r,t)}return n},ds=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const a=e[s];Oh(a,t,n,r)}},Oh=(e,t,n,r)=>{if(typeof e=="string"){jh(e,t,n);return}if(typeof e=="function"){_h(e,t,n,r);return}Ih(e,t,n,r)},jh=(e,t,n)=>{const r=e===""?t:Yc(t,e);r.classGroupId=n},_h=(e,t,n,r)=>{if(Vh(e)){ds(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Eh(n,e))},Ih=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let a=0;a<s;a++){const[i,c]=o[a];ds(c,Yc(t,i),n,r)}},Yc=(e,t)=>{let n=e;const r=t.split(gr),o=r.length;for(let s=0;s<o;s++){const a=r[s];let i=n.nextPart.get(a);i||(i=$c(),n.nextPart.set(a,i)),n=i}return n},Vh=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Fh=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,a)=>{n[s]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let a=n[s];if(a!==void 0)return a;if((a=r[s])!==void 0)return o(s,a),a},set(s,a){s in n?n[s]=a:o(s,a)}}},No="!",Ra=":",Lh=[],Na=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Wh=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let a=0,i=0,c=0,l;const u=o.length;for(let h=0;h<u;h++){const g=o[h];if(a===0&&i===0){if(g===Ra){s.push(o.slice(c,h)),c=h+1;continue}if(g==="/"){l=h;continue}}g==="["?a++:g==="]"?a--:g==="("?i++:g===")"&&i--}const d=s.length===0?o:o.slice(c);let f=d,m=!1;d.endsWith(No)?(f=d.slice(0,-1),m=!0):d.startsWith(No)&&(f=d.slice(1),m=!0);const b=l&&l>c?l-c:void 0;return Na(s,m,f,b)};if(t){const o=t+Ra,s=r;r=a=>a.startsWith(o)?s(a.slice(o.length)):Na(Lh,!1,a,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},Bh=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const a=n[s],i=a[0]==="[",c=t.has(a);i||c?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},$h=e=>({cache:Fh(e.cacheSize),parseClassName:Wh(e),sortModifiers:Bh(e),...Mh(e)}),zh=/\s+/,Yh=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,a=[],i=e.trim().split(zh);let c="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{isExternal:d,modifiers:f,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:h}=n(u);if(d){c=u+(c.length>0?" "+c:c);continue}let g=!!h,v=r(g?b.substring(0,h):b);if(!v){if(!g){c=u+(c.length>0?" "+c:c);continue}if(v=r(b),!v){c=u+(c.length>0?" "+c:c);continue}g=!1}const C=f.length===0?"":f.length===1?f[0]:s(f).join(":"),w=m?C+No:C,S=w+v;if(a.indexOf(S)>-1)continue;a.push(S);const k=o(v,g);for(let T=0;T<k.length;++T){const E=k[T];a.push(w+E)}c=u+(c.length>0?" "+c:c)}return c},Hh=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Hc(n))&&(o&&(o+=" "),o+=r);return o},Hc=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Hc(e[r]))&&(n&&(n+=" "),n+=t);return n},Gh=(e,...t)=>{let n,r,o,s;const a=c=>{const l=t.reduce((u,d)=>d(u),e());return n=$h(l),r=n.cache.get,o=n.cache.set,s=i,i(c)},i=c=>{const l=r(c);if(l)return l;const u=Yh(c,n);return o(c,u),u};return s=a,(...c)=>s(Hh(...c))},Uh=[],be=e=>{const t=n=>n[e]||Uh;return t.isThemeGetter=!0,t},Gc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Uc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qh=/^\d+\/\d+$/,Kh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Zh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Qh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Jh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_t=e=>qh.test(e),J=e=>!!e&&!Number.isNaN(Number(e)),ut=e=>!!e&&Number.isInteger(Number(e)),Zr=e=>e.endsWith("%")&&J(e.slice(0,-1)),rt=e=>Kh.test(e),ep=()=>!0,tp=e=>Xh.test(e)&&!Zh.test(e),qc=()=>!1,np=e=>Qh.test(e),rp=e=>Jh.test(e),op=e=>!V(e)&&!F(e),sp=e=>tn(e,Zc,qc),V=e=>Gc.test(e),Ct=e=>tn(e,Qc,tp),Qr=e=>tn(e,up,J),Oa=e=>tn(e,Kc,qc),ap=e=>tn(e,Xc,rp),Xn=e=>tn(e,Jc,np),F=e=>Uc.test(e),pn=e=>nn(e,Qc),ip=e=>nn(e,dp),ja=e=>nn(e,Kc),cp=e=>nn(e,Zc),lp=e=>nn(e,Xc),Zn=e=>nn(e,Jc,!0),tn=(e,t,n)=>{const r=Gc.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},nn=(e,t,n=!1)=>{const r=Uc.exec(e);return r?r[1]?t(r[1]):n:!1},Kc=e=>e==="position"||e==="percentage",Xc=e=>e==="image"||e==="url",Zc=e=>e==="length"||e==="size"||e==="bg-size",Qc=e=>e==="length",up=e=>e==="number",dp=e=>e==="family-name",Jc=e=>e==="shadow",fp=()=>{const e=be("color"),t=be("font"),n=be("text"),r=be("font-weight"),o=be("tracking"),s=be("leading"),a=be("breakpoint"),i=be("container"),c=be("spacing"),l=be("radius"),u=be("shadow"),d=be("inset-shadow"),f=be("text-shadow"),m=be("drop-shadow"),b=be("blur"),h=be("perspective"),g=be("aspect"),v=be("ease"),C=be("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...S(),F,V],T=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],D=()=>[F,V,c],A=()=>[_t,"full","auto",...D()],M=()=>[ut,"none","subgrid",F,V],j=()=>["auto",{span:["full",ut,F,V]},ut,F,V],_=()=>[ut,"auto",F,V],B=()=>["auto","min","max","fr",F,V],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...D()],W=()=>[_t,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],N=()=>[e,F,V],H=()=>[...S(),ja,Oa,{position:[F,V]}],ee=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",cp,sp,{size:[F,V]}],Y=()=>[Zr,pn,Ct],G=()=>["","none","full",l,F,V],X=()=>["",J,pn,Ct],xe=()=>["solid","dashed","dotted","double"],Pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>[J,Zr,ja,Oa],U=()=>["","none",b,F,V],ne=()=>["none",J,F,V],Z=()=>["none",J,F,V],re=()=>[J,F,V],ye=()=>[_t,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[rt],breakpoint:[rt],color:[ep],container:[rt],"drop-shadow":[rt],ease:["in","out","in-out"],font:[op],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[rt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[rt],shadow:[rt],spacing:["px",J],text:[rt],"text-shadow":[rt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_t,V,F,g]}],container:["container"],columns:[{columns:[J,V,F,i]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[ut,"auto",F,V]}],basis:[{basis:[_t,"full","auto",i,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[J,_t,"auto","initial","none",V]}],grow:[{grow:["",J,F,V]}],shrink:[{shrink:["",J,F,V]}],order:[{order:[ut,"first","last","none",F,V]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[i,"screen",...W()]}],"min-w":[{"min-w":[i,"screen","none",...W()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",n,pn,Ct]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,F,Qr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Zr,V]}],"font-family":[{font:[ip,V,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,F,V]}],"line-clamp":[{"line-clamp":[J,"none",F,Qr]}],leading:[{leading:[s,...D()]}],"list-image":[{"list-image":["none",F,V]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",F,V]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...xe(),"wavy"]}],"text-decoration-thickness":[{decoration:[J,"from-font","auto",F,Ct]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[J,"auto",F,V]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",F,V]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",F,V]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:H()}],"bg-repeat":[{bg:ee()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ut,F,V],radial:["",F,V],conic:[ut,F,V]},lp,ap]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:Y()}],"gradient-via-pos":[{via:Y()}],"gradient-to-pos":[{to:Y()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...xe(),"hidden","none"]}],"divide-style":[{divide:[...xe(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...xe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[J,F,V]}],"outline-w":[{outline:["",J,pn,Ct]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",u,Zn,Xn]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",d,Zn,Xn]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[J,Ct]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",f,Zn,Xn]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[J,F,V]}],"mix-blend":[{"mix-blend":[...Pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[J]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[F,V]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[J]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H()}],"mask-repeat":[{mask:ee()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",F,V]}],filter:[{filter:["","none",F,V]}],blur:[{blur:U()}],brightness:[{brightness:[J,F,V]}],contrast:[{contrast:[J,F,V]}],"drop-shadow":[{"drop-shadow":["","none",m,Zn,Xn]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",J,F,V]}],"hue-rotate":[{"hue-rotate":[J,F,V]}],invert:[{invert:["",J,F,V]}],saturate:[{saturate:[J,F,V]}],sepia:[{sepia:["",J,F,V]}],"backdrop-filter":[{"backdrop-filter":["","none",F,V]}],"backdrop-blur":[{"backdrop-blur":U()}],"backdrop-brightness":[{"backdrop-brightness":[J,F,V]}],"backdrop-contrast":[{"backdrop-contrast":[J,F,V]}],"backdrop-grayscale":[{"backdrop-grayscale":["",J,F,V]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[J,F,V]}],"backdrop-invert":[{"backdrop-invert":["",J,F,V]}],"backdrop-opacity":[{"backdrop-opacity":[J,F,V]}],"backdrop-saturate":[{"backdrop-saturate":[J,F,V]}],"backdrop-sepia":[{"backdrop-sepia":["",J,F,V]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",F,V]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[J,"initial",F,V]}],ease:[{ease:["linear","initial",v,F,V]}],delay:[{delay:[J,F,V]}],animate:[{animate:["none",C,F,V]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,F,V]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:re()}],"skew-x":[{"skew-x":re()}],"skew-y":[{"skew-y":re()}],transform:[{transform:[F,V,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",F,V]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",F,V]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[J,pn,Ct,Qr]}],stroke:[{stroke:["none",...N()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},mp=Gh(fp);function O(...e){return mp(Wc(e))}const hp=te("inline-flex items-center justify-center whitespace-nowrap select-none disabled:opacity-50 disabled:pointer-events-none rounded-md font-medium leading-none focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--atom-ring-color)] focus-visible:ring-offset-[var(--atom-ring-offset)] transition-colors transition-transform duration-150 ease-in-out relative overflow-hidden isolate [&>svg]:fill-current [&>svg]:stroke-current motion-reduce:transform-none motion-reduce:transition-none",{variants:{variant:{primary:"text-[var(--atom-button-fg)] bg-[var(--atom-button-bg)] hover:bg-[var(--atom-button-bg-hover)]",ghost:"text-[var(--atom-button-ghost-fg)] bg-[var(--atom-button-ghost-bg)] hover:bg-[var(--atom-button-ghost-hover-bg)]",success:"text-[var(--atom-button-success-fg)] bg-[var(--atom-button-success-bg)] hover:bg-[var(--atom-button-success-bg-hover)]",danger:"text-[var(--atom-button-danger-fg)] bg-[var(--atom-button-danger-bg)] hover:bg-[var(--atom-button-danger-bg-hover)]",warning:"text-[var(--atom-button-warning-fg)] bg-[var(--atom-button-warning-bg)] hover:bg-[var(--atom-button-warning-bg-hover)]",info:"text-[var(--atom-button-info-fg)] bg-[var(--atom-button-info-bg)] hover:bg-[var(--atom-button-info-bg-hover)]",icon:"rounded-full p-0 text-[var(--atom-button-ghost-fg)] bg-transparent hover:bg-[var(--atom-button-ghost-hover-bg)]",iconGhost:"rounded-full p-0 text-[var(--atom-button-ghost-fg)] bg-transparent hover:bg-[var(--atom-button-ghost-hover-bg)]",iconSquare:"rounded-md p-0 text-[var(--atom-button-ghost-fg)] bg-transparent hover:bg-[var(--atom-button-ghost-hover-bg)]",iconSquareGhost:"rounded-md p-0 text-[var(--atom-button-ghost-fg)] bg-transparent hover:bg-[var(--atom-button-ghost-hover-bg)]",secondary:"border border-[var(--atom-border)] text-[var(--atom-primary)] bg-transparent hover:border-[color-mix(in srgb, var(--atom-primary) 80%, black)] hover:text-[color-mix(in srgb, var(--atom-primary) 90%, black)] hover:bg-[var(--atom-button-ghost-hover-bg)] hover:text-[var(--atom-primary)]"},size:{sm:"h-8 px-3 text-sm [&>svg]:size-4",md:"h-10 px-4 text-sm [&>svg]:size-5",lg:"h-12 px-5 text-base [&>svg]:size-6"},fullWidth:{true:"w-full"}},compoundVariants:[{variant:"icon",size:"sm",class:"w-8 h-8 !px-0 aspect-square"},{variant:"icon",size:"md",class:"w-10 h-10 !px-0 aspect-square"},{variant:"icon",size:"lg",class:"w-12 h-12 !px-0 aspect-square"},{variant:"iconGhost",size:"sm",class:"w-8 h-8 !px-0 aspect-square"},{variant:"iconGhost",size:"md",class:"w-10 h-10 !px-0 aspect-square"},{variant:"iconGhost",size:"lg",class:"w-12 h-12 !px-0 aspect-square"},{variant:"iconSquare",size:"sm",class:"w-8 h-8 !px-0 aspect-square"},{variant:"iconSquare",size:"md",class:"w-10 h-10 !px-0 aspect-square"},{variant:"iconSquare",size:"lg",class:"w-12 h-12 !px-0 aspect-square"},{variant:"iconSquareGhost",size:"sm",class:"w-8 h-8 !px-0 aspect-square"},{variant:"iconSquareGhost",size:"md",class:"w-10 h-10 !px-0 aspect-square"},{variant:"iconSquareGhost",size:"lg",class:"w-12 h-12 !px-0 aspect-square"},{variant:"icon",class:"hover:scale-105 active:scale-95 hover:opacity-90"},{variant:"iconGhost",class:"hover:scale-105 active:scale-95 hover:opacity-90"},{variant:"iconSquare",class:"hover:scale-105 active:scale-95 hover:opacity-90"},{variant:"iconSquareGhost",class:"hover:scale-105 active:scale-95 hover:opacity-90"}],defaultVariants:{variant:"primary",size:"md"}}),fs=y.forwardRef(({className:e,variant:t,size:n,fullWidth:r,asChild:o,ripple:s=!0,onPointerDown:a,disabled:i,type:c,...l},u)=>{const d=!!o,f=d?je:"button",m=y.useRef(null),b=i?"":void 0,h=d?void 0:c??"button",g=v=>{if(a?.(v),!s||i||v.button!==0)return;const C=m.current;if(!C)return;const w=C.getBoundingClientRect(),T=Math.max(w.width,w.height)*(n==="sm"?.5:n==="lg"?.7:.6),E=v.clientX-w.left-T,D=v.clientY-w.top-T,A=document.createElement("span");A.className="atom-ripple",A.style.width=`${T*2}px`,A.style.height=`${T*2}px`,A.style.left=`${E}px`,A.style.top=`${D}px`;const M=(t??"primary")==="ghost"||t==="icon"||t==="iconGhost"||t==="iconSquare"||t==="iconSquareGhost"||t==="secondary",j=getComputedStyle(C).getPropertyValue(M?"--atom-ripple-color-ghost":"--atom-ripple-color-solid").trim();A.style.background=j||"currentColor",C.appendChild(A),A.addEventListener("animationend",()=>A.remove(),{once:!0})};return p.jsx(f,{...l,"data-disabled":b,"aria-disabled":d&&i?!0:void 0,type:h,ref:v=>{m.current=v,typeof u=="function"?u(v):u&&(u.current=v)},onPointerDown:g,className:O(hp({variant:t,size:n,fullWidth:r}),e),disabled:d?void 0:i})});fs.displayName="Button";const el=te(["inline-flex items-center justify-center","whitespace-nowrap shrink-0 w-fit","gap-1","rounded-md border","px-2 py-0.5","text-xs font-medium","[&>svg]:size-3 [&>svg]:pointer-events-none","transition-[color,background-color,border-color,box-shadow]","overflow-hidden","focus-visible:outline-none","focus-visible:ring-[3px] focus-visible:ring-[color:var(--atom-ring-color)]","focus-visible:ring-offset-2 focus-visible:ring-offset-[color:var(--atom-ring-offset)]"].join(" "),{variants:{variant:{primary:"",secondary:"",success:"",warning:"",danger:"",info:"",neutral:"",accent:""},tone:{low:"",medium:"",high:""}},compoundVariants:[{variant:"primary",tone:"low",className:"bg-[var(--atom-badge-primary-bg-low)] text-[var(--atom-badge-primary-fg-low)] border-[var(--atom-badge-primary-border-low)]"},{variant:"primary",tone:"medium",className:"bg-[var(--atom-badge-primary-bg-medium)] text-[var(--atom-badge-primary-fg-medium)] border-[var(--atom-badge-primary-border-medium)]"},{variant:"primary",tone:"high",className:"bg-[var(--atom-badge-primary-bg-high)] text-[var(--atom-badge-primary-fg-high)] border-[var(--atom-badge-primary-border-high)]"},{variant:"secondary",tone:"low",className:"bg-[var(--atom-badge-secondary-bg-low)] text-[var(--atom-badge-secondary-fg-low)] border-[var(--atom-badge-secondary-border-low)]"},{variant:"secondary",tone:"medium",className:"bg-[var(--atom-badge-secondary-bg-medium)] text-[var(--atom-badge-secondary-fg-medium)] border-[var(--atom-badge-secondary-border-medium)]"},{variant:"secondary",tone:"high",className:"bg-[var(--atom-badge-secondary-bg-high)] text-[var(--atom-badge-secondary-fg-high)] border-[var(--atom-badge-secondary-border-high)]"},{variant:"success",tone:"low",className:"bg-[var(--atom-badge-success-bg-low)] text-[var(--atom-badge-success-fg-low)] border-[var(--atom-badge-success-border-low)]"},{variant:"success",tone:"medium",className:"bg-[var(--atom-badge-success-bg-medium)] text-[var(--atom-badge-success-fg-medium)] border-[var(--atom-badge-success-border-medium)]"},{variant:"success",tone:"high",className:"bg-[var(--atom-badge-success-bg-high)] text-[var(--atom-badge-success-fg-high)] border-[var(--atom-badge-success-border-high)]"},{variant:"warning",tone:"low",className:"bg-[var(--atom-badge-warning-bg-low)] text-[var(--atom-badge-warning-fg-low)] border-[var(--atom-badge-warning-border-low)]"},{variant:"warning",tone:"medium",className:"bg-[var(--atom-badge-warning-bg-medium)] text-[var(--atom-badge-warning-fg-medium)] border-[var(--atom-badge-warning-border-medium)]"},{variant:"warning",tone:"high",className:"bg-[var(--atom-badge-warning-bg-high)] text-[var(--atom-badge-warning-fg-high)] border-[var(--atom-badge-warning-border-high)]"},{variant:"danger",tone:"low",className:"bg-[var(--atom-badge-danger-bg-low)] text-[var(--atom-badge-danger-fg-low)] border-[var(--atom-badge-danger-border-low)]"},{variant:"danger",tone:"medium",className:"bg-[var(--atom-badge-danger-bg-medium)] text-[var(--atom-badge-danger-fg-medium)] border-[var(--atom-badge-danger-border-medium)]"},{variant:"danger",tone:"high",className:"bg-[var(--atom-badge-danger-bg-high)] text-[var(--atom-badge-danger-fg-high)] border-[var(--atom-badge-danger-border-high)]"},{variant:"info",tone:"low",className:"bg-[var(--atom-badge-info-bg-low)] text-[var(--atom-badge-info-fg-low)] border-[var(--atom-badge-info-border-low)]"},{variant:"info",tone:"medium",className:"bg-[var(--atom-badge-info-bg-medium)] text-[var(--atom-badge-info-fg-medium)] border-[var(--atom-badge-info-border-medium)]"},{variant:"info",tone:"high",className:"bg-[var(--atom-badge-info-bg-high)] text-[var(--atom-badge-info-fg-high)] border-[var(--atom-badge-info-border-high)]"},{variant:"neutral",tone:"low",className:"bg-[var(--atom-badge-neutral-bg-low)] text-[var(--atom-badge-neutral-fg-low)] border-[var(--atom-badge-neutral-border-low)]"},{variant:"neutral",tone:"medium",className:"bg-[var(--atom-badge-neutral-bg-medium)] text-[var(--atom-badge-neutral-fg-medium)] border-[var(--atom-badge-neutral-border-medium)]"},{variant:"neutral",tone:"high",className:"bg-[var(--atom-badge-neutral-bg-high)] text-[var(--atom-badge-neutral-fg-high)] border-[var(--atom-badge-neutral-border-high)]"},{variant:"accent",tone:"low",className:"bg-[var(--atom-badge-accent-bg-low)] text-[var(--atom-badge-accent-fg-low)] border-[var(--atom-badge-accent-border-low)]"},{variant:"accent",tone:"medium",className:"bg-[var(--atom-badge-accent-bg-medium)] text-[var(--atom-badge-accent-fg-medium)] border-[var(--atom-badge-accent-border-medium)]"},{variant:"accent",tone:"high",className:"bg-[var(--atom-badge-accent-bg-high)] text-[var(--atom-badge-accent-fg-high)] border-[var(--atom-badge-accent-border-high)]"}],defaultVariants:{variant:"primary",tone:"low"}});function pp({className:e,variant:t,tone:n,asChild:r=!1,...o}){const s=r?je:"span";return p.jsx(s,{"data-slot":"badge",className:O(el({variant:t,tone:n}),e),...o})}const tl=te(["inline-flex items-center justify-center","select-none shrink-0 overflow-hidden","font-medium uppercase tracking-wide","border","transition-[color,background-color,border-color,box-shadow,transform]","duration-150 ease-in-out","motion-reduce:transition-none","focus-visible:outline-none","focus-visible:ring-[3px] focus-visible:ring-[color:var(--atom-ring-color)]","focus-visible:ring-offset-2 focus-visible:ring-offset-[color:var(--atom-ring-offset)]"].join(" "),{variants:{variant:{primary:"bg-[var(--atom-badge-primary-bg-low)] text-[var(--atom-badge-primary-fg-low)] border-[var(--atom-badge-primary-border-low)]",secondary:"bg-[var(--atom-badge-secondary-bg-low)] text-[var(--atom-badge-secondary-fg-low)] border-[var(--atom-badge-secondary-border-low)]",neutral:"bg-[var(--atom-badge-neutral-bg-low)] text-[var(--atom-badge-neutral-fg-low)] border-[var(--atom-badge-neutral-border-low)]",success:"bg-[var(--atom-badge-success-bg-low)] text-[var(--atom-badge-success-fg-low)] border-[var(--atom-badge-success-border-low)]",warning:"bg-[var(--atom-badge-warning-bg-low)] text-[var(--atom-badge-warning-fg-low)] border-[var(--atom-badge-warning-border-low)]",danger:"bg-[var(--atom-badge-danger-bg-low)] text-[var(--atom-badge-danger-fg-low)] border-[var(--atom-badge-danger-border-low)]",info:"bg-[var(--atom-badge-info-bg-low)] text-[var(--atom-badge-info-fg-low)] border-[var(--atom-badge-info-border-low)]",accent:"bg-[var(--atom-badge-accent-bg-low)] text-[var(--atom-badge-accent-fg-low)] border-[var(--atom-badge-accent-border-low)]"},appearance:{subtle:"",solid:"border-transparent",outline:"bg-transparent",ghost:"bg-transparent border-transparent hover:bg-[var(--atom-badge-neutral-bg-low)]",soft:"border-none"},shape:{circle:"rounded-full",square:"rounded-md",pill:"rounded-full px-3"},size:{sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-12 w-12 text-base"},withRing:{true:"ring-2 ring-[var(--atom-primary)] ring-offset-2 ring-offset-[var(--atom-bg)]",false:""}},compoundVariants:[{appearance:"solid",variant:"primary",className:"bg-[var(--atom-badge-primary-bg-high)] text-[var(--atom-badge-primary-fg-high)] border-[var(--atom-badge-primary-border-high)]"},{appearance:"solid",variant:"secondary",className:"bg-[var(--atom-badge-secondary-bg-high)] text-[var(--atom-badge-secondary-fg-high)] border-[var(--atom-badge-secondary-border-high)]"},{appearance:"solid",variant:"neutral",className:"bg-[var(--atom-badge-neutral-bg-high)] text-[var(--atom-badge-neutral-fg-high)] border-[var(--atom-badge-neutral-border-high)]"},{appearance:"solid",variant:"success",className:"bg-[var(--atom-badge-success-bg-high)] text-[var(--atom-badge-success-fg-high)] border-[var(--atom-badge-success-border-high)]"},{appearance:"solid",variant:"warning",className:"bg-[var(--atom-badge-warning-bg-high)] text-[var(--atom-badge-warning-fg-high)] border-[var(--atom-badge-warning-border-high)]"},{appearance:"solid",variant:"danger",className:"bg-[var(--atom-badge-danger-bg-high)] text-[var(--atom-badge-danger-fg-high)] border-[var(--atom-badge-danger-border-high)]"},{appearance:"solid",variant:"info",className:"bg-[var(--atom-badge-info-bg-high)] text-[var(--atom-badge-info-fg-high)] border-[var(--atom-badge-info-border-high)]"},{appearance:"solid",variant:"accent",className:"bg-[var(--atom-badge-accent-bg-high)] text-[var(--atom-badge-accent-fg-high)] border-[var(--atom-badge-accent-border-high)]"}],defaultVariants:{variant:"primary",appearance:"subtle",shape:"circle",size:"md",withRing:!1}}),nl=y.forwardRef(({className:e,asChild:t=!1,initials:n,src:r,alt:o,decorative:s=!1,children:a,variant:i,appearance:c,size:l,shape:u,withRing:d,...f},m)=>{const b=t?je:"div",[h,g]=y.useState(!1);y.useEffect(()=>{r&&g(!1)},[r]);const v=y.useCallback(()=>{g(!0)},[]),C=!!r&&!h&&!a,w=!C&&!a&&!!n,S=f["aria-label"]??void 0,k=s?"":o||S||n||"AZ",T=a||(C?p.jsx("img",{src:r,alt:k,className:"h-full w-full object-cover",onError:v,"aria-hidden":s||void 0}):w?p.jsx("span",{"aria-hidden":s||void 0,children:n}):null),E=s?{"aria-hidden":!0}:w&&!S&&!o?{role:"img","aria-label":n}:S&&!r?{role:"img","aria-label":S}:{};return p.jsx(b,{ref:m,"data-slot":"avatar",className:O(tl({variant:i,appearance:c,size:l,shape:u,withRing:d}),e),...E,...f,children:T})});nl.displayName="Avatar";function gp(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const yp={},vn={};function Tt(e,t){try{const r=(yp[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return r in vn?vn[r]:_a(r,r.split(":"))}catch{if(e in vn)return vn[e];const n=e?.match(bp);return n?_a(e,n.slice(1)):NaN}}const bp=/([+-]\d\d):?(\d\d)?/;function _a(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return vn[e]=n*60+r>0?n*60+r+o:n*60-r-o}class qe extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Tt(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),rl(this),Oo(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new qe(...n,t):new qe(Date.now(),t)}withTimeZone(t){return new qe(+this,t)}getTimezoneOffset(){const t=-Tt(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Oo(this),+this}[Symbol.for("constructDateFrom")](t){return new qe(+new Date(t),this.timeZone)}}const Ia=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Ia.test(e))return;const t=e.replace(Ia,"$1UTC");qe.prototype[t]&&(e.startsWith("get")?qe.prototype[e]=function(){return this.internal[t]()}:(qe.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),vp(this),+this},qe.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Oo(this),+this}))});function Oo(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-Tt(e.timeZone,e)*60))}function vp(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),rl(e)}function rl(e){const t=Tt(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),s=-new Date(+r).getTimezoneOffset(),a=o-s,i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const c=o-n;c&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+c);const l=new Date(+e);l.setUTCSeconds(0);const u=o>0?l.getSeconds():(l.getSeconds()-60)%60,d=Math.round(-(Tt(e.timeZone,e)*60))%60;(d||u)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+d),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+d+u));const f=Tt(e.timeZone,e),m=f>0?Math.floor(f):Math.ceil(f),h=-new Date(+e).getTimezoneOffset()-m,g=m!==n,v=h-c;if(g&&v){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+v);const C=Tt(e.timeZone,e),w=C>0?Math.floor(C):Math.ceil(C),S=m-w;S&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+S),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+S))}}class Se extends qe{static tz(t,...n){return n.length?new Se(...n,t):new Se(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${gp(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new Se(+this,t)}[Symbol.for("constructDateFrom")](t){return new Se(+new Date(t),this.timeZone)}}const ol=6048e5,xp=864e5,Va=Symbol.for("constructDateFrom");function pe(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Va in e?e[Va](t):e instanceof Date?new e.constructor(t):new Date(t)}function ce(e,t){return pe(t||e,e)}function sl(e,t,n){const r=ce(e,n?.in);return isNaN(t)?pe(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function al(e,t,n){const r=ce(e,n?.in);if(isNaN(t))return pe(e,NaN);if(!t)return r;const o=r.getDate(),s=pe(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const a=s.getDate();return o>=a?s:(r.setFullYear(s.getFullYear(),s.getMonth(),o),r)}let wp={};function Fn(){return wp}function Xt(e,t){const n=Fn(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=ce(e,t?.in),s=o.getDay(),a=(s<r?7:0)+s-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function En(e,t){return Xt(e,{...t,weekStartsOn:1})}function il(e,t){const n=ce(e,t?.in),r=n.getFullYear(),o=pe(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const s=En(o),a=pe(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const i=En(a);return n.getTime()>=s.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function Fa(e){const t=ce(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function rn(e,...t){const n=pe.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Pn(e,t){const n=ce(e,t?.in);return n.setHours(0,0,0,0),n}function ms(e,t,n){const[r,o]=rn(n?.in,e,t),s=Pn(r),a=Pn(o),i=+s-Fa(s),c=+a-Fa(a);return Math.round((i-c)/xp)}function Cp(e,t){const n=il(e,t),r=pe(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),En(r)}function kp(e,t,n){return sl(e,t*7,n)}function Sp(e,t,n){return al(e,t*12,n)}function Dp(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=pe.bind(null,o));const s=ce(o,r);(!n||n<s||isNaN(+s))&&(n=s)}),pe(r,n||NaN)}function Tp(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=pe.bind(null,o));const s=ce(o,r);(!n||n>s||isNaN(+s))&&(n=s)}),pe(r,n||NaN)}function Ep(e,t,n){const[r,o]=rn(n?.in,e,t);return+Pn(r)==+Pn(o)}function cl(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Pp(e){return!(!cl(e)&&typeof e!="number"||isNaN(+ce(e)))}function ll(e,t,n){const[r,o]=rn(n?.in,e,t),s=r.getFullYear()-o.getFullYear(),a=r.getMonth()-o.getMonth();return s*12+a}function Mp(e,t){const n=ce(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function ul(e,t){const[n,r]=rn(e,t.start,t.end);return{start:n,end:r}}function Ap(e,t){const{start:n,end:r}=ul(t?.in,e);let o=+n>+r;const s=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0),a.setDate(1);let i=1;const c=[];for(;+a<=s;)c.push(pe(n,a)),a.setMonth(a.getMonth()+i);return o?c.reverse():c}function Rp(e,t){const n=ce(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Np(e,t){const n=ce(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function dl(e,t){const n=ce(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Op(e,t){const{start:n,end:r}=ul(t?.in,e);let o=+n>+r;const s=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0),a.setMonth(0,1);let i=1;const c=[];for(;+a<=s;)c.push(pe(n,a)),a.setFullYear(a.getFullYear()+i);return o?c.reverse():c}function fl(e,t){const n=Fn(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=ce(e,t?.in),s=o.getDay(),a=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function jp(e,t){return fl(e,{...t,weekStartsOn:1})}const _p={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Ip=(e,t,n)=>{let r;const o=_p[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Jr(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Vp={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Fp={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Lp={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Wp={date:Jr({formats:Vp,defaultWidth:"full"}),time:Jr({formats:Fp,defaultWidth:"full"}),dateTime:Jr({formats:Lp,defaultWidth:"full"})},Bp={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},$p=(e,t,n,r)=>Bp[e];function gn(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,i=n?.width?String(n.width):a;o=e.formattingValues[i]||e.formattingValues[a]}else{const a=e.defaultWidth,i=n?.width?String(n.width):e.defaultWidth;o=e.values[i]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const zp={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Yp={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Hp={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Gp={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Up={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},qp={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Kp=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Xp={ordinalNumber:Kp,era:gn({values:zp,defaultWidth:"wide"}),quarter:gn({values:Yp,defaultWidth:"wide",argumentCallback:e=>e-1}),month:gn({values:Hp,defaultWidth:"wide"}),day:gn({values:Gp,defaultWidth:"wide"}),dayPeriod:gn({values:Up,defaultWidth:"wide",formattingValues:qp,defaultFormattingWidth:"wide"})};function yn(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const a=s[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(i)?Qp(i,d=>d.test(a)):Zp(i,d=>d.test(a));let l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;const u=t.slice(a.length);return{value:l,rest:u}}}function Zp(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Qp(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Jp(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const i=t.slice(o.length);return{value:a,rest:i}}}const eg=/^(\d+)(th|st|nd|rd)?/i,tg=/\d+/i,ng={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},rg={any:[/^b/i,/^(a|c)/i]},og={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},sg={any:[/1/i,/2/i,/3/i,/4/i]},ag={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ig={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},cg={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},lg={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ug={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},dg={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},fg={ordinalNumber:Jp({matchPattern:eg,parsePattern:tg,valueCallback:e=>parseInt(e,10)}),era:yn({matchPatterns:ng,defaultMatchWidth:"wide",parsePatterns:rg,defaultParseWidth:"any"}),quarter:yn({matchPatterns:og,defaultMatchWidth:"wide",parsePatterns:sg,defaultParseWidth:"any",valueCallback:e=>e+1}),month:yn({matchPatterns:ag,defaultMatchWidth:"wide",parsePatterns:ig,defaultParseWidth:"any"}),day:yn({matchPatterns:cg,defaultMatchWidth:"wide",parsePatterns:lg,defaultParseWidth:"any"}),dayPeriod:yn({matchPatterns:ug,defaultMatchWidth:"any",parsePatterns:dg,defaultParseWidth:"any"})},Bt={code:"en-US",formatDistance:Ip,formatLong:Wp,formatRelative:$p,localize:Xp,match:fg,options:{weekStartsOn:0,firstWeekContainsDate:1}};function mg(e,t){const n=ce(e,t?.in);return ms(n,dl(n))+1}function hs(e,t){const n=ce(e,t?.in),r=+En(n)-+Cp(n);return Math.round(r/ol)+1}function ml(e,t){const n=ce(e,t?.in),r=n.getFullYear(),o=Fn(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=pe(t?.in||e,0);a.setFullYear(r+1,0,s),a.setHours(0,0,0,0);const i=Xt(a,t),c=pe(t?.in||e,0);c.setFullYear(r,0,s),c.setHours(0,0,0,0);const l=Xt(c,t);return+n>=+i?r+1:+n>=+l?r:r-1}function hg(e,t){const n=Fn(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=ml(e,t),s=pe(t?.in||e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),Xt(s,t)}function ps(e,t){const n=ce(e,t?.in),r=+Xt(n,t)-+hg(n,t);return Math.round(r/ol)+1}function ie(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const dt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ie(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ie(n+1,2)},d(e,t){return ie(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ie(e.getHours()%12||12,t.length)},H(e,t){return ie(e.getHours(),t.length)},m(e,t){return ie(e.getMinutes(),t.length)},s(e,t){return ie(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ie(o,t.length)}},It={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},La={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return dt.y(e,t)},Y:function(e,t,n,r){const o=ml(e,r),s=o>0?o:1-o;if(t==="YY"){const a=s%100;return ie(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):ie(s,t.length)},R:function(e,t){const n=il(e);return ie(n,t.length)},u:function(e,t){const n=e.getFullYear();return ie(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ie(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ie(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return dt.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ie(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=ps(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ie(o,t.length)},I:function(e,t,n){const r=hs(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ie(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):dt.d(e,t)},D:function(e,t,n){const r=mg(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ie(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return ie(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return ie(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return ie(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=It.noon:r===0?o=It.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=It.evening:r>=12?o=It.afternoon:r>=4?o=It.morning:o=It.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return dt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):dt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ie(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ie(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):dt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):dt.s(e,t)},S:function(e,t){return dt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Ba(r);case"XXXX":case"XX":return St(r);case"XXXXX":case"XXX":default:return St(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ba(r);case"xxxx":case"xx":return St(r);case"xxxxx":case"xxx":default:return St(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Wa(r,":");case"OOOO":default:return"GMT"+St(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Wa(r,":");case"zzzz":default:return"GMT"+St(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ie(r,t.length)},T:function(e,t,n){return ie(+e,t.length)}};function Wa(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+ie(s,2)}function Ba(e,t){return e%60===0?(e>0?"-":"+")+ie(Math.abs(e)/60,2):St(e,t)}function St(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ie(Math.trunc(r/60),2),s=ie(r%60,2);return n+o+t+s}const $a=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},hl=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},pg=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return $a(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",$a(r,t)).replace("{{time}}",hl(o,t))},gg={p:hl,P:pg},yg=/^D+$/,bg=/^Y+$/,vg=["D","DD","YY","YYYY"];function xg(e){return yg.test(e)}function wg(e){return bg.test(e)}function Cg(e,t,n){const r=kg(e,t,n);if(console.warn(r),vg.includes(e))throw new RangeError(r)}function kg(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Sg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Dg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Tg=/^'([^]*?)'?$/,Eg=/''/g,Pg=/[a-zA-Z]/;function xn(e,t,n){const r=Fn(),o=n?.locale??r.locale??Bt,s=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=ce(e,n?.in);if(!Pp(i))throw new RangeError("Invalid time value");let c=t.match(Dg).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=gg[d];return f(u,o.formatLong)}return u}).join("").match(Sg).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:Mg(u)};if(La[d])return{isToken:!0,value:u};if(d.match(Pg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(c=o.localize.preprocessor(i,c));const l={firstWeekContainsDate:s,weekStartsOn:a,locale:o};return c.map(u=>{if(!u.isToken)return u.value;const d=u.value;(!n?.useAdditionalWeekYearTokens&&wg(d)||!n?.useAdditionalDayOfYearTokens&&xg(d))&&Cg(d,t,String(e));const f=La[d[0]];return f(i,d,o.localize,l)}).join("")}function Mg(e){const t=e.match(Tg);return t?t[1].replace(Eg,"'"):e}function Ag(e,t){const n=ce(e,t?.in),r=n.getFullYear(),o=n.getMonth(),s=pe(n,0);return s.setFullYear(r,o+1,0),s.setHours(0,0,0,0),s.getDate()}function Rg(e,t){return ce(e,t?.in).getMonth()}function Ng(e,t){return ce(e,t?.in).getFullYear()}function Og(e,t){return+ce(e)>+ce(t)}function jg(e,t){return+ce(e)<+ce(t)}function _g(e,t,n){const[r,o]=rn(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Ig(e,t,n){const[r,o]=rn(n?.in,e,t);return r.getFullYear()===o.getFullYear()}function Vg(e,t,n){const r=ce(e,n?.in),o=r.getFullYear(),s=r.getDate(),a=pe(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const i=Ag(a);return r.setMonth(t,Math.min(s,i)),r}function Fg(e,t,n){const r=ce(e,n?.in);return isNaN(+r)?pe(e,NaN):(r.setFullYear(t),r)}const za=5,Lg=4;function Wg(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),s=t.addDays(o,za*7-1);return t.getMonth(e)===t.getMonth(s)?za:Lg}function pl(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function Bg(e,t){const n=pl(e,t),r=Wg(e,t);return t.addDays(n,r*7-1)}const gl={...Bt,labels:{labelDayButton:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(a,i)=>xn(a,i,{locale:Bt,...n});let s=o(e,"PPPP");return t.today&&(s=`Today, ${s}`),t.selected&&(s=`${s}, selected`),s},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,s)=>xn(o,s,{locale:Bt,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(a,i)=>xn(a,i,{locale:Bt,...n});let s=o(e,"PPPP");return t?.today&&(s=`Today, ${s}`),s},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,s)=>xn(o,s,{locale:Bt,...t}),r(e,"cccc")}}};class Oe{constructor(t,n){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?Se.tz(this.options.timeZone):new this.Date,this.newDate=(r,o,s)=>this.overrides?.newDate?this.overrides.newDate(r,o,s):this.options.timeZone?new Se(r,o,s,this.options.timeZone):new Date(r,o,s),this.addDays=(r,o)=>this.overrides?.addDays?this.overrides.addDays(r,o):sl(r,o),this.addMonths=(r,o)=>this.overrides?.addMonths?this.overrides.addMonths(r,o):al(r,o),this.addWeeks=(r,o)=>this.overrides?.addWeeks?this.overrides.addWeeks(r,o):kp(r,o),this.addYears=(r,o)=>this.overrides?.addYears?this.overrides.addYears(r,o):Sp(r,o),this.differenceInCalendarDays=(r,o)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):ms(r,o),this.differenceInCalendarMonths=(r,o)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):ll(r,o),this.eachMonthOfInterval=r=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Ap(r),this.eachYearOfInterval=r=>{const o=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(r):Op(r),s=new Set(o.map(i=>this.getYear(i)));if(s.size===o.length)return o;const a=[];return s.forEach(i=>{a.push(new Date(i,0,1))}),a},this.endOfBroadcastWeek=r=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):Bg(r,this),this.endOfISOWeek=r=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(r):jp(r),this.endOfMonth=r=>this.overrides?.endOfMonth?this.overrides.endOfMonth(r):Mp(r),this.endOfWeek=(r,o)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(r,o):fl(r,this.options),this.endOfYear=r=>this.overrides?.endOfYear?this.overrides.endOfYear(r):Np(r),this.format=(r,o,s)=>{const a=this.overrides?.format?this.overrides.format(r,o,this.options):xn(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=r=>this.overrides?.getISOWeek?this.overrides.getISOWeek(r):hs(r),this.getMonth=(r,o)=>this.overrides?.getMonth?this.overrides.getMonth(r,this.options):Rg(r,this.options),this.getYear=(r,o)=>this.overrides?.getYear?this.overrides.getYear(r,this.options):Ng(r,this.options),this.getWeek=(r,o)=>this.overrides?.getWeek?this.overrides.getWeek(r,this.options):ps(r,this.options),this.isAfter=(r,o)=>this.overrides?.isAfter?this.overrides.isAfter(r,o):Og(r,o),this.isBefore=(r,o)=>this.overrides?.isBefore?this.overrides.isBefore(r,o):jg(r,o),this.isDate=r=>this.overrides?.isDate?this.overrides.isDate(r):cl(r),this.isSameDay=(r,o)=>this.overrides?.isSameDay?this.overrides.isSameDay(r,o):Ep(r,o),this.isSameMonth=(r,o)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(r,o):_g(r,o),this.isSameYear=(r,o)=>this.overrides?.isSameYear?this.overrides.isSameYear(r,o):Ig(r,o),this.max=r=>this.overrides?.max?this.overrides.max(r):Dp(r),this.min=r=>this.overrides?.min?this.overrides.min(r):Tp(r),this.setMonth=(r,o)=>this.overrides?.setMonth?this.overrides.setMonth(r,o):Vg(r,o),this.setYear=(r,o)=>this.overrides?.setYear?this.overrides.setYear(r,o):Fg(r,o),this.startOfBroadcastWeek=(r,o)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):pl(r,this),this.startOfDay=r=>this.overrides?.startOfDay?this.overrides.startOfDay(r):Pn(r),this.startOfISOWeek=r=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(r):En(r),this.startOfMonth=r=>this.overrides?.startOfMonth?this.overrides.startOfMonth(r):Rp(r),this.startOfWeek=(r,o)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(r,this.options):Xt(r,this.options),this.startOfYear=r=>this.overrides?.startOfYear?this.overrides.startOfYear(r):dl(r),this.options={locale:gl,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){const t=this.options.locale?.code;return t&&Oe.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:o}=this.options,s=n?.code;if(s&&Oe.yearFirstLocales.has(s))try{return new Intl.DateTimeFormat(s,{month:"long",year:"numeric",timeZone:r,numberingSystem:o}).format(t)}catch{}const a=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,a)}}Oe.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const tt=new Oe;class yl{constructor(t,n,r=tt){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class $g{constructor(t,n){this.date=t,this.weeks=n}}class zg{constructor(t,n){this.days=n,this.weekNumber=t}}function Yg(e){return x.createElement("button",{...e})}function Hg(e){return x.createElement("span",{...e})}function Gg(e){const{size:t=24,orientation:n="left",className:r}=e;return x.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&x.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&x.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&x.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&x.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Ug(e){const{day:t,modifiers:n,...r}=e;return x.createElement("td",{...r})}function qg(e){const{day:t,modifiers:n,...r}=e,o=x.useRef(null);return x.useEffect(()=>{n.focused&&o.current?.focus()},[n.focused]),x.createElement("button",{ref:o,...r})}var L;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(L||(L={}));var de;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(de||(de={}));var $e;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})($e||($e={}));var Ae;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(Ae||(Ae={}));function Kg(e){const{options:t,className:n,components:r,classNames:o,...s}=e,a=[o[L.Dropdown],n].join(" "),i=t?.find(({value:c})=>c===s.value);return x.createElement("span",{"data-disabled":s.disabled,className:o[L.DropdownRoot]},x.createElement(r.Select,{className:a,...s},t?.map(({value:c,label:l,disabled:u})=>x.createElement(r.Option,{key:c,value:c,disabled:u},l))),x.createElement("span",{className:o[L.CaptionLabel],"aria-hidden":!0},i?.label,x.createElement(r.Chevron,{orientation:"down",size:18,className:o[L.Chevron]})))}function Xg(e){return x.createElement("div",{...e})}function Zg(e){return x.createElement("div",{...e})}function Qg(e){const{calendarMonth:t,displayIndex:n,...r}=e;return x.createElement("div",{...r},e.children)}function Jg(e){const{calendarMonth:t,displayIndex:n,...r}=e;return x.createElement("div",{...r})}function ey(e){return x.createElement("table",{...e})}function ty(e){return x.createElement("div",{...e})}const bl=x.createContext(void 0);function Ln(){const e=x.useContext(bl);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function ny(e){const{components:t}=Ln();return x.createElement(t.Dropdown,{...e})}function ry(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...s}=e,{components:a,classNames:i,labels:{labelPrevious:c,labelNext:l}}=Ln(),u=x.useCallback(f=>{o&&n?.(f)},[o,n]),d=x.useCallback(f=>{r&&t?.(f)},[r,t]);return x.createElement("nav",{...s},x.createElement(a.PreviousMonthButton,{type:"button",className:i[L.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:d},x.createElement(a.Chevron,{disabled:r?void 0:!0,className:i[L.Chevron],orientation:"left"})),x.createElement(a.NextMonthButton,{type:"button",className:i[L.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":l(o),onClick:u},x.createElement(a.Chevron,{disabled:o?void 0:!0,orientation:"right",className:i[L.Chevron]})))}function oy(e){const{components:t}=Ln();return x.createElement(t.Button,{...e})}function sy(e){return x.createElement("option",{...e})}function ay(e){const{components:t}=Ln();return x.createElement(t.Button,{...e})}function iy(e){const{rootRef:t,...n}=e;return x.createElement("div",{...n,ref:t})}function cy(e){return x.createElement("select",{...e})}function ly(e){const{week:t,...n}=e;return x.createElement("tr",{...n})}function uy(e){return x.createElement("th",{...e})}function dy(e){return x.createElement("thead",{"aria-hidden":!0},x.createElement("tr",{...e}))}function fy(e){const{week:t,...n}=e;return x.createElement("th",{...n})}function my(e){return x.createElement("th",{...e})}function hy(e){return x.createElement("tbody",{...e})}function py(e){const{components:t}=Ln();return x.createElement(t.Dropdown,{...e})}const gy=Object.freeze(Object.defineProperty({__proto__:null,Button:Yg,CaptionLabel:Hg,Chevron:Gg,Day:Ug,DayButton:qg,Dropdown:Kg,DropdownNav:Xg,Footer:Zg,Month:Qg,MonthCaption:Jg,MonthGrid:ey,Months:ty,MonthsDropdown:ny,Nav:ry,NextMonthButton:oy,Option:sy,PreviousMonthButton:ay,Root:iy,Select:cy,Week:ly,WeekNumber:fy,WeekNumberHeader:my,Weekday:uy,Weekdays:dy,Weeks:hy,YearsDropdown:py},Symbol.toStringTag,{value:"Module"}));function ot(e,t,n=!1,r=tt){let{from:o,to:s}=e;const{differenceInCalendarDays:a,isSameDay:i}=r;return o&&s?(a(s,o)<0&&([o,s]=[s,o]),a(t,o)>=(n?1:0)&&a(s,t)>=(n?1:0)):!n&&s?i(s,t):!n&&o?i(o,t):!1}function gs(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Ar(e){return!!(e&&typeof e=="object"&&"from"in e)}function ys(e){return!!(e&&typeof e=="object"&&"after"in e)}function bs(e){return!!(e&&typeof e=="object"&&"before"in e)}function vl(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function xl(e,t){return Array.isArray(e)&&e.every(t.isDate)}function st(e,t,n=tt){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:s,isAfter:a}=n;return r.some(i=>{if(typeof i=="boolean")return i;if(n.isDate(i))return o(e,i);if(xl(i,n))return i.some(c=>o(e,c));if(Ar(i))return ot(i,e,!1,n);if(vl(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(gs(i)){const c=s(i.before,e),l=s(i.after,e),u=c>0,d=l<0;return a(i.before,i.after)?d&&u:u||d}return ys(i)?s(e,i.after)>0:bs(i)?s(i.before,e)>0:typeof i=="function"?i(e):!1})}function yy(e,t,n,r,o){const{disabled:s,hidden:a,modifiers:i,showOutsideDays:c,broadcastCalendar:l,today:u=o.today()}=t,{isSameDay:d,isSameMonth:f,startOfMonth:m,isBefore:b,endOfMonth:h,isAfter:g}=o,v=n&&m(n),C=r&&h(r),w={[de.focused]:[],[de.outside]:[],[de.disabled]:[],[de.hidden]:[],[de.today]:[]},S={};for(const k of e){const{date:T,displayMonth:E}=k,D=!!(E&&!f(T,E)),A=!!(v&&b(T,v)),M=!!(C&&g(T,C)),j=!!(s&&st(T,s,o)),_=!!(a&&st(T,a,o))||A||M||!l&&!c&&D||l&&c===!1&&D,B=d(T,u);D&&w.outside.push(k),j&&w.disabled.push(k),_&&w.hidden.push(k),B&&w.today.push(k),i&&Object.keys(i).forEach(z=>{const K=i?.[z];K&&st(T,K,o)&&(S[z]?S[z].push(k):S[z]=[k])})}return k=>{const T={[de.focused]:!1,[de.disabled]:!1,[de.hidden]:!1,[de.outside]:!1,[de.today]:!1},E={};for(const D in w){const A=w[D];T[D]=A.some(M=>M===k)}for(const D in S)E[D]=S[D].some(A=>A===k);return{...T,...E}}}function by(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[s])=>(n[s]?o.push(n[s]):t[de[s]]?o.push(t[de[s]]):t[$e[s]]&&o.push(t[$e[s]]),o),[t[L.Day]])}function vy(e){return{...gy,...e}}function xy(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function wl(){const e={};for(const t in L)e[L[t]]=`rdp-${L[t]}`;for(const t in de)e[de[t]]=`rdp-${de[t]}`;for(const t in $e)e[$e[t]]=`rdp-${$e[t]}`;for(const t in Ae)e[Ae[t]]=`rdp-${Ae[t]}`;return e}function Cl(e,t,n){return(n??new Oe(t)).formatMonthYear(e)}const wy=Cl;function Cy(e,t,n){return(n??new Oe(t)).format(e,"d")}function ky(e,t=tt){return t.format(e,"LLLL")}function Sy(e,t,n){return(n??new Oe(t)).format(e,"cccccc")}function Dy(e,t=tt){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Ty(){return""}function kl(e,t=tt){return t.format(e,"yyyy")}const Ey=kl,Py=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Cl,formatDay:Cy,formatMonthCaption:wy,formatMonthDropdown:ky,formatWeekNumber:Dy,formatWeekNumberHeader:Ty,formatWeekdayName:Sy,formatYearCaption:Ey,formatYearDropdown:kl},Symbol.toStringTag,{value:"Module"}));function My(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Py,...e}}function vs(e,t,n,r){let o=(r??new Oe(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const Ay=vs;function xs(e,t,n){return(n??new Oe(t)).formatMonthYear(e)}const Ry=xs;function Sl(e,t,n,r){let o=(r??new Oe(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function Dl(e){return"Choose the Month"}function Tl(){return""}const Ny="Go to the Next Month";function El(e,t){return Ny}function Pl(e){return"Go to the Previous Month"}function Ml(e,t,n){return(n??new Oe(t)).format(e,"cccc")}function Al(e,t){return`Week ${e}`}function Rl(e){return"Week Number"}function Nl(e){return"Choose the Year"}const Oy=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Ry,labelDay:Ay,labelDayButton:vs,labelGrid:xs,labelGridcell:Sl,labelMonthDropdown:Dl,labelNav:Tl,labelNext:El,labelPrevious:Pl,labelWeekNumber:Al,labelWeekNumberHeader:Rl,labelWeekday:Ml,labelYearDropdown:Nl},Symbol.toStringTag,{value:"Module"})),Le=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function jy(e,t){const n=t.locale?.labels??{};return{...Oy,...e??{},labelDayButton:Le(vs,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:Le(Dl,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:Le(El,e?.labelNext,n.labelNext),labelPrevious:Le(Pl,e?.labelPrevious,n.labelPrevious),labelWeekNumber:Le(Al,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:Le(Nl,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:Le(xs,e?.labelGrid,n.labelGrid),labelGridcell:Le(Sl,e?.labelGridcell,n.labelGridcell),labelNav:Le(Tl,e?.labelNav,n.labelNav),labelWeekNumberHeader:Le(Rl,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:Le(Ml,e?.labelWeekday,n.labelWeekday)}}function _y(e,t,n,r,o){const{startOfMonth:s,startOfYear:a,endOfYear:i,eachMonthOfInterval:c,getMonth:l}=o;return c({start:a(e),end:i(e)}).map(f=>{const m=r.formatMonthDropdown(f,o),b=l(f),h=t&&f<s(t)||n&&f>s(n)||!1;return{value:b,label:m,disabled:h}})}function Iy(e,t={},n={}){let r={...t?.[L.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n?.[o]}}),r}function Vy(e,t,n,r){const o=r??e.today(),s=n?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),a=[];for(let i=0;i<7;i++){const c=e.addDays(s,i);a.push(c)}return a}function Fy(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:s,endOfYear:a,eachYearOfInterval:i,getYear:c}=r,l=s(e),u=a(t),d=i({start:l,end:u});return o&&d.reverse(),d.map(f=>{const m=n.formatYearDropdown(f,r);return{value:c(f),label:m,disabled:!1}})}function Ly(e,t={}){const{weekStartsOn:n,locale:r}=t,o=n??r?.options?.weekStartsOn??0,s=i=>{const c=typeof i=="number"||typeof i=="string"?new Date(i):i;return new Se(c.getFullYear(),c.getMonth(),c.getDate(),12,0,0,e)},a=i=>{const c=s(i);return new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0)};return{today:()=>s(Se.tz(e)),newDate:(i,c,l)=>new Se(i,c,l,12,0,0,e),startOfDay:i=>s(i),startOfWeek:(i,c)=>{const l=s(i),u=c?.weekStartsOn??o,d=(l.getDay()-u+7)%7;return l.setDate(l.getDate()-d),l},startOfISOWeek:i=>{const c=s(i),l=(c.getDay()-1+7)%7;return c.setDate(c.getDate()-l),c},startOfMonth:i=>{const c=s(i);return c.setDate(1),c},startOfYear:i=>{const c=s(i);return c.setMonth(0,1),c},endOfWeek:(i,c)=>{const l=s(i),f=(((c?.weekStartsOn??o)+6)%7-l.getDay()+7)%7;return l.setDate(l.getDate()+f),l},endOfISOWeek:i=>{const c=s(i),l=(7-c.getDay())%7;return c.setDate(c.getDate()+l),c},endOfMonth:i=>{const c=s(i);return c.setMonth(c.getMonth()+1,0),c},endOfYear:i=>{const c=s(i);return c.setMonth(11,31),c},eachMonthOfInterval:i=>{const c=s(i.start),l=s(i.end),u=[],d=new Se(c.getFullYear(),c.getMonth(),1,12,0,0,e),f=l.getFullYear()*12+l.getMonth();for(;d.getFullYear()*12+d.getMonth()<=f;)u.push(new Se(d,e)),d.setMonth(d.getMonth()+1,1);return u},addDays:(i,c)=>{const l=s(i);return l.setDate(l.getDate()+c),l},addWeeks:(i,c)=>{const l=s(i);return l.setDate(l.getDate()+c*7),l},addMonths:(i,c)=>{const l=s(i);return l.setMonth(l.getMonth()+c),l},addYears:(i,c)=>{const l=s(i);return l.setFullYear(l.getFullYear()+c),l},eachYearOfInterval:i=>{const c=s(i.start),l=s(i.end),u=[],d=new Se(c.getFullYear(),0,1,12,0,0,e);for(;d.getFullYear()<=l.getFullYear();)u.push(new Se(d,e)),d.setFullYear(d.getFullYear()+1,0,1);return u},getWeek:(i,c)=>{const l=a(i);return ps(l,{weekStartsOn:c?.weekStartsOn??o,firstWeekContainsDate:c?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1})},getISOWeek:i=>{const c=a(i);return hs(c)},differenceInCalendarDays:(i,c)=>{const l=a(i),u=a(c);return ms(l,u)},differenceInCalendarMonths:(i,c)=>{const l=a(i),u=a(c);return ll(l,u)}}}const Wn=e=>e instanceof HTMLElement?e:null,eo=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Wy=e=>Wn(e.querySelector("[data-animated-month]")),to=e=>Wn(e.querySelector("[data-animated-caption]")),no=e=>Wn(e.querySelector("[data-animated-weeks]")),By=e=>Wn(e.querySelector("[data-animated-nav]")),$y=e=>Wn(e.querySelector("[data-animated-weekdays]"));function zy(e,t,{classNames:n,months:r,focused:o,dateLib:s}){const a=x.useRef(null),i=x.useRef(r),c=x.useRef(!1);x.useLayoutEffect(()=>{const l=i.current;if(i.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||l.length===0||r.length!==l.length)return;const u=s.isSameMonth(r[0].date,l[0].date),d=s.isAfter(r[0].date,l[0].date),f=d?n[Ae.caption_after_enter]:n[Ae.caption_before_enter],m=d?n[Ae.weeks_after_enter]:n[Ae.weeks_before_enter],b=a.current,h=e.current.cloneNode(!0);if(h instanceof HTMLElement?(eo(h).forEach(w=>{if(!(w instanceof HTMLElement))return;const S=Wy(w);S&&w.contains(S)&&w.removeChild(S);const k=to(w);k&&k.classList.remove(f);const T=no(w);T&&T.classList.remove(m)}),a.current=h):a.current=null,c.current||u||o)return;const g=b instanceof HTMLElement?eo(b):[],v=eo(e.current);if(v?.every(C=>C instanceof HTMLElement)&&g&&g.every(C=>C instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const C=By(e.current);C&&(C.style.zIndex="1"),v.forEach((w,S)=>{const k=g[S];if(!k)return;w.style.position="relative",w.style.overflow="hidden";const T=to(w);T&&T.classList.add(f);const E=no(w);E&&E.classList.add(m);const D=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),C&&(C.style.zIndex=""),T&&T.classList.remove(f),E&&E.classList.remove(m),w.style.position="",w.style.overflow="",w.contains(k)&&w.removeChild(k)};k.style.pointerEvents="none",k.style.position="absolute",k.style.overflow="hidden",k.setAttribute("aria-hidden","true");const A=$y(k);A&&(A.style.opacity="0");const M=to(k);M&&(M.classList.add(d?n[Ae.caption_before_exit]:n[Ae.caption_after_exit]),M.addEventListener("animationend",D));const j=no(k);j&&j.classList.add(d?n[Ae.weeks_before_exit]:n[Ae.weeks_after_exit]),w.insertBefore(k,w.firstChild)})}})}function Yy(e,t,n,r){const o=e[0],s=e[e.length-1],{ISOWeek:a,fixedWeeks:i,broadcastCalendar:c}=n??{},{addDays:l,differenceInCalendarDays:u,differenceInCalendarMonths:d,endOfBroadcastWeek:f,endOfISOWeek:m,endOfMonth:b,endOfWeek:h,isAfter:g,startOfBroadcastWeek:v,startOfISOWeek:C,startOfWeek:w}=r,S=c?v(o,r):a?C(o):w(o),k=c?f(s):a?m(b(s)):h(b(s)),T=t&&(c?f(t):a?m(t):h(t)),E=T&&g(k,T)?T:k,D=u(E,S),A=d(s,o)+1,M=[];for(let B=0;B<=D;B++){const z=l(S,B);M.push(z)}const _=(c?35:42)*A;if(i&&M.length<_){const B=_-M.length;for(let z=0;z<B;z++){const K=l(M[M.length-1],1);M.push(K)}}return M}function Hy(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((s,a)=>s.concat(a.days.slice()),t.slice());return n.concat(o.slice())},t.slice())}function Gy(e,t,n,r){const{numberOfMonths:o=1}=n,s=[];for(let a=0;a<o;a++){const i=r.addMonths(e,a);if(t&&i>t)break;s.push(i)}return s}function Ya(e,t,n,r){const{month:o,defaultMonth:s,today:a=r.today(),numberOfMonths:i=1}=e;let c=o||s||a;const{differenceInCalendarMonths:l,addMonths:u,startOfMonth:d}=r;if(n&&l(n,c)<i-1){const f=-1*(i-1);c=u(n,f)}return t&&l(c,t)<0&&(c=t),d(c)}function Uy(e,t,n,r){const{addDays:o,endOfBroadcastWeek:s,endOfISOWeek:a,endOfMonth:i,endOfWeek:c,getISOWeek:l,getWeek:u,startOfBroadcastWeek:d,startOfISOWeek:f,startOfWeek:m}=r,b=e.reduce((h,g)=>{const v=n.broadcastCalendar?d(g,r):n.ISOWeek?f(g):m(g),C=n.broadcastCalendar?s(g):n.ISOWeek?a(i(g)):c(i(g)),w=t.filter(E=>E>=v&&E<=C),S=n.broadcastCalendar?35:42;if(n.fixedWeeks&&w.length<S){const E=t.filter(D=>{const A=S-w.length;return D>C&&D<=o(C,A)});w.push(...E)}const k=w.reduce((E,D)=>{const A=n.ISOWeek?l(D):u(D),M=E.find(_=>_.weekNumber===A),j=new yl(D,g,r);return M?M.days.push(j):E.push(new zg(A,[j])),E},[]),T=new $g(g,k);return h.push(T),h},[]);return n.reverseMonths?b.reverse():b}function qy(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:s,startOfMonth:a,endOfMonth:i,addYears:c,endOfYear:l,newDate:u,today:d}=t,{fromYear:f,toYear:m,fromMonth:b,toMonth:h}=e;!n&&b&&(n=b),!n&&f&&(n=t.newDate(f,0,1)),!r&&h&&(r=h),!r&&m&&(r=u(m,11,31));const g=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=a(n):f?n=u(f,0,1):!n&&g&&(n=o(c(e.today??d(),-100))),r?r=i(r):m?r=u(m,11,31):!r&&g&&(r=l(e.today??d())),[n&&s(n),r&&s(r)]}function Ky(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s=1}=n,{startOfMonth:a,addMonths:i,differenceInCalendarMonths:c}=r,l=o?s:1,u=a(e);if(!t)return i(u,l);if(!(c(t,e)<s))return i(u,l)}function Xy(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s}=n,{startOfMonth:a,addMonths:i,differenceInCalendarMonths:c}=r,l=o?s??1:1,u=a(e);if(!t)return i(u,-l);if(!(c(u,t)<=0))return i(u,-l)}function Zy(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function Rr(e,t){const[n,r]=x.useState(e);return[t===void 0?n:t,r]}function Qy(e,t){const[n,r]=qy(e,t),{startOfMonth:o,endOfMonth:s}=t,a=Ya(e,n,r,t),[i,c]=Rr(a,e.month?a:void 0);x.useEffect(()=>{const S=Ya(e,n,r,t);c(S)},[e.timeZone]);const{months:l,weeks:u,days:d,previousMonth:f,nextMonth:m}=x.useMemo(()=>{const S=Gy(i,r,{numberOfMonths:e.numberOfMonths},t),k=Yy(S,e.endMonth?s(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),T=Uy(S,k,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),E=Zy(T),D=Hy(T),A=Xy(i,n,e,t),M=Ky(i,r,e,t);return{months:T,weeks:E,days:D,previousMonth:A,nextMonth:M}},[t,i.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:b,onMonthChange:h}=e,g=S=>u.some(k=>k.days.some(T=>T.isEqualTo(S))),v=S=>{if(b)return;let k=o(S);n&&k<o(n)&&(k=o(n)),r&&k>o(r)&&(k=o(r)),c(k),h?.(k)};return{months:l,weeks:u,days:d,navStart:n,navEnd:r,previousMonth:f,nextMonth:m,goToMonth:v,goToDay:S=>{g(S)||v(S.date)}}}var Ge;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Ge||(Ge={}));function Ha(e){return!e[de.disabled]&&!e[de.hidden]&&!e[de.outside]}function Jy(e,t,n,r){let o,s=-1;for(const a of e){const i=t(a);Ha(i)&&(i[de.focused]&&s<Ge.FocusedModifier?(o=a,s=Ge.FocusedModifier):r?.isEqualTo(a)&&s<Ge.LastFocused?(o=a,s=Ge.LastFocused):n(a.date)&&s<Ge.Selected?(o=a,s=Ge.Selected):i[de.today]&&s<Ge.Today&&(o=a,s=Ge.Today))}return o||(o=e.find(a=>Ha(t(a)))),o}function eb(e,t,n,r,o,s,a){const{ISOWeek:i,broadcastCalendar:c}=s,{addDays:l,addMonths:u,addWeeks:d,addYears:f,endOfBroadcastWeek:m,endOfISOWeek:b,endOfWeek:h,max:g,min:v,startOfBroadcastWeek:C,startOfISOWeek:w,startOfWeek:S}=a;let T={day:l,week:d,month:u,year:f,startOfWeek:E=>c?C(E,a):i?w(E):S(E),endOfWeek:E=>c?m(E):i?b(E):h(E)}[e](n,t==="after"?1:-1);return t==="before"&&r?T=g([r,T]):t==="after"&&o&&(T=v([o,T])),T}function Ol(e,t,n,r,o,s,a,i=0){if(i>365)return;const c=eb(e,t,n.date,r,o,s,a),l=!!(s.disabled&&st(c,s.disabled,a)),u=!!(s.hidden&&st(c,s.hidden,a)),d=c,f=new yl(c,d,a);return!l&&!u?f:Ol(e,t,f,r,o,s,a,i+1)}function tb(e,t,n,r,o){const{autoFocus:s}=e,[a,i]=x.useState(),c=Jy(t.days,n,r||(()=>!1),a),[l,u]=x.useState(s?c:void 0);return{isFocusTarget:h=>!!c?.isEqualTo(h),setFocused:u,focused:l,blur:()=>{i(l),u(void 0)},moveFocus:(h,g)=>{if(!l)return;const v=Ol(h,g,l,t.navStart,t.navEnd,e,o);v&&(e.disableNavigation&&!t.days.some(w=>w.isEqualTo(v))||(t.goToDay(v),u(v)))}}}function nb(e,t){const{selected:n,required:r,onSelect:o}=e,[s,a]=Rr(n,o?n:void 0),i=o?n:s,{isSameDay:c}=t,l=m=>i?.some(b=>c(b,m))??!1,{min:u,max:d}=e;return{selected:i,select:(m,b,h)=>{let g=[...i??[]];if(l(m)){if(i?.length===u||r&&i?.length===1)return;g=i?.filter(v=>!c(v,m))}else i?.length===d?g=[m]:g=[...g,m];return o||a(g),o?.(g,m,b,h),g},isSelected:l}}function rb(e,t,n=0,r=0,o=!1,s=tt){const{from:a,to:i}=t||{},{isSameDay:c,isAfter:l,isBefore:u}=s;let d;if(!a&&!i)d={from:e,to:n>0?void 0:e};else if(a&&!i)c(a,e)?n===0?d={from:a,to:e}:o?d={from:a,to:void 0}:d=void 0:u(e,a)?d={from:e,to:a}:d={from:a,to:e};else if(a&&i)if(c(a,e)&&c(i,e))o?d={from:a,to:i}:d=void 0;else if(c(a,e))d={from:a,to:n>0?void 0:e};else if(c(i,e))d={from:e,to:n>0?void 0:e};else if(u(e,a))d={from:e,to:i};else if(l(e,a))d={from:a,to:e};else if(l(e,i))d={from:a,to:e};else throw new Error("Invalid range");if(d?.from&&d?.to){const f=s.differenceInCalendarDays(d.to,d.from);r>0&&f>r?d={from:e,to:void 0}:n>1&&f<n&&(d={from:e,to:void 0})}return d}function ob(e,t,n=tt){const r=Array.isArray(t)?t:[t];let o=e.from;const s=n.differenceInCalendarDays(e.to,e.from),a=Math.min(s,6);for(let i=0;i<=a;i++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function Ga(e,t,n=tt){return ot(e,t.from,!1,n)||ot(e,t.to,!1,n)||ot(t,e.from,!1,n)||ot(t,e.to,!1,n)}function sb(e,t,n=tt){const r=Array.isArray(t)?t:[t];if(r.filter(i=>typeof i!="function").some(i=>typeof i=="boolean"?i:n.isDate(i)?ot(e,i,!1,n):xl(i,n)?i.some(c=>ot(e,c,!1,n)):Ar(i)?i.from&&i.to?Ga(e,{from:i.from,to:i.to},n):!1:vl(i)?ob(e,i.dayOfWeek,n):gs(i)?n.isAfter(i.before,i.after)?Ga(e,{from:n.addDays(i.after,1),to:n.addDays(i.before,-1)},n):st(e.from,i,n)||st(e.to,i,n):ys(i)||bs(i)?st(e.from,i,n)||st(e.to,i,n):!1))return!0;const a=r.filter(i=>typeof i=="function");if(a.length){let i=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let l=0;l<=c;l++){if(a.some(u=>u(i)))return!0;i=n.addDays(i,1)}}return!1}function ab(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:s,onSelect:a}=e,[i,c]=Rr(o,a?o:void 0),l=a?o:i;return{selected:l,select:(f,m,b)=>{const{min:h,max:g}=e,v=f?rb(f,l,h,g,s,t):void 0;return r&&n&&v?.from&&v.to&&sb({from:v.from,to:v.to},n,t)&&(v.from=f,v.to=void 0),a||c(v),a?.(v,f,m,b),v},isSelected:f=>l&&ot(l,f,!1,t)}}function ib(e,t){const{selected:n,required:r,onSelect:o}=e,[s,a]=Rr(n,o?n:void 0),i=o?n:s,{isSameDay:c}=t;return{selected:i,select:(d,f,m)=>{let b=d;return!r&&i&&i&&c(d,i)&&(b=void 0),o||a(b),o?.(b,d,f,m),b},isSelected:d=>i?c(i,d):!1}}function cb(e,t){const n=ib(e,t),r=nb(e,t),o=ab(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function Ie(e,t){return e instanceof Se&&e.timeZone===t?e:new Se(e,t)}function Vt(e,t,n){return Ie(e,t)}function Ua(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?Vt(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?Vt(r,t):r):Ar(e)?{...e,from:e.from?Ie(e.from,t):e.from,to:e.to?Ie(e.to,t):e.to}:gs(e)?{before:Vt(e.before,t),after:Vt(e.after,t)}:ys(e)?{after:Vt(e.after,t)}:bs(e)?{before:Vt(e.before,t)}:e}function ro(e,t,n){return e&&(Array.isArray(e)?e.map(r=>Ua(r,t)):Ua(e,t))}function lb(e){let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=Ie(t.today,n)),t.month&&(t.month=Ie(t.month,n)),t.defaultMonth&&(t.defaultMonth=Ie(t.defaultMonth,n)),t.startMonth&&(t.startMonth=Ie(t.startMonth,n)),t.endMonth&&(t.endMonth=Ie(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=Ie(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(Q=>Ie(Q,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?Ie(t.selected.from,n):t.selected.from,to:t.selected.to?Ie(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=ro(t.disabled,n)),t.hidden!==void 0&&(t.hidden=ro(t.hidden,n)),t.modifiers)){const Q={};Object.keys(t.modifiers).forEach(ae=>{Q[ae]=ro(t.modifiers?.[ae],n)}),t.modifiers=Q}const{components:r,formatters:o,labels:s,dateLib:a,locale:i,classNames:c}=x.useMemo(()=>{const Q={...gl,...t.locale},ae=t.broadcastCalendar?1:t.weekStartsOn,q=t.noonSafe&&t.timeZone?Ly(t.timeZone,{weekStartsOn:ae,locale:Q}):void 0,se=t.dateLib&&q?{...q,...t.dateLib}:t.dateLib??q,Me=new Oe({locale:Q,weekStartsOn:ae,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},se);return{dateLib:Me,components:vy(t.components),formatters:My(t.formatters),labels:jy(t.labels,Me.options),locale:Q,classNames:{...wl(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:a.today()});const{captionLayout:l,mode:u,navLayout:d,numberOfMonths:f=1,onDayBlur:m,onDayClick:b,onDayFocus:h,onDayKeyDown:g,onDayMouseEnter:v,onDayMouseLeave:C,onNextClick:w,onPrevClick:S,showWeekNumber:k,styles:T}=t,{formatCaption:E,formatDay:D,formatMonthDropdown:A,formatWeekNumber:M,formatWeekNumberHeader:j,formatWeekdayName:_,formatYearDropdown:B}=o,z=Qy(t,a),{days:K,months:$,navStart:W,navEnd:N,previousMonth:H,nextMonth:ee,goToMonth:P}=z,Y=yy(K,t,W,N,a),{isSelected:G,select:X,selected:xe}=cb(t,a)??{},{blur:Pe,focused:R,isFocusTarget:U,moveFocus:ne,setFocused:Z}=tb(t,z,Y,G??(()=>!1),a),{labelDayButton:re,labelGridcell:ye,labelGrid:we,labelMonthDropdown:wt,labelNav:fn,labelPrevious:qn,labelNext:Gr,labelWeekday:Km,labelWeekNumber:Xm,labelWeekNumberHeader:Zm,labelYearDropdown:Qm}=s,Jm=x.useMemo(()=>Vy(a,t.ISOWeek,t.broadcastCalendar,t.today),[a,t.ISOWeek,t.broadcastCalendar,t.today]),Ca=u!==void 0||b!==void 0,Ur=x.useCallback(()=>{H&&(P(H),S?.(H))},[H,P,S]),qr=x.useCallback(()=>{ee&&(P(ee),w?.(ee))},[P,ee,w]),eh=x.useCallback((Q,ae)=>q=>{q.preventDefault(),q.stopPropagation(),Z(Q),!ae.disabled&&(X?.(Q.date,ae,q),b?.(Q.date,ae,q))},[X,b,Z]),th=x.useCallback((Q,ae)=>q=>{Z(Q),h?.(Q.date,ae,q)},[h,Z]),nh=x.useCallback((Q,ae)=>q=>{Pe(),m?.(Q.date,ae,q)},[Pe,m]),rh=x.useCallback((Q,ae)=>q=>{const se={ArrowLeft:[q.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[q.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[q.shiftKey?"year":"week","after"],ArrowUp:[q.shiftKey?"year":"week","before"],PageUp:[q.shiftKey?"year":"month","before"],PageDown:[q.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(se[q.key]){q.preventDefault(),q.stopPropagation();const[Me,oe]=se[q.key];ne(Me,oe)}g?.(Q.date,ae,q)},[ne,g,t.dir]),oh=x.useCallback((Q,ae)=>q=>{v?.(Q.date,ae,q)},[v]),sh=x.useCallback((Q,ae)=>q=>{C?.(Q.date,ae,q)},[C]),ah=x.useCallback(Q=>ae=>{const q=Number(ae.target.value),se=a.setMonth(a.startOfMonth(Q),q);P(se)},[a,P]),ih=x.useCallback(Q=>ae=>{const q=Number(ae.target.value),se=a.setYear(a.startOfMonth(Q),q);P(se)},[a,P]),{className:ch,style:lh}=x.useMemo(()=>({className:[c[L.Root],t.className].filter(Boolean).join(" "),style:{...T?.[L.Root],...t.style}}),[c,t.className,t.style,T]),uh=xy(t),ka=x.useRef(null);zy(ka,!!t.animate,{classNames:c,months:$,focused:R,dateLib:a});const dh={dayPickerProps:t,selected:xe,select:X,isSelected:G,months:$,nextMonth:ee,previousMonth:H,goToMonth:P,getModifiers:Y,components:r,classNames:c,styles:T,labels:s,formatters:o};return x.createElement(bl.Provider,{value:dh},x.createElement(r.Root,{rootRef:t.animate?ka:void 0,className:ch,style:lh,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...uh},x.createElement(r.Months,{className:c[L.Months],style:T?.[L.Months]},!t.hideNavigation&&!d&&x.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[L.Nav],style:T?.[L.Nav],"aria-label":fn(),onPreviousClick:Ur,onNextClick:qr,previousMonth:H,nextMonth:ee}),$.map((Q,ae)=>x.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:c[L.Month],style:T?.[L.Month],key:ae,displayIndex:ae,calendarMonth:Q},d==="around"&&!t.hideNavigation&&ae===0&&x.createElement(r.PreviousMonthButton,{type:"button",className:c[L.PreviousMonthButton],tabIndex:H?void 0:-1,"aria-disabled":H?void 0:!0,"aria-label":qn(H),onClick:Ur,"data-animated-button":t.animate?"true":void 0},x.createElement(r.Chevron,{disabled:H?void 0:!0,className:c[L.Chevron],orientation:t.dir==="rtl"?"right":"left"})),x.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:c[L.MonthCaption],style:T?.[L.MonthCaption],calendarMonth:Q,displayIndex:ae},l?.startsWith("dropdown")?x.createElement(r.DropdownNav,{className:c[L.Dropdowns],style:T?.[L.Dropdowns]},(()=>{const q=l==="dropdown"||l==="dropdown-months"?x.createElement(r.MonthsDropdown,{key:"month",className:c[L.MonthsDropdown],"aria-label":wt(),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:ah(Q.date),options:_y(Q.date,W,N,o,a),style:T?.[L.Dropdown],value:a.getMonth(Q.date)}):x.createElement("span",{key:"month"},A(Q.date,a)),se=l==="dropdown"||l==="dropdown-years"?x.createElement(r.YearsDropdown,{key:"year",className:c[L.YearsDropdown],"aria-label":Qm(a.options),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:ih(Q.date),options:Fy(W,N,o,a,!!t.reverseYears),style:T?.[L.Dropdown],value:a.getYear(Q.date)}):x.createElement("span",{key:"year"},B(Q.date,a));return a.getMonthYearOrder()==="year-first"?[se,q]:[q,se]})(),x.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},E(Q.date,a.options,a))):x.createElement(r.CaptionLabel,{className:c[L.CaptionLabel],role:"status","aria-live":"polite"},E(Q.date,a.options,a))),d==="around"&&!t.hideNavigation&&ae===f-1&&x.createElement(r.NextMonthButton,{type:"button",className:c[L.NextMonthButton],tabIndex:ee?void 0:-1,"aria-disabled":ee?void 0:!0,"aria-label":Gr(ee),onClick:qr,"data-animated-button":t.animate?"true":void 0},x.createElement(r.Chevron,{disabled:ee?void 0:!0,className:c[L.Chevron],orientation:t.dir==="rtl"?"left":"right"})),ae===f-1&&d==="after"&&!t.hideNavigation&&x.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[L.Nav],style:T?.[L.Nav],"aria-label":fn(),onPreviousClick:Ur,onNextClick:qr,previousMonth:H,nextMonth:ee}),x.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":we(Q.date,a.options,a)||void 0,className:c[L.MonthGrid],style:T?.[L.MonthGrid]},!t.hideWeekdays&&x.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:c[L.Weekdays],style:T?.[L.Weekdays]},k&&x.createElement(r.WeekNumberHeader,{"aria-label":Zm(a.options),className:c[L.WeekNumberHeader],style:T?.[L.WeekNumberHeader],scope:"col"},j()),Jm.map(q=>x.createElement(r.Weekday,{"aria-label":Km(q,a.options,a),className:c[L.Weekday],key:String(q),style:T?.[L.Weekday],scope:"col"},_(q,a.options,a)))),x.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:c[L.Weeks],style:T?.[L.Weeks]},Q.weeks.map(q=>x.createElement(r.Week,{className:c[L.Week],key:q.weekNumber,style:T?.[L.Week],week:q},k&&x.createElement(r.WeekNumber,{week:q,style:T?.[L.WeekNumber],"aria-label":Xm(q.weekNumber,{locale:i}),className:c[L.WeekNumber],scope:"row",role:"rowheader"},M(q.weekNumber,a)),q.days.map(se=>{const{date:Me}=se,oe=Y(se);if(oe[de.focused]=!oe.hidden&&!!R?.isEqualTo(se),oe[$e.selected]=G?.(Me)||oe.selected,Ar(xe)){const{from:Kr,to:Xr}=xe;oe[$e.range_start]=!!(Kr&&Xr&&a.isSameDay(Me,Kr)),oe[$e.range_end]=!!(Kr&&Xr&&a.isSameDay(Me,Xr)),oe[$e.range_middle]=ot(xe,Me,!0,a)}const fh=Iy(oe,T,t.modifiersStyles),mh=by(oe,c,t.modifiersClassNames),hh=!Ca&&!oe.hidden?ye(Me,oe,a.options,a):void 0;return x.createElement(r.Day,{key:`${se.isoDate}_${se.displayMonthId}`,day:se,modifiers:oe,className:mh.join(" "),style:fh,role:"gridcell","aria-selected":oe.selected||void 0,"aria-label":hh,"data-day":se.isoDate,"data-month":se.outside?se.dateMonthId:void 0,"data-selected":oe.selected||void 0,"data-disabled":oe.disabled||void 0,"data-hidden":oe.hidden||void 0,"data-outside":se.outside||void 0,"data-focused":oe.focused||void 0,"data-today":oe.today||void 0},!oe.hidden&&Ca?x.createElement(r.DayButton,{className:c[L.DayButton],style:T?.[L.DayButton],type:"button",day:se,modifiers:oe,disabled:!oe.focused&&oe.disabled||void 0,"aria-disabled":oe.focused&&oe.disabled||void 0,tabIndex:U(se)?0:-1,"aria-label":re(Me,oe,a.options,a),onClick:eh(se,oe),onBlur:nh(se,oe),onFocus:th(se,oe),onKeyDown:rh(se,oe),onMouseEnter:oh(se,oe),onMouseLeave:sh(se,oe)},D(Me,a.options,a)):!oe.hidden&&D(se.date,a.options,a))})))))))),t.footer&&x.createElement(r.Footer,{className:c[L.Footer],style:T?.[L.Footer],role:"status","aria-live":"polite"},t.footer)))}const ub=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),db=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),qa=e=>{const t=db(e);return t.charAt(0).toUpperCase()+t.slice(1)},jl=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),fb=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var mb={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const hb=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:a,...i},c)=>x.createElement("svg",{ref:c,...mb,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:jl("lucide",o),...!s&&!fb(i)&&{"aria-hidden":"true"},...i},[...a.map(([l,u])=>x.createElement(l,u)),...Array.isArray(s)?s:[s]]));const on=(e,t)=>{const n=x.forwardRef(({className:r,...o},s)=>x.createElement(hb,{ref:s,iconNode:t,className:jl(`lucide-${ub(qa(e))}`,`lucide-${e}`,r),...o}));return n.displayName=qa(e),n};const pb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],_l=on("chevron-down",pb);const gb=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],yb=on("chevron-left",gb);const bb=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],vb=on("chevron-right",bb);const xb=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],wb=on("chevron-up",xb);const Cb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],kb=on("circle",Cb);const Sb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Db=on("x",Sb);function Tb({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="dropdown",formatters:o,components:s,navButtonVariant:a="iconSquareGhost",...i}){const c=wl();return p.jsx(lb,{showOutsideDays:n,captionLayout:r,formatters:{formatMonthDropdown:u=>u.toLocaleString("default",{month:"short"}),...o},className:O("p-3 rounded-md border border-[var(--atom-border)]","bg-[var(--atom-bg)] text-[var(--atom-text)]","shadow-[var(--atom-shadow-sm)] w-fit",e),classNames:{root:O("w-fit",c.root),months:O("relative flex flex-col gap-4 md:flex-row",c.months),month:O("flex w-full flex-col gap-4",c.month),nav:O("absolute inset-x-0 top-0 flex items-center justify-between px-1",c.nav),button_previous:O("inline-flex items-center justify-center","h-7 w-7 rounded-md","bg-[var(--atom-card-bg)]","border border-[color-mix(in_srgb,var(--atom-primary)_15%,transparent)]","opacity-60 hover:opacity-100","transition-opacity","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--atom-primary)] focus-visible:ring-offset-1","cursor-pointer",c.button_previous),button_next:O("inline-flex items-center justify-center","h-7 w-7 rounded-md","bg-[var(--atom-card-bg)]","border border-[color-mix(in_srgb,var(--atom-primary)_15%,transparent)]","opacity-60 hover:opacity-100","transition-opacity","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--atom-primary)] focus-visible:ring-offset-1","cursor-pointer",c.button_next),month_caption:O("flex h-7 w-full items-center justify-center gap-2",c.month_caption),dropdowns:O("flex items-center gap-2 text-sm font-medium",c.dropdowns),dropdown_root:O("relative flex items-center rounded-md border border-[var(--atom-border)]","bg-[var(--atom-bg)] px-2 py-1 shadow-xs",c.dropdown_root),dropdown:O("absolute inset-0 opacity-0 cursor-pointer",c.dropdown),caption_label:O("inline-flex items-center gap-2 select-none text-md font-medium",c.caption_label),month_grid:O("w-full border-collapse",c.month_grid),weekdays:O("flex",c.weekdays),weekday:O("flex-1 select-none text-[0.75rem] font-normal opacity-60 text-center",c.weekday),week:O("mt-2 flex w-full",c.week),day:O("relative aspect-square w-8 h-8 p-0 text-center",c.day),outside:O("opacity-40",c.outside),disabled:O("opacity-30 pointer-events-none",c.disabled),hidden:O("invisible",c.hidden),range_start:O("rounded-l-md",c.range_start),range_end:O("rounded-r-md",c.range_end),range_middle:O("rounded-none",c.range_middle),today:O("rounded-md","bg-[var(--atom-primary-100)]",c.today),...t},components:{Root:({className:u,rootRef:d,...f})=>p.jsx("div",{"data-slot":"calendar",ref:d,className:O(u),...f}),Chevron:({className:u,orientation:d,...f})=>d==="left"?p.jsx(yb,{className:O("size-4",u),...f}):d==="right"?p.jsx(vb,{className:O("size-4",u),...f}):p.jsx(_l,{className:O("size-4",u),...f}),DayButton:u=>p.jsx(l,{...u}),WeekNumber:({children:u,...d})=>p.jsx("td",{...d,children:p.jsx("div",{className:"flex items-center justify-center text-xs opacity-60",children:u})}),...s},...i});function l({className:u,day:d,modifiers:f,...m}){const b=y.useRef(null);y.useEffect(()=>{f.focused&&b.current?.focus()},[f.focused]);const h=!!f.selected&&!f.range_start&&!f.range_end&&!f.range_middle;return p.jsx(fs,{ref:b,variant:a,size:"sm","data-day":d.date.toLocaleDateString(),"data-selected-single":h||void 0,"data-range-start":f.range_start||void 0,"data-range-end":f.range_end||void 0,"data-range-middle":f.range_middle||void 0,disabled:f.disabled,className:O("!px-0 !py-0 w-full h-full","data-[selected-single=true]:bg-[var(--atom-primary)]","data-[selected-single=true]:!text-[var(--atom-primary-contrast)]","data-[range-start=true]:bg-[var(--atom-primary)] data-[range-start=true]:!text-[var(--atom-primary-contrast)]","data-[range-end=true]:bg-[var(--atom-primary)] data-[range-end=true]:!text-[var(--atom-primary-contrast)]","data-[range-middle=true]:bg-[color-mix(in_srgb,var(--atom-primary)_18%,transparent)]","hover:bg-[color-mix(in_srgb,var(--atom-border)_70%,transparent)]",u,e),...m})}}const Eb=te(["rounded-lg","bg-[var(--atom-theme-surface-primary)]","border border-[color-mix(in_srgb,var(--atom-theme-border-primary)_60%,transparent)]","transition-all duration-200","overflow-hidden"].join(" "),{variants:{variant:{elevated:"shadow-md hover:shadow-lg",outlined:"shadow-sm",flat:"border-transparent shadow-none"},hoverable:{true:"hover:shadow-xl hover:scale-[1.02] cursor-pointer",false:""},clickable:{true:"cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--atom-ring-color)] focus-visible:ring-offset-2",false:""}},defaultVariants:{variant:"elevated",hoverable:!1,clickable:!1}}),Il=y.forwardRef(({className:e,variant:t,hoverable:n,clickable:r,...o},s)=>p.jsx("div",{ref:s,className:O(Eb({variant:t,hoverable:n,clickable:r}),e),tabIndex:r?0:void 0,...o}));Il.displayName="Card";const Ka=te("px-6 pt-6",{variants:{divider:{true:"border-b border-[var(--atom-theme-border-primary)] pb-4",false:""},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{divider:!1,align:"left"}}),Vl=y.forwardRef(({className:e,divider:t,align:n,avatar:r,action:o,children:s,...a},i)=>r||o?p.jsx("div",{ref:i,className:O(Ka({divider:t}),e),...a,children:p.jsxs("div",{className:"flex items-start gap-4",children:[r&&p.jsx("div",{className:"shrink-0",children:r}),p.jsx("div",{className:"flex-1 min-w-0",children:s}),o&&p.jsx("div",{className:"shrink-0",children:o})]})}):p.jsx("div",{ref:i,className:O(Ka({divider:t,align:n}),e),...a,children:s}));Vl.displayName="CardHeader";const Fl=y.forwardRef(({className:e,...t},n)=>p.jsx("h3",{ref:n,className:O("text-lg font-semibold leading-none tracking-tight","text-[var(--atom-theme-text-primary)]",e),...t}));Fl.displayName="CardTitle";const Ll=y.forwardRef(({className:e,...t},n)=>p.jsx("p",{ref:n,className:O("mt-1 text-sm text-[var(--atom-text-muted)]",e),...t}));Ll.displayName="CardSubtitle";const Pb=te("",{variants:{noPadding:{true:"",false:"px-6 py-4"}},defaultVariants:{noPadding:!1}}),Wl=y.forwardRef(({className:e,noPadding:t,...n},r)=>p.jsx("div",{ref:r,className:O(Pb({noPadding:t}),e),...n}));Wl.displayName="CardBody";const Mb=te("flex items-center gap-3 px-6 pb-6",{variants:{divider:{true:"border-t border-[var(--atom-theme-border-primary)] pt-4",false:""},align:{left:"justify-start",center:"justify-center",right:"justify-end",between:"justify-between"}},defaultVariants:{divider:!1,align:"right"}}),Bl=y.forwardRef(({className:e,divider:t,align:n,...r},o)=>p.jsx("div",{ref:o,className:O(Mb({divider:t,align:n}),e),...r}));Bl.displayName="CardFooter";const Ab=te("w-full",{variants:{size:{sm:"h-32",md:"h-48",lg:"h-64",xl:"h-80",auto:"h-auto"},objectFit:{cover:"object-cover",contain:"object-contain",fill:"object-fill",none:"object-none"}},defaultVariants:{size:"md",objectFit:"cover"}}),$l=y.forwardRef(({className:e,size:t,objectFit:n,...r},o)=>p.jsx("img",{ref:o,className:O(Ab({size:t,objectFit:n}),e),...r}));$l.displayName="CardMedia";const Rb=te(["shrink-0 rounded-[var(--atom-radius-1)]","border border-[var(--atom-card-border)]","bg-[var(--atom-input-bg)]","transition-[background-color,border-color,box-shadow,color]","disabled:cursor-not-allowed disabled:opacity-50","hover:border-[color-mix(in_srgb,var(--atom-card-border)_70%,var(--atom-text))]","focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-[color-mix(in_srgb,var(--atom-primary)_35%,transparent)]","focus-visible:ring-offset-0","accent-[var(--atom-primary)]"].join(" "),{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),zl=y.forwardRef(({className:e,size:t,id:n,label:r,indeterminate:o=!1,wrapperClassName:s,labelClassName:a,disabled:i,...c},l)=>{const u=y.useId(),d=n??u,f=y.useRef(null);return y.useImperativeHandle(l,()=>f.current,[]),y.useEffect(()=>{f.current&&(f.current.indeterminate=o)},[o]),p.jsxs("div",{className:O("inline-flex items-center gap-2",s),children:[p.jsx("input",{ref:f,id:d,type:"checkbox","data-slot":"checkbox",className:O(Rb({size:t}),e),disabled:i,...c}),r!=null&&p.jsx("label",{htmlFor:d,className:O("select-none text-sm font-medium","text-[var(--atom-text)]",i?"cursor-not-allowed opacity-50":"cursor-pointer",a),children:r})]})});zl.displayName="Checkbox";const Nb=te(["flex flex-col","rounded-md border","select-text outline-none","transition-[background-color,border-color,box-shadow]","duration-200"].join(" "),{variants:{variant:{default:"bg-[var(--atom-theme-surface-primary)] border-[var(--atom-theme-border-primary)] text-[var(--atom-theme-text-primary)]",info:"bg-[color-mix(in_srgb,var(--atom-info)_8%,transparent)] border-[color-mix(in_srgb,var(--atom-info)_25%,transparent)] text-[color-mix(in_srgb,var(--atom-info)_90%,black)]",success:"bg-[color-mix(in_srgb,var(--atom-success)_8%,transparent)] border-[color-mix(in_srgb,var(--atom-success)_25%,transparent)] text-[color-mix(in_srgb,var(--atom-success)_90%,black)]",warning:"bg-[color-mix(in_srgb,var(--atom-warning)_8%,transparent)] border-[color-mix(in_srgb,var(--atom-warning)_25%,transparent)] text-[color-mix(in_srgb,var(--atom-warning)_90%,black)]",error:"bg-[color-mix(in_srgb,var(--atom-error)_8%,transparent)] border-[color-mix(in_srgb,var(--atom-error)_25%,transparent)] text-[color-mix(in_srgb,var(--atom-error)_90%,black)]",neutral:"bg-[color-mix(in_srgb,var(--atom-badge-archived-border)_6%,transparent)] border-[color-mix(in_srgb,var(--atom-badge-archived-border)_75%,transparent)] text-muted-foreground"},size:{sm:"p-3 text-xs gap-2",md:"p-4 text-sm gap-3",lg:"p-6 text-base gap-4"}},defaultVariants:{variant:"default",size:"md"}}),Yl=y.forwardRef(({className:e,variant:t="default",size:n="md",title:r,icon:o,children:s,footer:a,...i},c)=>{const l=t==="error"||t==="warning"?"polite":"off";return p.jsxs("div",{ref:c,role:"region","aria-live":l,"data-slot":"content-card",className:O(Nb({variant:t,size:n}),e),...i,children:[(r||o)&&p.jsxs("div",{className:"flex items-start gap-2",children:[o&&p.jsx("span",{"aria-hidden":"true",className:O("shrink-0 mt-0.5",t==="info"&&"text-[var(--atom-info)]",t==="success"&&"text-[var(--atom-success)]",t==="warning"&&"text-[var(--atom-warning)]",t==="error"&&"text-[var(--atom-error)]",t==="neutral"&&"text-muted-foreground",t==="default"&&"text-[var(--atom-theme-text-primary)]"),children:o}),r&&r.trim()!==""&&p.jsx("h3",{className:"font-semibold leading-tight",children:r})]}),p.jsx("div",{className:"flex-1 leading-relaxed",children:s}),a&&p.jsx("div",{className:"text-xs opacity-80 border-t border-current/10 pt-2 mt-1",children:a})]})});Yl.displayName="ContentCard";function fe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Ob(e,t){const n=y.createContext(t),r=s=>{const{children:a,...i}=s,c=y.useMemo(()=>i,Object.values(i));return p.jsx(n.Provider,{value:c,children:a})};r.displayName=e+"Provider";function o(s){const a=y.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Ot(e,t=[]){let n=[];function r(s,a){const i=y.createContext(a),c=n.length;n=[...n,a];const l=d=>{const{scope:f,children:m,...b}=d,h=f?.[e]?.[c]||i,g=y.useMemo(()=>b,Object.values(b));return p.jsx(h.Provider,{value:g,children:m})};l.displayName=s+"Provider";function u(d,f){const m=f?.[e]?.[c]||i,b=y.useContext(m);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[l,u]}const o=()=>{const s=n.map(a=>y.createContext(a));return function(i){const c=i?.[e]||s;return y.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[r,jb(o,...t)]}function jb(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((i,{useScope:c,scopeName:l})=>{const d=c(s)[`__scope${l}`];return{...i,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var pt=globalThis?.document?y.useLayoutEffect:()=>{},_b=y[" useId ".trim().toString()]||(()=>{}),Ib=0;function kn(e){const[t,n]=y.useState(_b());return pt(()=>{n(r=>r??String(Ib++))},[e]),e||(t?`radix-${t}`:"")}var Vb=y[" useInsertionEffect ".trim().toString()]||pt;function Nr({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,a]=Fb({defaultProp:t,onChange:n}),i=e!==void 0,c=i?e:o;{const u=y.useRef(e!==void 0);y.useEffect(()=>{const d=u.current;d!==i&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=i},[i,r])}const l=y.useCallback(u=>{if(i){const d=Lb(u)?u(e):u;d!==e&&a.current?.(d)}else s(u)},[i,e,s,a]);return[c,l]}function Fb({defaultProp:e,onChange:t}){const[n,r]=y.useState(e),o=y.useRef(n),s=y.useRef(t);return Vb(()=>{s.current=t},[t]),y.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function Lb(e){return typeof e=="function"}function Wb(e){const t=Bb(e),n=y.forwardRef((r,o)=>{const{children:s,...a}=r,i=y.Children.toArray(s),c=i.find(zb);if(c){const l=c.props.children,u=i.map(d=>d===c?y.Children.count(l)>1?y.Children.only(null):y.isValidElement(l)?l.props.children:null:d);return p.jsx(t,{...a,ref:o,children:y.isValidElement(l)?y.cloneElement(l,void 0,u):null})}return p.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Bb(e){const t=y.forwardRef((n,r)=>{const{children:o,...s}=n;if(y.isValidElement(o)){const a=Hb(o),i=Yb(s,o.props);return o.type!==y.Fragment&&(i.ref=r?Vn(r,a):a),y.cloneElement(o,i)}return y.Children.count(o)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $b=Symbol("radix.slottable");function zb(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$b}function Yb(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Hb(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Gb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ge=Gb.reduce((e,t)=>{const n=Wb(`Primitive.${t}`),r=y.forwardRef((o,s)=>{const{asChild:a,...i}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(c,{...i,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ub(e,t){e&&Fc.flushSync(()=>e.dispatchEvent(t))}function At(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}function qb(e,t=globalThis?.document){const n=At(e);y.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Kb="DismissableLayer",jo="dismissableLayer.update",Xb="dismissableLayer.pointerDownOutside",Zb="dismissableLayer.focusOutside",Xa,Hl=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ws=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...c}=e,l=y.useContext(Hl),[u,d]=y.useState(null),f=u?.ownerDocument??globalThis?.document,[,m]=y.useState({}),b=ke(t,E=>d(E)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(g),C=u?h.indexOf(u):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,S=C>=v,k=ev(E=>{const D=E.target,A=[...l.branches].some(M=>M.contains(D));!S||A||(o?.(E),a?.(E),E.defaultPrevented||i?.())},f),T=tv(E=>{const D=E.target;[...l.branches].some(M=>M.contains(D))||(s?.(E),a?.(E),E.defaultPrevented||i?.())},f);return qb(E=>{C===l.layers.size-1&&(r?.(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},f),y.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Xa=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Za(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Xa)}},[u,f,n,l]),y.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Za())},[u,l]),y.useEffect(()=>{const E=()=>m({});return document.addEventListener(jo,E),()=>document.removeEventListener(jo,E)},[]),p.jsx(ge.div,{...c,ref:b,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:fe(e.onFocusCapture,T.onFocusCapture),onBlurCapture:fe(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:fe(e.onPointerDownCapture,k.onPointerDownCapture)})});ws.displayName=Kb;var Qb="DismissableLayerBranch",Jb=y.forwardRef((e,t)=>{const n=y.useContext(Hl),r=y.useRef(null),o=ke(t,r);return y.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(ge.div,{...e,ref:o})});Jb.displayName=Qb;function ev(e,t=globalThis?.document){const n=At(e),r=y.useRef(!1),o=y.useRef(()=>{});return y.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let c=function(){Gl(Xb,n,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function tv(e,t=globalThis?.document){const n=At(e),r=y.useRef(!1);return y.useEffect(()=>{const o=s=>{s.target&&!r.current&&Gl(Zb,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Za(){const e=new CustomEvent(jo);document.dispatchEvent(e)}function Gl(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ub(o,s):o.dispatchEvent(s)}var oo="focusScope.autoFocusOnMount",so="focusScope.autoFocusOnUnmount",Qa={bubbles:!1,cancelable:!0},nv="FocusScope",Ul=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,c]=y.useState(null),l=At(o),u=At(s),d=y.useRef(null),f=ke(t,h=>c(h)),m=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let h=function(w){if(m.paused||!i)return;const S=w.target;i.contains(S)?d.current=S:ft(d.current,{select:!0})},g=function(w){if(m.paused||!i)return;const S=w.relatedTarget;S!==null&&(i.contains(S)||ft(d.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const k of w)k.removedNodes.length>0&&ft(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const C=new MutationObserver(v);return i&&C.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),C.disconnect()}}},[r,i,m.paused]),y.useEffect(()=>{if(i){ei.add(m);const h=document.activeElement;if(!i.contains(h)){const v=new CustomEvent(oo,Qa);i.addEventListener(oo,l),i.dispatchEvent(v),v.defaultPrevented||(rv(cv(ql(i)),{select:!0}),document.activeElement===h&&ft(i))}return()=>{i.removeEventListener(oo,l),setTimeout(()=>{const v=new CustomEvent(so,Qa);i.addEventListener(so,u),i.dispatchEvent(v),v.defaultPrevented||ft(h??document.body,{select:!0}),i.removeEventListener(so,u),ei.remove(m)},0)}}},[i,l,u,m]);const b=y.useCallback(h=>{if(!n&&!r||m.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(g&&v){const C=h.currentTarget,[w,S]=ov(C);w&&S?!h.shiftKey&&v===S?(h.preventDefault(),n&&ft(w,{select:!0})):h.shiftKey&&v===w&&(h.preventDefault(),n&&ft(S,{select:!0})):v===C&&h.preventDefault()}},[n,r,m.paused]);return p.jsx(ge.div,{tabIndex:-1,...a,ref:f,onKeyDown:b})});Ul.displayName=nv;function rv(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ft(r,{select:t}),document.activeElement!==n)return}function ov(e){const t=ql(e),n=Ja(t,e),r=Ja(t.reverse(),e);return[n,r]}function ql(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ja(e,t){for(const n of e)if(!sv(n,{upTo:t}))return n}function sv(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function av(e){return e instanceof HTMLInputElement&&"select"in e}function ft(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&av(e)&&t&&e.select()}}var ei=iv();function iv(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ti(e,t),e.unshift(t)},remove(t){e=ti(e,t),e[0]?.resume()}}}function ti(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function cv(e){return e.filter(t=>t.tagName!=="A")}var lv="Portal",Cs=y.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=y.useState(!1);pt(()=>s(!0),[]);const a=n||o&&globalThis?.document?.body;return a?Mr.createPortal(p.jsx(ge.div,{...r,ref:t}),a):null});Cs.displayName=lv;function uv(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var jt=e=>{const{present:t,children:n}=e,r=dv(t),o=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),s=ke(r.ref,fv(o));return typeof n=="function"||r.isPresent?y.cloneElement(o,{ref:s}):null};jt.displayName="Presence";function dv(e){const[t,n]=y.useState(),r=y.useRef(null),o=y.useRef(e),s=y.useRef("none"),a=e?"mounted":"unmounted",[i,c]=uv(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=Qn(r.current);s.current=i==="mounted"?l:"none"},[i]),pt(()=>{const l=r.current,u=o.current;if(u!==e){const f=s.current,m=Qn(l);e?c("MOUNT"):m==="none"||l?.display==="none"?c("UNMOUNT"):c(u&&f!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),pt(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,d=m=>{const h=Qn(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&h&&(c("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},f=m=>{m.target===t&&(s.current=Qn(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:y.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function Qn(e){return e?.animationName||"none"}function fv(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ao=0;function mv(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ni()),document.body.insertAdjacentElement("beforeend",e[1]??ni()),ao++,()=>{ao===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ao--}},[])}function ni(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ue=function(){return Ue=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ue.apply(this,arguments)};function Kl(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function hv(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var cr="right-scroll-bar-position",lr="width-before-scroll-bar",pv="with-scroll-bars-hidden",gv="--removed-body-scroll-bar-size";function io(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function yv(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var bv=typeof window<"u"?y.useLayoutEffect:y.useEffect,ri=new WeakMap;function vv(e,t){var n=yv(null,function(r){return e.forEach(function(o){return io(o,r)})});return bv(function(){var r=ri.get(n);if(r){var o=new Set(r),s=new Set(e),a=n.current;o.forEach(function(i){s.has(i)||io(i,null)}),s.forEach(function(i){o.has(i)||io(i,a)})}ri.set(n,e)},[e]),n}function xv(e){return e}function wv(e,t){t===void 0&&(t=xv);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(s),a=n}var c=function(){var u=a;a=[],u.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),n}}}};return o}function Cv(e){e===void 0&&(e={});var t=wv(null);return t.options=Ue({async:!0,ssr:!1},e),t}var Xl=function(e){var t=e.sideCar,n=Kl(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return y.createElement(r,Ue({},n))};Xl.isSideCarExport=!0;function kv(e,t){return e.useMedium(t),Xl}var Zl=Cv(),co=function(){},Or=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:co,onWheelCapture:co,onTouchMoveCapture:co}),o=r[0],s=r[1],a=e.forwardProps,i=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,m=e.noRelative,b=e.noIsolation,h=e.inert,g=e.allowPinchZoom,v=e.as,C=v===void 0?"div":v,w=e.gapMode,S=Kl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=f,T=vv([n,t]),E=Ue(Ue({},S),o);return y.createElement(y.Fragment,null,u&&y.createElement(k,{sideCar:Zl,removeScrollBar:l,shards:d,noRelative:m,noIsolation:b,inert:h,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:w}),a?y.cloneElement(y.Children.only(i),Ue(Ue({},E),{ref:T})):y.createElement(C,Ue({},E,{className:c,ref:T}),i))});Or.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Or.classNames={fullWidth:lr,zeroRight:cr};var Sv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Dv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Sv();return t&&e.setAttribute("nonce",t),e}function Tv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ev(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Pv=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Dv())&&(Tv(t,n),Ev(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Mv=function(){var e=Pv();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ql=function(){var e=Mv(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Av={left:0,top:0,right:0,gap:0},lo=function(e){return parseInt(e||"",10)||0},Rv=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[lo(n),lo(r),lo(o)]},Nv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Av;var t=Rv(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ov=Ql(),Ut="data-scroll-locked",jv=function(e,t,n,r){var o=e.left,s=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
7
- .`.concat(pv,` {
6
+ <%s key={someKey} {...props} />`,X,A,U,A),ee[A+X]=!0)}if(A=null,G!==void 0&&(n(G),A=""+G),a(Y)&&(n(Y.key),A=""+Y.key),"key"in Y){G={};for(var ne in Y)ne!=="key"&&(G[ne]=Y[ne])}else G=Y;return A&&i(G,typeof P=="function"?P.displayName||P.name||"Unknown":P),l(P,A,G,o(),we,Pe)}function d(P){f(P)?P._store&&(P._store.validated=1):typeof P=="object"&&P!==null&&P.$$typeof===N&&(P._payload.status==="fulfilled"?f(P._payload.value)&&P._payload.value._store&&(P._payload.value._store.validated=1):P._store&&(P._store.validated=1))}function f(P){return typeof P=="object"&&P!==null&&P.$$typeof===y}var m=w,y=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),k=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),j=Symbol.for("react.client.reference"),_=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=Object.prototype.hasOwnProperty,z=Array.isArray,K=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(P){return P()}};var $,W={},O=m.react_stack_bottom_frame.bind(m,s)(),H=K(r(s)),ee={};pn.Fragment=b,pn.jsx=function(P,Y,G){var X=1e4>_.recentlyCreatedOwnerStacks++;return u(P,Y,G,!1,X?Error("react-stack-top-frame"):O,X?K(r(P)):H)},pn.jsxs=function(P,Y,G){var X=1e4>_.recentlyCreatedOwnerStacks++;return u(P,Y,G,!0,X?Error("react-stack-top-frame"):O,X?K(r(P)):H)}})()),pn}var Ma;function Oh(){return Ma||(Ma=1,process.env.NODE_ENV==="production"?Qn.exports=Nh():Qn.exports=Ah()),Qn.exports}var h=Oh();function $c(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=$c(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function zc(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=$c(e))&&(r&&(r+=" "),r+=t);return r}const Ra=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Na=zc,te=(e,t)=>n=>{var r;if(t?.variants==null)return Na(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(l=>{const u=n?.[l],d=s?.[l];if(u===null)return null;const f=Ra(u)||Ra(d);return o[l][f]}),i=n&&Object.entries(n).reduce((l,u)=>{let[d,f]=u;return f===void 0||(l[d]=f),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,u)=>{let{class:d,className:f,...m}=u;return Object.entries(m).every(y=>{let[p,b]=y;return Array.isArray(b)?b.includes({...s,...i}[p]):{...s,...i}[p]===b})?[...l,d,f]:l},[]);return Na(e,a,c,n?.class,n?.className)};function Aa(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ln(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Aa(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Aa(e[o],null)}}}}function xe(...e){return g.useCallback(Ln(...e),e)}var jh=Symbol.for("react.lazy"),yr=g[" use ".trim().toString()];function _h(e){return typeof e=="object"&&e!==null&&"then"in e}function Yc(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===jh&&"_payload"in e&&_h(e._payload)}function Ih(e){const t=Vh(e),n=g.forwardRef((r,o)=>{let{children:s,...a}=r;Yc(s)&&typeof yr=="function"&&(s=yr(s._payload));const i=g.Children.toArray(s),c=i.find(Lh);if(c){const l=c.props.children,u=i.map(d=>d===c?g.Children.count(l)>1?g.Children.only(null):g.isValidElement(l)?l.props.children:null:d);return h.jsx(t,{...a,ref:o,children:g.isValidElement(l)?g.cloneElement(l,void 0,u):null})}return h.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var Me=Ih("Slot");function Vh(e){const t=g.forwardRef((n,r)=>{let{children:o,...s}=n;if(Yc(o)&&typeof yr=="function"&&(o=yr(o._payload)),g.isValidElement(o)){const a=Bh(o),i=Wh(s,o.props);return o.type!==g.Fragment&&(i.ref=r?Ln(r,a):a),g.cloneElement(o,i)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fh=Symbol("radix.slottable");function Lh(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fh}function Wh(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Bh(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const $h=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},zh=(e,t)=>({classGroupId:e,validator:t}),Hc=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),vr="-",Oa=[],Yh="arbitrary..",Hh=e=>{const t=Uh(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Gh(a);const i=a.split(vr),c=i[0]===""&&i.length>1?1:0;return Gc(i,c,t)},getConflictingClassGroupIds:(a,i)=>{if(i){const c=r[a],l=n[a];return c?l?$h(l,c):c:l||Oa}return n[a]||Oa}}},Gc=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const l=Gc(e,t+1,s);if(l)return l}const a=n.validators;if(a===null)return;const i=t===0?e.join(vr):e.slice(t).join(vr),c=a.length;for(let l=0;l<c;l++){const u=a[l];if(u.validator(i))return u.classGroupId}},Gh=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Yh+r:void 0})(),Uh=e=>{const{theme:t,classGroups:n}=e;return qh(n,t)},qh=(e,t)=>{const n=Hc();for(const r in e){const o=e[r];ms(o,n,r,t)}return n},ms=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const a=e[s];Kh(a,t,n,r)}},Kh=(e,t,n,r)=>{if(typeof e=="string"){Xh(e,t,n);return}if(typeof e=="function"){Zh(e,t,n,r);return}Qh(e,t,n,r)},Xh=(e,t,n)=>{const r=e===""?t:Uc(t,e);r.classGroupId=n},Zh=(e,t,n,r)=>{if(Jh(e)){ms(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(zh(n,e))},Qh=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let a=0;a<s;a++){const[i,c]=o[a];ms(c,Uc(t,i),n,r)}},Uc=(e,t)=>{let n=e;const r=t.split(vr),o=r.length;for(let s=0;s<o;s++){const a=r[s];let i=n.nextPart.get(a);i||(i=Hc(),n.nextPart.set(a,i)),n=i}return n},Jh=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,ep=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,a)=>{n[s]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let a=n[s];if(a!==void 0)return a;if((a=r[s])!==void 0)return o(s,a),a},set(s,a){s in n?n[s]=a:o(s,a)}}},jo="!",ja=":",tp=[],_a=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),np=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let a=0,i=0,c=0,l;const u=o.length;for(let p=0;p<u;p++){const b=o[p];if(a===0&&i===0){if(b===ja){s.push(o.slice(c,p)),c=p+1;continue}if(b==="/"){l=p;continue}}b==="["?a++:b==="]"?a--:b==="("?i++:b===")"&&i--}const d=s.length===0?o:o.slice(c);let f=d,m=!1;d.endsWith(jo)?(f=d.slice(0,-1),m=!0):d.startsWith(jo)&&(f=d.slice(1),m=!0);const y=l&&l>c?l-c:void 0;return _a(s,m,f,y)};if(t){const o=t+ja,s=r;r=a=>a.startsWith(o)?s(a.slice(o.length)):_a(tp,!1,a,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},rp=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const a=n[s],i=a[0]==="[",c=t.has(a);i||c?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},op=e=>({cache:ep(e.cacheSize),parseClassName:np(e),sortModifiers:rp(e),...Hh(e)}),sp=/\s+/,ap=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,a=[],i=e.trim().split(sp);let c="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{isExternal:d,modifiers:f,hasImportantModifier:m,baseClassName:y,maybePostfixModifierPosition:p}=n(u);if(d){c=u+(c.length>0?" "+c:c);continue}let b=!!p,v=r(b?y.substring(0,p):y);if(!v){if(!b){c=u+(c.length>0?" "+c:c);continue}if(v=r(y),!v){c=u+(c.length>0?" "+c:c);continue}b=!1}const C=f.length===0?"":f.length===1?f[0]:s(f).join(":"),x=m?C+jo:C,k=x+v;if(a.indexOf(k)>-1)continue;a.push(k);const S=o(v,b);for(let T=0;T<S.length;++T){const E=S[T];a.push(x+E)}c=u+(c.length>0?" "+c:c)}return c},ip=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=qc(n))&&(o&&(o+=" "),o+=r);return o},qc=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=qc(e[r]))&&(n&&(n+=" "),n+=t);return n},cp=(e,...t)=>{let n,r,o,s;const a=c=>{const l=t.reduce((u,d)=>d(u),e());return n=op(l),r=n.cache.get,o=n.cache.set,s=i,i(c)},i=c=>{const l=r(c);if(l)return l;const u=ap(c,n);return o(c,u),u};return s=a,(...c)=>s(ip(...c))},lp=[],ye=e=>{const t=n=>n[e]||lp;return t.isThemeGetter=!0,t},Kc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,up=/^\d+\/\d+$/,dp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fp=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,mp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,hp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,It=e=>up.test(e),J=e=>!!e&&!Number.isNaN(Number(e)),ut=e=>!!e&&Number.isInteger(Number(e)),Jr=e=>e.endsWith("%")&&J(e.slice(0,-1)),rt=e=>dp.test(e),gp=()=>!0,bp=e=>fp.test(e)&&!mp.test(e),Zc=()=>!1,yp=e=>hp.test(e),vp=e=>pp.test(e),xp=e=>!V(e)&&!F(e),wp=e=>nn(e,el,Zc),V=e=>Kc.test(e),St=e=>nn(e,tl,bp),eo=e=>nn(e,Tp,J),Ia=e=>nn(e,Qc,Zc),Cp=e=>nn(e,Jc,vp),Jn=e=>nn(e,nl,yp),F=e=>Xc.test(e),gn=e=>rn(e,tl),kp=e=>rn(e,Ep),Va=e=>rn(e,Qc),Sp=e=>rn(e,el),Dp=e=>rn(e,Jc),er=e=>rn(e,nl,!0),nn=(e,t,n)=>{const r=Kc.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},rn=(e,t,n=!1)=>{const r=Xc.exec(e);return r?r[1]?t(r[1]):n:!1},Qc=e=>e==="position"||e==="percentage",Jc=e=>e==="image"||e==="url",el=e=>e==="length"||e==="size"||e==="bg-size",tl=e=>e==="length",Tp=e=>e==="number",Ep=e=>e==="family-name",nl=e=>e==="shadow",Pp=()=>{const e=ye("color"),t=ye("font"),n=ye("text"),r=ye("font-weight"),o=ye("tracking"),s=ye("leading"),a=ye("breakpoint"),i=ye("container"),c=ye("spacing"),l=ye("radius"),u=ye("shadow"),d=ye("inset-shadow"),f=ye("text-shadow"),m=ye("drop-shadow"),y=ye("blur"),p=ye("perspective"),b=ye("aspect"),v=ye("ease"),C=ye("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...k(),F,V],T=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],D=()=>[F,V,c],N=()=>[It,"full","auto",...D()],M=()=>[ut,"none","subgrid",F,V],j=()=>["auto",{span:["full",ut,F,V]},ut,F,V],_=()=>[ut,"auto",F,V],B=()=>["auto","min","max","fr",F,V],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...D()],W=()=>[It,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],O=()=>[e,F,V],H=()=>[...k(),Va,Ia,{position:[F,V]}],ee=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",Sp,wp,{size:[F,V]}],Y=()=>[Jr,gn,St],G=()=>["","none","full",l,F,V],X=()=>["",J,gn,St],we=()=>["solid","dashed","dotted","double"],Pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>[J,Jr,Va,Ia],U=()=>["","none",y,F,V],ne=()=>["none",J,F,V],Z=()=>["none",J,F,V],re=()=>[J,F,V],be=()=>[It,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[rt],breakpoint:[rt],color:[gp],container:[rt],"drop-shadow":[rt],ease:["in","out","in-out"],font:[xp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[rt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[rt],shadow:[rt],spacing:["px",J],text:[rt],"text-shadow":[rt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",It,V,F,b]}],container:["container"],columns:[{columns:[J,V,F,i]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[ut,"auto",F,V]}],basis:[{basis:[It,"full","auto",i,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[J,It,"auto","initial","none",V]}],grow:[{grow:["",J,F,V]}],shrink:[{shrink:["",J,F,V]}],order:[{order:[ut,"first","last","none",F,V]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[i,"screen",...W()]}],"min-w":[{"min-w":[i,"screen","none",...W()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",n,gn,St]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,F,eo]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Jr,V]}],"font-family":[{font:[kp,V,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,F,V]}],"line-clamp":[{"line-clamp":[J,"none",F,eo]}],leading:[{leading:[s,...D()]}],"list-image":[{"list-image":["none",F,V]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",F,V]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...we(),"wavy"]}],"text-decoration-thickness":[{decoration:[J,"from-font","auto",F,St]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[J,"auto",F,V]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",F,V]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",F,V]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:H()}],"bg-repeat":[{bg:ee()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ut,F,V],radial:["",F,V],conic:[ut,F,V]},Dp,Cp]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:Y()}],"gradient-via-pos":[{via:Y()}],"gradient-to-pos":[{to:Y()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...we(),"hidden","none"]}],"divide-style":[{divide:[...we(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...we(),"none","hidden"]}],"outline-offset":[{"outline-offset":[J,F,V]}],"outline-w":[{outline:["",J,gn,St]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",u,er,Jn]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",d,er,Jn]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[J,St]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",f,er,Jn]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[J,F,V]}],"mix-blend":[{"mix-blend":[...Pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[J]}],"mask-image-linear-from-pos":[{"mask-linear-from":A()}],"mask-image-linear-to-pos":[{"mask-linear-to":A()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":A()}],"mask-image-t-to-pos":[{"mask-t-to":A()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":A()}],"mask-image-r-to-pos":[{"mask-r-to":A()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":A()}],"mask-image-b-to-pos":[{"mask-b-to":A()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":A()}],"mask-image-l-to-pos":[{"mask-l-to":A()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":A()}],"mask-image-x-to-pos":[{"mask-x-to":A()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":A()}],"mask-image-y-to-pos":[{"mask-y-to":A()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[F,V]}],"mask-image-radial-from-pos":[{"mask-radial-from":A()}],"mask-image-radial-to-pos":[{"mask-radial-to":A()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[J]}],"mask-image-conic-from-pos":[{"mask-conic-from":A()}],"mask-image-conic-to-pos":[{"mask-conic-to":A()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H()}],"mask-repeat":[{mask:ee()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",F,V]}],filter:[{filter:["","none",F,V]}],blur:[{blur:U()}],brightness:[{brightness:[J,F,V]}],contrast:[{contrast:[J,F,V]}],"drop-shadow":[{"drop-shadow":["","none",m,er,Jn]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",J,F,V]}],"hue-rotate":[{"hue-rotate":[J,F,V]}],invert:[{invert:["",J,F,V]}],saturate:[{saturate:[J,F,V]}],sepia:[{sepia:["",J,F,V]}],"backdrop-filter":[{"backdrop-filter":["","none",F,V]}],"backdrop-blur":[{"backdrop-blur":U()}],"backdrop-brightness":[{"backdrop-brightness":[J,F,V]}],"backdrop-contrast":[{"backdrop-contrast":[J,F,V]}],"backdrop-grayscale":[{"backdrop-grayscale":["",J,F,V]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[J,F,V]}],"backdrop-invert":[{"backdrop-invert":["",J,F,V]}],"backdrop-opacity":[{"backdrop-opacity":[J,F,V]}],"backdrop-saturate":[{"backdrop-saturate":[J,F,V]}],"backdrop-sepia":[{"backdrop-sepia":["",J,F,V]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",F,V]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[J,"initial",F,V]}],ease:[{ease:["linear","initial",v,F,V]}],delay:[{delay:[J,F,V]}],animate:[{animate:["none",C,F,V]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,F,V]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:re()}],"skew-x":[{"skew-x":re()}],"skew-y":[{"skew-y":re()}],transform:[{transform:[F,V,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:be()}],"translate-x":[{"translate-x":be()}],"translate-y":[{"translate-y":be()}],"translate-z":[{"translate-z":be()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",F,V]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",F,V]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[J,gn,St,eo]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Mp=cp(Pp);function R(...e){return Mp(zc(e))}const Rp=te("inline-flex items-center justify-center whitespace-nowrap select-none disabled:opacity-50 disabled:pointer-events-none rounded-md font-medium leading-none focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--atom-ring-color)] focus-visible:ring-offset-[var(--atom-ring-offset)] transition-colors transition-transform duration-150 ease-in-out relative overflow-hidden isolate [&>svg]:fill-current [&>svg]:stroke-current motion-reduce:transform-none motion-reduce:transition-none",{variants:{variant:{primary:"text-[var(--atom-button-fg)] bg-[var(--atom-button-bg)] hover:bg-[var(--atom-button-bg-hover)]",ghost:"text-[var(--atom-button-ghost-fg)] bg-[var(--atom-button-ghost-bg)] hover:bg-[var(--atom-button-ghost-hover-bg)]",success:"text-[var(--atom-button-success-fg)] bg-[var(--atom-button-success-bg)] hover:bg-[var(--atom-button-success-bg-hover)]",danger:"text-[var(--atom-button-danger-fg)] bg-[var(--atom-button-danger-bg)] hover:bg-[var(--atom-button-danger-bg-hover)]",warning:"text-[var(--atom-button-warning-fg)] bg-[var(--atom-button-warning-bg)] hover:bg-[var(--atom-button-warning-bg-hover)]",info:"text-[var(--atom-button-info-fg)] bg-[var(--atom-button-info-bg)] hover:bg-[var(--atom-button-info-bg-hover)]",icon:"rounded-full p-0 text-[var(--atom-button-ghost-fg)] bg-transparent hover:bg-[var(--atom-button-ghost-hover-bg)]",iconGhost:"rounded-full p-0 text-[var(--atom-button-ghost-fg)] bg-transparent hover:bg-[var(--atom-button-ghost-hover-bg)]",iconSquare:"rounded-md p-0 text-[var(--atom-button-ghost-fg)] bg-transparent hover:bg-[var(--atom-button-ghost-hover-bg)]",iconSquareGhost:"rounded-md p-0 text-[var(--atom-button-ghost-fg)] bg-transparent hover:bg-[var(--atom-button-ghost-hover-bg)]",secondary:"border border-[var(--atom-border)] text-[var(--atom-primary)] bg-transparent hover:border-[color-mix(in srgb, var(--atom-primary) 80%, black)] hover:text-[color-mix(in srgb, var(--atom-primary) 90%, black)] hover:bg-[var(--atom-button-ghost-hover-bg)] hover:text-[var(--atom-primary)]"},size:{sm:"h-8 px-3 text-sm [&>svg]:size-4",md:"h-10 px-4 text-sm [&>svg]:size-5",lg:"h-12 px-5 text-base [&>svg]:size-6"},fullWidth:{true:"w-full"}},compoundVariants:[{variant:"icon",size:"sm",class:"w-8 h-8 !px-0 aspect-square"},{variant:"icon",size:"md",class:"w-10 h-10 !px-0 aspect-square"},{variant:"icon",size:"lg",class:"w-12 h-12 !px-0 aspect-square"},{variant:"iconGhost",size:"sm",class:"w-8 h-8 !px-0 aspect-square"},{variant:"iconGhost",size:"md",class:"w-10 h-10 !px-0 aspect-square"},{variant:"iconGhost",size:"lg",class:"w-12 h-12 !px-0 aspect-square"},{variant:"iconSquare",size:"sm",class:"w-8 h-8 !px-0 aspect-square"},{variant:"iconSquare",size:"md",class:"w-10 h-10 !px-0 aspect-square"},{variant:"iconSquare",size:"lg",class:"w-12 h-12 !px-0 aspect-square"},{variant:"iconSquareGhost",size:"sm",class:"w-8 h-8 !px-0 aspect-square"},{variant:"iconSquareGhost",size:"md",class:"w-10 h-10 !px-0 aspect-square"},{variant:"iconSquareGhost",size:"lg",class:"w-12 h-12 !px-0 aspect-square"},{variant:"icon",class:"hover:scale-105 active:scale-95 hover:opacity-90"},{variant:"iconGhost",class:"hover:scale-105 active:scale-95 hover:opacity-90"},{variant:"iconSquare",class:"hover:scale-105 active:scale-95 hover:opacity-90"},{variant:"iconSquareGhost",class:"hover:scale-105 active:scale-95 hover:opacity-90"}],defaultVariants:{variant:"primary",size:"md"}}),hs=g.forwardRef(({className:e,variant:t,size:n,fullWidth:r,asChild:o,ripple:s=!0,onPointerDown:a,disabled:i,type:c,...l},u)=>{const d=!!o,f=d?Me:"button",m=g.useRef(null),y=i?"":void 0,p=d?void 0:c??"button",b=v=>{if(a?.(v),!s||i||v.button!==0)return;const C=m.current;if(!C)return;const x=C.getBoundingClientRect(),T=Math.max(x.width,x.height)*(n==="sm"?.5:n==="lg"?.7:.6),E=v.clientX-x.left-T,D=v.clientY-x.top-T,N=document.createElement("span");N.className="atom-ripple",N.style.width=`${T*2}px`,N.style.height=`${T*2}px`,N.style.left=`${E}px`,N.style.top=`${D}px`;const M=(t??"primary")==="ghost"||t==="icon"||t==="iconGhost"||t==="iconSquare"||t==="iconSquareGhost"||t==="secondary",j=getComputedStyle(C).getPropertyValue(M?"--atom-ripple-color-ghost":"--atom-ripple-color-solid").trim();N.style.background=j||"currentColor",C.appendChild(N),N.addEventListener("animationend",()=>N.remove(),{once:!0})};return h.jsx(f,{...l,"data-disabled":y,"aria-disabled":d&&i?!0:void 0,type:p,ref:v=>{m.current=v,typeof u=="function"?u(v):u&&(u.current=v)},onPointerDown:b,className:R(Rp({variant:t,size:n,fullWidth:r}),e),disabled:d?void 0:i})});hs.displayName="Button";const rl=te(["inline-flex items-center justify-center","whitespace-nowrap shrink-0 w-fit","gap-1","rounded-md border","px-2 py-0.5","text-xs font-medium","[&>svg]:size-3 [&>svg]:pointer-events-none","transition-[color,background-color,border-color,box-shadow]","overflow-hidden","focus-visible:outline-none","focus-visible:ring-[3px] focus-visible:ring-[color:var(--atom-ring-color)]","focus-visible:ring-offset-2 focus-visible:ring-offset-[color:var(--atom-ring-offset)]"].join(" "),{variants:{variant:{primary:"",secondary:"",success:"",warning:"",danger:"",info:"",neutral:"",accent:""},tone:{low:"",medium:"",high:""}},compoundVariants:[{variant:"primary",tone:"low",className:"bg-[var(--atom-badge-primary-bg-low)] text-[var(--atom-badge-primary-fg-low)] border-[var(--atom-badge-primary-border-low)]"},{variant:"primary",tone:"medium",className:"bg-[var(--atom-badge-primary-bg-medium)] text-[var(--atom-badge-primary-fg-medium)] border-[var(--atom-badge-primary-border-medium)]"},{variant:"primary",tone:"high",className:"bg-[var(--atom-badge-primary-bg-high)] text-[var(--atom-badge-primary-fg-high)] border-[var(--atom-badge-primary-border-high)]"},{variant:"secondary",tone:"low",className:"bg-[var(--atom-badge-secondary-bg-low)] text-[var(--atom-badge-secondary-fg-low)] border-[var(--atom-badge-secondary-border-low)]"},{variant:"secondary",tone:"medium",className:"bg-[var(--atom-badge-secondary-bg-medium)] text-[var(--atom-badge-secondary-fg-medium)] border-[var(--atom-badge-secondary-border-medium)]"},{variant:"secondary",tone:"high",className:"bg-[var(--atom-badge-secondary-bg-high)] text-[var(--atom-badge-secondary-fg-high)] border-[var(--atom-badge-secondary-border-high)]"},{variant:"success",tone:"low",className:"bg-[var(--atom-badge-success-bg-low)] text-[var(--atom-badge-success-fg-low)] border-[var(--atom-badge-success-border-low)]"},{variant:"success",tone:"medium",className:"bg-[var(--atom-badge-success-bg-medium)] text-[var(--atom-badge-success-fg-medium)] border-[var(--atom-badge-success-border-medium)]"},{variant:"success",tone:"high",className:"bg-[var(--atom-badge-success-bg-high)] text-[var(--atom-badge-success-fg-high)] border-[var(--atom-badge-success-border-high)]"},{variant:"warning",tone:"low",className:"bg-[var(--atom-badge-warning-bg-low)] text-[var(--atom-badge-warning-fg-low)] border-[var(--atom-badge-warning-border-low)]"},{variant:"warning",tone:"medium",className:"bg-[var(--atom-badge-warning-bg-medium)] text-[var(--atom-badge-warning-fg-medium)] border-[var(--atom-badge-warning-border-medium)]"},{variant:"warning",tone:"high",className:"bg-[var(--atom-badge-warning-bg-high)] text-[var(--atom-badge-warning-fg-high)] border-[var(--atom-badge-warning-border-high)]"},{variant:"danger",tone:"low",className:"bg-[var(--atom-badge-danger-bg-low)] text-[var(--atom-badge-danger-fg-low)] border-[var(--atom-badge-danger-border-low)]"},{variant:"danger",tone:"medium",className:"bg-[var(--atom-badge-danger-bg-medium)] text-[var(--atom-badge-danger-fg-medium)] border-[var(--atom-badge-danger-border-medium)]"},{variant:"danger",tone:"high",className:"bg-[var(--atom-badge-danger-bg-high)] text-[var(--atom-badge-danger-fg-high)] border-[var(--atom-badge-danger-border-high)]"},{variant:"info",tone:"low",className:"bg-[var(--atom-badge-info-bg-low)] text-[var(--atom-badge-info-fg-low)] border-[var(--atom-badge-info-border-low)]"},{variant:"info",tone:"medium",className:"bg-[var(--atom-badge-info-bg-medium)] text-[var(--atom-badge-info-fg-medium)] border-[var(--atom-badge-info-border-medium)]"},{variant:"info",tone:"high",className:"bg-[var(--atom-badge-info-bg-high)] text-[var(--atom-badge-info-fg-high)] border-[var(--atom-badge-info-border-high)]"},{variant:"neutral",tone:"low",className:"bg-[var(--atom-badge-neutral-bg-low)] text-[var(--atom-badge-neutral-fg-low)] border-[var(--atom-badge-neutral-border-low)]"},{variant:"neutral",tone:"medium",className:"bg-[var(--atom-badge-neutral-bg-medium)] text-[var(--atom-badge-neutral-fg-medium)] border-[var(--atom-badge-neutral-border-medium)]"},{variant:"neutral",tone:"high",className:"bg-[var(--atom-badge-neutral-bg-high)] text-[var(--atom-badge-neutral-fg-high)] border-[var(--atom-badge-neutral-border-high)]"},{variant:"accent",tone:"low",className:"bg-[var(--atom-badge-accent-bg-low)] text-[var(--atom-badge-accent-fg-low)] border-[var(--atom-badge-accent-border-low)]"},{variant:"accent",tone:"medium",className:"bg-[var(--atom-badge-accent-bg-medium)] text-[var(--atom-badge-accent-fg-medium)] border-[var(--atom-badge-accent-border-medium)]"},{variant:"accent",tone:"high",className:"bg-[var(--atom-badge-accent-bg-high)] text-[var(--atom-badge-accent-fg-high)] border-[var(--atom-badge-accent-border-high)]"}],defaultVariants:{variant:"primary",tone:"low"}});function Np({className:e,variant:t,tone:n,asChild:r=!1,...o}){const s=r?Me:"span";return h.jsx(s,{"data-slot":"badge",className:R(rl({variant:t,tone:n}),e),...o})}const ol=te(["inline-flex items-center justify-center","select-none shrink-0 overflow-hidden","font-medium uppercase tracking-wide","border","transition-[color,background-color,border-color,box-shadow,transform]","duration-150 ease-in-out","motion-reduce:transition-none","focus-visible:outline-none","focus-visible:ring-[3px] focus-visible:ring-[color:var(--atom-ring-color)]","focus-visible:ring-offset-2 focus-visible:ring-offset-[color:var(--atom-ring-offset)]"].join(" "),{variants:{variant:{primary:"bg-[var(--atom-badge-primary-bg-low)] text-[var(--atom-badge-primary-fg-low)] border-[var(--atom-badge-primary-border-low)]",secondary:"bg-[var(--atom-badge-secondary-bg-low)] text-[var(--atom-badge-secondary-fg-low)] border-[var(--atom-badge-secondary-border-low)]",neutral:"bg-[var(--atom-badge-neutral-bg-low)] text-[var(--atom-badge-neutral-fg-low)] border-[var(--atom-badge-neutral-border-low)]",success:"bg-[var(--atom-badge-success-bg-low)] text-[var(--atom-badge-success-fg-low)] border-[var(--atom-badge-success-border-low)]",warning:"bg-[var(--atom-badge-warning-bg-low)] text-[var(--atom-badge-warning-fg-low)] border-[var(--atom-badge-warning-border-low)]",danger:"bg-[var(--atom-badge-danger-bg-low)] text-[var(--atom-badge-danger-fg-low)] border-[var(--atom-badge-danger-border-low)]",info:"bg-[var(--atom-badge-info-bg-low)] text-[var(--atom-badge-info-fg-low)] border-[var(--atom-badge-info-border-low)]",accent:"bg-[var(--atom-badge-accent-bg-low)] text-[var(--atom-badge-accent-fg-low)] border-[var(--atom-badge-accent-border-low)]"},appearance:{subtle:"",solid:"border-transparent",outline:"bg-transparent",ghost:"bg-transparent border-transparent hover:bg-[var(--atom-badge-neutral-bg-low)]",soft:"border-none"},shape:{circle:"rounded-full",square:"rounded-md",pill:"rounded-full px-3"},size:{sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-12 w-12 text-base"},withRing:{true:"ring-2 ring-[var(--atom-primary)] ring-offset-2 ring-offset-[var(--atom-bg)]",false:""}},compoundVariants:[{appearance:"solid",variant:"primary",className:"bg-[var(--atom-badge-primary-bg-high)] text-[var(--atom-badge-primary-fg-high)] border-[var(--atom-badge-primary-border-high)]"},{appearance:"solid",variant:"secondary",className:"bg-[var(--atom-badge-secondary-bg-high)] text-[var(--atom-badge-secondary-fg-high)] border-[var(--atom-badge-secondary-border-high)]"},{appearance:"solid",variant:"neutral",className:"bg-[var(--atom-badge-neutral-bg-high)] text-[var(--atom-badge-neutral-fg-high)] border-[var(--atom-badge-neutral-border-high)]"},{appearance:"solid",variant:"success",className:"bg-[var(--atom-badge-success-bg-high)] text-[var(--atom-badge-success-fg-high)] border-[var(--atom-badge-success-border-high)]"},{appearance:"solid",variant:"warning",className:"bg-[var(--atom-badge-warning-bg-high)] text-[var(--atom-badge-warning-fg-high)] border-[var(--atom-badge-warning-border-high)]"},{appearance:"solid",variant:"danger",className:"bg-[var(--atom-badge-danger-bg-high)] text-[var(--atom-badge-danger-fg-high)] border-[var(--atom-badge-danger-border-high)]"},{appearance:"solid",variant:"info",className:"bg-[var(--atom-badge-info-bg-high)] text-[var(--atom-badge-info-fg-high)] border-[var(--atom-badge-info-border-high)]"},{appearance:"solid",variant:"accent",className:"bg-[var(--atom-badge-accent-bg-high)] text-[var(--atom-badge-accent-fg-high)] border-[var(--atom-badge-accent-border-high)]"}],defaultVariants:{variant:"primary",appearance:"subtle",shape:"circle",size:"md",withRing:!1}}),sl=g.forwardRef(({className:e,asChild:t=!1,initials:n,src:r,alt:o,decorative:s=!1,children:a,variant:i,appearance:c,size:l,shape:u,withRing:d,...f},m)=>{const y=t?Me:"div",[p,b]=g.useState(!1);g.useEffect(()=>{r&&b(!1)},[r]);const v=g.useCallback(()=>{b(!0)},[]),C=!!r&&!p&&!a,x=!C&&!a&&!!n,k=f["aria-label"]??void 0,S=s?"":o||k||n||"AZ",T=a||(C?h.jsx("img",{src:r,alt:S,className:"h-full w-full object-cover",onError:v,"aria-hidden":s||void 0}):x?h.jsx("span",{"aria-hidden":s||void 0,children:n}):null),E=s?{"aria-hidden":!0}:x&&!k&&!o?{role:"img","aria-label":n}:k&&!r?{role:"img","aria-label":k}:{};return h.jsx(y,{ref:m,"data-slot":"avatar",className:R(ol({variant:i,appearance:c,size:l,shape:u,withRing:d}),e),...E,...f,children:T})});sl.displayName="Avatar";function Ap(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const Op={},xn={};function Pt(e,t){try{const r=(Op[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return r in xn?xn[r]:Fa(r,r.split(":"))}catch{if(e in xn)return xn[e];const n=e?.match(jp);return n?Fa(e,n.slice(1)):NaN}}const jp=/([+-]\d\d):?(\d\d)?/;function Fa(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return xn[e]=n*60+r>0?n*60+r+o:n*60-r-o}class qe extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Pt(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),al(this),_o(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new qe(...n,t):new qe(Date.now(),t)}withTimeZone(t){return new qe(+this,t)}getTimezoneOffset(){const t=-Pt(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),_o(this),+this}[Symbol.for("constructDateFrom")](t){return new qe(+new Date(t),this.timeZone)}}const La=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!La.test(e))return;const t=e.replace(La,"$1UTC");qe.prototype[t]&&(e.startsWith("get")?qe.prototype[e]=function(){return this.internal[t]()}:(qe.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),_p(this),+this},qe.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),_o(this),+this}))});function _o(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-Pt(e.timeZone,e)*60))}function _p(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),al(e)}function al(e){const t=Pt(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),s=-new Date(+r).getTimezoneOffset(),a=o-s,i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const c=o-n;c&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+c);const l=new Date(+e);l.setUTCSeconds(0);const u=o>0?l.getSeconds():(l.getSeconds()-60)%60,d=Math.round(-(Pt(e.timeZone,e)*60))%60;(d||u)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+d),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+d+u));const f=Pt(e.timeZone,e),m=f>0?Math.floor(f):Math.ceil(f),p=-new Date(+e).getTimezoneOffset()-m,b=m!==n,v=p-c;if(b&&v){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+v);const C=Pt(e.timeZone,e),x=C>0?Math.floor(C):Math.ceil(C),k=m-x;k&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+k),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+k))}}class Se extends qe{static tz(t,...n){return n.length?new Se(...n,t):new Se(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${Ap(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new Se(+this,t)}[Symbol.for("constructDateFrom")](t){return new Se(+new Date(t),this.timeZone)}}const il=6048e5,Ip=864e5,Wa=Symbol.for("constructDateFrom");function ge(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Wa in e?e[Wa](t):e instanceof Date?new e.constructor(t):new Date(t)}function ce(e,t){return ge(t||e,e)}function cl(e,t,n){const r=ce(e,n?.in);return isNaN(t)?ge(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function ll(e,t,n){const r=ce(e,n?.in);if(isNaN(t))return ge(e,NaN);if(!t)return r;const o=r.getDate(),s=ge(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const a=s.getDate();return o>=a?s:(r.setFullYear(s.getFullYear(),s.getMonth(),o),r)}let Vp={};function Wn(){return Vp}function Zt(e,t){const n=Wn(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=ce(e,t?.in),s=o.getDay(),a=(s<r?7:0)+s-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function Pn(e,t){return Zt(e,{...t,weekStartsOn:1})}function ul(e,t){const n=ce(e,t?.in),r=n.getFullYear(),o=ge(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const s=Pn(o),a=ge(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const i=Pn(a);return n.getTime()>=s.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function Ba(e){const t=ce(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function on(e,...t){const n=ge.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Mn(e,t){const n=ce(e,t?.in);return n.setHours(0,0,0,0),n}function ps(e,t,n){const[r,o]=on(n?.in,e,t),s=Mn(r),a=Mn(o),i=+s-Ba(s),c=+a-Ba(a);return Math.round((i-c)/Ip)}function Fp(e,t){const n=ul(e,t),r=ge(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Pn(r)}function Lp(e,t,n){return cl(e,t*7,n)}function Wp(e,t,n){return ll(e,t*12,n)}function Bp(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=ge.bind(null,o));const s=ce(o,r);(!n||n<s||isNaN(+s))&&(n=s)}),ge(r,n||NaN)}function $p(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=ge.bind(null,o));const s=ce(o,r);(!n||n>s||isNaN(+s))&&(n=s)}),ge(r,n||NaN)}function zp(e,t,n){const[r,o]=on(n?.in,e,t);return+Mn(r)==+Mn(o)}function dl(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Yp(e){return!(!dl(e)&&typeof e!="number"||isNaN(+ce(e)))}function fl(e,t,n){const[r,o]=on(n?.in,e,t),s=r.getFullYear()-o.getFullYear(),a=r.getMonth()-o.getMonth();return s*12+a}function Hp(e,t){const n=ce(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function ml(e,t){const[n,r]=on(e,t.start,t.end);return{start:n,end:r}}function Gp(e,t){const{start:n,end:r}=ml(t?.in,e);let o=+n>+r;const s=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0),a.setDate(1);let i=1;const c=[];for(;+a<=s;)c.push(ge(n,a)),a.setMonth(a.getMonth()+i);return o?c.reverse():c}function Up(e,t){const n=ce(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function qp(e,t){const n=ce(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function hl(e,t){const n=ce(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Kp(e,t){const{start:n,end:r}=ml(t?.in,e);let o=+n>+r;const s=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0),a.setMonth(0,1);let i=1;const c=[];for(;+a<=s;)c.push(ge(n,a)),a.setFullYear(a.getFullYear()+i);return o?c.reverse():c}function pl(e,t){const n=Wn(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=ce(e,t?.in),s=o.getDay(),a=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function Xp(e,t){return pl(e,{...t,weekStartsOn:1})}const Zp={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Qp=(e,t,n)=>{let r;const o=Zp[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function to(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Jp={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},eg={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},tg={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ng={date:to({formats:Jp,defaultWidth:"full"}),time:to({formats:eg,defaultWidth:"full"}),dateTime:to({formats:tg,defaultWidth:"full"})},rg={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},og=(e,t,n,r)=>rg[e];function bn(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,i=n?.width?String(n.width):a;o=e.formattingValues[i]||e.formattingValues[a]}else{const a=e.defaultWidth,i=n?.width?String(n.width):e.defaultWidth;o=e.values[i]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const sg={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ag={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ig={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},cg={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},lg={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ug={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},dg=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},fg={ordinalNumber:dg,era:bn({values:sg,defaultWidth:"wide"}),quarter:bn({values:ag,defaultWidth:"wide",argumentCallback:e=>e-1}),month:bn({values:ig,defaultWidth:"wide"}),day:bn({values:cg,defaultWidth:"wide"}),dayPeriod:bn({values:lg,defaultWidth:"wide",formattingValues:ug,defaultFormattingWidth:"wide"})};function yn(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const a=s[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(i)?hg(i,d=>d.test(a)):mg(i,d=>d.test(a));let l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;const u=t.slice(a.length);return{value:l,rest:u}}}function mg(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function hg(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function pg(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const i=t.slice(o.length);return{value:a,rest:i}}}const gg=/^(\d+)(th|st|nd|rd)?/i,bg=/\d+/i,yg={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},vg={any:[/^b/i,/^(a|c)/i]},xg={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},wg={any:[/1/i,/2/i,/3/i,/4/i]},Cg={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},kg={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Sg={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Dg={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Tg={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Eg={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Pg={ordinalNumber:pg({matchPattern:gg,parsePattern:bg,valueCallback:e=>parseInt(e,10)}),era:yn({matchPatterns:yg,defaultMatchWidth:"wide",parsePatterns:vg,defaultParseWidth:"any"}),quarter:yn({matchPatterns:xg,defaultMatchWidth:"wide",parsePatterns:wg,defaultParseWidth:"any",valueCallback:e=>e+1}),month:yn({matchPatterns:Cg,defaultMatchWidth:"wide",parsePatterns:kg,defaultParseWidth:"any"}),day:yn({matchPatterns:Sg,defaultMatchWidth:"wide",parsePatterns:Dg,defaultParseWidth:"any"}),dayPeriod:yn({matchPatterns:Tg,defaultMatchWidth:"any",parsePatterns:Eg,defaultParseWidth:"any"})},$t={code:"en-US",formatDistance:Qp,formatLong:ng,formatRelative:og,localize:fg,match:Pg,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Mg(e,t){const n=ce(e,t?.in);return ps(n,hl(n))+1}function gs(e,t){const n=ce(e,t?.in),r=+Pn(n)-+Fp(n);return Math.round(r/il)+1}function gl(e,t){const n=ce(e,t?.in),r=n.getFullYear(),o=Wn(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=ge(t?.in||e,0);a.setFullYear(r+1,0,s),a.setHours(0,0,0,0);const i=Zt(a,t),c=ge(t?.in||e,0);c.setFullYear(r,0,s),c.setHours(0,0,0,0);const l=Zt(c,t);return+n>=+i?r+1:+n>=+l?r:r-1}function Rg(e,t){const n=Wn(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=gl(e,t),s=ge(t?.in||e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),Zt(s,t)}function bs(e,t){const n=ce(e,t?.in),r=+Zt(n,t)-+Rg(n,t);return Math.round(r/il)+1}function ie(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const dt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ie(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ie(n+1,2)},d(e,t){return ie(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ie(e.getHours()%12||12,t.length)},H(e,t){return ie(e.getHours(),t.length)},m(e,t){return ie(e.getMinutes(),t.length)},s(e,t){return ie(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ie(o,t.length)}},Vt={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},$a={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return dt.y(e,t)},Y:function(e,t,n,r){const o=gl(e,r),s=o>0?o:1-o;if(t==="YY"){const a=s%100;return ie(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):ie(s,t.length)},R:function(e,t){const n=ul(e);return ie(n,t.length)},u:function(e,t){const n=e.getFullYear();return ie(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ie(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ie(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return dt.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ie(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=bs(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ie(o,t.length)},I:function(e,t,n){const r=gs(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ie(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):dt.d(e,t)},D:function(e,t,n){const r=Mg(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ie(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return ie(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return ie(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return ie(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Vt.noon:r===0?o=Vt.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Vt.evening:r>=12?o=Vt.afternoon:r>=4?o=Vt.morning:o=Vt.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return dt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):dt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ie(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ie(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):dt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):dt.s(e,t)},S:function(e,t){return dt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Ya(r);case"XXXX":case"XX":return Tt(r);case"XXXXX":case"XXX":default:return Tt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ya(r);case"xxxx":case"xx":return Tt(r);case"xxxxx":case"xxx":default:return Tt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+za(r,":");case"OOOO":default:return"GMT"+Tt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+za(r,":");case"zzzz":default:return"GMT"+Tt(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ie(r,t.length)},T:function(e,t,n){return ie(+e,t.length)}};function za(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+ie(s,2)}function Ya(e,t){return e%60===0?(e>0?"-":"+")+ie(Math.abs(e)/60,2):Tt(e,t)}function Tt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ie(Math.trunc(r/60),2),s=ie(r%60,2);return n+o+t+s}const Ha=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},bl=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Ng=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Ha(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",Ha(r,t)).replace("{{time}}",bl(o,t))},Ag={p:bl,P:Ng},Og=/^D+$/,jg=/^Y+$/,_g=["D","DD","YY","YYYY"];function Ig(e){return Og.test(e)}function Vg(e){return jg.test(e)}function Fg(e,t,n){const r=Lg(e,t,n);if(console.warn(r),_g.includes(e))throw new RangeError(r)}function Lg(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Wg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Bg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$g=/^'([^]*?)'?$/,zg=/''/g,Yg=/[a-zA-Z]/;function wn(e,t,n){const r=Wn(),o=n?.locale??r.locale??$t,s=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=ce(e,n?.in);if(!Yp(i))throw new RangeError("Invalid time value");let c=t.match(Bg).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=Ag[d];return f(u,o.formatLong)}return u}).join("").match(Wg).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:Hg(u)};if($a[d])return{isToken:!0,value:u};if(d.match(Yg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(c=o.localize.preprocessor(i,c));const l={firstWeekContainsDate:s,weekStartsOn:a,locale:o};return c.map(u=>{if(!u.isToken)return u.value;const d=u.value;(!n?.useAdditionalWeekYearTokens&&Vg(d)||!n?.useAdditionalDayOfYearTokens&&Ig(d))&&Fg(d,t,String(e));const f=$a[d[0]];return f(i,d,o.localize,l)}).join("")}function Hg(e){const t=e.match($g);return t?t[1].replace(zg,"'"):e}function Gg(e,t){const n=ce(e,t?.in),r=n.getFullYear(),o=n.getMonth(),s=ge(n,0);return s.setFullYear(r,o+1,0),s.setHours(0,0,0,0),s.getDate()}function Ug(e,t){return ce(e,t?.in).getMonth()}function qg(e,t){return ce(e,t?.in).getFullYear()}function Kg(e,t){return+ce(e)>+ce(t)}function Xg(e,t){return+ce(e)<+ce(t)}function Zg(e,t,n){const[r,o]=on(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Qg(e,t,n){const[r,o]=on(n?.in,e,t);return r.getFullYear()===o.getFullYear()}function Jg(e,t,n){const r=ce(e,n?.in),o=r.getFullYear(),s=r.getDate(),a=ge(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const i=Gg(a);return r.setMonth(t,Math.min(s,i)),r}function eb(e,t,n){const r=ce(e,n?.in);return isNaN(+r)?ge(e,NaN):(r.setFullYear(t),r)}const Ga=5,tb=4;function nb(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),s=t.addDays(o,Ga*7-1);return t.getMonth(e)===t.getMonth(s)?Ga:tb}function yl(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function rb(e,t){const n=yl(e,t),r=nb(e,t);return t.addDays(n,r*7-1)}const vl={...$t,labels:{labelDayButton:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(a,i)=>wn(a,i,{locale:$t,...n});let s=o(e,"PPPP");return t.today&&(s=`Today, ${s}`),t.selected&&(s=`${s}, selected`),s},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,s)=>wn(o,s,{locale:$t,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(a,i)=>wn(a,i,{locale:$t,...n});let s=o(e,"PPPP");return t?.today&&(s=`Today, ${s}`),s},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,s)=>wn(o,s,{locale:$t,...t}),r(e,"cccc")}}};class je{constructor(t,n){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?Se.tz(this.options.timeZone):new this.Date,this.newDate=(r,o,s)=>this.overrides?.newDate?this.overrides.newDate(r,o,s):this.options.timeZone?new Se(r,o,s,this.options.timeZone):new Date(r,o,s),this.addDays=(r,o)=>this.overrides?.addDays?this.overrides.addDays(r,o):cl(r,o),this.addMonths=(r,o)=>this.overrides?.addMonths?this.overrides.addMonths(r,o):ll(r,o),this.addWeeks=(r,o)=>this.overrides?.addWeeks?this.overrides.addWeeks(r,o):Lp(r,o),this.addYears=(r,o)=>this.overrides?.addYears?this.overrides.addYears(r,o):Wp(r,o),this.differenceInCalendarDays=(r,o)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):ps(r,o),this.differenceInCalendarMonths=(r,o)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):fl(r,o),this.eachMonthOfInterval=r=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Gp(r),this.eachYearOfInterval=r=>{const o=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(r):Kp(r),s=new Set(o.map(i=>this.getYear(i)));if(s.size===o.length)return o;const a=[];return s.forEach(i=>{a.push(new Date(i,0,1))}),a},this.endOfBroadcastWeek=r=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):rb(r,this),this.endOfISOWeek=r=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(r):Xp(r),this.endOfMonth=r=>this.overrides?.endOfMonth?this.overrides.endOfMonth(r):Hp(r),this.endOfWeek=(r,o)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(r,o):pl(r,this.options),this.endOfYear=r=>this.overrides?.endOfYear?this.overrides.endOfYear(r):qp(r),this.format=(r,o,s)=>{const a=this.overrides?.format?this.overrides.format(r,o,this.options):wn(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=r=>this.overrides?.getISOWeek?this.overrides.getISOWeek(r):gs(r),this.getMonth=(r,o)=>this.overrides?.getMonth?this.overrides.getMonth(r,this.options):Ug(r,this.options),this.getYear=(r,o)=>this.overrides?.getYear?this.overrides.getYear(r,this.options):qg(r,this.options),this.getWeek=(r,o)=>this.overrides?.getWeek?this.overrides.getWeek(r,this.options):bs(r,this.options),this.isAfter=(r,o)=>this.overrides?.isAfter?this.overrides.isAfter(r,o):Kg(r,o),this.isBefore=(r,o)=>this.overrides?.isBefore?this.overrides.isBefore(r,o):Xg(r,o),this.isDate=r=>this.overrides?.isDate?this.overrides.isDate(r):dl(r),this.isSameDay=(r,o)=>this.overrides?.isSameDay?this.overrides.isSameDay(r,o):zp(r,o),this.isSameMonth=(r,o)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(r,o):Zg(r,o),this.isSameYear=(r,o)=>this.overrides?.isSameYear?this.overrides.isSameYear(r,o):Qg(r,o),this.max=r=>this.overrides?.max?this.overrides.max(r):Bp(r),this.min=r=>this.overrides?.min?this.overrides.min(r):$p(r),this.setMonth=(r,o)=>this.overrides?.setMonth?this.overrides.setMonth(r,o):Jg(r,o),this.setYear=(r,o)=>this.overrides?.setYear?this.overrides.setYear(r,o):eb(r,o),this.startOfBroadcastWeek=(r,o)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):yl(r,this),this.startOfDay=r=>this.overrides?.startOfDay?this.overrides.startOfDay(r):Mn(r),this.startOfISOWeek=r=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(r):Pn(r),this.startOfMonth=r=>this.overrides?.startOfMonth?this.overrides.startOfMonth(r):Up(r),this.startOfWeek=(r,o)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(r,this.options):Zt(r,this.options),this.startOfYear=r=>this.overrides?.startOfYear?this.overrides.startOfYear(r):hl(r),this.options={locale:vl,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){const t=this.options.locale?.code;return t&&je.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:o}=this.options,s=n?.code;if(s&&je.yearFirstLocales.has(s))try{return new Intl.DateTimeFormat(s,{month:"long",year:"numeric",timeZone:r,numberingSystem:o}).format(t)}catch{}const a=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,a)}}je.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const tt=new je;class xl{constructor(t,n,r=tt){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class ob{constructor(t,n){this.date=t,this.weeks=n}}class sb{constructor(t,n){this.days=n,this.weekNumber=t}}function ab(e){return w.createElement("button",{...e})}function ib(e){return w.createElement("span",{...e})}function cb(e){const{size:t=24,orientation:n="left",className:r}=e;return w.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&w.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&w.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&w.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&w.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function lb(e){const{day:t,modifiers:n,...r}=e;return w.createElement("td",{...r})}function ub(e){const{day:t,modifiers:n,...r}=e,o=w.useRef(null);return w.useEffect(()=>{n.focused&&o.current?.focus()},[n.focused]),w.createElement("button",{ref:o,...r})}var L;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(L||(L={}));var fe;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(fe||(fe={}));var $e;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})($e||($e={}));var Ne;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(Ne||(Ne={}));function db(e){const{options:t,className:n,components:r,classNames:o,...s}=e,a=[o[L.Dropdown],n].join(" "),i=t?.find(({value:c})=>c===s.value);return w.createElement("span",{"data-disabled":s.disabled,className:o[L.DropdownRoot]},w.createElement(r.Select,{className:a,...s},t?.map(({value:c,label:l,disabled:u})=>w.createElement(r.Option,{key:c,value:c,disabled:u},l))),w.createElement("span",{className:o[L.CaptionLabel],"aria-hidden":!0},i?.label,w.createElement(r.Chevron,{orientation:"down",size:18,className:o[L.Chevron]})))}function fb(e){return w.createElement("div",{...e})}function mb(e){return w.createElement("div",{...e})}function hb(e){const{calendarMonth:t,displayIndex:n,...r}=e;return w.createElement("div",{...r},e.children)}function pb(e){const{calendarMonth:t,displayIndex:n,...r}=e;return w.createElement("div",{...r})}function gb(e){return w.createElement("table",{...e})}function bb(e){return w.createElement("div",{...e})}const wl=w.createContext(void 0);function Bn(){const e=w.useContext(wl);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function yb(e){const{components:t}=Bn();return w.createElement(t.Dropdown,{...e})}function vb(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...s}=e,{components:a,classNames:i,labels:{labelPrevious:c,labelNext:l}}=Bn(),u=w.useCallback(f=>{o&&n?.(f)},[o,n]),d=w.useCallback(f=>{r&&t?.(f)},[r,t]);return w.createElement("nav",{...s},w.createElement(a.PreviousMonthButton,{type:"button",className:i[L.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:d},w.createElement(a.Chevron,{disabled:r?void 0:!0,className:i[L.Chevron],orientation:"left"})),w.createElement(a.NextMonthButton,{type:"button",className:i[L.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":l(o),onClick:u},w.createElement(a.Chevron,{disabled:o?void 0:!0,orientation:"right",className:i[L.Chevron]})))}function xb(e){const{components:t}=Bn();return w.createElement(t.Button,{...e})}function wb(e){return w.createElement("option",{...e})}function Cb(e){const{components:t}=Bn();return w.createElement(t.Button,{...e})}function kb(e){const{rootRef:t,...n}=e;return w.createElement("div",{...n,ref:t})}function Sb(e){return w.createElement("select",{...e})}function Db(e){const{week:t,...n}=e;return w.createElement("tr",{...n})}function Tb(e){return w.createElement("th",{...e})}function Eb(e){return w.createElement("thead",{"aria-hidden":!0},w.createElement("tr",{...e}))}function Pb(e){const{week:t,...n}=e;return w.createElement("th",{...n})}function Mb(e){return w.createElement("th",{...e})}function Rb(e){return w.createElement("tbody",{...e})}function Nb(e){const{components:t}=Bn();return w.createElement(t.Dropdown,{...e})}const Ab=Object.freeze(Object.defineProperty({__proto__:null,Button:ab,CaptionLabel:ib,Chevron:cb,Day:lb,DayButton:ub,Dropdown:db,DropdownNav:fb,Footer:mb,Month:hb,MonthCaption:pb,MonthGrid:gb,Months:bb,MonthsDropdown:yb,Nav:vb,NextMonthButton:xb,Option:wb,PreviousMonthButton:Cb,Root:kb,Select:Sb,Week:Db,WeekNumber:Pb,WeekNumberHeader:Mb,Weekday:Tb,Weekdays:Eb,Weeks:Rb,YearsDropdown:Nb},Symbol.toStringTag,{value:"Module"}));function ot(e,t,n=!1,r=tt){let{from:o,to:s}=e;const{differenceInCalendarDays:a,isSameDay:i}=r;return o&&s?(a(s,o)<0&&([o,s]=[s,o]),a(t,o)>=(n?1:0)&&a(s,t)>=(n?1:0)):!n&&s?i(s,t):!n&&o?i(o,t):!1}function ys(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Nr(e){return!!(e&&typeof e=="object"&&"from"in e)}function vs(e){return!!(e&&typeof e=="object"&&"after"in e)}function xs(e){return!!(e&&typeof e=="object"&&"before"in e)}function Cl(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function kl(e,t){return Array.isArray(e)&&e.every(t.isDate)}function st(e,t,n=tt){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:s,isAfter:a}=n;return r.some(i=>{if(typeof i=="boolean")return i;if(n.isDate(i))return o(e,i);if(kl(i,n))return i.some(c=>o(e,c));if(Nr(i))return ot(i,e,!1,n);if(Cl(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(ys(i)){const c=s(i.before,e),l=s(i.after,e),u=c>0,d=l<0;return a(i.before,i.after)?d&&u:u||d}return vs(i)?s(e,i.after)>0:xs(i)?s(i.before,e)>0:typeof i=="function"?i(e):!1})}function Ob(e,t,n,r,o){const{disabled:s,hidden:a,modifiers:i,showOutsideDays:c,broadcastCalendar:l,today:u=o.today()}=t,{isSameDay:d,isSameMonth:f,startOfMonth:m,isBefore:y,endOfMonth:p,isAfter:b}=o,v=n&&m(n),C=r&&p(r),x={[fe.focused]:[],[fe.outside]:[],[fe.disabled]:[],[fe.hidden]:[],[fe.today]:[]},k={};for(const S of e){const{date:T,displayMonth:E}=S,D=!!(E&&!f(T,E)),N=!!(v&&y(T,v)),M=!!(C&&b(T,C)),j=!!(s&&st(T,s,o)),_=!!(a&&st(T,a,o))||N||M||!l&&!c&&D||l&&c===!1&&D,B=d(T,u);D&&x.outside.push(S),j&&x.disabled.push(S),_&&x.hidden.push(S),B&&x.today.push(S),i&&Object.keys(i).forEach(z=>{const K=i?.[z];K&&st(T,K,o)&&(k[z]?k[z].push(S):k[z]=[S])})}return S=>{const T={[fe.focused]:!1,[fe.disabled]:!1,[fe.hidden]:!1,[fe.outside]:!1,[fe.today]:!1},E={};for(const D in x){const N=x[D];T[D]=N.some(M=>M===S)}for(const D in k)E[D]=k[D].some(N=>N===S);return{...T,...E}}}function jb(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[s])=>(n[s]?o.push(n[s]):t[fe[s]]?o.push(t[fe[s]]):t[$e[s]]&&o.push(t[$e[s]]),o),[t[L.Day]])}function _b(e){return{...Ab,...e}}function Ib(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function Sl(){const e={};for(const t in L)e[L[t]]=`rdp-${L[t]}`;for(const t in fe)e[fe[t]]=`rdp-${fe[t]}`;for(const t in $e)e[$e[t]]=`rdp-${$e[t]}`;for(const t in Ne)e[Ne[t]]=`rdp-${Ne[t]}`;return e}function Dl(e,t,n){return(n??new je(t)).formatMonthYear(e)}const Vb=Dl;function Fb(e,t,n){return(n??new je(t)).format(e,"d")}function Lb(e,t=tt){return t.format(e,"LLLL")}function Wb(e,t,n){return(n??new je(t)).format(e,"cccccc")}function Bb(e,t=tt){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function $b(){return""}function Tl(e,t=tt){return t.format(e,"yyyy")}const zb=Tl,Yb=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Dl,formatDay:Fb,formatMonthCaption:Vb,formatMonthDropdown:Lb,formatWeekNumber:Bb,formatWeekNumberHeader:$b,formatWeekdayName:Wb,formatYearCaption:zb,formatYearDropdown:Tl},Symbol.toStringTag,{value:"Module"}));function Hb(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Yb,...e}}function ws(e,t,n,r){let o=(r??new je(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const Gb=ws;function Cs(e,t,n){return(n??new je(t)).formatMonthYear(e)}const Ub=Cs;function El(e,t,n,r){let o=(r??new je(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function Pl(e){return"Choose the Month"}function Ml(){return""}const qb="Go to the Next Month";function Rl(e,t){return qb}function Nl(e){return"Go to the Previous Month"}function Al(e,t,n){return(n??new je(t)).format(e,"cccc")}function Ol(e,t){return`Week ${e}`}function jl(e){return"Week Number"}function _l(e){return"Choose the Year"}const Kb=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Ub,labelDay:Gb,labelDayButton:ws,labelGrid:Cs,labelGridcell:El,labelMonthDropdown:Pl,labelNav:Ml,labelNext:Rl,labelPrevious:Nl,labelWeekNumber:Ol,labelWeekNumberHeader:jl,labelWeekday:Al,labelYearDropdown:_l},Symbol.toStringTag,{value:"Module"})),Le=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function Xb(e,t){const n=t.locale?.labels??{};return{...Kb,...e??{},labelDayButton:Le(ws,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:Le(Pl,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:Le(Rl,e?.labelNext,n.labelNext),labelPrevious:Le(Nl,e?.labelPrevious,n.labelPrevious),labelWeekNumber:Le(Ol,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:Le(_l,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:Le(Cs,e?.labelGrid,n.labelGrid),labelGridcell:Le(El,e?.labelGridcell,n.labelGridcell),labelNav:Le(Ml,e?.labelNav,n.labelNav),labelWeekNumberHeader:Le(jl,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:Le(Al,e?.labelWeekday,n.labelWeekday)}}function Zb(e,t,n,r,o){const{startOfMonth:s,startOfYear:a,endOfYear:i,eachMonthOfInterval:c,getMonth:l}=o;return c({start:a(e),end:i(e)}).map(f=>{const m=r.formatMonthDropdown(f,o),y=l(f),p=t&&f<s(t)||n&&f>s(n)||!1;return{value:y,label:m,disabled:p}})}function Qb(e,t={},n={}){let r={...t?.[L.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n?.[o]}}),r}function Jb(e,t,n,r){const o=r??e.today(),s=n?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),a=[];for(let i=0;i<7;i++){const c=e.addDays(s,i);a.push(c)}return a}function ey(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:s,endOfYear:a,eachYearOfInterval:i,getYear:c}=r,l=s(e),u=a(t),d=i({start:l,end:u});return o&&d.reverse(),d.map(f=>{const m=n.formatYearDropdown(f,r);return{value:c(f),label:m,disabled:!1}})}function ty(e,t={}){const{weekStartsOn:n,locale:r}=t,o=n??r?.options?.weekStartsOn??0,s=i=>{const c=typeof i=="number"||typeof i=="string"?new Date(i):i;return new Se(c.getFullYear(),c.getMonth(),c.getDate(),12,0,0,e)},a=i=>{const c=s(i);return new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0)};return{today:()=>s(Se.tz(e)),newDate:(i,c,l)=>new Se(i,c,l,12,0,0,e),startOfDay:i=>s(i),startOfWeek:(i,c)=>{const l=s(i),u=c?.weekStartsOn??o,d=(l.getDay()-u+7)%7;return l.setDate(l.getDate()-d),l},startOfISOWeek:i=>{const c=s(i),l=(c.getDay()-1+7)%7;return c.setDate(c.getDate()-l),c},startOfMonth:i=>{const c=s(i);return c.setDate(1),c},startOfYear:i=>{const c=s(i);return c.setMonth(0,1),c},endOfWeek:(i,c)=>{const l=s(i),f=(((c?.weekStartsOn??o)+6)%7-l.getDay()+7)%7;return l.setDate(l.getDate()+f),l},endOfISOWeek:i=>{const c=s(i),l=(7-c.getDay())%7;return c.setDate(c.getDate()+l),c},endOfMonth:i=>{const c=s(i);return c.setMonth(c.getMonth()+1,0),c},endOfYear:i=>{const c=s(i);return c.setMonth(11,31),c},eachMonthOfInterval:i=>{const c=s(i.start),l=s(i.end),u=[],d=new Se(c.getFullYear(),c.getMonth(),1,12,0,0,e),f=l.getFullYear()*12+l.getMonth();for(;d.getFullYear()*12+d.getMonth()<=f;)u.push(new Se(d,e)),d.setMonth(d.getMonth()+1,1);return u},addDays:(i,c)=>{const l=s(i);return l.setDate(l.getDate()+c),l},addWeeks:(i,c)=>{const l=s(i);return l.setDate(l.getDate()+c*7),l},addMonths:(i,c)=>{const l=s(i);return l.setMonth(l.getMonth()+c),l},addYears:(i,c)=>{const l=s(i);return l.setFullYear(l.getFullYear()+c),l},eachYearOfInterval:i=>{const c=s(i.start),l=s(i.end),u=[],d=new Se(c.getFullYear(),0,1,12,0,0,e);for(;d.getFullYear()<=l.getFullYear();)u.push(new Se(d,e)),d.setFullYear(d.getFullYear()+1,0,1);return u},getWeek:(i,c)=>{const l=a(i);return bs(l,{weekStartsOn:c?.weekStartsOn??o,firstWeekContainsDate:c?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1})},getISOWeek:i=>{const c=a(i);return gs(c)},differenceInCalendarDays:(i,c)=>{const l=a(i),u=a(c);return ps(l,u)},differenceInCalendarMonths:(i,c)=>{const l=a(i),u=a(c);return fl(l,u)}}}const $n=e=>e instanceof HTMLElement?e:null,no=e=>[...e.querySelectorAll("[data-animated-month]")??[]],ny=e=>$n(e.querySelector("[data-animated-month]")),ro=e=>$n(e.querySelector("[data-animated-caption]")),oo=e=>$n(e.querySelector("[data-animated-weeks]")),ry=e=>$n(e.querySelector("[data-animated-nav]")),oy=e=>$n(e.querySelector("[data-animated-weekdays]"));function sy(e,t,{classNames:n,months:r,focused:o,dateLib:s}){const a=w.useRef(null),i=w.useRef(r),c=w.useRef(!1);w.useLayoutEffect(()=>{const l=i.current;if(i.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||l.length===0||r.length!==l.length)return;const u=s.isSameMonth(r[0].date,l[0].date),d=s.isAfter(r[0].date,l[0].date),f=d?n[Ne.caption_after_enter]:n[Ne.caption_before_enter],m=d?n[Ne.weeks_after_enter]:n[Ne.weeks_before_enter],y=a.current,p=e.current.cloneNode(!0);if(p instanceof HTMLElement?(no(p).forEach(x=>{if(!(x instanceof HTMLElement))return;const k=ny(x);k&&x.contains(k)&&x.removeChild(k);const S=ro(x);S&&S.classList.remove(f);const T=oo(x);T&&T.classList.remove(m)}),a.current=p):a.current=null,c.current||u||o)return;const b=y instanceof HTMLElement?no(y):[],v=no(e.current);if(v?.every(C=>C instanceof HTMLElement)&&b&&b.every(C=>C instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const C=ry(e.current);C&&(C.style.zIndex="1"),v.forEach((x,k)=>{const S=b[k];if(!S)return;x.style.position="relative",x.style.overflow="hidden";const T=ro(x);T&&T.classList.add(f);const E=oo(x);E&&E.classList.add(m);const D=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),C&&(C.style.zIndex=""),T&&T.classList.remove(f),E&&E.classList.remove(m),x.style.position="",x.style.overflow="",x.contains(S)&&x.removeChild(S)};S.style.pointerEvents="none",S.style.position="absolute",S.style.overflow="hidden",S.setAttribute("aria-hidden","true");const N=oy(S);N&&(N.style.opacity="0");const M=ro(S);M&&(M.classList.add(d?n[Ne.caption_before_exit]:n[Ne.caption_after_exit]),M.addEventListener("animationend",D));const j=oo(S);j&&j.classList.add(d?n[Ne.weeks_before_exit]:n[Ne.weeks_after_exit]),x.insertBefore(S,x.firstChild)})}})}function ay(e,t,n,r){const o=e[0],s=e[e.length-1],{ISOWeek:a,fixedWeeks:i,broadcastCalendar:c}=n??{},{addDays:l,differenceInCalendarDays:u,differenceInCalendarMonths:d,endOfBroadcastWeek:f,endOfISOWeek:m,endOfMonth:y,endOfWeek:p,isAfter:b,startOfBroadcastWeek:v,startOfISOWeek:C,startOfWeek:x}=r,k=c?v(o,r):a?C(o):x(o),S=c?f(s):a?m(y(s)):p(y(s)),T=t&&(c?f(t):a?m(t):p(t)),E=T&&b(S,T)?T:S,D=u(E,k),N=d(s,o)+1,M=[];for(let B=0;B<=D;B++){const z=l(k,B);M.push(z)}const _=(c?35:42)*N;if(i&&M.length<_){const B=_-M.length;for(let z=0;z<B;z++){const K=l(M[M.length-1],1);M.push(K)}}return M}function iy(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((s,a)=>s.concat(a.days.slice()),t.slice());return n.concat(o.slice())},t.slice())}function cy(e,t,n,r){const{numberOfMonths:o=1}=n,s=[];for(let a=0;a<o;a++){const i=r.addMonths(e,a);if(t&&i>t)break;s.push(i)}return s}function Ua(e,t,n,r){const{month:o,defaultMonth:s,today:a=r.today(),numberOfMonths:i=1}=e;let c=o||s||a;const{differenceInCalendarMonths:l,addMonths:u,startOfMonth:d}=r;if(n&&l(n,c)<i-1){const f=-1*(i-1);c=u(n,f)}return t&&l(c,t)<0&&(c=t),d(c)}function ly(e,t,n,r){const{addDays:o,endOfBroadcastWeek:s,endOfISOWeek:a,endOfMonth:i,endOfWeek:c,getISOWeek:l,getWeek:u,startOfBroadcastWeek:d,startOfISOWeek:f,startOfWeek:m}=r,y=e.reduce((p,b)=>{const v=n.broadcastCalendar?d(b,r):n.ISOWeek?f(b):m(b),C=n.broadcastCalendar?s(b):n.ISOWeek?a(i(b)):c(i(b)),x=t.filter(E=>E>=v&&E<=C),k=n.broadcastCalendar?35:42;if(n.fixedWeeks&&x.length<k){const E=t.filter(D=>{const N=k-x.length;return D>C&&D<=o(C,N)});x.push(...E)}const S=x.reduce((E,D)=>{const N=n.ISOWeek?l(D):u(D),M=E.find(_=>_.weekNumber===N),j=new xl(D,b,r);return M?M.days.push(j):E.push(new sb(N,[j])),E},[]),T=new ob(b,S);return p.push(T),p},[]);return n.reverseMonths?y.reverse():y}function uy(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:s,startOfMonth:a,endOfMonth:i,addYears:c,endOfYear:l,newDate:u,today:d}=t,{fromYear:f,toYear:m,fromMonth:y,toMonth:p}=e;!n&&y&&(n=y),!n&&f&&(n=t.newDate(f,0,1)),!r&&p&&(r=p),!r&&m&&(r=u(m,11,31));const b=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=a(n):f?n=u(f,0,1):!n&&b&&(n=o(c(e.today??d(),-100))),r?r=i(r):m?r=u(m,11,31):!r&&b&&(r=l(e.today??d())),[n&&s(n),r&&s(r)]}function dy(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s=1}=n,{startOfMonth:a,addMonths:i,differenceInCalendarMonths:c}=r,l=o?s:1,u=a(e);if(!t)return i(u,l);if(!(c(t,e)<s))return i(u,l)}function fy(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s}=n,{startOfMonth:a,addMonths:i,differenceInCalendarMonths:c}=r,l=o?s??1:1,u=a(e);if(!t)return i(u,-l);if(!(c(u,t)<=0))return i(u,-l)}function my(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function Ar(e,t){const[n,r]=w.useState(e);return[t===void 0?n:t,r]}function hy(e,t){const[n,r]=uy(e,t),{startOfMonth:o,endOfMonth:s}=t,a=Ua(e,n,r,t),[i,c]=Ar(a,e.month?a:void 0);w.useEffect(()=>{const k=Ua(e,n,r,t);c(k)},[e.timeZone]);const{months:l,weeks:u,days:d,previousMonth:f,nextMonth:m}=w.useMemo(()=>{const k=cy(i,r,{numberOfMonths:e.numberOfMonths},t),S=ay(k,e.endMonth?s(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),T=ly(k,S,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),E=my(T),D=iy(T),N=fy(i,n,e,t),M=dy(i,r,e,t);return{months:T,weeks:E,days:D,previousMonth:N,nextMonth:M}},[t,i.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:y,onMonthChange:p}=e,b=k=>u.some(S=>S.days.some(T=>T.isEqualTo(k))),v=k=>{if(y)return;let S=o(k);n&&S<o(n)&&(S=o(n)),r&&S>o(r)&&(S=o(r)),c(S),p?.(S)};return{months:l,weeks:u,days:d,navStart:n,navEnd:r,previousMonth:f,nextMonth:m,goToMonth:v,goToDay:k=>{b(k)||v(k.date)}}}var Ge;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Ge||(Ge={}));function qa(e){return!e[fe.disabled]&&!e[fe.hidden]&&!e[fe.outside]}function py(e,t,n,r){let o,s=-1;for(const a of e){const i=t(a);qa(i)&&(i[fe.focused]&&s<Ge.FocusedModifier?(o=a,s=Ge.FocusedModifier):r?.isEqualTo(a)&&s<Ge.LastFocused?(o=a,s=Ge.LastFocused):n(a.date)&&s<Ge.Selected?(o=a,s=Ge.Selected):i[fe.today]&&s<Ge.Today&&(o=a,s=Ge.Today))}return o||(o=e.find(a=>qa(t(a)))),o}function gy(e,t,n,r,o,s,a){const{ISOWeek:i,broadcastCalendar:c}=s,{addDays:l,addMonths:u,addWeeks:d,addYears:f,endOfBroadcastWeek:m,endOfISOWeek:y,endOfWeek:p,max:b,min:v,startOfBroadcastWeek:C,startOfISOWeek:x,startOfWeek:k}=a;let T={day:l,week:d,month:u,year:f,startOfWeek:E=>c?C(E,a):i?x(E):k(E),endOfWeek:E=>c?m(E):i?y(E):p(E)}[e](n,t==="after"?1:-1);return t==="before"&&r?T=b([r,T]):t==="after"&&o&&(T=v([o,T])),T}function Il(e,t,n,r,o,s,a,i=0){if(i>365)return;const c=gy(e,t,n.date,r,o,s,a),l=!!(s.disabled&&st(c,s.disabled,a)),u=!!(s.hidden&&st(c,s.hidden,a)),d=c,f=new xl(c,d,a);return!l&&!u?f:Il(e,t,f,r,o,s,a,i+1)}function by(e,t,n,r,o){const{autoFocus:s}=e,[a,i]=w.useState(),c=py(t.days,n,r||(()=>!1),a),[l,u]=w.useState(s?c:void 0);return{isFocusTarget:p=>!!c?.isEqualTo(p),setFocused:u,focused:l,blur:()=>{i(l),u(void 0)},moveFocus:(p,b)=>{if(!l)return;const v=Il(p,b,l,t.navStart,t.navEnd,e,o);v&&(e.disableNavigation&&!t.days.some(x=>x.isEqualTo(v))||(t.goToDay(v),u(v)))}}}function yy(e,t){const{selected:n,required:r,onSelect:o}=e,[s,a]=Ar(n,o?n:void 0),i=o?n:s,{isSameDay:c}=t,l=m=>i?.some(y=>c(y,m))??!1,{min:u,max:d}=e;return{selected:i,select:(m,y,p)=>{let b=[...i??[]];if(l(m)){if(i?.length===u||r&&i?.length===1)return;b=i?.filter(v=>!c(v,m))}else i?.length===d?b=[m]:b=[...b,m];return o||a(b),o?.(b,m,y,p),b},isSelected:l}}function vy(e,t,n=0,r=0,o=!1,s=tt){const{from:a,to:i}=t||{},{isSameDay:c,isAfter:l,isBefore:u}=s;let d;if(!a&&!i)d={from:e,to:n>0?void 0:e};else if(a&&!i)c(a,e)?n===0?d={from:a,to:e}:o?d={from:a,to:void 0}:d=void 0:u(e,a)?d={from:e,to:a}:d={from:a,to:e};else if(a&&i)if(c(a,e)&&c(i,e))o?d={from:a,to:i}:d=void 0;else if(c(a,e))d={from:a,to:n>0?void 0:e};else if(c(i,e))d={from:e,to:n>0?void 0:e};else if(u(e,a))d={from:e,to:i};else if(l(e,a))d={from:a,to:e};else if(l(e,i))d={from:a,to:e};else throw new Error("Invalid range");if(d?.from&&d?.to){const f=s.differenceInCalendarDays(d.to,d.from);r>0&&f>r?d={from:e,to:void 0}:n>1&&f<n&&(d={from:e,to:void 0})}return d}function xy(e,t,n=tt){const r=Array.isArray(t)?t:[t];let o=e.from;const s=n.differenceInCalendarDays(e.to,e.from),a=Math.min(s,6);for(let i=0;i<=a;i++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function Ka(e,t,n=tt){return ot(e,t.from,!1,n)||ot(e,t.to,!1,n)||ot(t,e.from,!1,n)||ot(t,e.to,!1,n)}function wy(e,t,n=tt){const r=Array.isArray(t)?t:[t];if(r.filter(i=>typeof i!="function").some(i=>typeof i=="boolean"?i:n.isDate(i)?ot(e,i,!1,n):kl(i,n)?i.some(c=>ot(e,c,!1,n)):Nr(i)?i.from&&i.to?Ka(e,{from:i.from,to:i.to},n):!1:Cl(i)?xy(e,i.dayOfWeek,n):ys(i)?n.isAfter(i.before,i.after)?Ka(e,{from:n.addDays(i.after,1),to:n.addDays(i.before,-1)},n):st(e.from,i,n)||st(e.to,i,n):vs(i)||xs(i)?st(e.from,i,n)||st(e.to,i,n):!1))return!0;const a=r.filter(i=>typeof i=="function");if(a.length){let i=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let l=0;l<=c;l++){if(a.some(u=>u(i)))return!0;i=n.addDays(i,1)}}return!1}function Cy(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:s,onSelect:a}=e,[i,c]=Ar(o,a?o:void 0),l=a?o:i;return{selected:l,select:(f,m,y)=>{const{min:p,max:b}=e,v=f?vy(f,l,p,b,s,t):void 0;return r&&n&&v?.from&&v.to&&wy({from:v.from,to:v.to},n,t)&&(v.from=f,v.to=void 0),a||c(v),a?.(v,f,m,y),v},isSelected:f=>l&&ot(l,f,!1,t)}}function ky(e,t){const{selected:n,required:r,onSelect:o}=e,[s,a]=Ar(n,o?n:void 0),i=o?n:s,{isSameDay:c}=t;return{selected:i,select:(d,f,m)=>{let y=d;return!r&&i&&i&&c(d,i)&&(y=void 0),o||a(y),o?.(y,d,f,m),y},isSelected:d=>i?c(i,d):!1}}function Sy(e,t){const n=ky(e,t),r=yy(e,t),o=Cy(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function Ie(e,t){return e instanceof Se&&e.timeZone===t?e:new Se(e,t)}function Ft(e,t,n){return Ie(e,t)}function Xa(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?Ft(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?Ft(r,t):r):Nr(e)?{...e,from:e.from?Ie(e.from,t):e.from,to:e.to?Ie(e.to,t):e.to}:ys(e)?{before:Ft(e.before,t),after:Ft(e.after,t)}:vs(e)?{after:Ft(e.after,t)}:xs(e)?{before:Ft(e.before,t)}:e}function so(e,t,n){return e&&(Array.isArray(e)?e.map(r=>Xa(r,t)):Xa(e,t))}function Dy(e){let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=Ie(t.today,n)),t.month&&(t.month=Ie(t.month,n)),t.defaultMonth&&(t.defaultMonth=Ie(t.defaultMonth,n)),t.startMonth&&(t.startMonth=Ie(t.startMonth,n)),t.endMonth&&(t.endMonth=Ie(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=Ie(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(Q=>Ie(Q,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?Ie(t.selected.from,n):t.selected.from,to:t.selected.to?Ie(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=so(t.disabled,n)),t.hidden!==void 0&&(t.hidden=so(t.hidden,n)),t.modifiers)){const Q={};Object.keys(t.modifiers).forEach(ae=>{Q[ae]=so(t.modifiers?.[ae],n)}),t.modifiers=Q}const{components:r,formatters:o,labels:s,dateLib:a,locale:i,classNames:c}=w.useMemo(()=>{const Q={...vl,...t.locale},ae=t.broadcastCalendar?1:t.weekStartsOn,q=t.noonSafe&&t.timeZone?ty(t.timeZone,{weekStartsOn:ae,locale:Q}):void 0,se=t.dateLib&&q?{...q,...t.dateLib}:t.dateLib??q,Re=new je({locale:Q,weekStartsOn:ae,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},se);return{dateLib:Re,components:_b(t.components),formatters:Hb(t.formatters),labels:Xb(t.labels,Re.options),locale:Q,classNames:{...Sl(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:a.today()});const{captionLayout:l,mode:u,navLayout:d,numberOfMonths:f=1,onDayBlur:m,onDayClick:y,onDayFocus:p,onDayKeyDown:b,onDayMouseEnter:v,onDayMouseLeave:C,onNextClick:x,onPrevClick:k,showWeekNumber:S,styles:T}=t,{formatCaption:E,formatDay:D,formatMonthDropdown:N,formatWeekNumber:M,formatWeekNumberHeader:j,formatWeekdayName:_,formatYearDropdown:B}=o,z=hy(t,a),{days:K,months:$,navStart:W,navEnd:O,previousMonth:H,nextMonth:ee,goToMonth:P}=z,Y=Ob(K,t,W,O,a),{isSelected:G,select:X,selected:we}=Sy(t,a)??{},{blur:Pe,focused:A,isFocusTarget:U,moveFocus:ne,setFocused:Z}=by(t,z,Y,G??(()=>!1),a),{labelDayButton:re,labelGridcell:be,labelGrid:Ce,labelMonthDropdown:kt,labelNav:mn,labelPrevious:Zn,labelNext:qr,labelWeekday:dh,labelWeekNumber:fh,labelWeekNumberHeader:mh,labelYearDropdown:hh}=s,ph=w.useMemo(()=>Jb(a,t.ISOWeek,t.broadcastCalendar,t.today),[a,t.ISOWeek,t.broadcastCalendar,t.today]),Da=u!==void 0||y!==void 0,Kr=w.useCallback(()=>{H&&(P(H),k?.(H))},[H,P,k]),Xr=w.useCallback(()=>{ee&&(P(ee),x?.(ee))},[P,ee,x]),gh=w.useCallback((Q,ae)=>q=>{q.preventDefault(),q.stopPropagation(),Z(Q),!ae.disabled&&(X?.(Q.date,ae,q),y?.(Q.date,ae,q))},[X,y,Z]),bh=w.useCallback((Q,ae)=>q=>{Z(Q),p?.(Q.date,ae,q)},[p,Z]),yh=w.useCallback((Q,ae)=>q=>{Pe(),m?.(Q.date,ae,q)},[Pe,m]),vh=w.useCallback((Q,ae)=>q=>{const se={ArrowLeft:[q.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[q.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[q.shiftKey?"year":"week","after"],ArrowUp:[q.shiftKey?"year":"week","before"],PageUp:[q.shiftKey?"year":"month","before"],PageDown:[q.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(se[q.key]){q.preventDefault(),q.stopPropagation();const[Re,oe]=se[q.key];ne(Re,oe)}b?.(Q.date,ae,q)},[ne,b,t.dir]),xh=w.useCallback((Q,ae)=>q=>{v?.(Q.date,ae,q)},[v]),wh=w.useCallback((Q,ae)=>q=>{C?.(Q.date,ae,q)},[C]),Ch=w.useCallback(Q=>ae=>{const q=Number(ae.target.value),se=a.setMonth(a.startOfMonth(Q),q);P(se)},[a,P]),kh=w.useCallback(Q=>ae=>{const q=Number(ae.target.value),se=a.setYear(a.startOfMonth(Q),q);P(se)},[a,P]),{className:Sh,style:Dh}=w.useMemo(()=>({className:[c[L.Root],t.className].filter(Boolean).join(" "),style:{...T?.[L.Root],...t.style}}),[c,t.className,t.style,T]),Th=Ib(t),Ta=w.useRef(null);sy(Ta,!!t.animate,{classNames:c,months:$,focused:A,dateLib:a});const Eh={dayPickerProps:t,selected:we,select:X,isSelected:G,months:$,nextMonth:ee,previousMonth:H,goToMonth:P,getModifiers:Y,components:r,classNames:c,styles:T,labels:s,formatters:o};return w.createElement(wl.Provider,{value:Eh},w.createElement(r.Root,{rootRef:t.animate?Ta:void 0,className:Sh,style:Dh,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...Th},w.createElement(r.Months,{className:c[L.Months],style:T?.[L.Months]},!t.hideNavigation&&!d&&w.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[L.Nav],style:T?.[L.Nav],"aria-label":mn(),onPreviousClick:Kr,onNextClick:Xr,previousMonth:H,nextMonth:ee}),$.map((Q,ae)=>w.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:c[L.Month],style:T?.[L.Month],key:ae,displayIndex:ae,calendarMonth:Q},d==="around"&&!t.hideNavigation&&ae===0&&w.createElement(r.PreviousMonthButton,{type:"button",className:c[L.PreviousMonthButton],tabIndex:H?void 0:-1,"aria-disabled":H?void 0:!0,"aria-label":Zn(H),onClick:Kr,"data-animated-button":t.animate?"true":void 0},w.createElement(r.Chevron,{disabled:H?void 0:!0,className:c[L.Chevron],orientation:t.dir==="rtl"?"right":"left"})),w.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:c[L.MonthCaption],style:T?.[L.MonthCaption],calendarMonth:Q,displayIndex:ae},l?.startsWith("dropdown")?w.createElement(r.DropdownNav,{className:c[L.Dropdowns],style:T?.[L.Dropdowns]},(()=>{const q=l==="dropdown"||l==="dropdown-months"?w.createElement(r.MonthsDropdown,{key:"month",className:c[L.MonthsDropdown],"aria-label":kt(),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:Ch(Q.date),options:Zb(Q.date,W,O,o,a),style:T?.[L.Dropdown],value:a.getMonth(Q.date)}):w.createElement("span",{key:"month"},N(Q.date,a)),se=l==="dropdown"||l==="dropdown-years"?w.createElement(r.YearsDropdown,{key:"year",className:c[L.YearsDropdown],"aria-label":hh(a.options),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:kh(Q.date),options:ey(W,O,o,a,!!t.reverseYears),style:T?.[L.Dropdown],value:a.getYear(Q.date)}):w.createElement("span",{key:"year"},B(Q.date,a));return a.getMonthYearOrder()==="year-first"?[se,q]:[q,se]})(),w.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},E(Q.date,a.options,a))):w.createElement(r.CaptionLabel,{className:c[L.CaptionLabel],role:"status","aria-live":"polite"},E(Q.date,a.options,a))),d==="around"&&!t.hideNavigation&&ae===f-1&&w.createElement(r.NextMonthButton,{type:"button",className:c[L.NextMonthButton],tabIndex:ee?void 0:-1,"aria-disabled":ee?void 0:!0,"aria-label":qr(ee),onClick:Xr,"data-animated-button":t.animate?"true":void 0},w.createElement(r.Chevron,{disabled:ee?void 0:!0,className:c[L.Chevron],orientation:t.dir==="rtl"?"left":"right"})),ae===f-1&&d==="after"&&!t.hideNavigation&&w.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[L.Nav],style:T?.[L.Nav],"aria-label":mn(),onPreviousClick:Kr,onNextClick:Xr,previousMonth:H,nextMonth:ee}),w.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":Ce(Q.date,a.options,a)||void 0,className:c[L.MonthGrid],style:T?.[L.MonthGrid]},!t.hideWeekdays&&w.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:c[L.Weekdays],style:T?.[L.Weekdays]},S&&w.createElement(r.WeekNumberHeader,{"aria-label":mh(a.options),className:c[L.WeekNumberHeader],style:T?.[L.WeekNumberHeader],scope:"col"},j()),ph.map(q=>w.createElement(r.Weekday,{"aria-label":dh(q,a.options,a),className:c[L.Weekday],key:String(q),style:T?.[L.Weekday],scope:"col"},_(q,a.options,a)))),w.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:c[L.Weeks],style:T?.[L.Weeks]},Q.weeks.map(q=>w.createElement(r.Week,{className:c[L.Week],key:q.weekNumber,style:T?.[L.Week],week:q},S&&w.createElement(r.WeekNumber,{week:q,style:T?.[L.WeekNumber],"aria-label":fh(q.weekNumber,{locale:i}),className:c[L.WeekNumber],scope:"row",role:"rowheader"},M(q.weekNumber,a)),q.days.map(se=>{const{date:Re}=se,oe=Y(se);if(oe[fe.focused]=!oe.hidden&&!!A?.isEqualTo(se),oe[$e.selected]=G?.(Re)||oe.selected,Nr(we)){const{from:Zr,to:Qr}=we;oe[$e.range_start]=!!(Zr&&Qr&&a.isSameDay(Re,Zr)),oe[$e.range_end]=!!(Zr&&Qr&&a.isSameDay(Re,Qr)),oe[$e.range_middle]=ot(we,Re,!0,a)}const Ph=Qb(oe,T,t.modifiersStyles),Mh=jb(oe,c,t.modifiersClassNames),Rh=!Da&&!oe.hidden?be(Re,oe,a.options,a):void 0;return w.createElement(r.Day,{key:`${se.isoDate}_${se.displayMonthId}`,day:se,modifiers:oe,className:Mh.join(" "),style:Ph,role:"gridcell","aria-selected":oe.selected||void 0,"aria-label":Rh,"data-day":se.isoDate,"data-month":se.outside?se.dateMonthId:void 0,"data-selected":oe.selected||void 0,"data-disabled":oe.disabled||void 0,"data-hidden":oe.hidden||void 0,"data-outside":se.outside||void 0,"data-focused":oe.focused||void 0,"data-today":oe.today||void 0},!oe.hidden&&Da?w.createElement(r.DayButton,{className:c[L.DayButton],style:T?.[L.DayButton],type:"button",day:se,modifiers:oe,disabled:!oe.focused&&oe.disabled||void 0,"aria-disabled":oe.focused&&oe.disabled||void 0,tabIndex:U(se)?0:-1,"aria-label":re(Re,oe,a.options,a),onClick:gh(se,oe),onBlur:yh(se,oe),onFocus:bh(se,oe),onKeyDown:vh(se,oe),onMouseEnter:xh(se,oe),onMouseLeave:wh(se,oe)},D(Re,a.options,a)):!oe.hidden&&D(se.date,a.options,a))})))))))),t.footer&&w.createElement(r.Footer,{className:c[L.Footer],style:T?.[L.Footer],role:"status","aria-live":"polite"},t.footer)))}const Ty=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ey=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Za=e=>{const t=Ey(e);return t.charAt(0).toUpperCase()+t.slice(1)},Vl=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Py=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var My={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ry=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:a,...i},c)=>w.createElement("svg",{ref:c,...My,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Vl("lucide",o),...!s&&!Py(i)&&{"aria-hidden":"true"},...i},[...a.map(([l,u])=>w.createElement(l,u)),...Array.isArray(s)?s:[s]]));const sn=(e,t)=>{const n=w.forwardRef(({className:r,...o},s)=>w.createElement(Ry,{ref:s,iconNode:t,className:Vl(`lucide-${Ty(Za(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Za(e),n};const Ny=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Fl=sn("chevron-down",Ny);const Ay=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Oy=sn("chevron-left",Ay);const jy=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],_y=sn("chevron-right",jy);const Iy=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Vy=sn("chevron-up",Iy);const Fy=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ly=sn("circle",Fy);const Wy=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],By=sn("x",Wy);function $y({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="dropdown",formatters:o,components:s,navButtonVariant:a="iconSquareGhost",...i}){const c=Sl();return h.jsx(Dy,{showOutsideDays:n,captionLayout:r,formatters:{formatMonthDropdown:u=>u.toLocaleString("default",{month:"short"}),...o},className:R("p-3 rounded-md border border-[var(--atom-border)]","bg-[var(--atom-bg)] text-[var(--atom-text)]","shadow-[var(--atom-shadow-sm)] w-fit",e),classNames:{root:R("w-fit",c.root),months:R("relative flex flex-col gap-4 md:flex-row",c.months),month:R("flex w-full flex-col gap-4",c.month),nav:R("absolute inset-x-0 top-0 flex items-center justify-between px-1",c.nav),button_previous:R("inline-flex items-center justify-center","h-7 w-7 rounded-md","bg-[var(--atom-card-bg)]","border border-[color-mix(in_srgb,var(--atom-primary)_15%,transparent)]","opacity-60 hover:opacity-100","transition-opacity","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--atom-primary)] focus-visible:ring-offset-1","cursor-pointer",c.button_previous),button_next:R("inline-flex items-center justify-center","h-7 w-7 rounded-md","bg-[var(--atom-card-bg)]","border border-[color-mix(in_srgb,var(--atom-primary)_15%,transparent)]","opacity-60 hover:opacity-100","transition-opacity","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--atom-primary)] focus-visible:ring-offset-1","cursor-pointer",c.button_next),month_caption:R("flex h-7 w-full items-center justify-center gap-2",c.month_caption),dropdowns:R("flex items-center gap-2 text-sm font-medium",c.dropdowns),dropdown_root:R("relative flex items-center rounded-md border border-[var(--atom-border)]","bg-[var(--atom-bg)] px-2 py-1 shadow-xs",c.dropdown_root),dropdown:R("absolute inset-0 opacity-0 cursor-pointer",c.dropdown),caption_label:R("inline-flex items-center gap-2 select-none text-md font-medium",c.caption_label),month_grid:R("w-full border-collapse",c.month_grid),weekdays:R("flex",c.weekdays),weekday:R("flex-1 select-none text-[0.75rem] font-normal opacity-60 text-center",c.weekday),week:R("mt-2 flex w-full",c.week),day:R("relative aspect-square w-8 h-8 p-0 text-center",c.day),outside:R("opacity-40",c.outside),disabled:R("opacity-30 pointer-events-none",c.disabled),hidden:R("invisible",c.hidden),range_start:R("rounded-l-md",c.range_start),range_end:R("rounded-r-md",c.range_end),range_middle:R("rounded-none",c.range_middle),today:R("rounded-md","bg-[var(--atom-primary-100)]",c.today),...t},components:{Root:({className:u,rootRef:d,...f})=>h.jsx("div",{"data-slot":"calendar",ref:d,className:R(u),...f}),Chevron:({className:u,orientation:d,...f})=>d==="left"?h.jsx(Oy,{className:R("size-4",u),...f}):d==="right"?h.jsx(_y,{className:R("size-4",u),...f}):h.jsx(Fl,{className:R("size-4",u),...f}),DayButton:u=>h.jsx(l,{...u}),WeekNumber:({children:u,...d})=>h.jsx("td",{...d,children:h.jsx("div",{className:"flex items-center justify-center text-xs opacity-60",children:u})}),...s},...i});function l({className:u,day:d,modifiers:f,...m}){const y=g.useRef(null);g.useEffect(()=>{f.focused&&y.current?.focus()},[f.focused]);const p=!!f.selected&&!f.range_start&&!f.range_end&&!f.range_middle;return h.jsx(hs,{ref:y,variant:a,size:"sm","data-day":d.date.toLocaleDateString(),"data-selected-single":p||void 0,"data-range-start":f.range_start||void 0,"data-range-end":f.range_end||void 0,"data-range-middle":f.range_middle||void 0,disabled:f.disabled,className:R("!px-0 !py-0 w-full h-full","data-[selected-single=true]:bg-[var(--atom-primary)]","data-[selected-single=true]:!text-[var(--atom-primary-contrast)]","data-[range-start=true]:bg-[var(--atom-primary)] data-[range-start=true]:!text-[var(--atom-primary-contrast)]","data-[range-end=true]:bg-[var(--atom-primary)] data-[range-end=true]:!text-[var(--atom-primary-contrast)]","data-[range-middle=true]:bg-[color-mix(in_srgb,var(--atom-primary)_18%,transparent)]","hover:bg-[color-mix(in_srgb,var(--atom-border)_70%,transparent)]",u,e),...m})}}const zy=te(["rounded-lg","bg-[var(--atom-theme-surface-primary)]","border border-[color-mix(in_srgb,var(--atom-theme-border-primary)_60%,transparent)]","transition-all duration-200","overflow-hidden"].join(" "),{variants:{variant:{elevated:"shadow-md hover:shadow-lg",outlined:"shadow-sm",flat:"border-transparent shadow-none"},hoverable:{true:"hover:shadow-xl hover:scale-[1.02] cursor-pointer",false:""},clickable:{true:"cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--atom-ring-color)] focus-visible:ring-offset-2",false:""}},defaultVariants:{variant:"elevated",hoverable:!1,clickable:!1}}),Ll=g.forwardRef(({className:e,variant:t,hoverable:n,clickable:r,...o},s)=>h.jsx("div",{ref:s,className:R(zy({variant:t,hoverable:n,clickable:r}),e),tabIndex:r?0:void 0,...o}));Ll.displayName="Card";const Qa=te("px-6 pt-6",{variants:{divider:{true:"border-b border-[var(--atom-theme-border-primary)] pb-4",false:""},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{divider:!1,align:"left"}}),Wl=g.forwardRef(({className:e,divider:t,align:n,avatar:r,action:o,children:s,...a},i)=>r||o?h.jsx("div",{ref:i,className:R(Qa({divider:t}),e),...a,children:h.jsxs("div",{className:"flex items-start gap-4",children:[r&&h.jsx("div",{className:"shrink-0",children:r}),h.jsx("div",{className:"flex-1 min-w-0",children:s}),o&&h.jsx("div",{className:"shrink-0",children:o})]})}):h.jsx("div",{ref:i,className:R(Qa({divider:t,align:n}),e),...a,children:s}));Wl.displayName="CardHeader";const Bl=g.forwardRef(({className:e,...t},n)=>h.jsx("h3",{ref:n,className:R("text-lg font-semibold leading-none tracking-tight","text-[var(--atom-theme-text-primary)]",e),...t}));Bl.displayName="CardTitle";const $l=g.forwardRef(({className:e,...t},n)=>h.jsx("p",{ref:n,className:R("mt-1 text-sm text-[var(--atom-text-muted)]",e),...t}));$l.displayName="CardSubtitle";const Yy=te("",{variants:{noPadding:{true:"",false:"px-6 py-4"}},defaultVariants:{noPadding:!1}}),zl=g.forwardRef(({className:e,noPadding:t,...n},r)=>h.jsx("div",{ref:r,className:R(Yy({noPadding:t}),e),...n}));zl.displayName="CardBody";const Hy=te("flex items-center gap-3 px-6 pb-6",{variants:{divider:{true:"border-t border-[var(--atom-theme-border-primary)] pt-4",false:""},align:{left:"justify-start",center:"justify-center",right:"justify-end",between:"justify-between"}},defaultVariants:{divider:!1,align:"right"}}),Yl=g.forwardRef(({className:e,divider:t,align:n,...r},o)=>h.jsx("div",{ref:o,className:R(Hy({divider:t,align:n}),e),...r}));Yl.displayName="CardFooter";const Gy=te("w-full",{variants:{size:{sm:"h-32",md:"h-48",lg:"h-64",xl:"h-80",auto:"h-auto"},objectFit:{cover:"object-cover",contain:"object-contain",fill:"object-fill",none:"object-none"}},defaultVariants:{size:"md",objectFit:"cover"}}),Hl=g.forwardRef(({className:e,size:t,objectFit:n,...r},o)=>h.jsx("img",{ref:o,className:R(Gy({size:t,objectFit:n}),e),...r}));Hl.displayName="CardMedia";const Uy=te(["shrink-0 rounded-[var(--atom-radius-1)]","border border-[var(--atom-card-border)]","bg-[var(--atom-input-bg)]","transition-[background-color,border-color,box-shadow,color]","disabled:cursor-not-allowed disabled:opacity-50","hover:border-[color-mix(in_srgb,var(--atom-card-border)_70%,var(--atom-text))]","focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-[color-mix(in_srgb,var(--atom-primary)_35%,transparent)]","focus-visible:ring-offset-0","accent-[var(--atom-primary)]"].join(" "),{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),Gl=g.forwardRef(({className:e,size:t,id:n,label:r,indeterminate:o=!1,wrapperClassName:s,labelClassName:a,disabled:i,...c},l)=>{const u=g.useId(),d=n??u,f=g.useRef(null);return g.useImperativeHandle(l,()=>f.current,[]),g.useEffect(()=>{f.current&&(f.current.indeterminate=o)},[o]),h.jsxs("div",{className:R("inline-flex items-center gap-2",s),children:[h.jsx("input",{ref:f,id:d,type:"checkbox","data-slot":"checkbox",className:R(Uy({size:t}),e),disabled:i,...c}),r!=null&&h.jsx("label",{htmlFor:d,className:R("select-none text-sm font-medium","text-[var(--atom-text)]",i?"cursor-not-allowed opacity-50":"cursor-pointer",a),children:r})]})});Gl.displayName="Checkbox";const qy=te(["flex flex-col","rounded-md border","select-text outline-none","transition-[background-color,border-color,box-shadow]","duration-200"].join(" "),{variants:{variant:{default:"bg-[var(--atom-theme-surface-primary)] border-[var(--atom-theme-border-primary)] text-[var(--atom-theme-text-primary)]",info:"bg-[color-mix(in_srgb,var(--atom-info)_8%,transparent)] border-[color-mix(in_srgb,var(--atom-info)_25%,transparent)] text-[color-mix(in_srgb,var(--atom-info)_90%,black)]",success:"bg-[color-mix(in_srgb,var(--atom-success)_8%,transparent)] border-[color-mix(in_srgb,var(--atom-success)_25%,transparent)] text-[color-mix(in_srgb,var(--atom-success)_90%,black)]",warning:"bg-[color-mix(in_srgb,var(--atom-warning)_8%,transparent)] border-[color-mix(in_srgb,var(--atom-warning)_25%,transparent)] text-[color-mix(in_srgb,var(--atom-warning)_90%,black)]",error:"bg-[color-mix(in_srgb,var(--atom-error)_8%,transparent)] border-[color-mix(in_srgb,var(--atom-error)_25%,transparent)] text-[color-mix(in_srgb,var(--atom-error)_90%,black)]",neutral:"bg-[color-mix(in_srgb,var(--atom-badge-archived-border)_6%,transparent)] border-[color-mix(in_srgb,var(--atom-badge-archived-border)_75%,transparent)] text-muted-foreground"},size:{sm:"p-3 text-xs gap-2",md:"p-4 text-sm gap-3",lg:"p-6 text-base gap-4"}},defaultVariants:{variant:"default",size:"md"}}),Ul=g.forwardRef(({className:e,variant:t="default",size:n="md",title:r,icon:o,children:s,footer:a,...i},c)=>{const l=t==="error"||t==="warning"?"polite":"off";return h.jsxs("div",{ref:c,role:"region","aria-live":l,"data-slot":"content-card",className:R(qy({variant:t,size:n}),e),...i,children:[(r||o)&&h.jsxs("div",{className:"flex items-start gap-2",children:[o&&h.jsx("span",{"aria-hidden":"true",className:R("shrink-0 mt-0.5",t==="info"&&"text-[var(--atom-info)]",t==="success"&&"text-[var(--atom-success)]",t==="warning"&&"text-[var(--atom-warning)]",t==="error"&&"text-[var(--atom-error)]",t==="neutral"&&"text-muted-foreground",t==="default"&&"text-[var(--atom-theme-text-primary)]"),children:o}),r&&r.trim()!==""&&h.jsx("h3",{className:"font-semibold leading-tight",children:r})]}),h.jsx("div",{className:"flex-1 leading-relaxed",children:s}),a&&h.jsx("div",{className:"text-xs opacity-80 border-t border-current/10 pt-2 mt-1",children:a})]})});Ul.displayName="ContentCard";function ue(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Ky(e,t){const n=g.createContext(t),r=s=>{const{children:a,...i}=s,c=g.useMemo(()=>i,Object.values(i));return h.jsx(n.Provider,{value:c,children:a})};r.displayName=e+"Provider";function o(s){const a=g.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function wt(e,t=[]){let n=[];function r(s,a){const i=g.createContext(a),c=n.length;n=[...n,a];const l=d=>{const{scope:f,children:m,...y}=d,p=f?.[e]?.[c]||i,b=g.useMemo(()=>y,Object.values(y));return h.jsx(p.Provider,{value:b,children:m})};l.displayName=s+"Provider";function u(d,f){const m=f?.[e]?.[c]||i,y=g.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[l,u]}const o=()=>{const s=n.map(a=>g.createContext(a));return function(i){const c=i?.[e]||s;return g.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[r,Xy(o,...t)]}function Xy(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((i,{useScope:c,scopeName:l})=>{const d=c(s)[`__scope${l}`];return{...i,...d}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var gt=globalThis?.document?g.useLayoutEffect:()=>{},Zy=g[" useId ".trim().toString()]||(()=>{}),Qy=0;function Sn(e){const[t,n]=g.useState(Zy());return gt(()=>{n(r=>r??String(Qy++))},[e]),e||(t?`radix-${t}`:"")}var Jy=g[" useInsertionEffect ".trim().toString()]||gt;function zn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,a]=ev({defaultProp:t,onChange:n}),i=e!==void 0,c=i?e:o;{const u=g.useRef(e!==void 0);g.useEffect(()=>{const d=u.current;d!==i&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=i},[i,r])}const l=g.useCallback(u=>{if(i){const d=tv(u)?u(e):u;d!==e&&a.current?.(d)}else s(u)},[i,e,s,a]);return[c,l]}function ev({defaultProp:e,onChange:t}){const[n,r]=g.useState(e),o=g.useRef(n),s=g.useRef(t);return Jy(()=>{s.current=t},[t]),g.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function tv(e){return typeof e=="function"}function nv(e){const t=rv(e),n=g.forwardRef((r,o)=>{const{children:s,...a}=r,i=g.Children.toArray(s),c=i.find(sv);if(c){const l=c.props.children,u=i.map(d=>d===c?g.Children.count(l)>1?g.Children.only(null):g.isValidElement(l)?l.props.children:null:d);return h.jsx(t,{...a,ref:o,children:g.isValidElement(l)?g.cloneElement(l,void 0,u):null})}return h.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function rv(e){const t=g.forwardRef((n,r)=>{const{children:o,...s}=n;if(g.isValidElement(o)){const a=iv(o),i=av(s,o.props);return o.type!==g.Fragment&&(i.ref=r?Ln(r,a):a),g.cloneElement(o,i)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ov=Symbol("radix.slottable");function sv(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ov}function av(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function iv(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var cv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],he=cv.reduce((e,t)=>{const n=nv(`Primitive.${t}`),r=g.forwardRef((o,s)=>{const{asChild:a,...i}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(c,{...i,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function lv(e,t){e&&Bc.flushSync(()=>e.dispatchEvent(t))}function At(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>t.current?.(...n),[])}function uv(e,t=globalThis?.document){const n=At(e);g.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var dv="DismissableLayer",Io="dismissableLayer.update",fv="dismissableLayer.pointerDownOutside",mv="dismissableLayer.focusOutside",Ja,ql=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ks=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...c}=e,l=g.useContext(ql),[u,d]=g.useState(null),f=u?.ownerDocument??globalThis?.document,[,m]=g.useState({}),y=xe(t,E=>d(E)),p=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=p.indexOf(b),C=u?p.indexOf(u):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,k=C>=v,S=gv(E=>{const D=E.target,N=[...l.branches].some(M=>M.contains(D));!k||N||(o?.(E),a?.(E),E.defaultPrevented||i?.())},f),T=bv(E=>{const D=E.target;[...l.branches].some(M=>M.contains(D))||(s?.(E),a?.(E),E.defaultPrevented||i?.())},f);return uv(E=>{C===l.layers.size-1&&(r?.(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},f),g.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Ja=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),ei(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Ja)}},[u,f,n,l]),g.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),ei())},[u,l]),g.useEffect(()=>{const E=()=>m({});return document.addEventListener(Io,E),()=>document.removeEventListener(Io,E)},[]),h.jsx(he.div,{...c,ref:y,style:{pointerEvents:x?k?"auto":"none":void 0,...e.style},onFocusCapture:ue(e.onFocusCapture,T.onFocusCapture),onBlurCapture:ue(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:ue(e.onPointerDownCapture,S.onPointerDownCapture)})});ks.displayName=dv;var hv="DismissableLayerBranch",pv=g.forwardRef((e,t)=>{const n=g.useContext(ql),r=g.useRef(null),o=xe(t,r);return g.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),h.jsx(he.div,{...e,ref:o})});pv.displayName=hv;function gv(e,t=globalThis?.document){const n=At(e),r=g.useRef(!1),o=g.useRef(()=>{});return g.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let c=function(){Kl(fv,n,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function bv(e,t=globalThis?.document){const n=At(e),r=g.useRef(!1);return g.useEffect(()=>{const o=s=>{s.target&&!r.current&&Kl(mv,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ei(){const e=new CustomEvent(Io);document.dispatchEvent(e)}function Kl(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?lv(o,s):o.dispatchEvent(s)}var ao="focusScope.autoFocusOnMount",io="focusScope.autoFocusOnUnmount",ti={bubbles:!1,cancelable:!0},yv="FocusScope",Xl=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,c]=g.useState(null),l=At(o),u=At(s),d=g.useRef(null),f=xe(t,p=>c(p)),m=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let p=function(x){if(m.paused||!i)return;const k=x.target;i.contains(k)?d.current=k:ft(d.current,{select:!0})},b=function(x){if(m.paused||!i)return;const k=x.relatedTarget;k!==null&&(i.contains(k)||ft(d.current,{select:!0}))},v=function(x){if(document.activeElement===document.body)for(const S of x)S.removedNodes.length>0&&ft(i)};document.addEventListener("focusin",p),document.addEventListener("focusout",b);const C=new MutationObserver(v);return i&&C.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",b),C.disconnect()}}},[r,i,m.paused]),g.useEffect(()=>{if(i){ri.add(m);const p=document.activeElement;if(!i.contains(p)){const v=new CustomEvent(ao,ti);i.addEventListener(ao,l),i.dispatchEvent(v),v.defaultPrevented||(vv(Sv(Zl(i)),{select:!0}),document.activeElement===p&&ft(i))}return()=>{i.removeEventListener(ao,l),setTimeout(()=>{const v=new CustomEvent(io,ti);i.addEventListener(io,u),i.dispatchEvent(v),v.defaultPrevented||ft(p??document.body,{select:!0}),i.removeEventListener(io,u),ri.remove(m)},0)}}},[i,l,u,m]);const y=g.useCallback(p=>{if(!n&&!r||m.paused)return;const b=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,v=document.activeElement;if(b&&v){const C=p.currentTarget,[x,k]=xv(C);x&&k?!p.shiftKey&&v===k?(p.preventDefault(),n&&ft(x,{select:!0})):p.shiftKey&&v===x&&(p.preventDefault(),n&&ft(k,{select:!0})):v===C&&p.preventDefault()}},[n,r,m.paused]);return h.jsx(he.div,{tabIndex:-1,...a,ref:f,onKeyDown:y})});Xl.displayName=yv;function vv(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ft(r,{select:t}),document.activeElement!==n)return}function xv(e){const t=Zl(e),n=ni(t,e),r=ni(t.reverse(),e);return[n,r]}function Zl(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ni(e,t){for(const n of e)if(!wv(n,{upTo:t}))return n}function wv(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Cv(e){return e instanceof HTMLInputElement&&"select"in e}function ft(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Cv(e)&&t&&e.select()}}var ri=kv();function kv(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=oi(e,t),e.unshift(t)},remove(t){e=oi(e,t),e[0]?.resume()}}}function oi(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Sv(e){return e.filter(t=>t.tagName!=="A")}var Dv="Portal",Ss=g.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=g.useState(!1);gt(()=>s(!0),[]);const a=n||o&&globalThis?.document?.body;return a?Fn.createPortal(h.jsx(he.div,{...r,ref:t}),a):null});Ss.displayName=Dv;function Tv(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var _t=e=>{const{present:t,children:n}=e,r=Ev(t),o=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),s=xe(r.ref,Pv(o));return typeof n=="function"||r.isPresent?g.cloneElement(o,{ref:s}):null};_t.displayName="Presence";function Ev(e){const[t,n]=g.useState(),r=g.useRef(null),o=g.useRef(e),s=g.useRef("none"),a=e?"mounted":"unmounted",[i,c]=Tv(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const l=tr(r.current);s.current=i==="mounted"?l:"none"},[i]),gt(()=>{const l=r.current,u=o.current;if(u!==e){const f=s.current,m=tr(l);e?c("MOUNT"):m==="none"||l?.display==="none"?c("UNMOUNT"):c(u&&f!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),gt(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,d=m=>{const p=tr(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&p&&(c("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},f=m=>{m.target===t&&(s.current=tr(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:g.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function tr(e){return e?.animationName||"none"}function Pv(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var co=0;function Mv(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??si()),document.body.insertAdjacentElement("beforeend",e[1]??si()),co++,()=>{co===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),co--}},[])}function si(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ue=function(){return Ue=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ue.apply(this,arguments)};function Ql(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Rv(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var dr="right-scroll-bar-position",fr="width-before-scroll-bar",Nv="with-scroll-bars-hidden",Av="--removed-body-scroll-bar-size";function lo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ov(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var jv=typeof window<"u"?g.useLayoutEffect:g.useEffect,ai=new WeakMap;function _v(e,t){var n=Ov(null,function(r){return e.forEach(function(o){return lo(o,r)})});return jv(function(){var r=ai.get(n);if(r){var o=new Set(r),s=new Set(e),a=n.current;o.forEach(function(i){s.has(i)||lo(i,null)}),s.forEach(function(i){o.has(i)||lo(i,a)})}ai.set(n,e)},[e]),n}function Iv(e){return e}function Vv(e,t){t===void 0&&(t=Iv);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(s),a=n}var c=function(){var u=a;a=[],u.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),n}}}};return o}function Fv(e){e===void 0&&(e={});var t=Vv(null);return t.options=Ue({async:!0,ssr:!1},e),t}var Jl=function(e){var t=e.sideCar,n=Ql(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return g.createElement(r,Ue({},n))};Jl.isSideCarExport=!0;function Lv(e,t){return e.useMedium(t),Jl}var eu=Fv(),uo=function(){},Or=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:uo,onWheelCapture:uo,onTouchMoveCapture:uo}),o=r[0],s=r[1],a=e.forwardProps,i=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,m=e.noRelative,y=e.noIsolation,p=e.inert,b=e.allowPinchZoom,v=e.as,C=v===void 0?"div":v,x=e.gapMode,k=Ql(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,T=_v([n,t]),E=Ue(Ue({},k),o);return g.createElement(g.Fragment,null,u&&g.createElement(S,{sideCar:eu,removeScrollBar:l,shards:d,noRelative:m,noIsolation:y,inert:p,setCallbacks:s,allowPinchZoom:!!b,lockRef:n,gapMode:x}),a?g.cloneElement(g.Children.only(i),Ue(Ue({},E),{ref:T})):g.createElement(C,Ue({},E,{className:c,ref:T}),i))});Or.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Or.classNames={fullWidth:fr,zeroRight:dr};var Wv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Bv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Wv();return t&&e.setAttribute("nonce",t),e}function $v(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function zv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Yv=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Bv())&&($v(t,n),zv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Hv=function(){var e=Yv();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},tu=function(){var e=Hv(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Gv={left:0,top:0,right:0,gap:0},fo=function(e){return parseInt(e||"",10)||0},Uv=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[fo(n),fo(r),fo(o)]},qv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Gv;var t=Uv(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Kv=tu(),qt="data-scroll-locked",Xv=function(e,t,n,r){var o=e.left,s=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
7
+ .`.concat(Nv,` {
8
8
  overflow: hidden `).concat(r,`;
9
9
  padding-right: `).concat(i,"px ").concat(r,`;
10
10
  }
11
- body[`).concat(Ut,`] {
11
+ body[`).concat(qt,`] {
12
12
  overflow: hidden `).concat(r,`;
13
13
  overscroll-behavior: contain;
14
14
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
@@ -21,49 +21,49 @@ React keys must be passed directly to JSX without using spread:
21
21
  `),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
22
22
  }
23
23
 
24
- .`).concat(cr,` {
24
+ .`).concat(dr,` {
25
25
  right: `).concat(i,"px ").concat(r,`;
26
26
  }
27
27
 
28
- .`).concat(lr,` {
28
+ .`).concat(fr,` {
29
29
  margin-right: `).concat(i,"px ").concat(r,`;
30
30
  }
31
31
 
32
- .`).concat(cr," .").concat(cr,` {
32
+ .`).concat(dr," .").concat(dr,` {
33
33
  right: 0 `).concat(r,`;
34
34
  }
35
35
 
36
- .`).concat(lr," .").concat(lr,` {
36
+ .`).concat(fr," .").concat(fr,` {
37
37
  margin-right: 0 `).concat(r,`;
38
38
  }
39
39
 
40
- body[`).concat(Ut,`] {
41
- `).concat(gv,": ").concat(i,`px;
40
+ body[`).concat(qt,`] {
41
+ `).concat(Av,": ").concat(i,`px;
42
42
  }
43
- `)},oi=function(){var e=parseInt(document.body.getAttribute(Ut)||"0",10);return isFinite(e)?e:0},_v=function(){y.useEffect(function(){return document.body.setAttribute(Ut,(oi()+1).toString()),function(){var e=oi()-1;e<=0?document.body.removeAttribute(Ut):document.body.setAttribute(Ut,e.toString())}},[])},Iv=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;_v();var s=y.useMemo(function(){return Nv(o)},[o]);return y.createElement(Ov,{styles:jv(s,!t,o,n?"":"!important")})},_o=!1;if(typeof window<"u")try{var Jn=Object.defineProperty({},"passive",{get:function(){return _o=!0,!0}});window.addEventListener("test",Jn,Jn),window.removeEventListener("test",Jn,Jn)}catch{_o=!1}var Ft=_o?{passive:!1}:!1,Vv=function(e){return e.tagName==="TEXTAREA"},Jl=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Vv(e)&&n[t]==="visible")},Fv=function(e){return Jl(e,"overflowY")},Lv=function(e){return Jl(e,"overflowX")},si=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=eu(e,r);if(o){var s=tu(e,r),a=s[1],i=s[2];if(a>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Wv=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Bv=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},eu=function(e,t){return e==="v"?Fv(t):Lv(t)},tu=function(e,t){return e==="v"?Wv(t):Bv(t)},$v=function(e,t){return e==="h"&&t==="rtl"?-1:1},zv=function(e,t,n,r,o){var s=$v(e,window.getComputedStyle(t).direction),a=s*r,i=n.target,c=t.contains(i),l=!1,u=a>0,d=0,f=0;do{if(!i)break;var m=tu(e,i),b=m[0],h=m[1],g=m[2],v=h-g-s*b;(b||v)&&eu(e,i)&&(d+=v,f+=b);var C=i.parentNode;i=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(u&&Math.abs(d)<1||!u&&Math.abs(f)<1)&&(l=!0),l},er=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ai=function(e){return[e.deltaX,e.deltaY]},ii=function(e){return e&&"current"in e?e.current:e},Yv=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Hv=function(e){return`
43
+ `)},ii=function(){var e=parseInt(document.body.getAttribute(qt)||"0",10);return isFinite(e)?e:0},Zv=function(){g.useEffect(function(){return document.body.setAttribute(qt,(ii()+1).toString()),function(){var e=ii()-1;e<=0?document.body.removeAttribute(qt):document.body.setAttribute(qt,e.toString())}},[])},Qv=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Zv();var s=g.useMemo(function(){return qv(o)},[o]);return g.createElement(Kv,{styles:Xv(s,!t,o,n?"":"!important")})},Vo=!1;if(typeof window<"u")try{var nr=Object.defineProperty({},"passive",{get:function(){return Vo=!0,!0}});window.addEventListener("test",nr,nr),window.removeEventListener("test",nr,nr)}catch{Vo=!1}var Lt=Vo?{passive:!1}:!1,Jv=function(e){return e.tagName==="TEXTAREA"},nu=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Jv(e)&&n[t]==="visible")},ex=function(e){return nu(e,"overflowY")},tx=function(e){return nu(e,"overflowX")},ci=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=ru(e,r);if(o){var s=ou(e,r),a=s[1],i=s[2];if(a>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},nx=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},rx=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ru=function(e,t){return e==="v"?ex(t):tx(t)},ou=function(e,t){return e==="v"?nx(t):rx(t)},ox=function(e,t){return e==="h"&&t==="rtl"?-1:1},sx=function(e,t,n,r,o){var s=ox(e,window.getComputedStyle(t).direction),a=s*r,i=n.target,c=t.contains(i),l=!1,u=a>0,d=0,f=0;do{if(!i)break;var m=ou(e,i),y=m[0],p=m[1],b=m[2],v=p-b-s*y;(y||v)&&ru(e,i)&&(d+=v,f+=y);var C=i.parentNode;i=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(u&&Math.abs(d)<1||!u&&Math.abs(f)<1)&&(l=!0),l},rr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},li=function(e){return[e.deltaX,e.deltaY]},ui=function(e){return e&&"current"in e?e.current:e},ax=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ix=function(e){return`
44
44
  .block-interactivity-`.concat(e,` {pointer-events: none;}
45
45
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
46
- `)},Gv=0,Lt=[];function Uv(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),o=y.useState(Gv++)[0],s=y.useState(Ql)[0],a=y.useRef(e);y.useEffect(function(){a.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=hv([e.lockRef.current],(e.shards||[]).map(ii),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=y.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var v=er(h),C=n.current,w="deltaX"in h?h.deltaX:C[0]-v[0],S="deltaY"in h?h.deltaY:C[1]-v[1],k,T=h.target,E=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in h&&E==="h"&&T.type==="range")return!1;var D=window.getSelection(),A=D&&D.anchorNode,M=A?A===T||A.contains(T):!1;if(M)return!1;var j=si(E,T);if(!j)return!0;if(j?k=E:(k=E==="v"?"h":"v",j=si(E,T)),!j)return!1;if(!r.current&&"changedTouches"in h&&(w||S)&&(r.current=k),!k)return!0;var _=r.current||k;return zv(_,g,h,_==="h"?w:S)},[]),c=y.useCallback(function(h){var g=h;if(!(!Lt.length||Lt[Lt.length-1]!==s)){var v="deltaY"in g?ai(g):er(g),C=t.current.filter(function(k){return k.name===g.type&&(k.target===g.target||g.target===k.shadowParent)&&Yv(k.delta,v)})[0];if(C&&C.should){g.cancelable&&g.preventDefault();return}if(!C){var w=(a.current.shards||[]).map(ii).filter(Boolean).filter(function(k){return k.contains(g.target)}),S=w.length>0?i(g,w[0]):!a.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),l=y.useCallback(function(h,g,v,C){var w={name:h,delta:g,target:v,should:C,shadowParent:qv(v)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),u=y.useCallback(function(h){n.current=er(h),r.current=void 0},[]),d=y.useCallback(function(h){l(h.type,ai(h),h.target,i(h,e.lockRef.current))},[]),f=y.useCallback(function(h){l(h.type,er(h),h.target,i(h,e.lockRef.current))},[]);y.useEffect(function(){return Lt.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Ft),document.addEventListener("touchmove",c,Ft),document.addEventListener("touchstart",u,Ft),function(){Lt=Lt.filter(function(h){return h!==s}),document.removeEventListener("wheel",c,Ft),document.removeEventListener("touchmove",c,Ft),document.removeEventListener("touchstart",u,Ft)}},[]);var m=e.removeScrollBar,b=e.inert;return y.createElement(y.Fragment,null,b?y.createElement(s,{styles:Hv(o)}):null,m?y.createElement(Iv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function qv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Kv=kv(Zl,Uv);var nu=y.forwardRef(function(e,t){return y.createElement(Or,Ue({},e,{ref:t,sideCar:Kv}))});nu.classNames=Or.classNames;var Xv=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Wt=new WeakMap,tr=new WeakMap,nr={},uo=0,ru=function(e){return e&&(e.host||ru(e.parentNode))},Zv=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ru(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Qv=function(e,t,n,r){var o=Zv(t,Array.isArray(e)?e:[e]);nr[n]||(nr[n]=new WeakMap);var s=nr[n],a=[],i=new Set,c=new Set(o),l=function(d){!d||i.has(d)||(i.add(d),l(d.parentNode))};o.forEach(l);var u=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(f){if(i.has(f))u(f);else try{var m=f.getAttribute(r),b=m!==null&&m!=="false",h=(Wt.get(f)||0)+1,g=(s.get(f)||0)+1;Wt.set(f,h),s.set(f,g),a.push(f),h===1&&b&&tr.set(f,!0),g===1&&f.setAttribute(n,"true"),b||f.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return u(t),i.clear(),uo++,function(){a.forEach(function(d){var f=Wt.get(d)-1,m=s.get(d)-1;Wt.set(d,f),s.set(d,m),f||(tr.has(d)||d.removeAttribute(r),tr.delete(d)),m||d.removeAttribute(n)}),uo--,uo||(Wt=new WeakMap,Wt=new WeakMap,tr=new WeakMap,nr={})}},Jv=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Xv(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Qv(r,o,n,"aria-hidden")):function(){return null}};function ex(e){const t=tx(e),n=y.forwardRef((r,o)=>{const{children:s,...a}=r,i=y.Children.toArray(s),c=i.find(rx);if(c){const l=c.props.children,u=i.map(d=>d===c?y.Children.count(l)>1?y.Children.only(null):y.isValidElement(l)?l.props.children:null:d);return p.jsx(t,{...a,ref:o,children:y.isValidElement(l)?y.cloneElement(l,void 0,u):null})}return p.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function tx(e){const t=y.forwardRef((n,r)=>{const{children:o,...s}=n;if(y.isValidElement(o)){const a=sx(o),i=ox(s,o.props);return o.type!==y.Fragment&&(i.ref=r?Vn(r,a):a),y.cloneElement(o,i)}return y.Children.count(o)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nx=Symbol("radix.slottable");function rx(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nx}function ox(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function sx(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var jr="Dialog",[ou]=Ot(jr),[ax,He]=ou(jr),su=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,i=y.useRef(null),c=y.useRef(null),[l,u]=Nr({prop:r,defaultProp:o??!1,onChange:s,caller:jr});return p.jsx(ax,{scope:t,triggerRef:i,contentRef:c,contentId:kn(),titleId:kn(),descriptionId:kn(),open:l,onOpenChange:u,onOpenToggle:y.useCallback(()=>u(d=>!d),[u]),modal:a,children:n})};su.displayName=jr;var au="DialogTrigger",iu=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(au,n),s=ke(t,o.triggerRef);return p.jsx(ge.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ds(o.open),...r,ref:s,onClick:fe(e.onClick,o.onOpenToggle)})});iu.displayName=au;var ks="DialogPortal",[ix,cu]=ou(ks,{forceMount:void 0}),lu=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=He(ks,t);return p.jsx(ix,{scope:t,forceMount:n,children:y.Children.map(r,a=>p.jsx(jt,{present:n||s.open,children:p.jsx(Cs,{asChild:!0,container:o,children:a})}))})};lu.displayName=ks;var yr="DialogOverlay",uu=y.forwardRef((e,t)=>{const n=cu(yr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=He(yr,e.__scopeDialog);return s.modal?p.jsx(jt,{present:r||s.open,children:p.jsx(lx,{...o,ref:t})}):null});uu.displayName=yr;var cx=ex("DialogOverlay.RemoveScroll"),lx=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(yr,n);return p.jsx(nu,{as:cx,allowPinchZoom:!0,shards:[o.contentRef],children:p.jsx(ge.div,{"data-state":Ds(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Rt="DialogContent",du=y.forwardRef((e,t)=>{const n=cu(Rt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=He(Rt,e.__scopeDialog);return p.jsx(jt,{present:r||s.open,children:s.modal?p.jsx(ux,{...o,ref:t}):p.jsx(dx,{...o,ref:t})})});du.displayName=Rt;var ux=y.forwardRef((e,t)=>{const n=He(Rt,e.__scopeDialog),r=y.useRef(null),o=ke(t,n.contentRef,r);return y.useEffect(()=>{const s=r.current;if(s)return Jv(s)},[]),p.jsx(fu,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:fe(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:fe(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:fe(e.onFocusOutside,s=>s.preventDefault())})}),dx=y.forwardRef((e,t)=>{const n=He(Rt,e.__scopeDialog),r=y.useRef(!1),o=y.useRef(!1);return p.jsx(fu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),fu=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,i=He(Rt,n),c=y.useRef(null),l=ke(t,c);return mv(),p.jsxs(p.Fragment,{children:[p.jsx(Ul,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:p.jsx(ws,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Ds(i.open),...a,ref:l,onDismiss:()=>i.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(fx,{titleId:i.titleId}),p.jsx(hx,{contentRef:c,descriptionId:i.descriptionId})]})]})}),Ss="DialogTitle",mu=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(Ss,n);return p.jsx(ge.h2,{id:o.titleId,...r,ref:t})});mu.displayName=Ss;var hu="DialogDescription",pu=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(hu,n);return p.jsx(ge.p,{id:o.descriptionId,...r,ref:t})});pu.displayName=hu;var gu="DialogClose",yu=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(gu,n);return p.jsx(ge.button,{type:"button",...r,ref:t,onClick:fe(e.onClick,()=>o.onOpenChange(!1))})});yu.displayName=gu;function Ds(e){return e?"open":"closed"}var bu="DialogTitleWarning",[kE,vu]=Ob(bu,{contentName:Rt,titleName:Ss,docsSlug:"dialog"}),fx=({titleId:e})=>{const t=vu(bu),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
46
+ `)},cx=0,Wt=[];function lx(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),o=g.useState(cx++)[0],s=g.useState(tu)[0],a=g.useRef(e);g.useEffect(function(){a.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=Rv([e.lockRef.current],(e.shards||[]).map(ui),!0).filter(Boolean);return p.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=g.useCallback(function(p,b){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!a.current.allowPinchZoom;var v=rr(p),C=n.current,x="deltaX"in p?p.deltaX:C[0]-v[0],k="deltaY"in p?p.deltaY:C[1]-v[1],S,T=p.target,E=Math.abs(x)>Math.abs(k)?"h":"v";if("touches"in p&&E==="h"&&T.type==="range")return!1;var D=window.getSelection(),N=D&&D.anchorNode,M=N?N===T||N.contains(T):!1;if(M)return!1;var j=ci(E,T);if(!j)return!0;if(j?S=E:(S=E==="v"?"h":"v",j=ci(E,T)),!j)return!1;if(!r.current&&"changedTouches"in p&&(x||k)&&(r.current=S),!S)return!0;var _=r.current||S;return sx(_,b,p,_==="h"?x:k)},[]),c=g.useCallback(function(p){var b=p;if(!(!Wt.length||Wt[Wt.length-1]!==s)){var v="deltaY"in b?li(b):rr(b),C=t.current.filter(function(S){return S.name===b.type&&(S.target===b.target||b.target===S.shadowParent)&&ax(S.delta,v)})[0];if(C&&C.should){b.cancelable&&b.preventDefault();return}if(!C){var x=(a.current.shards||[]).map(ui).filter(Boolean).filter(function(S){return S.contains(b.target)}),k=x.length>0?i(b,x[0]):!a.current.noIsolation;k&&b.cancelable&&b.preventDefault()}}},[]),l=g.useCallback(function(p,b,v,C){var x={name:p,delta:b,target:v,should:C,shadowParent:ux(v)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(k){return k!==x})},1)},[]),u=g.useCallback(function(p){n.current=rr(p),r.current=void 0},[]),d=g.useCallback(function(p){l(p.type,li(p),p.target,i(p,e.lockRef.current))},[]),f=g.useCallback(function(p){l(p.type,rr(p),p.target,i(p,e.lockRef.current))},[]);g.useEffect(function(){return Wt.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Lt),document.addEventListener("touchmove",c,Lt),document.addEventListener("touchstart",u,Lt),function(){Wt=Wt.filter(function(p){return p!==s}),document.removeEventListener("wheel",c,Lt),document.removeEventListener("touchmove",c,Lt),document.removeEventListener("touchstart",u,Lt)}},[]);var m=e.removeScrollBar,y=e.inert;return g.createElement(g.Fragment,null,y?g.createElement(s,{styles:ix(o)}):null,m?g.createElement(Qv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ux(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const dx=Lv(eu,lx);var su=g.forwardRef(function(e,t){return g.createElement(Or,Ue({},e,{ref:t,sideCar:dx}))});su.classNames=Or.classNames;var fx=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Bt=new WeakMap,or=new WeakMap,sr={},mo=0,au=function(e){return e&&(e.host||au(e.parentNode))},mx=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=au(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},hx=function(e,t,n,r){var o=mx(t,Array.isArray(e)?e:[e]);sr[n]||(sr[n]=new WeakMap);var s=sr[n],a=[],i=new Set,c=new Set(o),l=function(d){!d||i.has(d)||(i.add(d),l(d.parentNode))};o.forEach(l);var u=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(f){if(i.has(f))u(f);else try{var m=f.getAttribute(r),y=m!==null&&m!=="false",p=(Bt.get(f)||0)+1,b=(s.get(f)||0)+1;Bt.set(f,p),s.set(f,b),a.push(f),p===1&&y&&or.set(f,!0),b===1&&f.setAttribute(n,"true"),y||f.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return u(t),i.clear(),mo++,function(){a.forEach(function(d){var f=Bt.get(d)-1,m=s.get(d)-1;Bt.set(d,f),s.set(d,m),f||(or.has(d)||d.removeAttribute(r),or.delete(d)),m||d.removeAttribute(n)}),mo--,mo||(Bt=new WeakMap,Bt=new WeakMap,or=new WeakMap,sr={})}},px=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=fx(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),hx(r,o,n,"aria-hidden")):function(){return null}};function gx(e){const t=bx(e),n=g.forwardRef((r,o)=>{const{children:s,...a}=r,i=g.Children.toArray(s),c=i.find(vx);if(c){const l=c.props.children,u=i.map(d=>d===c?g.Children.count(l)>1?g.Children.only(null):g.isValidElement(l)?l.props.children:null:d);return h.jsx(t,{...a,ref:o,children:g.isValidElement(l)?g.cloneElement(l,void 0,u):null})}return h.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function bx(e){const t=g.forwardRef((n,r)=>{const{children:o,...s}=n;if(g.isValidElement(o)){const a=wx(o),i=xx(s,o.props);return o.type!==g.Fragment&&(i.ref=r?Ln(r,a):a),g.cloneElement(o,i)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var yx=Symbol("radix.slottable");function vx(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===yx}function xx(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function wx(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var jr="Dialog",[iu]=wt(jr),[Cx,He]=iu(jr),cu=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,i=g.useRef(null),c=g.useRef(null),[l,u]=zn({prop:r,defaultProp:o??!1,onChange:s,caller:jr});return h.jsx(Cx,{scope:t,triggerRef:i,contentRef:c,contentId:Sn(),titleId:Sn(),descriptionId:Sn(),open:l,onOpenChange:u,onOpenToggle:g.useCallback(()=>u(d=>!d),[u]),modal:a,children:n})};cu.displayName=jr;var lu="DialogTrigger",uu=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(lu,n),s=xe(t,o.triggerRef);return h.jsx(he.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Es(o.open),...r,ref:s,onClick:ue(e.onClick,o.onOpenToggle)})});uu.displayName=lu;var Ds="DialogPortal",[kx,du]=iu(Ds,{forceMount:void 0}),fu=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=He(Ds,t);return h.jsx(kx,{scope:t,forceMount:n,children:g.Children.map(r,a=>h.jsx(_t,{present:n||s.open,children:h.jsx(Ss,{asChild:!0,container:o,children:a})}))})};fu.displayName=Ds;var xr="DialogOverlay",mu=g.forwardRef((e,t)=>{const n=du(xr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=He(xr,e.__scopeDialog);return s.modal?h.jsx(_t,{present:r||s.open,children:h.jsx(Dx,{...o,ref:t})}):null});mu.displayName=xr;var Sx=gx("DialogOverlay.RemoveScroll"),Dx=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(xr,n);return h.jsx(su,{as:Sx,allowPinchZoom:!0,shards:[o.contentRef],children:h.jsx(he.div,{"data-state":Es(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ot="DialogContent",hu=g.forwardRef((e,t)=>{const n=du(Ot,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=He(Ot,e.__scopeDialog);return h.jsx(_t,{present:r||s.open,children:s.modal?h.jsx(Tx,{...o,ref:t}):h.jsx(Ex,{...o,ref:t})})});hu.displayName=Ot;var Tx=g.forwardRef((e,t)=>{const n=He(Ot,e.__scopeDialog),r=g.useRef(null),o=xe(t,n.contentRef,r);return g.useEffect(()=>{const s=r.current;if(s)return px(s)},[]),h.jsx(pu,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ue(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:ue(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:ue(e.onFocusOutside,s=>s.preventDefault())})}),Ex=g.forwardRef((e,t)=>{const n=He(Ot,e.__scopeDialog),r=g.useRef(!1),o=g.useRef(!1);return h.jsx(pu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),pu=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,i=He(Ot,n),c=g.useRef(null),l=xe(t,c);return Mv(),h.jsxs(h.Fragment,{children:[h.jsx(Xl,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:h.jsx(ks,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Es(i.open),...a,ref:l,onDismiss:()=>i.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(Px,{titleId:i.titleId}),h.jsx(Rx,{contentRef:c,descriptionId:i.descriptionId})]})]})}),Ts="DialogTitle",gu=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(Ts,n);return h.jsx(he.h2,{id:o.titleId,...r,ref:t})});gu.displayName=Ts;var bu="DialogDescription",yu=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(bu,n);return h.jsx(he.p,{id:o.descriptionId,...r,ref:t})});yu.displayName=bu;var vu="DialogClose",xu=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=He(vu,n);return h.jsx(he.button,{type:"button",...r,ref:t,onClick:ue(e.onClick,()=>o.onOpenChange(!1))})});xu.displayName=vu;function Es(e){return e?"open":"closed"}var wu="DialogTitleWarning",[ZT,Cu]=Ky(wu,{contentName:Ot,titleName:Ts,docsSlug:"dialog"}),Px=({titleId:e})=>{const t=Cu(wu),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
47
47
 
48
48
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
49
49
 
50
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},mx="DialogDescriptionWarning",hx=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${vu(mx).contentName}}.`;return y.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},px=su,gx=iu,yx=lu,xu=uu,wu=du,Cu=mu,ku=pu,bx=yu;const vx=te(["fixed inset-0 z-[9998]","bg-black/50","backdrop-blur-[1px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0"].join(" ")),xx=te(["fixed left-1/2 top-1/2 z-[9999]","-translate-x-1/2 -translate-y-1/2","w-full max-w-lg max-h-[90vh] overflow-y-auto","bg-[var(--atom-theme-surface-primary)]","border border-[var(--atom-theme-border-primary)]","rounded-lg shadow-2xl","flex flex-col","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0","data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95","data-[state=open]:slide-in-from-top-[48%]","data-[state=closed]:slide-out-to-top-[48%]","duration-200"].join(" ")),wx=px,Cx=gx,Ts=({children:e,...t})=>{const[n,r]=y.useState(null);return y.useEffect(()=>{const o=document.getElementById("app-root");o?r(o):(console.warn("atom-theme container not found, using document.body"),r(document.body))},[]),n?p.jsx(yx,{container:n,...t,children:e}):null};Ts.displayName="DialogPortal";const Es=y.forwardRef(({className:e,...t},n)=>p.jsx(xu,{ref:n,className:O(vx(),e),...t}));Es.displayName=xu.displayName;const Su=y.forwardRef(({className:e,children:t,showClose:n=!0,...r},o)=>p.jsxs(Ts,{children:[p.jsx(Es,{}),p.jsxs(wu,{ref:o,role:"dialog",className:O(xx(),e),...r,children:[t,n&&p.jsxs(bx,{"aria-label":"Close",className:O("absolute right-4 top-4","inline-flex h-8 w-8 items-center justify-center rounded-md","text-[var(--atom-text-muted)]","hover:bg-[var(--atom-surface-alt)] hover:text-[var(--atom-text)]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--atom-primary)]"),children:[p.jsx(Db,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Su.displayName=wu.displayName;const Du=({className:e,...t})=>p.jsx("div",{className:O("flex flex-col space-y-1.5 px-6 pt-6 text-center sm:text-left",e),...t});Du.displayName="DialogHeader";const Tu=({className:e,...t})=>p.jsx("div",{className:O("px-6 py-4 text-[var(--atom-card-fg)]",e),...t});Tu.displayName="DialogBody";const Eu=({className:e,...t})=>p.jsx("div",{className:O("flex flex-col-reverse gap-2 px-6 pb-6 sm:flex-row sm:justify-end",e),...t});Eu.displayName="DialogFooter";const Pu=y.forwardRef(({className:e,...t},n)=>p.jsx(Cu,{ref:n,className:O("text-lg font-semibold leading-tight tracking-tight","text-[var(--atom-card-fg)]",e),...t}));Pu.displayName=Cu.displayName;const Mu=y.forwardRef(({className:e,...t},n)=>p.jsx(ku,{ref:n,className:O("text-sm text-[var(--atom-text-muted)]",e),...t}));Mu.displayName=ku.displayName;const kx=te("text-[var(--atom-text)] leading-tight tracking-tight",{variants:{size:{none:"",xs:"text-[calc(var(--atom-text-xs))]",sm:"text-[calc(var(--atom-text-sm))]",md:"text-[calc(var(--atom-text-md))]",lg:"text-[calc(var(--atom-text-lg))]",xl:"text-[calc(var(--atom-text-xl))]"},weight:{normal:"font-[var(--atom-font-weight-normal)]",medium:"font-[var(--atom-font-weight-medium)]",bold:"font-[var(--atom-font-weight-bold)]"}},defaultVariants:{size:void 0,weight:void 0}}),Sx={h1:"xl",h2:"lg",h3:"md",h4:"sm",h5:"xs",h6:"xs"},Au=y.forwardRef(({className:e,as:t="h2",asChild:n=!1,size:r,weight:o,...s},a)=>{const i=n?je:t,c=r??Sx[t];return p.jsx(i,{ref:a,"data-slot":"heading",className:O(kx({size:c,weight:o}),e),...s})});Au.displayName="Heading";const Dx=te(["transition-colors duration-200","bg-[var(--atom-theme-surface-primary)]","shadow-[var(--atom-border-xs2)]"].join(" "),{variants:{variant:{outlined:"border border-[var(--atom-theme-border)]",flat:"",dashed:"bg-transparent border border-dashed border-[var(--atom-border)]"},size:{none:"",sm:"text-sm",md:"text-base",lg:"text-lg"},padding:{none:"p-0",sm:"p-4",md:"p-6",lg:"p-8"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{variant:"outlined",size:"md",padding:"md",radius:"md"}}),Ru=y.forwardRef(({className:e,variant:t,size:n,padding:r,radius:o,asChild:s=!1,...a},i)=>{const c=s?je:"div";return p.jsx(c,{ref:i,"data-slot":"paper",className:O(Dx({variant:t,size:n,padding:r,radius:o}),e),...a})});Ru.displayName="Paper";const Tx=te(["w-full overflow-hidden","border border-[var(--atom-theme-border-primary)]","rounded-[var(--atom-radius-1)]"].join(" "),{variants:{trackVariant:{default:"bg-[color-mix(in_srgb,var(--atom-theme-border-primary)_8%,transparent)]",outline:"bg-transparent",subtle:"bg-[color-mix(in_srgb,var(--atom-theme-border-primary)_6%,var(--atom-bg))]"},size:{sm:"h-3",md:"h-3.5",lg:"h-4"},fullWidth:{true:"w-full",false:""}},defaultVariants:{trackVariant:"default",size:"sm",fullWidth:!0}}),Ex=te(["h-full","rounded-[var(--atom-radius-1)]","transition-all duration-300 ease-out"].join(" "),{variants:{indicatorVariant:{default:"bg-[var(--atom-theme-surface-secondary)]",outline:"bg-[var(--atom-primary)]",subtle:"bg-[color-mix(in_srgb,var(--atom-primary)_45%,transparent)]"}},defaultVariants:{indicatorVariant:"default"}}),Nu=y.forwardRef(({className:e,value:t=0,indeterminate:n=!1,ariaLabel:r="Progress",variant:o,trackVariant:s="default",size:a,fullWidth:i,...c},l)=>{const u=Math.max(0,Math.min(100,t)),d=o??s;return p.jsx("div",{ref:l,"data-slot":"progress-track",role:"progressbar","aria-label":r,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n?void 0:u,"aria-valuetext":n?void 0:`${u}%`,"aria-busy":n||void 0,className:O(Tx({trackVariant:s,size:a,fullWidth:i}),e),...c,children:p.jsx("div",{"data-slot":"progress-indicator","data-testid":"progress-indicator",className:O(Ex({indicatorVariant:d}),n&&"animate-indeterminate"),style:{width:n?"40%":`${u}%`,transform:n?"translateX(-60%)":void 0}})})});Nu.displayName="ProgressBar";function ci(e){const t=Px(e),n=y.forwardRef((r,o)=>{const{children:s,...a}=r,i=y.Children.toArray(s),c=i.find(Ax);if(c){const l=c.props.children,u=i.map(d=>d===c?y.Children.count(l)>1?y.Children.only(null):y.isValidElement(l)?l.props.children:null:d);return p.jsx(t,{...a,ref:o,children:y.isValidElement(l)?y.cloneElement(l,void 0,u):null})}return p.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Px(e){const t=y.forwardRef((n,r)=>{const{children:o,...s}=n;if(y.isValidElement(o)){const a=Nx(o),i=Rx(s,o.props);return o.type!==y.Fragment&&(i.ref=r?Vn(r,a):a),y.cloneElement(o,i)}return y.Children.count(o)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Mx=Symbol("radix.slottable");function Ax(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Mx}function Rx(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Nx(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ox(e){const t=e+"CollectionProvider",[n,r]=Ot(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=h=>{const{scope:g,children:v}=h,C=x.useRef(null),w=x.useRef(new Map).current;return p.jsx(o,{scope:g,itemMap:w,collectionRef:C,children:v})};a.displayName=t;const i=e+"CollectionSlot",c=ci(i),l=x.forwardRef((h,g)=>{const{scope:v,children:C}=h,w=s(i,v),S=ke(g,w.collectionRef);return p.jsx(c,{ref:S,children:C})});l.displayName=i;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=ci(u),m=x.forwardRef((h,g)=>{const{scope:v,children:C,...w}=h,S=x.useRef(null),k=ke(g,S),T=s(u,v);return x.useEffect(()=>(T.itemMap.set(S,{ref:S,...w}),()=>void T.itemMap.delete(S))),p.jsx(f,{[d]:"",ref:k,children:C})});m.displayName=u;function b(h){const g=s(e+"CollectionConsumer",h);return x.useCallback(()=>{const C=g.collectionRef.current;if(!C)return[];const w=Array.from(C.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((T,E)=>w.indexOf(T.ref.current)-w.indexOf(E.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:l,ItemSlot:m},b,r]}var jx=y.createContext(void 0);function Ou(e){const t=y.useContext(jx);return e||t||"ltr"}var fo="rovingFocusGroup.onEntryFocus",_x={bubbles:!1,cancelable:!0},Bn="RovingFocusGroup",[Io,ju,Ix]=Ox(Bn),[Vx,_u]=Ot(Bn,[Ix]),[Fx,Lx]=Vx(Bn),Iu=y.forwardRef((e,t)=>p.jsx(Io.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Io.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Wx,{...e,ref:t})})}));Iu.displayName=Bn;var Wx=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=y.useRef(null),m=ke(t,f),b=Ou(s),[h,g]=Nr({prop:a,defaultProp:i??null,onChange:c,caller:Bn}),[v,C]=y.useState(!1),w=At(l),S=ju(n),k=y.useRef(!1),[T,E]=y.useState(0);return y.useEffect(()=>{const D=f.current;if(D)return D.addEventListener(fo,w),()=>D.removeEventListener(fo,w)},[w]),p.jsx(Fx,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:h,onItemFocus:y.useCallback(D=>g(D),[g]),onItemShiftTab:y.useCallback(()=>C(!0),[]),onFocusableItemAdd:y.useCallback(()=>E(D=>D+1),[]),onFocusableItemRemove:y.useCallback(()=>E(D=>D-1),[]),children:p.jsx(ge.div,{tabIndex:v||T===0?-1:0,"data-orientation":r,...d,ref:m,style:{outline:"none",...e.style},onMouseDown:fe(e.onMouseDown,()=>{k.current=!0}),onFocus:fe(e.onFocus,D=>{const A=!k.current;if(D.target===D.currentTarget&&A&&!v){const M=new CustomEvent(fo,_x);if(D.currentTarget.dispatchEvent(M),!M.defaultPrevented){const j=S().filter($=>$.focusable),_=j.find($=>$.active),B=j.find($=>$.id===h),K=[_,B,...j].filter(Boolean).map($=>$.ref.current);Lu(K,u)}}k.current=!1}),onBlur:fe(e.onBlur,()=>C(!1))})})}),Vu="RovingFocusGroupItem",Fu=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:a,...i}=e,c=kn(),l=s||c,u=Lx(Vu,n),d=u.currentTabStopId===l,f=ju(n),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:h}=u;return y.useEffect(()=>{if(r)return m(),()=>b()},[r,m,b]),p.jsx(Io.ItemSlot,{scope:n,id:l,focusable:r,active:o,children:p.jsx(ge.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:fe(e.onMouseDown,g=>{r?u.onItemFocus(l):g.preventDefault()}),onFocus:fe(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:fe(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const v=zx(g,u.orientation,u.dir);if(v!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let w=f().filter(S=>S.focusable).map(S=>S.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const S=w.indexOf(g.currentTarget);w=u.loop?Yx(w,S+1):w.slice(S+1)}setTimeout(()=>Lu(w))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:h!=null}):a})})});Fu.displayName=Vu;var Bx={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function $x(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function zx(e,t,n){const r=$x(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Bx[r]}function Lu(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Yx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Hx=Iu,Gx=Fu;function Wu(e){const[t,n]=y.useState(void 0);return pt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;a=l.inlineSize,i=l.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Ux(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ps="Radio",[qx,Bu]=Ot(Ps),[Kx,Xx]=qx(Ps),$u=y.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:s,disabled:a,value:i="on",onCheck:c,form:l,...u}=e,[d,f]=y.useState(null),m=ke(t,g=>f(g)),b=y.useRef(!1),h=d?l||!!d.closest("form"):!0;return p.jsxs(Kx,{scope:n,checked:o,disabled:a,children:[p.jsx(ge.button,{type:"button",role:"radio","aria-checked":o,"data-state":Gu(o),"data-disabled":a?"":void 0,disabled:a,value:i,...u,ref:m,onClick:fe(e.onClick,g=>{o||c?.(),h&&(b.current=g.isPropagationStopped(),b.current||g.stopPropagation())})}),h&&p.jsx(Hu,{control:d,bubbles:!b.current,name:r,value:i,checked:o,required:s,disabled:a,form:l,style:{transform:"translateX(-100%)"}})]})});$u.displayName=Ps;var zu="RadioIndicator",Yu=y.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,s=Xx(zu,n);return p.jsx(jt,{present:r||s.checked,children:p.jsx(ge.span,{"data-state":Gu(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});Yu.displayName=zu;var Zx="RadioBubbleInput",Hu=y.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const a=y.useRef(null),i=ke(a,s),c=Ux(n),l=Wu(t);return y.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==n&&m){const b=new Event("click",{bubbles:r});m.call(u,n),u.dispatchEvent(b)}},[c,n,r]),p.jsx(ge.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...o.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Hu.displayName=Zx;function Gu(e){return e?"checked":"unchecked"}var Qx=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],_r="RadioGroup",[Jx]=Ot(_r,[_u,Bu]),Uu=_u(),qu=Bu(),[ew,tw]=Jx(_r),Ku=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:s,required:a=!1,disabled:i=!1,orientation:c,dir:l,loop:u=!0,onValueChange:d,...f}=e,m=Uu(n),b=Ou(l),[h,g]=Nr({prop:s,defaultProp:o??null,onChange:d,caller:_r});return p.jsx(ew,{scope:n,name:r,required:a,disabled:i,value:h,onValueChange:g,children:p.jsx(Hx,{asChild:!0,...m,orientation:c,dir:b,loop:u,children:p.jsx(ge.div,{role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":i?"":void 0,dir:b,...f,ref:t})})})});Ku.displayName=_r;var Xu="RadioGroupItem",Zu=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,s=tw(Xu,n),a=s.disabled||r,i=Uu(n),c=qu(n),l=y.useRef(null),u=ke(t,l),d=s.value===o.value,f=y.useRef(!1);return y.useEffect(()=>{const m=h=>{Qx.includes(h.key)&&(f.current=!0)},b=()=>f.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",b)}},[]),p.jsx(Gx,{asChild:!0,...i,focusable:!a,active:d,children:p.jsx($u,{disabled:a,required:s.required,checked:d,...c,...o,name:s.name,ref:u,onCheck:()=>s.onValueChange(o.value),onKeyDown:fe(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:fe(o.onFocus,()=>{f.current&&l.current?.click()})})})});Zu.displayName=Xu;var nw="RadioGroupIndicator",Qu=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=qu(n);return p.jsx(Yu,{...o,...r,ref:t})});Qu.displayName=nw;var rw=Ku,ow=Zu,sw=Qu;const aw=te("flex gap-2",{variants:{direction:{vertical:"flex-col",horizontal:"flex-row flex-wrap"}},defaultVariants:{direction:"vertical"}}),iw=te(["aspect-square h-4 w-4 rounded-full","border border-[var(--atom-theme-border-primary)]","bg-[var(--atom-theme-surface-primary)]","text-[var(--atom-primary)]","transition-colors","focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--atom-ring-color)]","disabled:cursor-not-allowed disabled:opacity-50","cursor-pointer"].join(" ")),Ju=y.forwardRef(({className:e,...t},n)=>p.jsx(ow,{ref:n,className:O(iw(),e),...t,children:p.jsx(sw,{className:"flex items-center justify-center",children:p.jsx(kb,{className:"h-2.5 w-2.5 fill-current"})})}));Ju.displayName="Radio";const ed=y.forwardRef(({className:e,...t},n)=>p.jsx("label",{ref:n,className:O("text-sm font-medium text-[var(--atom-card-fg)] cursor-pointer",e),...t}));ed.displayName="RadioLabel";const td=y.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:O("flex items-center gap-2",e),...t}));td.displayName="RadioOption";const nd=y.forwardRef(({className:e,...t},n)=>p.jsx("p",{ref:n,className:O("text-sm text-[var(--atom-text-muted)]",e),...t}));nd.displayName="RadioDescription";const rd=y.forwardRef(({className:e,direction:t,...n},r)=>p.jsx(rw,{ref:r,className:O(aw({direction:t}),e),...n}));rd.displayName="RadioGroup";const cw=te("flex bg-[color-mix(in_oklab,var(--atom-theme-surface-tertiary)_50%,transparent)]",{variants:{order:{col:"flex-col items-center justify-center border-none shadow-none",colR:"flex-col-reverse items-center justify-center border-none shadow-none",row:"flex-row items-center justify-between border-none shadow-none",rowR:"flex-row-reverse items-center justify-between border-none shadow-none"},size:{xs:"text-center py-[calc(var(--spacing)*2)] px-[calc(var(--spacing)*3)] rounded-[var(--atom-radius-2)] h-[64px] w-[112px]",sm:"text-center py-[calc(var(--spacing)*2)] px-[calc(var(--spacing)*4)] rounded-[var(--atom-radius-2)] h-[80px] w-[128px]",md:"text-center p-[calc(var(--atom-space-1)*4)] border-[var(--atom-border)] border-[var(--atom-border-style)] rounded-[var(--atom-radius-2)] h-[96px] w-[160px]",lg:"text-center p-[calc(var(--atom-space-1)*5)] rounded-[var(--atom-radius-2)] h-[112px] w-[192px]"}},defaultVariants:{order:"col",size:"sm"}}),lw=te("",{variants:{variant:{primary:"text-[var(--atom-theme-text-primary)] text-[calc(var(--atom-text-2xl))] font-semibold leading-[var(--atom-line-height-snug)]",secondary:"text-[var(--atom-theme-surface-secondary)] font-[600] font-semibold text-[calc(var(--atom-text-2xl))] leading-[var(--atom-line-height-snug)]",success:"text-[var(--atom-info-card-jobstatus-success-text)] font-[600] font-semibold text-[calc(var(--atom-text-2xl))] leading-[var(--atom-line-height-snug)]"}},defaultVariants:{variant:"primary"}}),uw=te("",{variants:{variant:{primary:"text-[var(--atom-theme-text-secondary)] leading-[var(--atom-info-card-jobstatus-label-line-height)] font-[var(--atom-text-xs)]",secondary:"text-[var(--atom-theme-text-secondary)] leading-[var(--atom-info-card-jobstatus-label-line-height)] font-[var(--atom-text-xs)]",success:"text-[var(--atom-theme-text-secondary)] leading-[var(--atom-info-card-jobstatus-label-line-height)] font-[var(--atom-text-xs)]"}},defaultVariants:{variant:"primary"}}),od=y.forwardRef(({variant:e="primary",order:t="col",size:n="sm",label:r,value:o,asChild:s=!1,className:a,children:i,...c},l)=>{const u=s?je:"div";return p.jsx(u,{ref:l,"data-slot":"stat-card",className:O(cw({order:t,size:n}),a),...c,children:i??p.jsxs(p.Fragment,{children:[p.jsx("div",{className:lw({variant:e}),children:o}),p.jsx("div",{className:uw({variant:e}),children:r})]})})});od.displayName="StatCardA";const dw=te("flex flex-col justify-center rounded-xl border bg-[var(--atom-theme-surface-primary] border-[var(--atom-theme-border-primary)] px-4 py-3transition-colors duration-150 ease-in-out shadow-sm ",{variants:{variant:{primary:"text-[var(--atom-primary)] ",neutral:"text-[var(--atom-text)] ",success:"text-[var(--atom-success)] ",warning:"text-[var(--atom-warning)] ",danger:"text-[var(--atom-error)]",info:"text-[var(--atom-info)]",accent:"text-[var(--atom-accent)] "},size:{sm:"h-[72px] gap-1 w-[160px]",md:"h-[84px] gap-1.5 w-[200px]",lg:"h-[96px] gap-2 w-[240px]"},appearance:{elevated:"shadow-sm",outlined:"shadow-none bg-transparent",ghost:"shadow-none bg-transparent border-transparent border-none ",soft:"shadow-none bg-[var(--atom-card-bg)] border-none"},fullWidth:{true:"w-full",false:""}},compoundVariants:[{appearance:"outlined",class:"bg-transparent"},{appearance:"ghost",class:"bg-transparent border-transparent hover:bg-[var(--atom-card-bg)] "},{appearance:"soft",class:"shadow-none bg-[var(--atom-card-bg)] border-none"}],defaultVariants:{variant:"neutral",size:"md",appearance:"elevated",fullWidth:!1}}),sd=y.forwardRef(({className:e,variant:t,size:n,appearance:r,fullWidth:o,label:s,value:a,icon:i,asChild:c,...l},u)=>{const d=c?je:"div";return p.jsxs(d,{ref:u,"data-slot":"stat-card",className:O(dw({variant:t,size:n,appearance:r,fullWidth:o}),e),...l,children:[p.jsxs("div",{className:"flex items-start justify-between gap-2",children:[p.jsx("span",{className:"text-xs font-medium text-(--atom-text-muted)",children:s}),i&&p.jsx("span",{className:"shrink-0 text-[11px] opacity-80",children:i})]}),p.jsx("div",{className:"mt-1 text-2xl font-semibold leading-tight",children:a})]})});sd.displayName="StatCardB";const fw=te("flex items-center justify-between rounded-xl border bg-[var(--atom-theme-surface-primary)] border-[var(--atom-theme-border-primary)] px-4 py-3 w-full transition-colors duration-150 ease-in-out shadow-sm border-[var(--atom-theme-border-primary)]",{variants:{variant:{primary:"text-[var(--atom-primary)]",high:"text-[var(--atom-error)]",medium:"text-[var(--atom-warning)]",low:"text-[var(--atom-success)]",neutral:"text-[var(--atom-text)]"},size:{sm:"h-10 text-sm gap-2 w-full max-w-[320px]",md:"h-12 text-sm gap-3 w-full max-w-[400px]",lg:"h-14 text-base gap-4 w-full max-w-[480px]"},appearance:{elevated:"shadow-sm",outlined:"shadow-none bg-transparent",ghost:"shadow-none bg-transparent border-transparent",soft:"shadow-none bg-[var(--atom-card-bg)] border-none"}},compoundVariants:[{appearance:"outlined",class:"bg-transparent"},{appearance:"ghost",class:"bg-transparent border-transparent hover:bg-[var(--atom-card-bg)] border-[var(--atom-card-border)]"},{appearance:"soft",class:"shadow-none bg-[var(--atom-card-bg)] border-none"}],defaultVariants:{variant:"neutral",size:"md",appearance:"elevated"}}),ad=y.forwardRef(({className:e,variant:t,size:n,appearance:r,label:o,value:s,pillIcon:a,asChild:i,...c},l)=>{const u=i?je:"div";return p.jsxs(u,{ref:l,"data-slot":"stat-card-priority",className:O(fw({variant:t,size:n,appearance:r}),e),...c,children:[p.jsx("span",{className:"text-(--atom-text)",children:o}),p.jsxs("span",{className:O("inline-flex items-center justify-center rounded-md px-2.5 py-1 text-xs font-medium",t==="high"&&"bg-[color-mix(in_srgb,var(--atom-error)_15%,transparent)] text-(--atom-error) border-[color-mix(in_srgb,var(--atom-error)_40%,var(--atom-card-border))] border",t==="medium"&&"bg-[color-mix(in_srgb,var(--atom-warning)_15%,transparent)] text-(--atom-warning) border-[color-mix(in_srgb,var(--atom-warning)_40%,var(--atom-card-border))] border",t==="low"&&"bg-[color-mix(in_srgb,var(--atom-success)_15%,transparent)] text-(--atom-success) border-[color-mix(in_srgb,var(--atom-success)_40%,var(--atom-card-border))] border",t==="primary"&&"bg-[color-mix(in_srgb,var(--atom-theme-surface-primary)_10%,transparent)] text-(--atom-theme-text-primary) border border-(--atom-theme-border-primary)",t==="neutral"&&"bg-[color-mix(in_srgb,var(--atom-border)_12%,transparent)] text-(--atom-text-muted) border-(--atom-card-border) border"),children:[a&&p.jsx("span",{className:"mr-1 flex items-center",children:a}),s]})]})});ad.displayName="StatCardC";const mw=e=>y.createElement("svg",{width:"64px",height:"64px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y.createElement("g",{id:"SVGRepo_bgCarrier",strokeWidth:0}),y.createElement("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),y.createElement("g",{id:"SVGRepo_iconCarrier"},y.createElement("path",{d:"M19 3H5C3.58579 3 2.87868 3 2.43934 3.4122C2 3.8244 2 4.48782 2 5.81466V6.50448C2 7.54232 2 8.06124 2.2596 8.49142C2.5192 8.9216 2.99347 9.18858 3.94202 9.72255L6.85504 11.3624C7.49146 11.7206 7.80967 11.8998 8.03751 12.0976C8.51199 12.5095 8.80408 12.9935 8.93644 13.5872C9 13.8722 9 14.2058 9 14.8729L9 17.5424C9 18.452 9 18.9067 9.25192 19.2613C9.50385 19.6158 9.95128 19.7907 10.8462 20.1406C12.7248 20.875 13.6641 21.2422 14.3321 20.8244C15 20.4066 15 19.4519 15 17.5424V14.8729C15 14.2058 15 13.8722 15.0636 13.5872C15.1959 12.9935 15.488 12.5095 15.9625 12.0976C16.1903 11.8998 16.5085 11.7206 17.145 11.3624L20.058 9.72255C21.0065 9.18858 21.4808 8.9216 21.7404 8.49142C22 8.06124 22 7.54232 22 6.50448V5.81466C22 4.48782 22 3.8244 21.5607 3.4122C21.1213 3 20.4142 3 19 3Z",stroke:"#00796B",strokeWidth:1.5}))),hw=()=>p.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center",children:p.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4 text-(--atom-text-primary,#4b5563)","aria-hidden":"true",children:p.jsx("path",{d:"M15 6l-6 6 6 6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),pw=()=>p.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center",children:p.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4 text-(--atom-text-primary,#4b5563)","aria-hidden":"true",children:p.jsx("path",{d:"M9 6l6 6-6 6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),gw=()=>p.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4","aria-hidden":"true",children:p.jsx("path",{d:"M11 5a6 6 0 014.472 9.985l3.271 3.272-1.414 1.414-3.272-3.271A6 6 0 1111 5z",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),yw=()=>p.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4","aria-hidden":"true",children:p.jsx("path",{d:"M5 4h4v16H5zM10 4h4v16h-4zM15 4h4v16h-4z",fill:"none",stroke:"currentColor",strokeWidth:"0.936",strokeLinecap:"round",strokeLinejoin:"round"})}),bw=()=>p.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4","aria-hidden":"true",children:p.jsx("path",{d:"M12 3v12m0 0l-4-4m4 4l4-4M5 19h14",fill:"none",stroke:"currentColor",strokeWidth:"0.936",strokeLinecap:"round",strokeLinejoin:"round"})}),vw=()=>p.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4","aria-hidden":"true",children:p.jsx("path",{d:"M6 9l6 6 6-6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function xw({columnKey:e,sortConfig:t,onSortChange:n}){const r=t.key===e,o=r?t.direction:"asc",s=()=>n(e,"asc"),a=()=>n(e,"desc");return p.jsxs("div",{className:"flex flex-col gap-0.5 -space-y-0.5 group-hover:opacity-100 opacity-50 transition-all duration-200",children:[p.jsx("button",{onClick:s,className:O("w-4 h-3 p-0 flex items-center justify-center rounded-sm transition-colors duration-200 hover:bg-blue-50 hover:opacity-100 opacity-60",r&&o==="asc"&&"opacity-100 bg-blue-50 border border-blue-300 text-blue-600 scale-110"),"aria-label":"Sort ascending",children:p.jsx("svg",{className:"w-5 h-3 stroke-[2.5]",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:p.jsx("path",{d:"M6 14l6-6 6 6"})})}),p.jsx("button",{onClick:a,className:O("w-4 h-3 p-0 flex items-center justify-center rounded-sm transition-colors duration-200 hover:bg-blue-50 hover:opacity-100 opacity-60 -mt-0.5",r&&o==="desc"&&"opacity-100 bg-blue-50 border border-blue-300 text-blue-600 scale-110"),"aria-label":"Sort descending",children:p.jsx("svg",{className:"w-5 h-3 stroke-[2.5]",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:p.jsx("path",{d:"M6 10l6 6 6-6"})})})]})}function ww({columns:e,columnVisibility:t,onColumnVisibilityChange:n}){const r=Object.values(t).filter(Boolean).length,o=()=>{const s=r===e.length;e.forEach(a=>{n(a.key,!s)})};return p.jsxs("div",{role:"dialog","aria-label":"Column visibility options",className:"absolute right-0 top-full mt-2 w-64 max-h-96 overflow-y-auto bg-(--atom-theme-surface-primary) rounded-md border border-(--atom-theme-border-primary) shadow-lg z-50",children:[p.jsxs("div",{className:"p-3 border-b border-(--atom-theme-border-primary) flex items-center justify-between",children:[p.jsx("span",{className:"text-sm font-semibold",children:"Show Columns"}),p.jsx("button",{onClick:o,className:`text-xs text-(--atom-theme-surface-secondary)\r
51
- hover:text-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_85%,black)] font-medium cursor-pointer`,children:r===e.length?"Hide All":"Show All"})]}),p.jsx("div",{className:"p-2",children:e.map(s=>{const a=t[s.key],i=a&&r===1;return p.jsxs("label",{className:O("flex items-center gap-3 px-3 py-2.5 text-sm rounded-md cursor-pointer transition-colors text-(--atom-theme-text-primary) font-medium hover:text-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_85%,black)]",i&&"opacity-50 cursor-not-allowed"),title:i?"At least one column must be visible":"",children:[p.jsx("input",{type:"checkbox",checked:a,onChange:()=>!i&&n(s.key,!a),disabled:i,className:"rounded border-gray-300 cursor-pointer disabled:cursor-not-allowed","aria-label":`Toggle ${s.name} column visibility`}),p.jsx("span",{className:"truncate",children:s.name})]},s.key)})})]})}function Cw({columns:e,data:t,filters:n,onFilterChange:r}){const[o,s]=x.useState(null),a=x.useMemo(()=>{const u={};t.forEach(f=>{e.forEach(m=>{u[m.key]||(u[m.key]=new Set);const b=m.selector?m.selector(f):f[m.key];b!=null&&b!==""&&u[m.key].add(String(b))})});const d={};return Object.keys(u).forEach(f=>{d[f]=Array.from(u[f]).sort()}),d},[t,e]),i=(u,d)=>{const f=n[u]||[],m=f.includes(d)?f.filter(b=>b!==d):[...f,d];r(u,m)},c=(u,d)=>{(n[u]||[]).length===d.length?r(u,[]):r(u,d)},l=()=>{e.forEach(u=>{r(u.key,[])})};return p.jsxs("div",{role:"dialog","aria-label":"Filter options",className:"absolute right-0 top-full mt-2 w-72 max-h-96 overflow-y-auto bg-(--atom-theme-surface-primary) rounded-md border shadow-lg z-50 border-(--atom-theme-border-primary)",children:[p.jsxs("div",{className:"p-3 border-b border-(--atom-theme-border-primary) flex items-center justify-between",children:[p.jsx("span",{className:"text-sm font-semibold",children:"Filter Columns"}),p.jsx("button",{onClick:l,className:`text-xs text-(--atom-theme-surface-secondary)\r
52
- hover:text-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_85%,black)] font-medium cursor-pointer`,children:"Clear All"})]}),p.jsx("div",{className:"p-2",children:e.map(u=>{const d=a[u.key]||[],f=o===u.key,m=n[u.key]||[],b=m.length===d.length;return p.jsxs("div",{className:"mb-2",children:[p.jsxs("button",{onClick:()=>s(f?null:u.key),className:"w-full flex items-center justify-between text-(--atom-theme-text-primary) px-3 py-2 text-sm font-medium hover:text-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_85%,black)] rounded-md",children:[p.jsx("span",{children:u.name}),p.jsxs("div",{className:"flex items-center gap-2",children:[m.length>0&&p.jsx("span",{className:"bg-(--atom-theme-surface-secondary) text-white text-xs px-1.5 py-1 rounded-full min-w-4.5 text-center",children:m.length}),p.jsx(vw,{})]})]}),f&&p.jsxs("div",{className:"ml-2 mt-1 border-l-2 border-(--atom-theme-border-primary) pl-2",children:[p.jsxs("label",{className:"flex items-center gap-2 px-3 py-1.5 text-sm rounded cursor-pointer",children:[p.jsx("input",{type:"checkbox",checked:b,onChange:()=>c(u.key,d),className:"rounded border-gray-300","aria-label":`Select all ${u.name}`}),p.jsx("span",{className:`text-xs text-(--atom-theme-surface-secondary)\r
53
- hover:text-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_85%,black)] font-medium cursor-pointer`,children:"Select All"})]}),p.jsx("div",{className:"max-h-48 overflow-y-auto",children:d.map(h=>p.jsxs("label",{className:"flex items-center gap-2 px-3 py-1.5 text-sm rounded cursor-pointer hover:text-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_85%,black)] hover:text-md",children:[p.jsx("input",{type:"checkbox",checked:m.includes(h),onChange:()=>i(u.key,h),className:"rounded border-gray-300","aria-label":`Filter by ${h}`}),p.jsx("span",{className:"truncate",children:h})]},h))})]})]},u.key)})})]})}function kw({filters:e,columns:t,onFilterChange:n,activeFilterCount:r}){const o=(s,a)=>{const c=(e[s]||[]).filter(l=>l!==a);n(s,c)};return r===0?null:p.jsx("div",{className:"px-4 py-2 border-b border-(--atom-theme-border-primary) bg-[color-mix(in_oklab,var(--atom-theme-surface-tertiary)_50%,transparent)] h-12 w-[65%] flex items-center justify-end",children:p.jsx("div",{className:`flex gap-2 items-center overflow-x-auto overflow-y-hidden max-w-xl scrollbar-thin [&::-webkit-scrollbar]:bg-transparent\r
54
- [&::-webkit-scrollbar-track]:bg-transparent`,children:Object.entries(e).map(([s,a])=>{const c=t.find(l=>l.key===s)?.name||s;return a.map(l=>p.jsxs("div",{className:"inline-flex items-center gap-2 bg-(--atom-theme-surface-secondary) text-white text-xs rounded-full px-3 py-1 whitespace-nowrap shrink-0",children:[p.jsxs("span",{children:[p.jsxs("strong",{className:"font-semibold",children:[c,":"]})," ",l]}),p.jsx("button",{onClick:()=>o(s,l),className:" rounded-full w-4 h-4 flex items-center justify-center transition-colors cursor-pointer ml-1","aria-label":`Remove ${c} filter: ${l}`,children:p.jsx("svg",{viewBox:"0 0 24 24",className:"w-3 h-3","aria-hidden":"true",children:p.jsx("path",{d:"M18 6L6 18M6 6l12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]},`${s}-${l}`))})})})}function Sw(e){const{search:t,download:n,viewColumns:r,filter:o,searchValue:s,onSearchChange:a,showFilterDropdown:i,onToggleFilter:c,showColumnsDropdown:l,onToggleColumnsDropdown:u,columns:d,data:f,filters:m,onFilterChange:b,columnVisibility:h,onColumnVisibilityChange:g,handleDownload:v}=e,C=x.useRef(null),w=x.useRef(null),S=t||n||r||o;if(x.useEffect(()=>{const T=E=>{i&&C.current&&!C.current.contains(E.target)&&c(!1),l&&w.current&&!w.current.contains(E.target)&&u(!1)};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[i,l,c,u]),!S)return null;const k=Object.values(m).reduce((T,E)=>T+E.length,0);return p.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-2 border-b border-(--atom-theme-border-primary) bg-(--atom-theme-surface-primary)",children:[p.jsx("div",{className:"flex items-center gap-2 w-[30%]",children:t&&p.jsxs("div",{className:"flex h-8 w-full items-center gap-2 rounded-md border border-(--atom-theme-border-primary) px-2",children:[p.jsx(gw,{}),p.jsx("input",{type:"text",placeholder:"Search...",value:s,onChange:T=>a(T.target.value),className:"h-full w-full bg-transparent text-sm outline-none","aria-label":"Search table"})]})}),p.jsxs("div",{className:"flex items-center gap-2 w-[60%] justify-end",children:[o&&p.jsxs(p.Fragment,{children:[p.jsx(kw,{filters:m,columns:d,onFilterChange:b,activeFilterCount:k}),p.jsxs("div",{className:"relative",ref:C,children:[p.jsxs("button",{type:"button",onClick:()=>c(!i),className:O("flex h-8 items-center gap-2 rounded-md border px-3 text-xs font-medium transition-colors border-(--atom-theme-border-primary) hover:bg-[color-mix(in_oklab,var(--atom-theme-surface-primary)_97%,black)] dark:hover:bg-[color-mix(in_oklab,var(--atom-theme-surface-primary)_85%,black)] bg-(--atom-theme-surface-primary) cursor-pointer ",""),"aria-label":"Filter table data","aria-expanded":i,"aria-haspopup":"true",children:[p.jsx(mw,{className:"h-4 w-4"}),k>0&&p.jsx("span",{className:`bg-(--atom-theme-surface-secondary) \r
50
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Mx="DialogDescriptionWarning",Rx=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Cu(Mx).contentName}}.`;return g.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Nx=cu,Ax=uu,Ox=fu,ku=mu,Su=hu,Du=gu,Tu=yu,jx=xu;const _x=te(["fixed inset-0 z-[9998]","bg-black/50","backdrop-blur-[1px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0"].join(" ")),Ix=te(["fixed left-1/2 top-1/2 z-[9999]","-translate-x-1/2 -translate-y-1/2","w-full max-w-lg max-h-[90vh] overflow-y-auto","bg-[var(--atom-theme-surface-primary)]","border border-[var(--atom-theme-border-primary)]","rounded-lg shadow-2xl","flex flex-col","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0","data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95","data-[state=open]:slide-in-from-top-[48%]","data-[state=closed]:slide-out-to-top-[48%]","duration-200"].join(" ")),Vx=Nx,Fx=Ax,Ps=({children:e,...t})=>{const[n,r]=g.useState(null);return g.useEffect(()=>{const o=document.getElementById("app-root");o?r(o):(console.warn("atom-theme container not found, using document.body"),r(document.body))},[]),n?h.jsx(Ox,{container:n,...t,children:e}):null};Ps.displayName="DialogPortal";const Ms=g.forwardRef(({className:e,...t},n)=>h.jsx(ku,{ref:n,className:R(_x(),e),...t}));Ms.displayName=ku.displayName;const Eu=g.forwardRef(({className:e,children:t,showClose:n=!0,...r},o)=>h.jsxs(Ps,{children:[h.jsx(Ms,{}),h.jsxs(Su,{ref:o,role:"dialog",className:R(Ix(),e),...r,children:[t,n&&h.jsxs(jx,{"aria-label":"Close",className:R("absolute right-4 top-4","inline-flex h-8 w-8 items-center justify-center rounded-md","text-[var(--atom-text-muted)]","hover:bg-[var(--atom-surface-alt)] hover:text-[var(--atom-text)]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--atom-primary)]"),children:[h.jsx(By,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Eu.displayName=Su.displayName;const Pu=({className:e,...t})=>h.jsx("div",{className:R("flex flex-col space-y-1.5 px-6 pt-6 text-center sm:text-left",e),...t});Pu.displayName="DialogHeader";const Mu=({className:e,...t})=>h.jsx("div",{className:R("px-6 py-4 text-[var(--atom-card-fg)]",e),...t});Mu.displayName="DialogBody";const Ru=({className:e,...t})=>h.jsx("div",{className:R("flex flex-col-reverse gap-2 px-6 pb-6 sm:flex-row sm:justify-end",e),...t});Ru.displayName="DialogFooter";const Nu=g.forwardRef(({className:e,...t},n)=>h.jsx(Du,{ref:n,className:R("text-lg font-semibold leading-tight tracking-tight","text-[var(--atom-card-fg)]",e),...t}));Nu.displayName=Du.displayName;const Au=g.forwardRef(({className:e,...t},n)=>h.jsx(Tu,{ref:n,className:R("text-sm text-[var(--atom-text-muted)]",e),...t}));Au.displayName=Tu.displayName;function _r(){const[e,t]=w.useState(null);return w.useEffect(()=>{document.getElementById("app-root")&&t(document.getElementById("app-root"))},[]),e}const Lx=te("fixed z-[1000] flex flex-col overflow-hidden border shadow-2xl transition-transform duration-300 ease-in-out bg-[var(--atom-card-bg)] border-[var(--atom-card-border)]",{variants:{variant:{right:"top-0 right-0 h-screen border-l",left:"top-0 left-0 h-screen border-r",bottom:"left-0 bottom-0 w-screen border-t",top:"left-0 top-0 w-screen border-b"},size:{sm:"",md:"",lg:"",xl:""}},compoundVariants:[{variant:["right","left"],size:"sm",class:"w-[239px]"},{variant:["right","left"],size:"md",class:"w-[478px]"},{variant:["right","left"],size:"lg",class:"w-[720px]"},{variant:["right","left"],size:"xl",class:"w-[900px]"},{variant:["top","bottom"],size:"sm",class:"h-80"},{variant:["top","bottom"],size:"md",class:"h-96"},{variant:["top","bottom"],size:"lg",class:"h-[500px]"},{variant:["top","bottom"],size:"xl",class:"h-[600px]"}],defaultVariants:{variant:"right",size:"md"}}),Wx=(e,t)=>{if(t)return"translate-x-0 translate-y-0";switch(e){case"right":return"translate-x-full";case"left":return"-translate-x-full";case"bottom":return"translate-y-full";case"top":return"-translate-y-full";default:return"translate-x-full"}},Ou=g.forwardRef(({className:e,variant:t="right",size:n="md",open:r=!1,onOpenChange:o,children:s,asChild:a=!1,closeOnBackdropClick:i=!0,closeOnEscape:c=!0,showBackdrop:l=!0,"aria-label":u,"aria-describedby":d,...f},m)=>{const y=a?Me:"div",p=_r(),b=g.useRef(null),v=g.useRef(null);g.useImperativeHandle(m,()=>b.current),g.useEffect(()=>{if(!r)return;v.current=document.activeElement;const k=b.current;if(!k)return;const S=k.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');S.length>0?S[0].focus():(k.setAttribute("tabindex","-1"),k.focus());const T=E=>{if(E.key!=="Tab")return;const D=k.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(D.length===0)return;const N=D[0],M=D[D.length-1];E.shiftKey?document.activeElement===N&&(M.focus(),E.preventDefault()):document.activeElement===M&&(N.focus(),E.preventDefault())};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T),v.current&&v.current.focus()}},[r]),g.useEffect(()=>{if(!r||!c||!o)return;const k=S=>{S.key==="Escape"&&o(!1)};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[r,c,o]),g.useEffect(()=>{if(r){const k=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",document.body.style.paddingRight=`${k}px`}else document.body.style.overflow="",document.body.style.paddingRight="";return()=>{document.body.style.overflow="",document.body.style.paddingRight=""}},[r]);const C=k=>{i&&o&&(k.stopPropagation(),o(!1))},x=h.jsxs(h.Fragment,{children:[l&&r&&h.jsx("div",{className:"fixed inset-0 z-[999] bg-black/50 transition-opacity duration-300",onClick:C,"aria-hidden":"true"}),h.jsx(y,{ref:b,"data-state":r?"open":"closed","data-variant":t,className:R(Lx({variant:t,size:n}),Wx(t,r),e),role:"dialog","aria-modal":r?"true":"false","aria-hidden":!r,"aria-label":u,"aria-labelledby":u?void 0:"drawer-title","aria-describedby":d,...f,children:h.jsx("div",{className:"h-full w-full flex flex-col overflow-auto",children:s})})]});return!p||!r?r&&!p?x:null:Fn.createPortal(x,p)});Ou.displayName="Drawer";const ju=g.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:R("flex flex-col space-y-1.5 p-6",e),...t}));ju.displayName="DrawerHeader";const _u=g.forwardRef(({className:e,...t},n)=>h.jsx("h2",{ref:n,id:"drawer-title",className:R("text-lg font-semibold leading-none tracking-tight",e),...t}));_u.displayName="DrawerTitle";const Iu=g.forwardRef(({className:e,...t},n)=>h.jsx("p",{ref:n,id:"drawer-description",className:R("text-sm text-[var(--atom-text)]",e),...t}));Iu.displayName="DrawerDescription";const Vu=g.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:R("flex-1 overflow-auto p-6 pt-0",e),...t}));Vu.displayName="DrawerBody";const Fu=g.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:R("flex items-center justify-end gap-2 p-6 pt-0",e),...t}));Fu.displayName="DrawerFooter";const Bx=g.forwardRef(({className:e,children:t,...n},r)=>h.jsx("button",{ref:r,type:"button",className:R("absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",e),"aria-label":"Close drawer",...n,children:t||h.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",children:h.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}));Bx.displayName="DrawerClose";const $x=te("text-[var(--atom-text)] leading-tight tracking-tight",{variants:{size:{none:"",xs:"text-[calc(var(--atom-text-xs))]",sm:"text-[calc(var(--atom-text-sm))]",md:"text-[calc(var(--atom-text-md))]",lg:"text-[calc(var(--atom-text-lg))]",xl:"text-[calc(var(--atom-text-xl))]"},weight:{normal:"font-[var(--atom-font-weight-normal)]",medium:"font-[var(--atom-font-weight-medium)]",bold:"font-[var(--atom-font-weight-bold)]"}},defaultVariants:{size:void 0,weight:void 0}}),zx={h1:"xl",h2:"lg",h3:"md",h4:"sm",h5:"xs",h6:"xs"},Lu=g.forwardRef(({className:e,as:t="h2",asChild:n=!1,size:r,weight:o,...s},a)=>{const i=n?Me:t,c=r??zx[t];return h.jsx(i,{ref:a,"data-slot":"heading",className:R($x({size:c,weight:o}),e),...s})});Lu.displayName="Heading";const Yx=te(["transition-colors duration-200","bg-[var(--atom-theme-surface-primary)]","shadow-[var(--atom-border-xs2)]"].join(" "),{variants:{variant:{outlined:"border border-[var(--atom-theme-border)]",flat:"",dashed:"bg-transparent border border-dashed border-[var(--atom-border)]"},size:{none:"",sm:"text-sm",md:"text-base",lg:"text-lg"},padding:{none:"p-0",sm:"p-4",md:"p-6",lg:"p-8"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{variant:"outlined",size:"md",padding:"md",radius:"md"}}),Wu=g.forwardRef(({className:e,variant:t,size:n,padding:r,radius:o,asChild:s=!1,...a},i)=>{const c=s?Me:"div";return h.jsx(c,{ref:i,"data-slot":"paper",className:R(Yx({variant:t,size:n,padding:r,radius:o}),e),...a})});Wu.displayName="Paper";const Hx=te(["w-full overflow-hidden","border border-[var(--atom-theme-border-primary)]","rounded-[var(--atom-radius-1)]"].join(" "),{variants:{trackVariant:{default:"bg-[color-mix(in_srgb,var(--atom-theme-border-primary)_8%,transparent)]",outline:"bg-transparent",subtle:"bg-[color-mix(in_srgb,var(--atom-theme-border-primary)_6%,var(--atom-bg))]"},size:{sm:"h-3",md:"h-3.5",lg:"h-4"},fullWidth:{true:"w-full",false:""}},defaultVariants:{trackVariant:"default",size:"sm",fullWidth:!0}}),Gx=te(["h-full","rounded-[var(--atom-radius-1)]","transition-all duration-300 ease-out"].join(" "),{variants:{indicatorVariant:{default:"bg-[var(--atom-theme-surface-secondary)]",outline:"bg-[var(--atom-primary)]",subtle:"bg-[color-mix(in_srgb,var(--atom-primary)_45%,transparent)]"}},defaultVariants:{indicatorVariant:"default"}}),Bu=g.forwardRef(({className:e,value:t=0,indeterminate:n=!1,ariaLabel:r="Progress",variant:o,trackVariant:s="default",size:a,fullWidth:i,...c},l)=>{const u=Math.max(0,Math.min(100,t)),d=o??s;return h.jsx("div",{ref:l,"data-slot":"progress-track",role:"progressbar","aria-label":r,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n?void 0:u,"aria-valuetext":n?void 0:`${u}%`,"aria-busy":n||void 0,className:R(Hx({trackVariant:s,size:a,fullWidth:i}),e),...c,children:h.jsx("div",{"data-slot":"progress-indicator","data-testid":"progress-indicator",className:R(Gx({indicatorVariant:d}),n&&"animate-indeterminate"),style:{width:n?"40%":`${u}%`,transform:n?"translateX(-60%)":void 0}})})});Bu.displayName="ProgressBar";function di(e){const t=Ux(e),n=g.forwardRef((r,o)=>{const{children:s,...a}=r,i=g.Children.toArray(s),c=i.find(Kx);if(c){const l=c.props.children,u=i.map(d=>d===c?g.Children.count(l)>1?g.Children.only(null):g.isValidElement(l)?l.props.children:null:d);return h.jsx(t,{...a,ref:o,children:g.isValidElement(l)?g.cloneElement(l,void 0,u):null})}return h.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Ux(e){const t=g.forwardRef((n,r)=>{const{children:o,...s}=n;if(g.isValidElement(o)){const a=Zx(o),i=Xx(s,o.props);return o.type!==g.Fragment&&(i.ref=r?Ln(r,a):a),g.cloneElement(o,i)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var qx=Symbol("radix.slottable");function Kx(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qx}function Xx(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Zx(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Qx(e){const t=e+"CollectionProvider",[n,r]=wt(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:b,children:v}=p,C=w.useRef(null),x=w.useRef(new Map).current;return h.jsx(o,{scope:b,itemMap:x,collectionRef:C,children:v})};a.displayName=t;const i=e+"CollectionSlot",c=di(i),l=w.forwardRef((p,b)=>{const{scope:v,children:C}=p,x=s(i,v),k=xe(b,x.collectionRef);return h.jsx(c,{ref:k,children:C})});l.displayName=i;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=di(u),m=w.forwardRef((p,b)=>{const{scope:v,children:C,...x}=p,k=w.useRef(null),S=xe(b,k),T=s(u,v);return w.useEffect(()=>(T.itemMap.set(k,{ref:k,...x}),()=>void T.itemMap.delete(k))),h.jsx(f,{[d]:"",ref:S,children:C})});m.displayName=u;function y(p){const b=s(e+"CollectionConsumer",p);return w.useCallback(()=>{const C=b.collectionRef.current;if(!C)return[];const x=Array.from(C.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((T,E)=>x.indexOf(T.ref.current)-x.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:l,ItemSlot:m},y,r]}var Jx=g.createContext(void 0);function $u(e){const t=g.useContext(Jx);return e||t||"ltr"}var ho="rovingFocusGroup.onEntryFocus",ew={bubbles:!1,cancelable:!0},Yn="RovingFocusGroup",[Fo,zu,tw]=Qx(Yn),[nw,Yu]=wt(Yn,[tw]),[rw,ow]=nw(Yn),Hu=g.forwardRef((e,t)=>h.jsx(Fo.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsx(Fo.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsx(sw,{...e,ref:t})})}));Hu.displayName=Yn;var sw=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=g.useRef(null),m=xe(t,f),y=$u(s),[p,b]=zn({prop:a,defaultProp:i??null,onChange:c,caller:Yn}),[v,C]=g.useState(!1),x=At(l),k=zu(n),S=g.useRef(!1),[T,E]=g.useState(0);return g.useEffect(()=>{const D=f.current;if(D)return D.addEventListener(ho,x),()=>D.removeEventListener(ho,x)},[x]),h.jsx(rw,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:p,onItemFocus:g.useCallback(D=>b(D),[b]),onItemShiftTab:g.useCallback(()=>C(!0),[]),onFocusableItemAdd:g.useCallback(()=>E(D=>D+1),[]),onFocusableItemRemove:g.useCallback(()=>E(D=>D-1),[]),children:h.jsx(he.div,{tabIndex:v||T===0?-1:0,"data-orientation":r,...d,ref:m,style:{outline:"none",...e.style},onMouseDown:ue(e.onMouseDown,()=>{S.current=!0}),onFocus:ue(e.onFocus,D=>{const N=!S.current;if(D.target===D.currentTarget&&N&&!v){const M=new CustomEvent(ho,ew);if(D.currentTarget.dispatchEvent(M),!M.defaultPrevented){const j=k().filter($=>$.focusable),_=j.find($=>$.active),B=j.find($=>$.id===p),K=[_,B,...j].filter(Boolean).map($=>$.ref.current);qu(K,u)}}S.current=!1}),onBlur:ue(e.onBlur,()=>C(!1))})})}),Gu="RovingFocusGroupItem",Uu=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:a,...i}=e,c=Sn(),l=s||c,u=ow(Gu,n),d=u.currentTabStopId===l,f=zu(n),{onFocusableItemAdd:m,onFocusableItemRemove:y,currentTabStopId:p}=u;return g.useEffect(()=>{if(r)return m(),()=>y()},[r,m,y]),h.jsx(Fo.ItemSlot,{scope:n,id:l,focusable:r,active:o,children:h.jsx(he.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:ue(e.onMouseDown,b=>{r?u.onItemFocus(l):b.preventDefault()}),onFocus:ue(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:ue(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const v=cw(b,u.orientation,u.dir);if(v!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let x=f().filter(k=>k.focusable).map(k=>k.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();const k=x.indexOf(b.currentTarget);x=u.loop?lw(x,k+1):x.slice(k+1)}setTimeout(()=>qu(x))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:p!=null}):a})})});Uu.displayName=Gu;var aw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function iw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function cw(e,t,n){const r=iw(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return aw[r]}function qu(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function lw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var uw=Hu,dw=Uu;function Rs(e){const[t,n]=g.useState(void 0);return gt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;a=l.inlineSize,i=l.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Ku(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ns="Radio",[fw,Xu]=wt(Ns),[mw,hw]=fw(Ns),Zu=g.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:s,disabled:a,value:i="on",onCheck:c,form:l,...u}=e,[d,f]=g.useState(null),m=xe(t,b=>f(b)),y=g.useRef(!1),p=d?l||!!d.closest("form"):!0;return h.jsxs(mw,{scope:n,checked:o,disabled:a,children:[h.jsx(he.button,{type:"button",role:"radio","aria-checked":o,"data-state":td(o),"data-disabled":a?"":void 0,disabled:a,value:i,...u,ref:m,onClick:ue(e.onClick,b=>{o||c?.(),p&&(y.current=b.isPropagationStopped(),y.current||b.stopPropagation())})}),p&&h.jsx(ed,{control:d,bubbles:!y.current,name:r,value:i,checked:o,required:s,disabled:a,form:l,style:{transform:"translateX(-100%)"}})]})});Zu.displayName=Ns;var Qu="RadioIndicator",Ju=g.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,s=hw(Qu,n);return h.jsx(_t,{present:r||s.checked,children:h.jsx(he.span,{"data-state":td(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});Ju.displayName=Qu;var pw="RadioBubbleInput",ed=g.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const a=g.useRef(null),i=xe(a,s),c=Ku(n),l=Rs(t);return g.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==n&&m){const y=new Event("click",{bubbles:r});m.call(u,n),u.dispatchEvent(y)}},[c,n,r]),h.jsx(he.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...o.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ed.displayName=pw;function td(e){return e?"checked":"unchecked"}var gw=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ir="RadioGroup",[bw]=wt(Ir,[Yu,Xu]),nd=Yu(),rd=Xu(),[yw,vw]=bw(Ir),od=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:s,required:a=!1,disabled:i=!1,orientation:c,dir:l,loop:u=!0,onValueChange:d,...f}=e,m=nd(n),y=$u(l),[p,b]=zn({prop:s,defaultProp:o??null,onChange:d,caller:Ir});return h.jsx(yw,{scope:n,name:r,required:a,disabled:i,value:p,onValueChange:b,children:h.jsx(uw,{asChild:!0,...m,orientation:c,dir:y,loop:u,children:h.jsx(he.div,{role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":i?"":void 0,dir:y,...f,ref:t})})})});od.displayName=Ir;var sd="RadioGroupItem",ad=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,s=vw(sd,n),a=s.disabled||r,i=nd(n),c=rd(n),l=g.useRef(null),u=xe(t,l),d=s.value===o.value,f=g.useRef(!1);return g.useEffect(()=>{const m=p=>{gw.includes(p.key)&&(f.current=!0)},y=()=>f.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",y)}},[]),h.jsx(dw,{asChild:!0,...i,focusable:!a,active:d,children:h.jsx(Zu,{disabled:a,required:s.required,checked:d,...c,...o,name:s.name,ref:u,onCheck:()=>s.onValueChange(o.value),onKeyDown:ue(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:ue(o.onFocus,()=>{f.current&&l.current?.click()})})})});ad.displayName=sd;var xw="RadioGroupIndicator",id=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=rd(n);return h.jsx(Ju,{...o,...r,ref:t})});id.displayName=xw;var ww=od,Cw=ad,kw=id;const Sw=te("flex gap-2",{variants:{direction:{vertical:"flex-col",horizontal:"flex-row flex-wrap"}},defaultVariants:{direction:"vertical"}}),Dw=te(["aspect-square h-4 w-4 rounded-full","border border-[var(--atom-theme-border-primary)]","bg-[var(--atom-theme-surface-primary)]","text-[var(--atom-primary)]","transition-colors","focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--atom-ring-color)]","disabled:cursor-not-allowed disabled:opacity-50","cursor-pointer"].join(" ")),cd=g.forwardRef(({className:e,...t},n)=>h.jsx(Cw,{ref:n,className:R(Dw(),e),...t,children:h.jsx(kw,{className:"flex items-center justify-center",children:h.jsx(Ly,{className:"h-2.5 w-2.5 fill-current"})})}));cd.displayName="Radio";const ld=g.forwardRef(({className:e,...t},n)=>h.jsx("label",{ref:n,className:R("text-sm font-medium text-[var(--atom-card-fg)] cursor-pointer",e),...t}));ld.displayName="RadioLabel";const ud=g.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:R("flex items-center gap-2",e),...t}));ud.displayName="RadioOption";const dd=g.forwardRef(({className:e,...t},n)=>h.jsx("p",{ref:n,className:R("text-sm text-[var(--atom-text-muted)]",e),...t}));dd.displayName="RadioDescription";const fd=g.forwardRef(({className:e,direction:t,...n},r)=>h.jsx(ww,{ref:r,className:R(Sw({direction:t}),e),...n}));fd.displayName="RadioGroup";const Tw=te("flex bg-[color-mix(in_oklab,var(--atom-theme-surface-tertiary)_50%,transparent)]",{variants:{order:{col:"flex-col items-center justify-center border-none shadow-none",colR:"flex-col-reverse items-center justify-center border-none shadow-none",row:"flex-row items-center justify-between border-none shadow-none",rowR:"flex-row-reverse items-center justify-between border-none shadow-none"},size:{xs:"text-center py-[calc(var(--spacing)*2)] px-[calc(var(--spacing)*3)] rounded-[var(--atom-radius-2)] h-[64px] w-[112px]",sm:"text-center py-[calc(var(--spacing)*2)] px-[calc(var(--spacing)*4)] rounded-[var(--atom-radius-2)] h-[80px] w-[128px]",md:"text-center p-[calc(var(--atom-space-1)*4)] border-[var(--atom-border)] border-[var(--atom-border-style)] rounded-[var(--atom-radius-2)] h-[96px] w-[160px]",lg:"text-center p-[calc(var(--atom-space-1)*5)] rounded-[var(--atom-radius-2)] h-[112px] w-[192px]"}},defaultVariants:{order:"col",size:"sm"}}),Ew=te("",{variants:{variant:{primary:"text-[var(--atom-theme-text-primary)] text-[calc(var(--atom-text-2xl))] font-semibold leading-[var(--atom-line-height-snug)]",secondary:"text-[var(--atom-theme-surface-secondary)] font-[600] font-semibold text-[calc(var(--atom-text-2xl))] leading-[var(--atom-line-height-snug)]",success:"text-[var(--atom-info-card-jobstatus-success-text)] font-[600] font-semibold text-[calc(var(--atom-text-2xl))] leading-[var(--atom-line-height-snug)]"}},defaultVariants:{variant:"primary"}}),Pw=te("",{variants:{variant:{primary:"text-[var(--atom-theme-text-secondary)] leading-[var(--atom-info-card-jobstatus-label-line-height)] font-[var(--atom-text-xs)]",secondary:"text-[var(--atom-theme-text-secondary)] leading-[var(--atom-info-card-jobstatus-label-line-height)] font-[var(--atom-text-xs)]",success:"text-[var(--atom-theme-text-secondary)] leading-[var(--atom-info-card-jobstatus-label-line-height)] font-[var(--atom-text-xs)]"}},defaultVariants:{variant:"primary"}}),md=g.forwardRef(({variant:e="primary",order:t="col",size:n="sm",label:r,value:o,asChild:s=!1,className:a,children:i,...c},l)=>{const u=s?Me:"div";return h.jsx(u,{ref:l,"data-slot":"stat-card",className:R(Tw({order:t,size:n}),a),...c,children:i??h.jsxs(h.Fragment,{children:[h.jsx("div",{className:Ew({variant:e}),children:o}),h.jsx("div",{className:Pw({variant:e}),children:r})]})})});md.displayName="StatCardA";const Mw=te("flex flex-col justify-center rounded-xl border bg-[var(--atom-theme-surface-primary] border-[var(--atom-theme-border-primary)] px-4 py-3transition-colors duration-150 ease-in-out shadow-sm ",{variants:{variant:{primary:"text-[var(--atom-primary)] ",neutral:"text-[var(--atom-text)] ",success:"text-[var(--atom-success)] ",warning:"text-[var(--atom-warning)] ",danger:"text-[var(--atom-error)]",info:"text-[var(--atom-info)]",accent:"text-[var(--atom-accent)] "},size:{sm:"h-[72px] gap-1 w-[160px]",md:"h-[84px] gap-1.5 w-[200px]",lg:"h-[96px] gap-2 w-[240px]"},appearance:{elevated:"shadow-sm",outlined:"shadow-none bg-transparent",ghost:"shadow-none bg-transparent border-transparent border-none ",soft:"shadow-none bg-[var(--atom-card-bg)] border-none"},fullWidth:{true:"w-full",false:""}},compoundVariants:[{appearance:"outlined",class:"bg-transparent"},{appearance:"ghost",class:"bg-transparent border-transparent hover:bg-[var(--atom-card-bg)] "},{appearance:"soft",class:"shadow-none bg-[var(--atom-card-bg)] border-none"}],defaultVariants:{variant:"neutral",size:"md",appearance:"elevated",fullWidth:!1}}),hd=g.forwardRef(({className:e,variant:t,size:n,appearance:r,fullWidth:o,label:s,value:a,icon:i,asChild:c,...l},u)=>{const d=c?Me:"div";return h.jsxs(d,{ref:u,"data-slot":"stat-card",className:R(Mw({variant:t,size:n,appearance:r,fullWidth:o}),e),...l,children:[h.jsxs("div",{className:"flex items-start justify-between gap-2",children:[h.jsx("span",{className:"text-xs font-medium text-(--atom-text-muted)",children:s}),i&&h.jsx("span",{className:"shrink-0 text-[11px] opacity-80",children:i})]}),h.jsx("div",{className:"mt-1 text-2xl font-semibold leading-tight",children:a})]})});hd.displayName="StatCardB";const Rw=te("flex items-center justify-between rounded-xl border bg-[var(--atom-theme-surface-primary)] border-[var(--atom-theme-border-primary)] px-4 py-3 w-full transition-colors duration-150 ease-in-out shadow-sm border-[var(--atom-theme-border-primary)]",{variants:{variant:{primary:"text-[var(--atom-primary)]",high:"text-[var(--atom-error)]",medium:"text-[var(--atom-warning)]",low:"text-[var(--atom-success)]",neutral:"text-[var(--atom-text)]"},size:{sm:"h-10 text-sm gap-2 w-full max-w-[320px]",md:"h-12 text-sm gap-3 w-full max-w-[400px]",lg:"h-14 text-base gap-4 w-full max-w-[480px]"},appearance:{elevated:"shadow-sm",outlined:"shadow-none bg-transparent",ghost:"shadow-none bg-transparent border-transparent",soft:"shadow-none bg-[var(--atom-card-bg)] border-none"}},compoundVariants:[{appearance:"outlined",class:"bg-transparent"},{appearance:"ghost",class:"bg-transparent border-transparent hover:bg-[var(--atom-card-bg)] border-[var(--atom-card-border)]"},{appearance:"soft",class:"shadow-none bg-[var(--atom-card-bg)] border-none"}],defaultVariants:{variant:"neutral",size:"md",appearance:"elevated"}}),pd=g.forwardRef(({className:e,variant:t,size:n,appearance:r,label:o,value:s,pillIcon:a,asChild:i,...c},l)=>{const u=i?Me:"div";return h.jsxs(u,{ref:l,"data-slot":"stat-card-priority",className:R(Rw({variant:t,size:n,appearance:r}),e),...c,children:[h.jsx("span",{className:"text-(--atom-text)",children:o}),h.jsxs("span",{className:R("inline-flex items-center justify-center rounded-md px-2.5 py-1 text-xs font-medium",t==="high"&&"bg-[color-mix(in_srgb,var(--atom-error)_15%,transparent)] text-(--atom-error) border-[color-mix(in_srgb,var(--atom-error)_40%,var(--atom-card-border))] border",t==="medium"&&"bg-[color-mix(in_srgb,var(--atom-warning)_15%,transparent)] text-(--atom-warning) border-[color-mix(in_srgb,var(--atom-warning)_40%,var(--atom-card-border))] border",t==="low"&&"bg-[color-mix(in_srgb,var(--atom-success)_15%,transparent)] text-(--atom-success) border-[color-mix(in_srgb,var(--atom-success)_40%,var(--atom-card-border))] border",t==="primary"&&"bg-[color-mix(in_srgb,var(--atom-theme-surface-primary)_10%,transparent)] text-(--atom-theme-text-primary) border border-(--atom-theme-border-primary)",t==="neutral"&&"bg-[color-mix(in_srgb,var(--atom-border)_12%,transparent)] text-(--atom-text-muted) border-(--atom-card-border) border"),children:[a&&h.jsx("span",{className:"mr-1 flex items-center",children:a}),s]})]})});pd.displayName="StatCardC";const Nw=e=>g.createElement("svg",{width:"64px",height:"64px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},g.createElement("g",{id:"SVGRepo_bgCarrier",strokeWidth:0}),g.createElement("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("g",{id:"SVGRepo_iconCarrier"},g.createElement("path",{d:"M19 3H5C3.58579 3 2.87868 3 2.43934 3.4122C2 3.8244 2 4.48782 2 5.81466V6.50448C2 7.54232 2 8.06124 2.2596 8.49142C2.5192 8.9216 2.99347 9.18858 3.94202 9.72255L6.85504 11.3624C7.49146 11.7206 7.80967 11.8998 8.03751 12.0976C8.51199 12.5095 8.80408 12.9935 8.93644 13.5872C9 13.8722 9 14.2058 9 14.8729L9 17.5424C9 18.452 9 18.9067 9.25192 19.2613C9.50385 19.6158 9.95128 19.7907 10.8462 20.1406C12.7248 20.875 13.6641 21.2422 14.3321 20.8244C15 20.4066 15 19.4519 15 17.5424V14.8729C15 14.2058 15 13.8722 15.0636 13.5872C15.1959 12.9935 15.488 12.5095 15.9625 12.0976C16.1903 11.8998 16.5085 11.7206 17.145 11.3624L20.058 9.72255C21.0065 9.18858 21.4808 8.9216 21.7404 8.49142C22 8.06124 22 7.54232 22 6.50448V5.81466C22 4.48782 22 3.8244 21.5607 3.4122C21.1213 3 20.4142 3 19 3Z",stroke:"#00796B",strokeWidth:1.5}))),Aw=()=>h.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center",children:h.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4 text-(--atom-text-primary,#4b5563)","aria-hidden":"true",children:h.jsx("path",{d:"M15 6l-6 6 6 6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),Ow=()=>h.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center",children:h.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4 text-(--atom-text-primary,#4b5563)","aria-hidden":"true",children:h.jsx("path",{d:"M9 6l6 6-6 6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),jw=()=>h.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4","aria-hidden":"true",children:h.jsx("path",{d:"M11 5a6 6 0 014.472 9.985l3.271 3.272-1.414 1.414-3.272-3.271A6 6 0 1111 5z",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),_w=()=>h.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4","aria-hidden":"true",children:h.jsx("path",{d:"M5 4h4v16H5zM10 4h4v16h-4zM15 4h4v16h-4z",fill:"none",stroke:"currentColor",strokeWidth:"0.936",strokeLinecap:"round",strokeLinejoin:"round"})}),Iw=()=>h.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4","aria-hidden":"true",children:h.jsx("path",{d:"M12 3v12m0 0l-4-4m4 4l4-4M5 19h14",fill:"none",stroke:"currentColor",strokeWidth:"0.936",strokeLinecap:"round",strokeLinejoin:"round"})}),Vw=()=>h.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4","aria-hidden":"true",children:h.jsx("path",{d:"M6 9l6 6 6-6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function Fw({columnKey:e,sortConfig:t,onSortChange:n}){const r=t.key===e,o=r?t.direction:"asc",s=()=>n(e,"asc"),a=()=>n(e,"desc");return h.jsxs("div",{className:"flex flex-col gap-0.5 -space-y-0.5 group-hover:opacity-100 opacity-50 transition-all duration-200",children:[h.jsx("button",{onClick:s,className:R("w-4 h-3 p-0 flex items-center justify-center rounded-sm transition-colors duration-200 hover:bg-blue-50 hover:opacity-100 opacity-60",r&&o==="asc"&&"opacity-100 bg-blue-50 border border-blue-300 text-blue-600 scale-110"),"aria-label":"Sort ascending",children:h.jsx("svg",{className:"w-5 h-3 stroke-[2.5]",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:h.jsx("path",{d:"M6 14l6-6 6 6"})})}),h.jsx("button",{onClick:a,className:R("w-4 h-3 p-0 flex items-center justify-center rounded-sm transition-colors duration-200 hover:bg-blue-50 hover:opacity-100 opacity-60 -mt-0.5",r&&o==="desc"&&"opacity-100 bg-blue-50 border border-blue-300 text-blue-600 scale-110"),"aria-label":"Sort descending",children:h.jsx("svg",{className:"w-5 h-3 stroke-[2.5]",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:h.jsx("path",{d:"M6 10l6 6 6-6"})})})]})}function Lw({columns:e,columnVisibility:t,onColumnVisibilityChange:n}){const r=Object.values(t).filter(Boolean).length,o=()=>{const s=r===e.length;e.forEach(a=>{n(a.key,!s)})};return h.jsxs("div",{role:"dialog","aria-label":"Column visibility options",className:"absolute right-0 top-full mt-2 w-64 max-h-96 overflow-y-auto bg-(--atom-theme-surface-primary) rounded-md border border-(--atom-theme-border-primary) shadow-lg z-50",children:[h.jsxs("div",{className:"p-3 border-b border-(--atom-theme-border-primary) flex items-center justify-between",children:[h.jsx("span",{className:"text-sm font-semibold",children:"Show Columns"}),h.jsx("button",{onClick:o,className:`text-xs text-(--atom-theme-surface-secondary)\r
51
+ hover:text-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_85%,black)] font-medium cursor-pointer`,children:r===e.length?"Hide All":"Show All"})]}),h.jsx("div",{className:"p-2",children:e.map(s=>{const a=t[s.key],i=a&&r===1;return h.jsxs("label",{className:R("flex items-center gap-3 px-3 py-2.5 text-sm rounded-md cursor-pointer transition-colors text-(--atom-theme-text-primary) font-medium hover:text-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_85%,black)]",i&&"opacity-50 cursor-not-allowed"),title:i?"At least one column must be visible":"",children:[h.jsx("input",{type:"checkbox",checked:a,onChange:()=>!i&&n(s.key,!a),disabled:i,className:"rounded border-gray-300 cursor-pointer disabled:cursor-not-allowed","aria-label":`Toggle ${s.name} column visibility`}),h.jsx("span",{className:"truncate",children:s.name})]},s.key)})})]})}function Ww({columns:e,data:t,filters:n,onFilterChange:r}){const[o,s]=w.useState(null),a=w.useMemo(()=>{const u={};t.forEach(f=>{e.forEach(m=>{u[m.key]||(u[m.key]=new Set);const y=m.selector?m.selector(f):f[m.key];y!=null&&y!==""&&u[m.key].add(String(y))})});const d={};return Object.keys(u).forEach(f=>{d[f]=Array.from(u[f]).sort()}),d},[t,e]),i=(u,d)=>{const f=n[u]||[],m=f.includes(d)?f.filter(y=>y!==d):[...f,d];r(u,m)},c=(u,d)=>{(n[u]||[]).length===d.length?r(u,[]):r(u,d)},l=()=>{e.forEach(u=>{r(u.key,[])})};return h.jsxs("div",{role:"dialog","aria-label":"Filter options",className:"absolute right-0 top-full mt-2 w-72 max-h-96 overflow-y-auto bg-(--atom-theme-surface-primary) rounded-md border shadow-lg z-50 border-(--atom-theme-border-primary)",children:[h.jsxs("div",{className:"p-3 border-b border-(--atom-theme-border-primary) flex items-center justify-between",children:[h.jsx("span",{className:"text-sm font-semibold",children:"Filter Columns"}),h.jsx("button",{onClick:l,className:`text-xs text-(--atom-theme-surface-secondary)\r
52
+ hover:text-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_85%,black)] font-medium cursor-pointer`,children:"Clear All"})]}),h.jsx("div",{className:"p-2",children:e.map(u=>{const d=a[u.key]||[],f=o===u.key,m=n[u.key]||[],y=m.length===d.length;return h.jsxs("div",{className:"mb-2",children:[h.jsxs("button",{onClick:()=>s(f?null:u.key),className:"w-full flex items-center justify-between text-(--atom-theme-text-primary) px-3 py-2 text-sm font-medium hover:text-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_85%,black)] rounded-md",children:[h.jsx("span",{children:u.name}),h.jsxs("div",{className:"flex items-center gap-2",children:[m.length>0&&h.jsx("span",{className:"bg-(--atom-theme-surface-secondary) text-white text-xs px-1.5 py-1 rounded-full min-w-4.5 text-center",children:m.length}),h.jsx(Vw,{})]})]}),f&&h.jsxs("div",{className:"ml-2 mt-1 border-l-2 border-(--atom-theme-border-primary) pl-2",children:[h.jsxs("label",{className:"flex items-center gap-2 px-3 py-1.5 text-sm rounded cursor-pointer",children:[h.jsx("input",{type:"checkbox",checked:y,onChange:()=>c(u.key,d),className:"rounded border-gray-300","aria-label":`Select all ${u.name}`}),h.jsx("span",{className:`text-xs text-(--atom-theme-surface-secondary)\r
53
+ hover:text-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_85%,black)] font-medium cursor-pointer`,children:"Select All"})]}),h.jsx("div",{className:"max-h-48 overflow-y-auto",children:d.map(p=>h.jsxs("label",{className:"flex items-center gap-2 px-3 py-1.5 text-sm rounded cursor-pointer hover:text-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_85%,black)] hover:text-md",children:[h.jsx("input",{type:"checkbox",checked:m.includes(p),onChange:()=>i(u.key,p),className:"rounded border-gray-300","aria-label":`Filter by ${p}`}),h.jsx("span",{className:"truncate",children:p})]},p))})]})]},u.key)})})]})}function Bw({filters:e,columns:t,onFilterChange:n,activeFilterCount:r}){const o=(s,a)=>{const c=(e[s]||[]).filter(l=>l!==a);n(s,c)};return r===0?null:h.jsx("div",{className:"px-4 py-2 border-b border-(--atom-theme-border-primary) bg-[color-mix(in_oklab,var(--atom-theme-surface-tertiary)_50%,transparent)] h-12 w-[65%] flex items-center justify-end",children:h.jsx("div",{className:`flex gap-2 items-center overflow-x-auto overflow-y-hidden max-w-xl scrollbar-thin [&::-webkit-scrollbar]:bg-transparent\r
54
+ [&::-webkit-scrollbar-track]:bg-transparent`,children:Object.entries(e).map(([s,a])=>{const c=t.find(l=>l.key===s)?.name||s;return a.map(l=>h.jsxs("div",{className:"inline-flex items-center gap-2 bg-(--atom-theme-surface-secondary) text-white text-xs rounded-full px-3 py-1 whitespace-nowrap shrink-0",children:[h.jsxs("span",{children:[h.jsxs("strong",{className:"font-semibold",children:[c,":"]})," ",l]}),h.jsx("button",{onClick:()=>o(s,l),className:" rounded-full w-4 h-4 flex items-center justify-center transition-colors cursor-pointer ml-1","aria-label":`Remove ${c} filter: ${l}`,children:h.jsx("svg",{viewBox:"0 0 24 24",className:"w-3 h-3","aria-hidden":"true",children:h.jsx("path",{d:"M18 6L6 18M6 6l12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]},`${s}-${l}`))})})})}function $w(e){const{search:t,download:n,viewColumns:r,filter:o,searchValue:s,onSearchChange:a,showFilterDropdown:i,onToggleFilter:c,showColumnsDropdown:l,onToggleColumnsDropdown:u,columns:d,data:f,filters:m,onFilterChange:y,columnVisibility:p,onColumnVisibilityChange:b,handleDownload:v}=e,C=w.useRef(null),x=w.useRef(null),k=t||n||r||o;if(w.useEffect(()=>{const T=E=>{i&&C.current&&!C.current.contains(E.target)&&c(!1),l&&x.current&&!x.current.contains(E.target)&&u(!1)};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[i,l,c,u]),!k)return null;const S=Object.values(m).reduce((T,E)=>T+E.length,0);return h.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-2 border-b border-(--atom-theme-border-primary) bg-(--atom-theme-surface-primary)",children:[h.jsx("div",{className:"flex items-center gap-2 w-[30%]",children:t&&h.jsxs("div",{className:"flex h-8 w-full items-center gap-2 rounded-md border border-(--atom-theme-border-primary) px-2",children:[h.jsx(jw,{}),h.jsx("input",{type:"text",placeholder:"Search...",value:s,onChange:T=>a(T.target.value),className:"h-full w-full bg-transparent text-sm outline-none","aria-label":"Search table"})]})}),h.jsxs("div",{className:"flex items-center gap-2 w-[60%] justify-end",children:[o&&h.jsxs(h.Fragment,{children:[h.jsx(Bw,{filters:m,columns:d,onFilterChange:y,activeFilterCount:S}),h.jsxs("div",{className:"relative",ref:C,children:[h.jsxs("button",{type:"button",onClick:()=>c(!i),className:R("flex h-8 items-center gap-2 rounded-md border px-3 text-xs font-medium transition-colors border-(--atom-theme-border-primary) hover:bg-[color-mix(in_oklab,var(--atom-theme-surface-primary)_97%,black)] dark:hover:bg-[color-mix(in_oklab,var(--atom-theme-surface-primary)_85%,black)] bg-(--atom-theme-surface-primary) cursor-pointer ",""),"aria-label":"Filter table data","aria-expanded":i,"aria-haspopup":"true",children:[h.jsx(Nw,{className:"h-4 w-4"}),S>0&&h.jsx("span",{className:`bg-(--atom-theme-surface-secondary) \r
55
55
  text-white text-xs \r
56
56
  px-1.5 py-1.5 \r
57
57
  rounded-full \r
58
58
  inline-flex items-center justify-center \r
59
- leading-none text-center`,children:k})]}),i&&p.jsx(Cw,{columns:d,data:f,filters:m,onFilterChange:b})]})]}),r&&p.jsxs("div",{className:"relative",ref:w,children:[p.jsx("button",{type:"button",onClick:()=>u(!l),className:O("flex h-8 items-center gap-2 rounded-md border px-3 text-xs font-medium transition-colors border-(--atom-theme-border-primary) hover:bg-[color-mix(in_oklab,var(--atom-theme-surface-primary)_97%,black)] dark:hover:bg-[color-mix(in_oklab,var(--atom-theme-surface-primary)_85%,black)] bg-(--atom-theme-surface-primary) cursor-pointer",""),"aria-label":"View columns","aria-expanded":l,"aria-haspopup":"true",children:p.jsx(yw,{})}),l&&p.jsx(ww,{columns:d,columnVisibility:h,onColumnVisibilityChange:g})]}),n&&p.jsxs("button",{type:"button",className:"flex h-8 items-center gap-2 rounded-md border px-3 text-xs font-medium transition-colors border-(--atom-theme-border-primary) hover:bg-[color-mix(in_oklab,var(--atom-theme-surface-primary)_97%,black)] dark:hover:bg-[color-mix(in_oklab,var(--atom-theme-surface-primary)_85%,black)] bg-(--atom-theme-surface-primary) cursor-pointer",onClick:v,"aria-label":"Download table data",children:[p.jsx(bw,{}),p.jsx("span",{children:"Export"})]})]})]})}function Dw(e){const{pagination:t,dataLength:n,rowsPerPage:r,currentPage:o,totalPages:s,onPageChange:a}=e;return!t||n<=r||s<=1?null:p.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-(--atom-theme-surface-primary) border-t border-(--atom-theme-border-primary) sm:px-6",children:[p.jsxs("div",{className:"text-sm text-(--atom-text-muted,#64748b)",role:"status","aria-live":"polite",children:["Showing ",(o-1)*r+1," to"," ",Math.min(o*r,n)," of ",n," ","entries"]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:()=>a(o-1),disabled:o===1,className:O("flex h-9 w-9 items-center justify-center rounded-full border transition-colors",o===1?"bg-gray-100 text-gray-400 cursor-not-allowed border-gray-200":"bg-white hover:bg-gray-50 text-(--atom-text-primary,#0f172a) border-(--atom-border-subtle,#e2e8f0) hover:border-gray-300 cursor-pointer"),"aria-label":"Previous page",children:p.jsx(hw,{})}),p.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:s},(i,c)=>c+1).map(i=>p.jsx("button",{onClick:()=>a(i),className:O("min-w-9 h-9 rounded-md text-sm font-medium flex items-center justify-center border transition-colors px-2 cursor-pointer",o===i?"bg-(--atom-primary,#3b82f6) text-white border-(--atom-primary,#3b82f6)":"bg-white hover:bg-gray-50 text-(--atom-text-primary,#0f172a) border-(--atom-border-subtle,#e2e8f0) hover:border-gray-300"),"aria-label":`Go to page ${i}`,"aria-current":o===i?"page":void 0,children:i},i))}),p.jsx("button",{onClick:()=>a(o+1),disabled:o===s,className:O("flex h-9 w-9 items-center justify-center rounded-full border transition-colors",o===s?"bg-gray-100 text-gray-400 cursor-not-allowed border-gray-200":"bg-white hover:bg-gray-50 text-(--atom-text-primary,#0f172a) border-(--atom-border-subtle,#e2e8f0) hover:border-gray-300 cursor-pointer"),"aria-label":"Next page",children:p.jsx(pw,{})})]})]})}function Tw({columns:e,data:t,pagination:n=!1,className:r,options:o}){const[s,a]=x.useState(1),[i,c]=x.useState(""),[l,u]=x.useState(!1),[d,f]=x.useState(!1),[m,b]=x.useState({}),[h,g]=x.useState({key:null,direction:"asc"}),[v,C]=x.useState(()=>e.reduce((R,U)=>({...R,[U.key]:!0}),{})),w=10,{search:S=!1,download:k=!1,viewColumns:T=!1,filter:E=!1,filterType:D="dropdown",tableBodyHeight:A,tableBodyMaxHeight:M}=o||{},j=x.useMemo(()=>e.filter(R=>v[R.key]),[e,v]),_=R=>R==null?"":String(R).toLowerCase().replace(/[^a-z0-9\s]/g,""),B=_(i.trim()),z=x.useMemo(()=>!S||!B?t:t.filter(R=>e.some(U=>{const ne=U.selector?U.selector(R):R[U.key];return _(ne).includes(B)})),[t,e,S,B]),K=x.useCallback(R=>h.key?[...R].sort((U,ne)=>{const Z=e.find(Gr=>Gr.key===h.key);if(!Z)return 0;const re=Z.selector?Z.selector(U):U[Z.key],ye=Z.selector?Z.selector(ne):ne[Z.key];if(re==null&&ye==null)return 0;if(re==null)return h.direction==="asc"?1:-1;if(ye==null)return h.direction==="asc"?-1:1;const we=parseFloat(String(re)),wt=parseFloat(String(ye));if(!isNaN(we)&&!isNaN(wt))return h.direction==="asc"?we-wt:wt-we;const fn=String(re).toLowerCase().trim(),qn=String(ye).toLowerCase().trim();return fn<qn?h.direction==="asc"?-1:1:fn>qn?h.direction==="asc"?1:-1:0}):R,[h.key,h.direction,e]),$=x.useMemo(()=>{let R=z;return Object.entries(m).forEach(([U,ne])=>{ne.length>0&&(R=R.filter(Z=>{const re=e.find(we=>we.key===U);if(!re)return!0;const ye=re.selector?re.selector(Z):Z[U];return ne.includes(String(ye))}))}),K(R)},[z,m,e,K]),W=x.useCallback(R=>{if(R.length===0)return"";const U=j.map(Z=>`"${Z.name.replace(/"/g,'""')}"`).join(","),ne=R.map(Z=>j.map(re=>{const ye=re.selector?re.selector(Z):Z[re.key];return`"${String(ye||"").replace(/"/g,'""')}"`}).join(","));return[U,...ne].join(`
60
- `)},[j]),N=x.useCallback(()=>{if(!k)return;const R=W($),U=new Blob([`\uFEFF${R}`],{type:"text/csv;charset=utf-8"}),ne=window.URL.createObjectURL(U),Z=document.createElement("a");Z.href=ne,Z.download=`table-export-${new Date().toISOString().slice(0,10)}.csv`,document.body.appendChild(Z),Z.click(),document.body.removeChild(Z),window.URL.revokeObjectURL(ne)},[k,$,W]),H=Math.ceil($.length/w),ee=n?$.slice((s-1)*w,s*w):$,P=x.useCallback((R,U)=>{g({key:R,direction:U}),a(1)},[]),Y=x.useCallback((R,U)=>{b(ne=>({...ne,[R]:U})),a(1)},[]),G=x.useCallback((R,U)=>{C(ne=>({...ne,[R]:U}))},[]),X=x.useCallback(R=>{R<1||R>H||a(R)},[H]);x.useEffect(()=>{a(1)},[i,m,h]),x.useEffect(()=>{C(e.reduce((R,U)=>({...R,[U.key]:!0}),{}))},[e]);const xe=x.useCallback((R,U)=>R.id??`row-${U}`,[]),Pe=R=>R==null?"-":typeof R=="boolean"?R?"Yes":"No":typeof R=="number"?R.toString():x.isValidElement(R)?R:String(R);return p.jsxs("div",{className:O("w-full overflow-hidden min-h-[60vh] rounded-md border border-(--atom-theme-border-primary) bg-(--atom-theme-surface-primary) ",r),children:[p.jsx(Sw,{search:S,download:k,viewColumns:T,filter:E,filterType:D,searchValue:i,onSearchChange:c,showFilterDropdown:l,onToggleFilter:u,showColumnsDropdown:d,onToggleColumnsDropdown:f,columns:e,data:t,filters:m,onFilterChange:Y,columnVisibility:v,onColumnVisibilityChange:G,handleDownload:N}),p.jsx("div",{className:"overflow-x-auto",style:{height:A,maxHeight:M},children:p.jsxs("table",{className:"w-full border-collapse text-left text-sm rounded-md",role:"table","aria-label":"Data table","aria-rowcount":$.length,"aria-colcount":j.length,children:[p.jsx("thead",{className:"bg-[color-mix(in_oklab,var(--atom-theme-surface-tertiary)_50%,transparent)] border-b border-(--atom-theme-border-primary)",children:p.jsx("tr",{role:"row",children:j.map((R,U)=>{const ne=R.sortable!==!1,Z=h.key===R.key,re=Z?h.direction:void 0;return p.jsx("th",{scope:"col",role:"columnheader","aria-colindex":U+1,"aria-sort":Z?re==="asc"?"ascending":"descending":ne?"none":void 0,className:"px-4 py-3 font-(--atom-font-weight-medium) text-left relative text-[14px] text-(--atom-theme-text-primary) ",children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"truncate",children:R.name}),ne&&p.jsx(xw,{columnKey:R.key,sortConfig:h,onSortChange:P})]})},R.key)})})}),p.jsx("tbody",{className:"divide-y divide-(--atom-theme-border-primary) bg-(--atom-theme-surface-primary)",role:"rowgroup",children:ee.length===0?p.jsx("tr",{role:"row",children:p.jsx("td",{colSpan:j.length,role:"cell","aria-colspan":j.length,className:"h-24 text-center text-sm text-gray-500 py-8",children:"No results found"})}):ee.map((R,U)=>{const ne=(s-1)*w+U+1,Z=xe(R,U);return p.jsx("tr",{role:"row","aria-rowindex":ne,className:"hover:hover:bg-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_25%,transparent)] transition-colors",children:j.map((re,ye)=>{let we;if(re.cell)we=re.cell(R,U);else if(re.conditionalCell){const wt=re.selector?re.selector(R):R[re.key];we=re.conditionalCell(wt,R)}else re.selector?we=Pe(re.selector(R)):we=Pe(R[re.key]);return p.jsx("td",{role:"cell","aria-colindex":ye+1,className:"px-4 py-3 align-top",children:we},re.key)})},Z)})})]})}),p.jsx(Dw,{pagination:n,dataLength:$.length,rowsPerPage:w,currentPage:s,totalPages:H,onPageChange:X})]})}const id=x.createContext(void 0);function Ms(){const e=x.useContext(id);if(!e)throw new Error("Tabs compound components must be used within Tabs");return e}const Ew=te("flex gap-1 border-b border-[var(--atom-card-border)]",{variants:{variant:{default:"",pills:"border-0 bg-[var(--atom-card-bg)] rounded-lg p-1",underline:""},orientation:{horizontal:"flex-row",vertical:"flex-col border-b-0 border-r"}},defaultVariants:{variant:"default",orientation:"horizontal"}}),Pw=te(["inline-flex items-center justify-center whitespace-nowrap px-4 py-2","text-sm font-medium transition-all duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--atom-primary)] focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"].join(" "),{variants:{variant:{default:["border-b-2 border-transparent rounded-t-md","hover:bg-[var(--atom-card-bg)] hover:text-[var(--atom-text)]","data-[state=active]:border-b-[3px] data-[state=active]:border-[var(--atom-primary)] data-[state=active]:text-[var(--atom-primary)]"].join(" "),pills:["rounded-md","hover:bg-[var(--atom-card-bg)]","data-[state=active]:bg-[var(--atom-primary)] data-[state=active]:text-white data-[state=active]:shadow-sm"].join(" "),underline:["border-b-2 border-transparent","hover:border-[var(--atom-card-border)]","data-[state=active]:border-[var(--atom-primary)] data-[state=active]:text-[var(--atom-primary)]"].join(" ")}},defaultVariants:{variant:"default"}}),Mw=te("mt-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--atom-primary)] focus-visible:ring-offset-2",{variants:{orientation:{horizontal:"",vertical:"ml-4"}},defaultVariants:{orientation:"horizontal"}}),cd=x.forwardRef(({defaultValue:e,value:t,onValueChange:n,variant:r="default",orientation:o="horizontal",className:s,children:a,...i},c)=>{const[l,u]=x.useState(e),d=t!==void 0,f=d?t:l,m=x.useCallback(h=>{d||u(h),n?.(h)},[d,n]),b=x.useMemo(()=>({activeTab:f,setActiveTab:m,orientation:o,variant:r}),[f,m,o,r]);return p.jsx(id.Provider,{value:b,children:p.jsx("div",{ref:c,"data-orientation":o,className:O("w-full ",s),...i,children:a})})});cd.displayName="Tabs";const ld=x.forwardRef(({className:e,children:t,"aria-label":n,...r},o)=>{const{orientation:s,variant:a}=Ms();return p.jsx("div",{ref:o,role:"tablist","aria-label":n,"aria-orientation":s,className:O(Ew({variant:a,orientation:s}),e),...r,children:t})});ld.displayName="TabsList";const ud=x.forwardRef(({className:e,value:t,disabled:n,asChild:r=!1,children:o,...s},a)=>{const{activeTab:i,setActiveTab:c,variant:l,orientation:u}=Ms(),d=i===t,f=x.useRef(null),m=x.useRef(null);x.useImperativeHandle(a,()=>m.current,[]),x.useEffect(()=>{m.current&&(f.current=m.current.closest('[role="tablist"]'))},[]);const b=g=>{if(!f.current)return;const v=Array.from(f.current.querySelectorAll('[role="tab"]:not([disabled])')),C=v.indexOf(m.current);let w=-1;const S=u==="horizontal";switch(g.key){case"ArrowLeft":S&&(g.preventDefault(),w=C-1,w<0&&(w=v.length-1));break;case"ArrowRight":S&&(g.preventDefault(),w=(C+1)%v.length);break;case"ArrowUp":S||(g.preventDefault(),w=C-1,w<0&&(w=v.length-1));break;case"ArrowDown":S||(g.preventDefault(),w=(C+1)%v.length);break;case"Home":g.preventDefault(),w=0;break;case"End":g.preventDefault(),w=v.length-1;break}if(w!==-1&&v[w]){v[w].focus();const k=v[w].getAttribute("data-value");k&&c(k)}},h=r?je:"button";return p.jsx(h,{ref:m,role:"tab",type:r?void 0:"button",id:`tab-${t}`,"aria-selected":d,"aria-controls":`tabpanel-${t}`,"data-state":d?"active":"inactive","data-value":t,tabIndex:d?0:-1,disabled:n,className:O(Pw({variant:l}),e),onClick:()=>c(t),onKeyDown:b,...s,children:o})});ud.displayName="TabTrigger";const dd=x.forwardRef(({className:e,value:t,children:n,...r},o)=>{const{activeTab:s,orientation:a}=Ms();return s===t?p.jsx("div",{ref:o,role:"tabpanel",id:`tabpanel-${t}`,"aria-labelledby":`tab-${t}`,tabIndex:0,className:O(Mw({orientation:a}),e),...r,children:n}):null});dd.displayName="TabContent";const Aw=te("text-[var(--atom-text)] leading-tight tracking-tight",{variants:{variant:{primary:"text-[var(--atom-primary)]",secondary:"text-[var(--atom-theme-surface-secondary)]",tertiary:"text-[var(--atom-theme-surface-secondary)]",neutral:"text-[var(--atom-text)]",success:"text-[var(--atom-success)]",error:"text-[var(--atom-error)]",info:"text-[var(--atom-info)]",warning:"text-[var(--atom-warning)]",disabled:"text-[var(--atom-theme-text-secondary)]"},size:{none:"",xs:"text-[calc(var(--atom-text-xs))]",sm:"text-[calc(var(--atom-text-sm))]",md:"text-[calc(var(--atom-text-md))]",lg:"text-[calc(var(--atom-text-lg))]",xl:"text-[calc(var(--atom-text-xl))]"},weight:{none:"",normal:"font-[var(--atom-font-weight-normal)]",medium:"font-[var(--atom-font-weight-medium)]",bold:"font-[var(--atom-font-weight-bold)]"}},defaultVariants:{size:"md",variant:"primary"}}),fd=y.forwardRef(({className:e,asChild:t=!1,size:n,weight:r,variant:o,...s},a)=>{const i=t?je:"span";return p.jsx(i,{ref:a,"data-slot":"text",className:O(Aw({size:n,weight:r,variant:o}),e),...s})});fd.displayName="Text";const Rw=te(["resize","flex field-sizing-content w-full rounded-md border px-3 py-2","min-h-16 text-base md:text-sm","outline-none disabled:cursor-not-allowed disabled:opacity-50","border-[var(--atom-theme-border-primary)]","placeholder:text-muted-foreground","hover:bg-[color-mix(in_srgb,var(--atom-theme-border-primary)_6%,transparent)]","hover:border-[color-mix(in_srgb,var(--atom-theme-border-primary)_25%,transparent)] ","focus-visible:border-[var(--atom-theme-border-primary))]","focus-visible:ring-1 focus-visible:ring-[color-mix(in_srgb,var(--atom-theme-border-primary)_35%,transparent)]","focus-visible:ring-offset-0","aria-invalid:border-destructive","aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40","dark:bg-input/30","transition-[background-color,border-color,box-shadow,color]","placeholder:text-muted-foreground placeholder-shown:border-[var(--atom-theme-border-primary)] [&:not(:placeholder-shown)]:border-[color-mix(in_srgb,var(--atom-theme-border-primary)_70%,var(--atom-primary))] focus-visible:border-[var(--atom-primary)] "].join(" "),{variants:{variant:{default:"",outline:"bg-transparent",subtle:"bg-input-background/60"},size:{sm:"min-h-10 px-2 py-1 text-xs w-64",md:"min-h-16 px-3 py-2 text-sm w-80",lg:"min-h-24 px-4 py-3 text-base w-96"}},defaultVariants:{variant:"default",size:"md"}}),md=y.forwardRef(({className:e,variant:t,size:n,placeholder:r,...o},s)=>p.jsx("textarea",{ref:s,"data-slot":"textArea",placeholder:r??" ",className:O(Rw({variant:t,size:n}),e),...o}));md.displayName="TextArea";const Nw=["top","right","bottom","left"],gt=Math.min,Re=Math.max,br=Math.round,rr=Math.floor,Xe=e=>({x:e,y:e}),Ow={left:"right",right:"left",bottom:"top",top:"bottom"},jw={start:"end",end:"start"};function Vo(e,t,n){return Re(e,gt(t,n))}function at(e,t){return typeof e=="function"?e(t):e}function it(e){return e.split("-")[0]}function sn(e){return e.split("-")[1]}function As(e){return e==="x"?"y":"x"}function Rs(e){return e==="y"?"height":"width"}const _w=new Set(["top","bottom"]);function Ke(e){return _w.has(it(e))?"y":"x"}function Ns(e){return As(Ke(e))}function Iw(e,t,n){n===void 0&&(n=!1);const r=sn(e),o=Ns(e),s=Rs(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=vr(a)),[a,vr(a)]}function Vw(e){const t=vr(e);return[Fo(e),t,Fo(t)]}function Fo(e){return e.replace(/start|end/g,t=>jw[t])}const li=["left","right"],ui=["right","left"],Fw=["top","bottom"],Lw=["bottom","top"];function Ww(e,t,n){switch(e){case"top":case"bottom":return n?t?ui:li:t?li:ui;case"left":case"right":return t?Fw:Lw;default:return[]}}function Bw(e,t,n,r){const o=sn(e);let s=Ww(it(e),n==="start",r);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(Fo)))),s}function vr(e){return e.replace(/left|right|bottom|top/g,t=>Ow[t])}function $w(e){return{top:0,right:0,bottom:0,left:0,...e}}function hd(e){return typeof e!="number"?$w(e):{top:e,right:e,bottom:e,left:e}}function xr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function di(e,t,n){let{reference:r,floating:o}=e;const s=Ke(t),a=Ns(t),i=Rs(a),c=it(t),l=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[i]/2-o[i]/2;let m;switch(c){case"top":m={x:u,y:r.y-o.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(sn(t)){case"start":m[a]-=f*(n&&l?-1:1);break;case"end":m[a]+=f*(n&&l?-1:1);break}return m}const zw=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,i=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=di(l,r,c),f=r,m={},b=0;for(let h=0;h<i.length;h++){const{name:g,fn:v}=i[h],{x:C,y:w,data:S,reset:k}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:l,platform:a,elements:{reference:e,floating:t}});u=C??u,d=w??d,m={...m,[g]:{...m[g],...S}},k&&b<=50&&(b++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(l=k.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:u,y:d}=di(l,f,c)),h=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:m}};async function Mn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:a,elements:i,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=at(t,e),b=hd(m),g=i[f?d==="floating"?"reference":"floating":d],v=xr(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:l,rootBoundary:u,strategy:c})),C=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},k=xr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:C,offsetParent:w,strategy:c}):C);return{top:(v.top-k.top+b.top)/S.y,bottom:(k.bottom-v.bottom+b.bottom)/S.y,left:(v.left-k.left+b.left)/S.x,right:(k.right-v.right+b.right)/S.x}}const Yw=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:a,elements:i,middlewareData:c}=t,{element:l,padding:u=0}=at(e,t)||{};if(l==null)return{};const d=hd(u),f={x:n,y:r},m=Ns(o),b=Rs(m),h=await a.getDimensions(l),g=m==="y",v=g?"top":"left",C=g?"bottom":"right",w=g?"clientHeight":"clientWidth",S=s.reference[b]+s.reference[m]-f[m]-s.floating[b],k=f[m]-s.reference[m],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let E=T?T[w]:0;(!E||!await(a.isElement==null?void 0:a.isElement(T)))&&(E=i.floating[w]||s.floating[b]);const D=S/2-k/2,A=E/2-h[b]/2-1,M=gt(d[v],A),j=gt(d[C],A),_=M,B=E-h[b]-j,z=E/2-h[b]/2+D,K=Vo(_,z,B),$=!c.arrow&&sn(o)!=null&&z!==K&&s.reference[b]/2-(z<_?M:j)-h[b]/2<0,W=$?z<_?z-_:z-B:0;return{[m]:f[m]+W,data:{[m]:K,centerOffset:z-K-W,...$&&{alignmentOffset:W}},reset:$}}}),Hw=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:h=!0,...g}=at(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=it(o),C=Ke(i),w=it(i)===i,S=await(c.isRTL==null?void 0:c.isRTL(l.floating)),k=f||(w||!h?[vr(i)]:Vw(i)),T=b!=="none";!f&&T&&k.push(...Bw(i,h,b,S));const E=[i,...k],D=await Mn(t,g),A=[];let M=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&A.push(D[v]),d){const z=Iw(o,a,S);A.push(D[z[0]],D[z[1]])}if(M=[...M,{placement:o,overflows:A}],!A.every(z=>z<=0)){var j,_;const z=(((j=s.flip)==null?void 0:j.index)||0)+1,K=E[z];if(K&&(!(d==="alignment"?C!==Ke(K):!1)||M.every(N=>Ke(N.placement)===C?N.overflows[0]>0:!0)))return{data:{index:z,overflows:M},reset:{placement:K}};let $=(_=M.filter(W=>W.overflows[0]<=0).sort((W,N)=>W.overflows[1]-N.overflows[1])[0])==null?void 0:_.placement;if(!$)switch(m){case"bestFit":{var B;const W=(B=M.filter(N=>{if(T){const H=Ke(N.placement);return H===C||H==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(H=>H>0).reduce((H,ee)=>H+ee,0)]).sort((N,H)=>N[1]-H[1])[0])==null?void 0:B[0];W&&($=W);break}case"initialPlacement":$=i;break}if(o!==$)return{reset:{placement:$}}}return{}}}};function fi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function mi(e){return Nw.some(t=>e[t]>=0)}const Gw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=at(e,t);switch(r){case"referenceHidden":{const s=await Mn(t,{...o,elementContext:"reference"}),a=fi(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:mi(a)}}}case"escaped":{const s=await Mn(t,{...o,altBoundary:!0}),a=fi(s,n.floating);return{data:{escapedOffsets:a,escaped:mi(a)}}}default:return{}}}}},pd=new Set(["left","top"]);async function Uw(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=it(n),i=sn(n),c=Ke(n)==="y",l=pd.has(a)?-1:1,u=s&&c?-1:1,d=at(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof b=="number"&&(m=i==="end"?b*-1:b),c?{x:m*u,y:f*l}:{x:f*l,y:m*u}}const qw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:a,middlewareData:i}=t,c=await Uw(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},Kw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:g=>{let{x:v,y:C}=g;return{x:v,y:C}}},...c}=at(e,t),l={x:n,y:r},u=await Mn(t,c),d=Ke(it(o)),f=As(d);let m=l[f],b=l[d];if(s){const g=f==="y"?"top":"left",v=f==="y"?"bottom":"right",C=m+u[g],w=m-u[v];m=Vo(C,m,w)}if(a){const g=d==="y"?"top":"left",v=d==="y"?"bottom":"right",C=b+u[g],w=b-u[v];b=Vo(C,b,w)}const h=i.fn({...t,[f]:m,[d]:b});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:s,[d]:a}}}}}},Xw=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:l=!0}=at(e,t),u={x:n,y:r},d=Ke(o),f=As(d);let m=u[f],b=u[d];const h=at(i,t),g=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const w=f==="y"?"height":"width",S=s.reference[f]-s.floating[w]+g.mainAxis,k=s.reference[f]+s.reference[w]-g.mainAxis;m<S?m=S:m>k&&(m=k)}if(l){var v,C;const w=f==="y"?"width":"height",S=pd.has(it(o)),k=s.reference[d]-s.floating[w]+(S&&((v=a.offset)==null?void 0:v[d])||0)+(S?0:g.crossAxis),T=s.reference[d]+s.reference[w]+(S?0:((C=a.offset)==null?void 0:C[d])||0)-(S?g.crossAxis:0);b<k?b=k:b>T&&(b=T)}return{[f]:m,[d]:b}}}},Zw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:c=()=>{},...l}=at(e,t),u=await Mn(t,l),d=it(o),f=sn(o),m=Ke(o)==="y",{width:b,height:h}=s.floating;let g,v;d==="top"||d==="bottom"?(g=d,v=f===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(v=d,g=f==="end"?"top":"bottom");const C=h-u.top-u.bottom,w=b-u.left-u.right,S=gt(h-u[g],C),k=gt(b-u[v],w),T=!t.middlewareData.shift;let E=S,D=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=C),T&&!f){const M=Re(u.left,0),j=Re(u.right,0),_=Re(u.top,0),B=Re(u.bottom,0);m?D=b-2*(M!==0||j!==0?M+j:Re(u.left,u.right)):E=h-2*(_!==0||B!==0?_+B:Re(u.top,u.bottom))}await c({...t,availableWidth:D,availableHeight:E});const A=await a.getDimensions(i.floating);return b!==A.width||h!==A.height?{reset:{rects:!0}}:{}}}};function Ir(){return typeof window<"u"}function an(e){return gd(e)?(e.nodeName||"").toLowerCase():"#document"}function Ne(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function nt(e){var t;return(t=(gd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gd(e){return Ir()?e instanceof Node||e instanceof Ne(e).Node:!1}function ze(e){return Ir()?e instanceof Element||e instanceof Ne(e).Element:!1}function Je(e){return Ir()?e instanceof HTMLElement||e instanceof Ne(e).HTMLElement:!1}function hi(e){return!Ir()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ne(e).ShadowRoot}const Qw=new Set(["inline","contents"]);function $n(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ye(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Qw.has(o)}const Jw=new Set(["table","td","th"]);function e0(e){return Jw.has(an(e))}const t0=[":popover-open",":modal"];function Vr(e){return t0.some(t=>{try{return e.matches(t)}catch{return!1}})}const n0=["transform","translate","scale","rotate","perspective"],r0=["transform","translate","scale","rotate","perspective","filter"],o0=["paint","layout","strict","content"];function Os(e){const t=js(),n=ze(e)?Ye(e):e;return n0.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||r0.some(r=>(n.willChange||"").includes(r))||o0.some(r=>(n.contain||"").includes(r))}function s0(e){let t=yt(e);for(;Je(t)&&!Zt(t);){if(Os(t))return t;if(Vr(t))return null;t=yt(t)}return null}function js(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const a0=new Set(["html","body","#document"]);function Zt(e){return a0.has(an(e))}function Ye(e){return Ne(e).getComputedStyle(e)}function Fr(e){return ze(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yt(e){if(an(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hi(e)&&e.host||nt(e);return hi(t)?t.host:t}function yd(e){const t=yt(e);return Zt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Je(t)&&$n(t)?t:yd(t)}function An(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=yd(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ne(o);if(s){const i=Lo(a);return t.concat(a,a.visualViewport||[],$n(o)?o:[],i&&n?An(i):[])}return t.concat(o,An(o,[],n))}function Lo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bd(e){const t=Ye(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Je(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=br(n)!==s||br(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function _s(e){return ze(e)?e:e.contextElement}function qt(e){const t=_s(e);if(!Je(t))return Xe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=bd(t);let a=(s?br(n.width):n.width)/r,i=(s?br(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const i0=Xe(0);function vd(e){const t=Ne(e);return!js()||!t.visualViewport?i0:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function c0(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ne(e)?!1:t}function Nt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=_s(e);let a=Xe(1);t&&(r?ze(r)&&(a=qt(r)):a=qt(e));const i=c0(s,n,r)?vd(s):Xe(0);let c=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(s){const f=Ne(s),m=r&&ze(r)?Ne(r):r;let b=f,h=Lo(b);for(;h&&r&&m!==b;){const g=qt(h),v=h.getBoundingClientRect(),C=Ye(h),w=v.left+(h.clientLeft+parseFloat(C.paddingLeft))*g.x,S=v.top+(h.clientTop+parseFloat(C.paddingTop))*g.y;c*=g.x,l*=g.y,u*=g.x,d*=g.y,c+=w,l+=S,b=Ne(h),h=Lo(b)}}return xr({width:u,height:d,x:c,y:l})}function Lr(e,t){const n=Fr(e).scrollLeft;return t?t.left+n:Nt(nt(e)).left+n}function xd(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Lr(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function l0(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=nt(r),i=t?Vr(t.floating):!1;if(r===a||i&&s)return n;let c={scrollLeft:0,scrollTop:0},l=Xe(1);const u=Xe(0),d=Je(r);if((d||!d&&!s)&&((an(r)!=="body"||$n(a))&&(c=Fr(r)),Je(r))){const m=Nt(r);l=qt(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}const f=a&&!d&&!s?xd(a,c):Xe(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function u0(e){return Array.from(e.getClientRects())}function d0(e){const t=nt(e),n=Fr(e),r=e.ownerDocument.body,o=Re(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Re(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Lr(e);const i=-n.scrollTop;return Ye(r).direction==="rtl"&&(a+=Re(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:i}}const pi=25;function f0(e,t){const n=Ne(e),r=nt(e),o=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,i=0,c=0;if(o){s=o.width,a=o.height;const u=js();(!u||u&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}const l=Lr(r);if(l<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),m=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,b=Math.abs(r.clientWidth-d.clientWidth-m);b<=pi&&(s-=b)}else l<=pi&&(s+=l);return{width:s,height:a,x:i,y:c}}const m0=new Set(["absolute","fixed"]);function h0(e,t){const n=Nt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Je(e)?qt(e):Xe(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,c=o*s.x,l=r*s.y;return{width:a,height:i,x:c,y:l}}function gi(e,t,n){let r;if(t==="viewport")r=f0(e,n);else if(t==="document")r=d0(nt(e));else if(ze(t))r=h0(t,n);else{const o=vd(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return xr(r)}function wd(e,t){const n=yt(e);return n===t||!ze(n)||Zt(n)?!1:Ye(n).position==="fixed"||wd(n,t)}function p0(e,t){const n=t.get(e);if(n)return n;let r=An(e,[],!1).filter(i=>ze(i)&&an(i)!=="body"),o=null;const s=Ye(e).position==="fixed";let a=s?yt(e):e;for(;ze(a)&&!Zt(a);){const i=Ye(a),c=Os(a);!c&&i.position==="fixed"&&(o=null),(s?!c&&!o:!c&&i.position==="static"&&!!o&&m0.has(o.position)||$n(a)&&!c&&wd(e,a))?r=r.filter(u=>u!==a):o=i,a=yt(a)}return t.set(e,r),r}function g0(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Vr(t)?[]:p0(t,this._c):[].concat(n),r],i=a[0],c=a.reduce((l,u)=>{const d=gi(t,u,o);return l.top=Re(d.top,l.top),l.right=gt(d.right,l.right),l.bottom=gt(d.bottom,l.bottom),l.left=Re(d.left,l.left),l},gi(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function y0(e){const{width:t,height:n}=bd(e);return{width:t,height:n}}function b0(e,t,n){const r=Je(t),o=nt(t),s=n==="fixed",a=Nt(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const c=Xe(0);function l(){c.x=Lr(o)}if(r||!r&&!s)if((an(t)!=="body"||$n(o))&&(i=Fr(t)),r){const m=Nt(t,!0,s,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else o&&l();s&&!r&&o&&l();const u=o&&!r&&!s?xd(o,i):Xe(0),d=a.left+i.scrollLeft-c.x-u.x,f=a.top+i.scrollTop-c.y-u.y;return{x:d,y:f,width:a.width,height:a.height}}function mo(e){return Ye(e).position==="static"}function yi(e,t){if(!Je(e)||Ye(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return nt(e)===n&&(n=n.ownerDocument.body),n}function Cd(e,t){const n=Ne(e);if(Vr(e))return n;if(!Je(e)){let o=yt(e);for(;o&&!Zt(o);){if(ze(o)&&!mo(o))return o;o=yt(o)}return n}let r=yi(e,t);for(;r&&e0(r)&&mo(r);)r=yi(r,t);return r&&Zt(r)&&mo(r)&&!Os(r)?n:r||s0(e)||n}const v0=async function(e){const t=this.getOffsetParent||Cd,n=this.getDimensions,r=await n(e.floating);return{reference:b0(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function x0(e){return Ye(e).direction==="rtl"}const w0={convertOffsetParentRelativeRectToViewportRelativeRect:l0,getDocumentElement:nt,getClippingRect:g0,getOffsetParent:Cd,getElementRects:v0,getClientRects:u0,getDimensions:y0,getScale:qt,isElement:ze,isRTL:x0};function kd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function C0(e,t){let n=null,r;const o=nt(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:m}=l;if(i||t(),!f||!m)return;const b=rr(d),h=rr(o.clientWidth-(u+f)),g=rr(o.clientHeight-(d+m)),v=rr(u),w={rootMargin:-b+"px "+-h+"px "+-g+"px "+-v+"px",threshold:Re(0,gt(1,c))||1};let S=!0;function k(T){const E=T[0].intersectionRatio;if(E!==c){if(!S)return a();E?a(!1,E):r=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!kd(l,e.getBoundingClientRect())&&a(),S=!1}try{n=new IntersectionObserver(k,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,w)}n.observe(e)}return a(!0),s}function k0(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=_s(e),u=o||s?[...l?An(l):[],...An(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=l&&i?C0(l,n):null;let f=-1,m=null;a&&(m=new ResizeObserver(v=>{let[C]=v;C&&C.target===l&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(t)})),n()}),l&&!c&&m.observe(l),m.observe(t));let b,h=c?Nt(e):null;c&&g();function g(){const v=Nt(e);h&&!kd(h,v)&&n(),h=v,b=requestAnimationFrame(g)}return n(),()=>{var v;u.forEach(C=>{o&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),d?.(),(v=m)==null||v.disconnect(),m=null,c&&cancelAnimationFrame(b)}}const S0=qw,D0=Kw,T0=Hw,E0=Zw,P0=Gw,bi=Yw,M0=Xw,A0=(e,t,n)=>{const r=new Map,o={platform:w0,...n},s={...o.platform,_c:r};return zw(e,t,{...o,platform:s})};var R0=typeof document<"u",N0=function(){},ur=R0?x.useLayoutEffect:N0;function wr(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,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!wr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!wr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Sd(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vi(e,t){const n=Sd(e);return Math.round(t*n)/n}function ho(e){const t=y.useRef(e);return ur(()=>{t.current=e}),t}function O0(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:c,open:l}=e,[u,d]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=y.useState(r);wr(f,r)||m(r);const[b,h]=y.useState(null),[g,v]=y.useState(null),C=y.useCallback(N=>{N!==T.current&&(T.current=N,h(N))},[]),w=y.useCallback(N=>{N!==E.current&&(E.current=N,v(N))},[]),S=s||b,k=a||g,T=y.useRef(null),E=y.useRef(null),D=y.useRef(u),A=c!=null,M=ho(c),j=ho(o),_=ho(l),B=y.useCallback(()=>{if(!T.current||!E.current)return;const N={placement:t,strategy:n,middleware:f};j.current&&(N.platform=j.current),A0(T.current,E.current,N).then(H=>{const ee={...H,isPositioned:_.current!==!1};z.current&&!wr(D.current,ee)&&(D.current=ee,Fc.flushSync(()=>{d(ee)}))})},[f,t,n,j,_]);ur(()=>{l===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,d(N=>({...N,isPositioned:!1})))},[l]);const z=y.useRef(!1);ur(()=>(z.current=!0,()=>{z.current=!1}),[]),ur(()=>{if(S&&(T.current=S),k&&(E.current=k),S&&k){if(M.current)return M.current(S,k,B);B()}},[S,k,B,M,A]);const K=y.useMemo(()=>({reference:T,floating:E,setReference:C,setFloating:w}),[C,w]),$=y.useMemo(()=>({reference:S,floating:k}),[S,k]),W=y.useMemo(()=>{const N={position:n,left:0,top:0};if(!$.floating)return N;const H=vi($.floating,u.x),ee=vi($.floating,u.y);return i?{...N,transform:"translate("+H+"px, "+ee+"px)",...Sd($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:ee}},[n,i,$.floating,u.x,u.y]);return y.useMemo(()=>({...u,update:B,refs:K,elements:$,floatingStyles:W}),[u,B,K,$,W])}const j0=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?bi({element:r.current,padding:o}).fn(n):{}:r?bi({element:r,padding:o}).fn(n):{}}}},_0=(e,t)=>({...S0(e),options:[e,t]}),I0=(e,t)=>({...D0(e),options:[e,t]}),V0=(e,t)=>({...M0(e),options:[e,t]}),F0=(e,t)=>({...T0(e),options:[e,t]}),L0=(e,t)=>({...E0(e),options:[e,t]}),W0=(e,t)=>({...P0(e),options:[e,t]}),B0=(e,t)=>({...j0(e),options:[e,t]});var $0="Arrow",Dd=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return p.jsx(ge.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Dd.displayName=$0;var z0=Dd,Is="Popper",[Td,Ed]=Ot(Is),[Y0,Pd]=Td(Is),Md=e=>{const{__scopePopper:t,children:n}=e,[r,o]=y.useState(null);return p.jsx(Y0,{scope:t,anchor:r,onAnchorChange:o,children:n})};Md.displayName=Is;var Ad="PopperAnchor",Rd=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Pd(Ad,n),a=y.useRef(null),i=ke(t,a),c=y.useRef(null);return y.useEffect(()=>{const l=c.current;c.current=r?.current||a.current,l!==c.current&&s.onAnchorChange(c.current)}),r?null:p.jsx(ge.div,{...o,ref:i})});Rd.displayName=Ad;var Vs="PopperContent",[H0,G0]=Td(Vs),Nd=y.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:m="optimized",onPlaced:b,...h}=e,g=Pd(Vs,n),[v,C]=y.useState(null),w=ke(t,R=>C(R)),[S,k]=y.useState(null),T=Wu(S),E=T?.width??0,D=T?.height??0,A=r+(s!=="center"?"-"+s:""),M=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},j=Array.isArray(l)?l:[l],_=j.length>0,B={padding:M,boundary:j.filter(q0),altBoundary:_},{refs:z,floatingStyles:K,placement:$,isPositioned:W,middlewareData:N}=O0({strategy:"fixed",placement:A,whileElementsMounted:(...R)=>k0(...R,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[_0({mainAxis:o+D,alignmentAxis:a}),c&&I0({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?V0():void 0,...B}),c&&F0({...B}),L0({...B,apply:({elements:R,rects:U,availableWidth:ne,availableHeight:Z})=>{const{width:re,height:ye}=U.reference,we=R.floating.style;we.setProperty("--radix-popper-available-width",`${ne}px`),we.setProperty("--radix-popper-available-height",`${Z}px`),we.setProperty("--radix-popper-anchor-width",`${re}px`),we.setProperty("--radix-popper-anchor-height",`${ye}px`)}}),S&&B0({element:S,padding:i}),K0({arrowWidth:E,arrowHeight:D}),f&&W0({strategy:"referenceHidden",...B})]}),[H,ee]=_d($),P=At(b);pt(()=>{W&&P?.()},[W,P]);const Y=N.arrow?.x,G=N.arrow?.y,X=N.arrow?.centerOffset!==0,[xe,Pe]=y.useState();return pt(()=>{v&&Pe(window.getComputedStyle(v).zIndex)},[v]),p.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:W?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:xe,"--radix-popper-transform-origin":[N.transformOrigin?.x,N.transformOrigin?.y].join(" "),...N.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(H0,{scope:n,placedSide:H,onArrowChange:k,arrowX:Y,arrowY:G,shouldHideArrow:X,children:p.jsx(ge.div,{"data-side":H,"data-align":ee,...h,ref:w,style:{...h.style,animation:W?void 0:"none"}})})})});Nd.displayName=Vs;var Od="PopperArrow",U0={top:"bottom",right:"left",bottom:"top",left:"right"},jd=y.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=G0(Od,r),a=U0[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(z0,{...o,ref:n,style:{...o.style,display:"block"}})})});jd.displayName=Od;function q0(e){return e!==null}var K0=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[l,u]=_d(n),d={start:"0%",center:"50%",end:"100%"}[u],f=(o.arrow?.x??0)+i/2,m=(o.arrow?.y??0)+c/2;let b="",h="";return l==="bottom"?(b=a?d:`${f}px`,h=`${-c}px`):l==="top"?(b=a?d:`${f}px`,h=`${r.floating.height+c}px`):l==="right"?(b=`${-c}px`,h=a?d:`${m}px`):l==="left"&&(b=`${r.floating.width+c}px`,h=a?d:`${m}px`),{data:{x:b,y:h}}}});function _d(e){const[t,n="center"]=e.split("-");return[t,n]}var X0=Md,Z0=Rd,Q0=Nd,J0=jd,eC=Symbol("radix.slottable");function tC(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=eC,t}var nC=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),rC="VisuallyHidden",Id=y.forwardRef((e,t)=>p.jsx(ge.span,{...e,ref:t,style:{...nC,...e.style}}));Id.displayName=rC;var oC=Id,[Wr]=Ot("Tooltip",[Ed]),Br=Ed(),Vd="TooltipProvider",sC=700,Wo="tooltip.open",[aC,Fs]=Wr(Vd),Fd=e=>{const{__scopeTooltip:t,delayDuration:n=sC,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,a=y.useRef(!0),i=y.useRef(!1),c=y.useRef(0);return y.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),p.jsx(aC,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:y.useCallback(l=>{i.current=l},[]),disableHoverableContent:o,children:s})};Fd.displayName=Vd;var Rn="Tooltip",[iC,zn]=Wr(Rn),Ld=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:i}=e,c=Fs(Rn,e.__scopeTooltip),l=Br(t),[u,d]=y.useState(null),f=kn(),m=y.useRef(0),b=a??c.disableHoverableContent,h=i??c.delayDuration,g=y.useRef(!1),[v,C]=Nr({prop:r,defaultProp:o??!1,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(Wo))):c.onClose(),s?.(E)},caller:Rn}),w=y.useMemo(()=>v?g.current?"delayed-open":"instant-open":"closed",[v]),S=y.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g.current=!1,C(!0)},[C]),k=y.useCallback(()=>{window.clearTimeout(m.current),m.current=0,C(!1)},[C]),T=y.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g.current=!0,C(!0),m.current=0},h)},[h,C]);return y.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),p.jsx(X0,{...l,children:p.jsx(iC,{scope:t,contentId:f,open:v,stateAttribute:w,trigger:u,onTriggerChange:d,onTriggerEnter:y.useCallback(()=>{c.isOpenDelayedRef.current?T():S()},[c.isOpenDelayedRef,T,S]),onTriggerLeave:y.useCallback(()=>{b?k():(window.clearTimeout(m.current),m.current=0)},[k,b]),onOpen:S,onClose:k,disableHoverableContent:b,children:n})})};Ld.displayName=Rn;var Bo="TooltipTrigger",Wd=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=zn(Bo,n),s=Fs(Bo,n),a=Br(n),i=y.useRef(null),c=ke(t,i,o.onTriggerChange),l=y.useRef(!1),u=y.useRef(!1),d=y.useCallback(()=>l.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),p.jsx(Z0,{asChild:!0,...a,children:p.jsx(ge.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:fe(e.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:fe(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:fe(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:fe(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:fe(e.onBlur,o.onClose),onClick:fe(e.onClick,o.onClose)})})});Wd.displayName=Bo;var Ls="TooltipPortal",[cC,lC]=Wr(Ls,{forceMount:void 0}),Bd=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=zn(Ls,t);return p.jsx(cC,{scope:t,forceMount:n,children:p.jsx(jt,{present:n||s.open,children:p.jsx(Cs,{asChild:!0,container:o,children:r})})})};Bd.displayName=Ls;var Qt="TooltipContent",$d=y.forwardRef((e,t)=>{const n=lC(Qt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,a=zn(Qt,e.__scopeTooltip);return p.jsx(jt,{present:r||a.open,children:a.disableHoverableContent?p.jsx(zd,{side:o,...s,ref:t}):p.jsx(uC,{side:o,...s,ref:t})})}),uC=y.forwardRef((e,t)=>{const n=zn(Qt,e.__scopeTooltip),r=Fs(Qt,e.__scopeTooltip),o=y.useRef(null),s=ke(t,o),[a,i]=y.useState(null),{trigger:c,onClose:l}=n,u=o.current,{onPointerInTransitChange:d}=r,f=y.useCallback(()=>{i(null),d(!1)},[d]),m=y.useCallback((b,h)=>{const g=b.currentTarget,v={x:b.clientX,y:b.clientY},C=hC(v,g.getBoundingClientRect()),w=pC(v,C),S=gC(h.getBoundingClientRect()),k=bC([...w,...S]);i(k),d(!0)},[d]);return y.useEffect(()=>()=>f(),[f]),y.useEffect(()=>{if(c&&u){const b=g=>m(g,u),h=g=>m(g,c);return c.addEventListener("pointerleave",b),u.addEventListener("pointerleave",h),()=>{c.removeEventListener("pointerleave",b),u.removeEventListener("pointerleave",h)}}},[c,u,m,f]),y.useEffect(()=>{if(a){const b=h=>{const g=h.target,v={x:h.clientX,y:h.clientY},C=c?.contains(g)||u?.contains(g),w=!yC(v,a);C?f():w&&(f(),l())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,u,a,l,f]),p.jsx(zd,{...e,ref:s})}),[dC,fC]=Wr(Rn,{isInside:!1}),mC=tC("TooltipContent"),zd=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=e,c=zn(Qt,n),l=Br(n),{onClose:u}=c;return y.useEffect(()=>(document.addEventListener(Wo,u),()=>document.removeEventListener(Wo,u)),[u]),y.useEffect(()=>{if(c.trigger){const d=f=>{f.target?.contains(c.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,u]),p.jsx(ws,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:p.jsxs(Q0,{"data-state":c.stateAttribute,...l,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(mC,{children:r}),p.jsx(dC,{scope:n,isInside:!0,children:p.jsx(oC,{id:c.contentId,role:"tooltip",children:o||r})})]})})});$d.displayName=Qt;var Yd="TooltipArrow",Hd=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Br(n);return fC(Yd,n).isInside?null:p.jsx(J0,{...o,...r,ref:t})});Hd.displayName=Yd;function hC(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function pC(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function gC(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function yC(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],c=t[a],l=i.x,u=i.y,d=c.x,f=c.y;u>r!=f>r&&n<(d-l)*(r-u)/(f-u)+l&&(o=!o)}return o}function bC(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),vC(t)}function vC(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var xC=Fd,wC=Ld,CC=Wd,kC=Bd,SC=$d,DC=Hd;function Ws(){const[e,t]=x.useState(null);return x.useEffect(()=>{document.getElementById("app-root")&&t(document.getElementById("app-root"))},[]),e}const TC=te("z-50 rounded-lg border bg-[var(--atom-card-bg)] px-3 py-1.5 text-xs text-[var(--atom-text)] shadow-md data-[state=delayed-open]:animate-in data-[state=closed]:animate-out data-[state=delayed-open]:fade-in data-[state=closed]:fade-out data-[side=top]:slide-in-from-bottom-1 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1",{variants:{variant:{soft:"bg-[color-mix(in_srgb,var(--atom-muted)_40%,var(--atom-card-bg))] text-[var(--atom-text)] border-[var(--atom-border)]",solid:"bg-[var(--atom-primary)] text-[var(--atom-primary-contrast)] border-transparent",outline:"bg-transparent text-[var(--atom-text)] border-[var(--atom-border)]",default:"bg-[var(--atom-theme-surface-secondary)] text-white border-none"},size:{sm:"px-2 py-1 text-[11px]",md:"px-3 py-1.5 text-xs",lg:"px-4 py-2 text-sm"},showArrow:{true:"",false:""}},defaultVariants:{variant:"default",size:"md",showArrow:!1}});function Gd({children:e,content:t,variant:n,size:r,showArrow:o,className:s,side:a="right",align:i="center",sideOffset:c=6,...l}){const u=Ws();return p.jsx(xC,{delayDuration:200,children:p.jsxs(wC,{children:[p.jsx(CC,{asChild:!0,children:e}),p.jsx(kC,{container:u||void 0,children:p.jsxs(SC,{side:a,align:i,sideOffset:c,className:O(TC({variant:n,size:r,showArrow:o}),s),...l,children:[t,o&&p.jsx(DC,{className:"fill-(--atom-primary) stroke-(--atom-primary)",width:12,height:6})]})})]})})}Gd.displayName="Tooltip";const xi=te(["flex w-full rounded-md border px-3 py-2","text-base md:text-sm","outline-none disabled:cursor-not-allowed disabled:opacity-50","border-[var(--atom-theme-border-primary)]","placeholder:text-muted-foreground","hover:bg-[color-mix(in_srgb,var(--atom-theme-border-primary)_6%,transparent)]","hover:border-[color-mix(in_srgb,var(--atom-theme-border-primary)_25%,transparent)]","focus-visible:border-[var(--atom-theme-border-primary)]","focus-visible:ring-1 focus-visible:ring-[color-mix(in_srgb,var(--atom-theme-border-primary)_35%,transparent)]","focus-visible:ring-offset-0","aria-[invalid=true]:border-destructive","aria-[invalid=true]:ring-2 aria-[invalid=true]:ring-destructive/20","dark:aria-[invalid=true]:ring-destructive/40","dark:bg-input/30","transition-[background-color,border-color,box-shadow,color]","placeholder:text-muted-foreground","placeholder-shown:border-[var(--atom-theme-border-primary)]","[&:not(:placeholder-shown)]:border-[color-mix(in_srgb,var(--atom-theme-border-primary)_70%,var(--atom-primary))]","focus-visible:border-[var(--atom-primary)]","[&::-webkit-inner-spin-button]:appearance-none","[&::-webkit-outer-spin-button]:appearance-none","[&::-webkit-inner-spin-button]:m-0","[&::-webkit-outer-spin-button]:m-0"].join(" "),{variants:{variant:{numeric:"",alphanumeric:"",alpha:""},size:{sm:"h-9 px-2 py-1 text-xs w-38",md:"h-10 px-3 py-2 text-sm w-40",lg:"h-12 px-4 py-3 text-base w-48"}},defaultVariants:{variant:"numeric",size:"md"}}),po=(e,t=3)=>{if(!e||e===""||e==="-")return e;const n=e.split(".");if(n.length===1)return e;const r=n[0],s=n[1].slice(0,t);return`${r}.${s}`},EC=e=>{if(!e)return"A";const t=e.match(/^([A-Za-z]+)$/);if(!t)return e;const r=t[1].toUpperCase().split("");let o=!0;for(let s=r.length-1;s>=0&&o;s--){const a=r[s].charCodeAt(0);a===90?r[s]="A":(r[s]=String.fromCharCode(a+1),o=!1)}return o&&r.unshift("A"),r.join("")},PC=e=>{if(!e)return"A";const t=e.match(/^([A-Za-z]+)$/);if(!t)return e;const r=t[1].toUpperCase().split("");let o=!0;for(let s=r.length-1;s>=0&&o;s--){const a=r[s].charCodeAt(0);a===65?r[s]="Z":(r[s]=String.fromCharCode(a-1),o=!1)}return o&&r.length>1&&r.shift(),r.join("")},MC=e=>{if(!e)return"A";const t=e.match(/^([A-Za-z]+)(\d*)$/);if(!t)return e;const n=t[1].toUpperCase(),r=t[2],o=n.split("");let s=!0;for(let a=o.length-1;a>=0&&s;a--){const i=o[a].charCodeAt(0);i===90?o[a]="A":(o[a]=String.fromCharCode(i+1),s=!1)}return s&&o.unshift("A"),o.join("")+r},AC=e=>{if(!e)return"A";const t=e.match(/^([A-Za-z]+)(\d*)$/);if(!t)return e;const n=t[1].toUpperCase(),r=t[2],o=n.split("");let s=!0;for(let a=o.length-1;a>=0&&s;a--){const i=o[a].charCodeAt(0);i===65?o[a]="Z":(o[a]=String.fromCharCode(i-1),s=!1)}return s&&o.length>1&&o.shift(),o.join("")+r},Ud=y.forwardRef(({className:e,variant:t="numeric",size:n="md",value:r,onChange:o,min:s,max:a,step:i=1,placeholder:c,disabled:l=!1,showSpinners:u=!1,decimalPlaces:d=3,...f},m)=>{const b=y.useCallback(()=>{if(l)return;const S=String(r??"");if(t==="numeric"){const T=(parseFloat(S)||0)+i,E=a!==void 0?Math.min(T,a):T,D=po(String(E),d);o?.(D)}else if(t==="alphanumeric"){const k=MC(S);o?.(k)}else if(t==="alpha"){const k=EC(S);o?.(k)}},[l,r,t,i,a,d,o]),h=y.useCallback(()=>{if(l)return;const S=String(r??"");if(t==="numeric"){const T=(parseFloat(S)||0)-i,E=s!==void 0?Math.max(T,s):T,D=po(String(E),d);o?.(D)}else if(t==="alphanumeric"){const k=AC(S);o?.(k)}else if(t==="alpha"){const k=PC(S);o?.(k)}},[l,r,t,i,s,d,o]),g=y.useCallback(S=>{l||(S.key==="ArrowUp"?(S.preventDefault(),b()):S.key==="ArrowDown"&&(S.preventDefault(),h()),f.onKeyDown?.(S))},[l,b,h,f]),v=y.useCallback(S=>{const k=S.target.value;if(t==="numeric"){if(k===""||/^-?\d*\.?\d*$/.test(k)){const T=po(k,d);o?.(T)}}else t==="alphanumeric"?(k===""||/^[A-Za-z0-9]*$/.test(k))&&o?.(k.toUpperCase()):t==="alpha"&&(k===""||/^[A-Za-z]*$/.test(k))&&o?.(k.toUpperCase())},[t,d,o]),C=y.useMemo(()=>{switch(n){case"sm":return{iconSize:14,spinnerWidth:"w-[20px]",inputPadding:"pr-[22px]"};case"lg":return{iconSize:18,spinnerWidth:"w-[28px]",inputPadding:"pr-[30px]"};default:return{iconSize:16,spinnerWidth:"w-[24px]",inputPadding:"pr-[26px]"}}},[n]),w=y.useMemo(()=>t==="numeric"?"numeric":"text",[t]);return u?p.jsxs("div",{className:"relative w-full",children:[p.jsx("input",{ref:m,type:"text",inputMode:w,"data-slot":"number-input","data-variant":t,value:r??"",onChange:v,onKeyDown:g,placeholder:c??" ",disabled:l,"aria-valuemin":s,"aria-valuemax":a,role:"spinbutton",className:O(xi({variant:t,size:n}),C.inputPadding,e),...f}),p.jsxs("div",{className:O("absolute top-px right-px bottom-px flex flex-col","border-l border-(--atom-theme-border-primary)","rounded-r-[calc(0.375rem-1px)] overflow-hidden",C.spinnerWidth),role:"group","aria-label":"Increment and decrement controls",children:[p.jsx("button",{type:"button",onClick:b,disabled:l||a!==void 0&&Number(r)>=a,"aria-label":"Increment value",tabIndex:-1,className:O("flex items-center justify-center flex-1","hover:bg-[color-mix(in_srgb,var(--atom-theme-border-primary)_10%,transparent)]","active:bg-[color-mix(in_srgb,var(--atom-theme-border-primary)_20%,transparent)]","disabled:opacity-50 disabled:cursor-not-allowed","transition-colors border-b border-(--atom-theme-border-primary)","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-(--atom-primary) focus-visible:ring-inset","cursor-pointer"),children:p.jsx(wb,{size:C.iconSize,className:"text-muted-foreground",strokeWidth:2,"aria-hidden":"true"})}),p.jsx("button",{type:"button",onClick:h,disabled:l||s!==void 0&&Number(r)<=s,"aria-label":"Decrement value",tabIndex:-1,className:O("flex items-center justify-center flex-1","hover:bg-[color-mix(in_srgb,var(--atom-theme-border-primary)_10%,transparent)]","active:bg-[color-mix(in_srgb,var(--atom-theme-border-primary)_20%,transparent)]","disabled:opacity-50 disabled:cursor-not-allowed","transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-(--atom-primary) focus-visible:ring-inset","cursor-pointer"),children:p.jsx(_l,{size:C.iconSize,className:"text-muted-foreground",strokeWidth:2,"aria-hidden":"true"})})]})]}):p.jsx("input",{ref:m,type:"text",inputMode:w,"data-slot":"number-input","data-variant":t,value:r??"",onChange:v,onKeyDown:g,placeholder:c??" ",disabled:l,"aria-valuemin":s,"aria-valuemax":a,className:O(xi({variant:t,size:n}),e),...f})});Ud.displayName="NumberInput";const Bs=x.createContext({});function $s(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const zs=typeof window<"u",qd=zs?x.useLayoutEffect:x.useEffect,$r=x.createContext(null);function Ys(e,t){e.indexOf(t)===-1&&e.push(t)}function Hs(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const et=(e,t,n)=>n>t?t:n<e?e:n;function $o(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let cn=()=>{},ct=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(cn=(e,t,n)=>{!e&&typeof console<"u"&&console.warn($o(t,n))},ct=(e,t,n)=>{if(!e)throw new Error($o(t,n))});const lt={},Kd=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Xd(e){return typeof e=="object"&&e!==null}const Zd=e=>/^0[^.\s]+$/u.test(e);function Gs(e){let t;return()=>(t===void 0&&(t=e()),t)}const Fe=e=>e,RC=(e,t)=>n=>t(e(n)),Yn=(...e)=>e.reduce(RC),Nn=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Us{constructor(){this.subscriptions=[]}add(t){return Ys(this.subscriptions,t),()=>Hs(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const a=this.subscriptions[s];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ze=e=>e*1e3,Ve=e=>e/1e3;function Qd(e,t){return t?e*(1e3/t):0}const wi=new Set;function qs(e,t,n){e||wi.has(t)||(console.warn($o(t,n)),wi.add(t))}const Jd=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,NC=1e-7,OC=12;function jC(e,t,n,r,o){let s,a,i=0;do a=t+(n-t)/2,s=Jd(a,r,o)-e,s>0?n=a:t=a;while(Math.abs(s)>NC&&++i<OC);return a}function Hn(e,t,n,r){if(e===t&&n===r)return Fe;const o=s=>jC(s,0,1,e,n);return s=>s===0||s===1?s:Jd(o(s),t,r)}const ef=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,tf=e=>t=>1-e(1-t),nf=Hn(.33,1.53,.69,.99),Ks=tf(nf),rf=ef(Ks),of=e=>(e*=2)<1?.5*Ks(e):.5*(2-Math.pow(2,-10*(e-1))),Xs=e=>1-Math.sin(Math.acos(e)),sf=tf(Xs),af=ef(Xs),_C=Hn(.42,0,1,1),IC=Hn(0,0,.58,1),cf=Hn(.42,0,.58,1),VC=e=>Array.isArray(e)&&typeof e[0]!="number",lf=e=>Array.isArray(e)&&typeof e[0]=="number",Ci={linear:Fe,easeIn:_C,easeInOut:cf,easeOut:IC,circIn:Xs,circInOut:af,circOut:sf,backIn:Ks,backInOut:rf,backOut:nf,anticipate:of},FC=e=>typeof e=="string",ki=e=>{if(lf(e)){ct(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return Hn(t,n,r,o)}else if(FC(e))return ct(Ci[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Ci[e];return e},or=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function LC(e,t){let n=new Set,r=new Set,o=!1,s=!1;const a=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function c(u){a.has(u)&&(l.schedule(u),e()),u(i)}const l={schedule:(u,d=!1,f=!1)=>{const b=f&&o?n:r;return d&&a.add(u),b.has(u)||b.add(u),u},cancel:u=>{r.delete(u),a.delete(u)},process:u=>{if(i=u,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),n.clear(),o=!1,s&&(s=!1,l.process(u))}};return l}const WC=40;function uf(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=or.reduce((w,S)=>(w[S]=LC(s),w),{}),{setup:i,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:m,postRender:b}=a,h=()=>{const w=lt.useManualTiming?o.timestamp:performance.now();n=!1,lt.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(w-o.timestamp,WC),1)),o.timestamp=w,o.isProcessing=!0,i.process(o),c.process(o),l.process(o),u.process(o),d.process(o),f.process(o),m.process(o),b.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:or.reduce((w,S)=>{const k=a[S];return w[S]=(T,E=!1,D=!1)=>(n||g(),k.schedule(T,E,D)),w},{}),cancel:w=>{for(let S=0;S<or.length;S++)a[or[S]].cancel(w)},state:o,steps:a}}const{schedule:le,cancel:bt,state:Ce,steps:go}=uf(typeof requestAnimationFrame<"u"?requestAnimationFrame:Fe,!0);let dr;function BC(){dr=void 0}const Te={now:()=>(dr===void 0&&Te.set(Ce.isProcessing||lt.useManualTiming?Ce.timestamp:performance.now()),dr),set:e=>{dr=e,queueMicrotask(BC)}},df=e=>t=>typeof t=="string"&&t.startsWith(e),ff=df("--"),$C=df("var(--"),Zs=e=>$C(e)?zC.test(e.split("/*")[0].trim()):!1,zC=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Si(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const ln={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},On={...ln,transform:e=>et(0,1,e)},sr={...ln,default:1},Sn=e=>Math.round(e*1e5)/1e5,Qs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function YC(e){return e==null}const HC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Js=(e,t)=>n=>!!(typeof n=="string"&&HC.test(n)&&n.startsWith(e)||t&&!YC(n)&&Object.prototype.hasOwnProperty.call(n,t)),mf=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,a,i]=r.match(Qs);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(a),alpha:i!==void 0?parseFloat(i):1}},GC=e=>et(0,255,e),yo={...ln,transform:e=>Math.round(GC(e))},Et={test:Js("rgb","red"),parse:mf("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+yo.transform(e)+", "+yo.transform(t)+", "+yo.transform(n)+", "+Sn(On.transform(r))+")"};function UC(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const zo={test:Js("#"),parse:UC,transform:Et.transform},Gn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),mt=Gn("deg"),Qe=Gn("%"),I=Gn("px"),qC=Gn("vh"),KC=Gn("vw"),Di={...Qe,parse:e=>Qe.parse(e)/100,transform:e=>Qe.transform(e*100)},$t={test:Js("hsl","hue"),parse:mf("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Qe.transform(Sn(t))+", "+Qe.transform(Sn(n))+", "+Sn(On.transform(r))+")"},he={test:e=>Et.test(e)||zo.test(e)||$t.test(e),parse:e=>Et.test(e)?Et.parse(e):$t.test(e)?$t.parse(e):zo.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Et.transform(e):$t.transform(e),getAnimatableNone:e=>{const t=he.parse(e);return t.alpha=0,he.transform(t)}},XC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ZC(e){return isNaN(e)&&typeof e=="string"&&(e.match(Qs)?.length||0)+(e.match(XC)?.length||0)>0}const hf="number",pf="color",QC="var",JC="var(",Ti="${}",ek=/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 jn(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const i=t.replace(ek,c=>(he.test(c)?(r.color.push(s),o.push(pf),n.push(he.parse(c))):c.startsWith(JC)?(r.var.push(s),o.push(QC),n.push(c)):(r.number.push(s),o.push(hf),n.push(parseFloat(c))),++s,Ti)).split(Ti);return{values:n,split:i,indexes:r,types:o}}function gf(e){return jn(e).values}function yf(e){const{split:t,types:n}=jn(e),r=t.length;return o=>{let s="";for(let a=0;a<r;a++)if(s+=t[a],o[a]!==void 0){const i=n[a];i===hf?s+=Sn(o[a]):i===pf?s+=he.transform(o[a]):s+=o[a]}return s}}const tk=e=>typeof e=="number"?0:he.test(e)?he.getAnimatableNone(e):e;function nk(e){const t=gf(e);return yf(e)(t.map(tk))}const vt={test:ZC,parse:gf,createTransformer:yf,getAnimatableNone:nk};function bo(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 rk({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,a=0;if(!t)o=s=a=n;else{const i=n<.5?n*(1+t):n+t-n*t,c=2*n-i;o=bo(c,i,e+1/3),s=bo(c,i,e),a=bo(c,i,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:r}}function Cr(e,t){return n=>n>0?t:e}const me=(e,t,n)=>e+(t-e)*n,vo=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},ok=[zo,Et,$t],sk=e=>ok.find(t=>t.test(e));function Ei(e){const t=sk(e);if(cn(!!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===$t&&(n=rk(n)),n}const Pi=(e,t)=>{const n=Ei(e),r=Ei(t);if(!n||!r)return Cr(e,t);const o={...n};return s=>(o.red=vo(n.red,r.red,s),o.green=vo(n.green,r.green,s),o.blue=vo(n.blue,r.blue,s),o.alpha=me(n.alpha,r.alpha,s),Et.transform(o))},Yo=new Set(["none","hidden"]);function ak(e,t){return Yo.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ik(e,t){return n=>me(e,t,n)}function ea(e){return typeof e=="number"?ik:typeof e=="string"?Zs(e)?Cr:he.test(e)?Pi:uk:Array.isArray(e)?bf:typeof e=="object"?he.test(e)?Pi:ck:Cr}function bf(e,t){const n=[...e],r=n.length,o=e.map((s,a)=>ea(s)(s,t[a]));return s=>{for(let a=0;a<r;a++)n[a]=o[a](s);return n}}function ck(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=ea(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function lk(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],a=e.indexes[s][r[s]],i=e.values[a]??0;n[o]=i,r[s]++}return n}const uk=(e,t)=>{const n=vt.createTransformer(t),r=jn(e),o=jn(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Yo.has(e)&&!o.values.length||Yo.has(t)&&!r.values.length?ak(e,t):Yn(bf(lk(r,o),o.values),n):(cn(!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"),Cr(e,t))};function vf(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?me(e,t,n):ea(e)(e,t)}const dk=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>le.update(t,n),stop:()=>bt(t),now:()=>Ce.isProcessing?Ce.timestamp:Te.now()}},xf=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=Math.round(e(s/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},kr=2e4;function ta(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<kr;)t+=n,r=e.next(t);return t>=kr?1/0:t}function fk(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(ta(r),kr);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:Ve(o)}}const mk=5;function wf(e,t,n){const r=Math.max(t-mk,0);return Qd(n-e(r),t-r)}const ue={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},xo=.001;function hk({duration:e=ue.duration,bounce:t=ue.bounce,velocity:n=ue.velocity,mass:r=ue.mass}){let o,s;cn(e<=Ze(ue.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=et(ue.minDamping,ue.maxDamping,a),e=et(ue.minDuration,ue.maxDuration,Ve(e)),a<1?(o=l=>{const u=l*a,d=u*e,f=u-n,m=Ho(l,a),b=Math.exp(-d);return xo-f/m*b},s=l=>{const d=l*a*e,f=d*n+n,m=Math.pow(a,2)*Math.pow(l,2)*e,b=Math.exp(-d),h=Ho(Math.pow(l,2),a);return(-o(l)+xo>0?-1:1)*((f-m)*b)/h}):(o=l=>{const u=Math.exp(-l*e),d=(l-n)*e+1;return-xo+u*d},s=l=>{const u=Math.exp(-l*e),d=(n-l)*(e*e);return u*d});const i=5/e,c=gk(o,s,i);if(e=Ze(e),isNaN(c))return{stiffness:ue.stiffness,damping:ue.damping,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:a*2*Math.sqrt(r*l),duration:e}}}const pk=12;function gk(e,t,n){let r=n;for(let o=1;o<pk;o++)r=r-e(r)/t(r);return r}function Ho(e,t){return e*Math.sqrt(1-t*t)}const yk=["duration","bounce"],bk=["stiffness","damping","mass"];function Mi(e,t){return t.some(n=>e[n]!==void 0)}function vk(e){let t={velocity:ue.velocity,stiffness:ue.stiffness,damping:ue.damping,mass:ue.mass,isResolvedFromDuration:!1,...e};if(!Mi(e,bk)&&Mi(e,yk))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*et(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ue.mass,stiffness:o,damping:s}}else{const n=hk(e);t={...t,...n,mass:ue.mass},t.isResolvedFromDuration=!0}return t}function Sr(e=ue.visualDuration,t=ue.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],i={done:!1,value:s},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:m}=vk({...n,velocity:-Ve(n.velocity||0)}),b=f||0,h=l/(2*Math.sqrt(c*u)),g=a-s,v=Ve(Math.sqrt(c/u)),C=Math.abs(g)<5;r||(r=C?ue.restSpeed.granular:ue.restSpeed.default),o||(o=C?ue.restDelta.granular:ue.restDelta.default);let w;if(h<1){const k=Ho(v,h);w=T=>{const E=Math.exp(-h*v*T);return a-E*((b+h*v*g)/k*Math.sin(k*T)+g*Math.cos(k*T))}}else if(h===1)w=k=>a-Math.exp(-v*k)*(g+(b+v*g)*k);else{const k=v*Math.sqrt(h*h-1);w=T=>{const E=Math.exp(-h*v*T),D=Math.min(k*T,300);return a-E*((b+h*v*g)*Math.sinh(D)+k*g*Math.cosh(D))/k}}const S={calculatedDuration:m&&d||null,next:k=>{const T=w(k);if(m)i.done=k>=d;else{let E=k===0?b:0;h<1&&(E=k===0?Ze(b):wf(w,k,T));const D=Math.abs(E)<=r,A=Math.abs(a-T)<=o;i.done=D&&A}return i.value=i.done?a:T,i},toString:()=>{const k=Math.min(ta(S),kr),T=xf(E=>S.next(k*E).value,k,30);return k+"ms "+T},toTransition:()=>{}};return S}Sr.applyToOptions=e=>{const t=fk(e,100,Sr);return e.ease=t.ease,e.duration=Ze(t.duration),e.type="keyframes",e};function Go({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:a,min:i,max:c,restDelta:l=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},m=D=>i!==void 0&&D<i||c!==void 0&&D>c,b=D=>i===void 0?c:c===void 0||Math.abs(i-D)<Math.abs(c-D)?i:c;let h=n*t;const g=d+h,v=a===void 0?g:a(g);v!==g&&(h=v-d);const C=D=>-h*Math.exp(-D/r),w=D=>v+C(D),S=D=>{const A=C(D),M=w(D);f.done=Math.abs(A)<=l,f.value=f.done?v:M};let k,T;const E=D=>{m(f.value)&&(k=D,T=Sr({keyframes:[f.value,b(f.value)],velocity:wf(w,D,f.value),damping:o,stiffness:s,restDelta:l,restSpeed:u}))};return E(0),{calculatedDuration:null,next:D=>{let A=!1;return!T&&k===void 0&&(A=!0,S(D),E(D)),k!==void 0&&D>=k?T.next(D-k):(!A&&S(D),f)}}}function xk(e,t,n){const r=[],o=n||lt.mix||vf,s=e.length-1;for(let a=0;a<s;a++){let i=o(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||Fe:t;i=Yn(c,i)}r.push(i)}return r}function wk(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(ct(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=xk(t,r,o),c=i.length,l=u=>{if(a&&u<e[0])return t[0];let d=0;if(c>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Nn(e[d],e[d+1],u);return i[d](f)};return n?u=>l(et(e[0],e[s-1],u)):l}function Ck(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Nn(0,t,r);e.push(me(n,1,o))}}function kk(e){const t=[0];return Ck(t,e.length-1),t}function Sk(e,t){return e.map(n=>n*t)}function Dk(e,t){return e.map(()=>t||cf).splice(0,e.length-1)}function zt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=VC(r)?r.map(ki):ki(r),s={done:!1,value:t[0]},a=Sk(n&&n.length===t.length?n:kk(t),e),i=wk(a,t,{ease:Array.isArray(o)?o:Dk(t,o)});return{calculatedDuration:e,next:c=>(s.value=i(c),s.done=c>=e,s)}}const Tk=e=>e!==null;function na(e,{repeat:t,repeatType:n="loop"},r,o=1){const s=e.filter(Tk),i=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}const Ek={decay:Go,inertia:Go,tween:zt,keyframes:zt,spring:Sr};function Cf(e){typeof e.type=="string"&&(e.type=Ek[e.type])}class ra{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 Pk=e=>e/100;class oa extends ra{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!==Te.now()&&this.tick(Te.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;Cf(t);const{type:n=zt,repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:a=0}=t;let{keyframes:i}=t;const c=n||zt;process.env.NODE_ENV!=="production"&&c!==zt&&ct(i.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${i}`,"spring-two-frames"),c!==zt&&typeof i[0]!="number"&&(this.mixKeyframes=Yn(Pk,vf(i[0],i[1])),i=[0,100]);const l=c({...t,keyframes:i});s==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...i].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=ta(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=l}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:r,totalDuration:o,mixKeyframes:s,mirroredGenerator:a,resolvedDuration:i,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:m,type:b,onUpdate:h,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-l*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let w=this.currentTime,S=r;if(d){const D=Math.min(this.currentTime,o)/i;let A=Math.floor(D),M=D%1;!M&&D>=1&&(M=1),M===1&&A--,A=Math.min(A,d+1),!!(A%2)&&(f==="reverse"?(M=1-M,m&&(M-=m/i)):f==="mirror"&&(S=a)),w=et(0,1,M)*i}const k=C?{done:!1,value:u[0]}:S.next(w);s&&(k.value=s(k.value));let{done:T}=k;!C&&c!==null&&(T=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return E&&b!==Go&&(k.value=na(u,this.options,g,this.speed)),h&&h(k.value),E&&this.finish(),k}then(t,n){return this.finished.then(t,n)}get duration(){return Ve(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ve(t)}get time(){return Ve(this.currentTime)}set time(t){t=Ze(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(Te.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ve(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=dk,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),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(Te.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 Mk(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Pt=e=>e*180/Math.PI,Uo=e=>{const t=Pt(Math.atan2(e[1],e[0]));return qo(t)},Ak={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Uo,rotateZ:Uo,skewX:e=>Pt(Math.atan(e[1])),skewY:e=>Pt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},qo=e=>(e=e%360,e<0&&(e+=360),e),Ai=Uo,Ri=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ni=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Rk={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ri,scaleY:Ni,scale:e=>(Ri(e)+Ni(e))/2,rotateX:e=>qo(Pt(Math.atan2(e[6],e[5]))),rotateY:e=>qo(Pt(Math.atan2(-e[2],e[0]))),rotateZ:Ai,rotate:Ai,skewX:e=>Pt(Math.atan(e[4])),skewY:e=>Pt(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 Xo(e,t){if(!e||e==="none")return Ko(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=Rk,o=n;else{const i=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Ak,o=i}if(!o)return Ko(t);const s=r[t],a=o[1].split(",").map(Ok);return typeof s=="function"?s(a):a[s]}const Nk=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Xo(n,t)};function Ok(e){return parseFloat(e.trim())}const un=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],dn=new Set(un),Oi=e=>e===ln||e===I,jk=new Set(["x","y","z"]),_k=un.filter(e=>!jk.has(e));function Ik(e){const t=[];return _k.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ht={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})=>Xo(t,"x"),y:(e,{transform:t})=>Xo(t,"y")};ht.translateX=ht.x;ht.translateY=ht.y;const Mt=new Set;let Zo=!1,Qo=!1,Jo=!1;function kf(){if(Qo){const e=Array.from(Mt).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=Ik(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,a])=>{r.getValue(s)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Qo=!1,Zo=!1,Mt.forEach(e=>e.complete(Jo)),Mt.clear()}function Sf(){Mt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qo=!0)})}function Vk(){Jo=!0,Sf(),kf(),Jo=!1}class sa{constructor(t,n,r,o,s,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Mt.add(this),Zo||(Zo=!0,le.read(Sf),le.resolveKeyframes(kf))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const s=o?.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const i=r.readValue(n,a);i!=null&&(t[0]=i)}t[0]===void 0&&(t[0]=a),o&&s===void 0&&o.set(t[0])}Mk(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Mt.delete(this)}cancel(){this.state==="scheduled"&&(Mt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Fk=e=>e.startsWith("--");function Lk(e,t,n){Fk(t)?e.style.setProperty(t,n):e.style[t]=n}const Wk=Gs(()=>window.ScrollTimeline!==void 0),Bk={};function $k(e,t){const n=Gs(e);return()=>Bk[t]??n()}const Df=$k(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),wn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ji={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wn([0,.65,.55,1]),circOut:wn([.55,0,1,.45]),backIn:wn([.31,.01,.66,-.59]),backOut:wn([.33,1.53,.69,.99])};function Tf(e,t){if(e)return typeof e=="function"?Df()?xf(e,t):"ease-out":lf(e)?wn(e):Array.isArray(e)?e.map(n=>Tf(n,t)||ji.easeOut):ji[e]}function zk(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:a="loop",ease:i="easeOut",times:c}={},l=void 0){const u={[t]:n};c&&(u.offset=c);const d=Tf(i,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"};return l&&(f.pseudoElement=l),e.animate(u,f)}function Ef(e){return typeof e=="function"&&"applyToOptions"in e}function Yk({type:e,...t}){return Ef(e)&&Df()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Hk extends ra{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:s,allowFlatten:a=!1,finalKeyframe:i,onComplete:c}=t;this.isPseudoElement=!!s,this.allowFlatten=a,this.options=t,ct(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const l=Yk(t);this.animation=zk(n,r,o,l,s),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const u=na(o,this.options,i,this.speed);this.updateMotionValue?this.updateMotionValue(u):Lk(n,r,u),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,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 Ve(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ve(t)}get time(){return Ve(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ze(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 this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Wk()?(this.animation.timeline=t,Fe):n(this)}}const Pf={anticipate:of,backInOut:rf,circInOut:af};function Gk(e){return e in Pf}function Uk(e){typeof e.ease=="string"&&Gk(e.ease)&&(e.ease=Pf[e.ease])}const wo=10;class qk extends Hk{constructor(t){Uk(t),Cf(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:s,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const i=new oa({...a,autoplay:!1}),c=Math.max(wo,Te.now()-this.startTime),l=et(0,wo,c-wo);n.setWithVelocity(i.sample(Math.max(0,c-l)).value,i.sample(c).value,l),i.stop()}}const _i=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(vt.test(e)||e==="0")&&!e.startsWith("url("));function Kk(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 Xk(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],a=_i(o,t),i=_i(s,t);return cn(a===i,`You are trying to animate ${t} from "${o}" to "${s}". "${a?s:o}" is not an animatable value.`,"value-not-animatable"),!a||!i?!1:Kk(e)||(n==="spring"||Ef(n))&&r}function es(e){e.duration=0,e.type="keyframes"}const Zk=new Set(["opacity","clipPath","filter","transform"]),Qk=Gs(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Jk(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:s,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=t.owner.getProps();return Qk()&&n&&Zk.has(n)&&(n!=="transform"||!l)&&!c&&!r&&o!=="mirror"&&s!==0&&a!=="inertia"}const eS=40;class tS extends ra{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",keyframes:i,name:c,motionValue:l,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Te.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:a,name:c,motionValue:l,element:u,...d},m=u?.KeyframeResolver||sa;this.keyframeResolver=new m(i,(b,h,g)=>this.onKeyframesResolved(b,h,f,!g),c,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:s,type:a,velocity:i,delay:c,isHandoff:l,onUpdate:u}=r;this.resolvedAt=Te.now(),Xk(t,s,a,i)||((lt.instantAnimations||!c)&&u?.(na(t,r,n)),t[0]=t[t.length-1],es(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>eS?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},m=!l&&Jk(f)?new qk({...f,element:f.motionValue.owner.current}):new oa(f);m.finished.then(()=>this.notifyFinished()).catch(Fe),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}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(),Vk()),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 nS=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function rS(e){const t=nS.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const oS=4;function Mf(e,t,n=1){ct(n<=oS,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=rS(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const a=s.trim();return Kd(a)?parseFloat(a):a}return Zs(o)?Mf(o,t,n+1):o}function aa(e,t){return e?.[t]??e?.default??e}const Af=new Set(["width","height","top","left","right","bottom",...un]),sS={test:e=>e==="auto",parse:e=>e},Rf=e=>t=>t.test(e),Nf=[ln,I,Qe,mt,KC,qC,sS],Ii=e=>Nf.find(Rf(e));function aS(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Zd(e):!0}const iS=new Set(["brightness","contrast","saturate","opacity"]);function cS(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Qs)||[];if(!r)return e;const o=n.replace(r,"");let s=iS.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const lS=/\b([a-z-]*)\(.*?\)/gu,ts={...vt,getAnimatableNone:e=>{const t=e.match(lS);return t?t.map(cS).join(" "):e}},Vi={...ln,transform:Math.round},uS={rotate:mt,rotateX:mt,rotateY:mt,rotateZ:mt,scale:sr,scaleX:sr,scaleY:sr,scaleZ:sr,skew:mt,skewX:mt,skewY:mt,distance:I,translateX:I,translateY:I,translateZ:I,x:I,y:I,z:I,perspective:I,transformPerspective:I,opacity:On,originX:Di,originY:Di,originZ:I},ia={borderWidth:I,borderTopWidth:I,borderRightWidth:I,borderBottomWidth:I,borderLeftWidth:I,borderRadius:I,radius:I,borderTopLeftRadius:I,borderTopRightRadius:I,borderBottomRightRadius:I,borderBottomLeftRadius:I,width:I,maxWidth:I,height:I,maxHeight:I,top:I,right:I,bottom:I,left:I,inset:I,insetBlock:I,insetBlockStart:I,insetBlockEnd:I,insetInline:I,insetInlineStart:I,insetInlineEnd:I,padding:I,paddingTop:I,paddingRight:I,paddingBottom:I,paddingLeft:I,paddingBlock:I,paddingBlockStart:I,paddingBlockEnd:I,paddingInline:I,paddingInlineStart:I,paddingInlineEnd:I,margin:I,marginTop:I,marginRight:I,marginBottom:I,marginLeft:I,marginBlock:I,marginBlockStart:I,marginBlockEnd:I,marginInline:I,marginInlineStart:I,marginInlineEnd:I,backgroundPositionX:I,backgroundPositionY:I,...uS,zIndex:Vi,fillOpacity:On,strokeOpacity:On,numOctaves:Vi},dS={...ia,color:he,backgroundColor:he,outlineColor:he,fill:he,stroke:he,borderColor:he,borderTopColor:he,borderRightColor:he,borderBottomColor:he,borderLeftColor:he,filter:ts,WebkitFilter:ts},Of=e=>dS[e];function jf(e,t){let n=Of(e);return n!==ts&&(n=vt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const fS=new Set(["auto","none","0"]);function mS(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!fS.has(s)&&jn(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=jf(n,o)}class hS extends sa{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),Zs(d))){const f=Mf(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Af.has(r)||t.length!==2)return;const[o,s]=t,a=Ii(o),i=Ii(s),c=Si(o),l=Si(s);if(c!==l&&ht[r]){this.needsMeasurement=!0;return}if(a!==i)if(Oi(a)&&Oi(i))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else ht[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||aS(t[o]))&&r.push(o);r.length&&mS(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ht[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const s=r.length-1,a=r[s];r[s]=ht[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([i,c])=>{t.getValue(i).set(c)}),this.resolveNoneKeyframes()}}function pS(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const _f=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function If(e){return Xd(e)&&"offsetHeight"in e}const Fi=30,gS=e=>!isNaN(parseFloat(e));class yS{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=Te.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Te.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=gS(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&qs(!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 Us);const r=this.events[t].add(n);return t==="change"?()=>{r(),le.read(()=>{this.events.change.getSize()||this.stop()})}:r}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,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}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=Te.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Fi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Fi);return Qd(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 Jt(e,t){return new yS(e,t)}const{schedule:ca}=uf(queueMicrotask,!1),Be={x:!1,y:!1};function Vf(){return Be.x||Be.y}function bS(e){return e==="x"||e==="y"?Be[e]?null:(Be[e]=!0,()=>{Be[e]=!1}):Be.x||Be.y?null:(Be.x=Be.y=!0,()=>{Be.x=Be.y=!1})}function Ff(e,t){const n=pS(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Li(e){return!(e.pointerType==="touch"||Vf())}function vS(e,t,n={}){const[r,o,s]=Ff(e,n),a=i=>{if(!Li(i))return;const{target:c}=i,l=t(c,i);if(typeof l!="function"||!c)return;const u=d=>{Li(d)&&(l(d),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,o)};return r.forEach(i=>{i.addEventListener("pointerenter",a,o)}),s}const Lf=(e,t)=>t?e===t?!0:Lf(e,t.parentElement):!1,la=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,xS=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Wf(e){return xS.has(e.tagName)||e.isContentEditable===!0}const fr=new WeakSet;function Wi(e){return t=>{t.key==="Enter"&&e(t)}}function Co(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const wS=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Wi(()=>{if(fr.has(n))return;Co(n,"down");const o=Wi(()=>{Co(n,"up")}),s=()=>Co(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Bi(e){return la(e)&&!Vf()}function CS(e,t,n={}){const[r,o,s]=Ff(e,n),a=i=>{const c=i.currentTarget;if(!Bi(i))return;fr.add(c);const l=t(c,i),u=(m,b)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),fr.has(c)&&fr.delete(c),Bi(m)&&typeof l=="function"&&l(m,{success:b})},d=m=>{u(m,c===window||c===document||n.useGlobalTarget||Lf(c,m.target))},f=m=>{u(m,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(i=>{(n.useGlobalTarget?window:i).addEventListener("pointerdown",a,o),If(i)&&(i.addEventListener("focus",l=>wS(l,o)),!Wf(i)&&!i.hasAttribute("tabindex")&&(i.tabIndex=0))}),s}function Bf(e){return Xd(e)&&"ownerSVGElement"in e}function kS(e){return Bf(e)&&e.tagName==="svg"}const De=e=>!!(e&&e.getVelocity),SS=[...Nf,he,vt],DS=e=>SS.find(Rf(e)),ua=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function $i(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function TS(...e){return t=>{let n=!1;const r=e.map(o=>{const s=$i(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():$i(e[o],null)}}}}function ES(...e){return y.useCallback(TS(...e),e)}class PS extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=If(r)&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=o-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function MS({children:e,isPresent:t,anchorX:n,root:r}){const o=x.useId(),s=x.useRef(null),a=x.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:i}=x.useContext(ua),c=e.props?.ref??e?.ref,l=ES(s,c);return x.useInsertionEffect(()=>{const{width:u,height:d,top:f,left:m,right:b}=a.current;if(t||!s.current||!u||!d)return;const h=n==="left"?`left: ${m}`:`right: ${b}`;s.current.dataset.motionPopId=o;const g=document.createElement("style");i&&(g.nonce=i);const v=r??document.head;return v.appendChild(g),g.sheet&&g.sheet.insertRule(`
59
+ leading-none text-center`,children:S})]}),i&&h.jsx(Ww,{columns:d,data:f,filters:m,onFilterChange:y})]})]}),r&&h.jsxs("div",{className:"relative",ref:x,children:[h.jsx("button",{type:"button",onClick:()=>u(!l),className:R("flex h-8 items-center gap-2 rounded-md border px-3 text-xs font-medium transition-colors border-(--atom-theme-border-primary) hover:bg-[color-mix(in_oklab,var(--atom-theme-surface-primary)_97%,black)] dark:hover:bg-[color-mix(in_oklab,var(--atom-theme-surface-primary)_85%,black)] bg-(--atom-theme-surface-primary) cursor-pointer",""),"aria-label":"View columns","aria-expanded":l,"aria-haspopup":"true",children:h.jsx(_w,{})}),l&&h.jsx(Lw,{columns:d,columnVisibility:p,onColumnVisibilityChange:b})]}),n&&h.jsxs("button",{type:"button",className:"flex h-8 items-center gap-2 rounded-md border px-3 text-xs font-medium transition-colors border-(--atom-theme-border-primary) hover:bg-[color-mix(in_oklab,var(--atom-theme-surface-primary)_97%,black)] dark:hover:bg-[color-mix(in_oklab,var(--atom-theme-surface-primary)_85%,black)] bg-(--atom-theme-surface-primary) cursor-pointer",onClick:v,"aria-label":"Download table data",children:[h.jsx(Iw,{}),h.jsx("span",{children:"Export"})]})]})]})}function zw(e){const{pagination:t,dataLength:n,rowsPerPage:r,currentPage:o,totalPages:s,onPageChange:a}=e;return!t||n<=r||s<=1?null:h.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-(--atom-theme-surface-primary) border-t border-(--atom-theme-border-primary) sm:px-6",children:[h.jsxs("div",{className:"text-sm text-(--atom-text-muted,#64748b)",role:"status","aria-live":"polite",children:["Showing ",(o-1)*r+1," to"," ",Math.min(o*r,n)," of ",n," ","entries"]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("button",{onClick:()=>a(o-1),disabled:o===1,className:R("flex h-9 w-9 items-center justify-center rounded-full border transition-colors",o===1?"bg-gray-100 text-gray-400 cursor-not-allowed border-gray-200":"bg-white hover:bg-gray-50 text-(--atom-text-primary,#0f172a) border-(--atom-border-subtle,#e2e8f0) hover:border-gray-300 cursor-pointer"),"aria-label":"Previous page",children:h.jsx(Aw,{})}),h.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:s},(i,c)=>c+1).map(i=>h.jsx("button",{onClick:()=>a(i),className:R("min-w-9 h-9 rounded-md text-sm font-medium flex items-center justify-center border transition-colors px-2 cursor-pointer",o===i?"bg-(--atom-primary,#3b82f6) text-white border-(--atom-primary,#3b82f6)":"bg-white hover:bg-gray-50 text-(--atom-text-primary,#0f172a) border-(--atom-border-subtle,#e2e8f0) hover:border-gray-300"),"aria-label":`Go to page ${i}`,"aria-current":o===i?"page":void 0,children:i},i))}),h.jsx("button",{onClick:()=>a(o+1),disabled:o===s,className:R("flex h-9 w-9 items-center justify-center rounded-full border transition-colors",o===s?"bg-gray-100 text-gray-400 cursor-not-allowed border-gray-200":"bg-white hover:bg-gray-50 text-(--atom-text-primary,#0f172a) border-(--atom-border-subtle,#e2e8f0) hover:border-gray-300 cursor-pointer"),"aria-label":"Next page",children:h.jsx(Ow,{})})]})]})}function Yw({columns:e,data:t,pagination:n=!1,className:r,options:o}){const[s,a]=w.useState(1),[i,c]=w.useState(""),[l,u]=w.useState(!1),[d,f]=w.useState(!1),[m,y]=w.useState({}),[p,b]=w.useState({key:null,direction:"asc"}),[v,C]=w.useState(()=>e.reduce((A,U)=>({...A,[U.key]:!0}),{})),x=10,{search:k=!1,download:S=!1,viewColumns:T=!1,filter:E=!1,filterType:D="dropdown",tableBodyHeight:N,tableBodyMaxHeight:M}=o||{},j=w.useMemo(()=>e.filter(A=>v[A.key]),[e,v]),_=A=>A==null?"":String(A).toLowerCase().replace(/[^a-z0-9\s]/g,""),B=_(i.trim()),z=w.useMemo(()=>!k||!B?t:t.filter(A=>e.some(U=>{const ne=U.selector?U.selector(A):A[U.key];return _(ne).includes(B)})),[t,e,k,B]),K=w.useCallback(A=>p.key?[...A].sort((U,ne)=>{const Z=e.find(qr=>qr.key===p.key);if(!Z)return 0;const re=Z.selector?Z.selector(U):U[Z.key],be=Z.selector?Z.selector(ne):ne[Z.key];if(re==null&&be==null)return 0;if(re==null)return p.direction==="asc"?1:-1;if(be==null)return p.direction==="asc"?-1:1;const Ce=parseFloat(String(re)),kt=parseFloat(String(be));if(!isNaN(Ce)&&!isNaN(kt))return p.direction==="asc"?Ce-kt:kt-Ce;const mn=String(re).toLowerCase().trim(),Zn=String(be).toLowerCase().trim();return mn<Zn?p.direction==="asc"?-1:1:mn>Zn?p.direction==="asc"?1:-1:0}):A,[p.key,p.direction,e]),$=w.useMemo(()=>{let A=z;return Object.entries(m).forEach(([U,ne])=>{ne.length>0&&(A=A.filter(Z=>{const re=e.find(Ce=>Ce.key===U);if(!re)return!0;const be=re.selector?re.selector(Z):Z[U];return ne.includes(String(be))}))}),K(A)},[z,m,e,K]),W=w.useCallback(A=>{if(A.length===0)return"";const U=j.map(Z=>`"${Z.name.replace(/"/g,'""')}"`).join(","),ne=A.map(Z=>j.map(re=>{const be=re.selector?re.selector(Z):Z[re.key];return`"${String(be||"").replace(/"/g,'""')}"`}).join(","));return[U,...ne].join(`
60
+ `)},[j]),O=w.useCallback(()=>{if(!S)return;const A=W($),U=new Blob([`\uFEFF${A}`],{type:"text/csv;charset=utf-8"}),ne=window.URL.createObjectURL(U),Z=document.createElement("a");Z.href=ne,Z.download=`table-export-${new Date().toISOString().slice(0,10)}.csv`,document.body.appendChild(Z),Z.click(),document.body.removeChild(Z),window.URL.revokeObjectURL(ne)},[S,$,W]),H=Math.ceil($.length/x),ee=n?$.slice((s-1)*x,s*x):$,P=w.useCallback((A,U)=>{b({key:A,direction:U}),a(1)},[]),Y=w.useCallback((A,U)=>{y(ne=>({...ne,[A]:U})),a(1)},[]),G=w.useCallback((A,U)=>{C(ne=>({...ne,[A]:U}))},[]),X=w.useCallback(A=>{A<1||A>H||a(A)},[H]);w.useEffect(()=>{a(1)},[i,m,p]),w.useEffect(()=>{C(e.reduce((A,U)=>({...A,[U.key]:!0}),{}))},[e]);const we=w.useCallback((A,U)=>A.id??`row-${U}`,[]),Pe=A=>A==null?"-":typeof A=="boolean"?A?"Yes":"No":typeof A=="number"?A.toString():w.isValidElement(A)?A:String(A);return h.jsxs("div",{className:R("w-full overflow-hidden min-h-[60vh] rounded-md border border-(--atom-theme-border-primary) bg-(--atom-theme-surface-primary) ",r),children:[h.jsx($w,{search:k,download:S,viewColumns:T,filter:E,filterType:D,searchValue:i,onSearchChange:c,showFilterDropdown:l,onToggleFilter:u,showColumnsDropdown:d,onToggleColumnsDropdown:f,columns:e,data:t,filters:m,onFilterChange:Y,columnVisibility:v,onColumnVisibilityChange:G,handleDownload:O}),h.jsx("div",{className:"overflow-x-auto",style:{height:N,maxHeight:M},children:h.jsxs("table",{className:"w-full border-collapse text-left text-sm rounded-md",role:"table","aria-label":"Data table","aria-rowcount":$.length,"aria-colcount":j.length,children:[h.jsx("thead",{className:"bg-[color-mix(in_oklab,var(--atom-theme-surface-tertiary)_50%,transparent)] border-b border-(--atom-theme-border-primary)",children:h.jsx("tr",{role:"row",children:j.map((A,U)=>{const ne=A.sortable!==!1,Z=p.key===A.key,re=Z?p.direction:void 0;return h.jsx("th",{scope:"col",role:"columnheader","aria-colindex":U+1,"aria-sort":Z?re==="asc"?"ascending":"descending":ne?"none":void 0,className:"px-4 py-3 font-(--atom-font-weight-medium) text-left relative text-[14px] text-(--atom-theme-text-primary) ",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("span",{className:"truncate",children:A.name}),ne&&h.jsx(Fw,{columnKey:A.key,sortConfig:p,onSortChange:P})]})},A.key)})})}),h.jsx("tbody",{className:"divide-y divide-(--atom-theme-border-primary) bg-(--atom-theme-surface-primary)",role:"rowgroup",children:ee.length===0?h.jsx("tr",{role:"row",children:h.jsx("td",{colSpan:j.length,role:"cell","aria-colspan":j.length,className:"h-24 text-center text-sm text-gray-500 py-8",children:"No results found"})}):ee.map((A,U)=>{const ne=(s-1)*x+U+1,Z=we(A,U);return h.jsx("tr",{role:"row","aria-rowindex":ne,className:"hover:hover:bg-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_25%,transparent)] transition-colors",children:j.map((re,be)=>{let Ce;if(re.cell)Ce=re.cell(A,U);else if(re.conditionalCell){const kt=re.selector?re.selector(A):A[re.key];Ce=re.conditionalCell(kt,A)}else re.selector?Ce=Pe(re.selector(A)):Ce=Pe(A[re.key]);return h.jsx("td",{role:"cell","aria-colindex":be+1,className:"px-4 py-3 align-top",children:Ce},re.key)})},Z)})})]})}),h.jsx(zw,{pagination:n,dataLength:$.length,rowsPerPage:x,currentPage:s,totalPages:H,onPageChange:X})]})}const gd=w.createContext(void 0);function As(){const e=w.useContext(gd);if(!e)throw new Error("Tabs compound components must be used within Tabs");return e}const Hw=te("flex gap-1 border-b border-[var(--atom-card-border)]",{variants:{variant:{default:"",pills:"border-0 bg-[var(--atom-card-bg)] rounded-lg p-1",underline:""},orientation:{horizontal:"flex-row",vertical:"flex-col border-b-0 border-r"}},defaultVariants:{variant:"default",orientation:"horizontal"}}),Gw=te(["inline-flex items-center justify-center whitespace-nowrap px-4 py-2","text-sm font-medium transition-all duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--atom-primary)] focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"].join(" "),{variants:{variant:{default:["border-b-2 border-transparent rounded-t-md","hover:bg-[var(--atom-card-bg)] hover:text-[var(--atom-text)]","data-[state=active]:border-b-[3px] data-[state=active]:border-[var(--atom-primary)] data-[state=active]:text-[var(--atom-primary)]"].join(" "),pills:["rounded-md","hover:bg-[var(--atom-card-bg)]","data-[state=active]:bg-[var(--atom-primary)] data-[state=active]:text-white data-[state=active]:shadow-sm"].join(" "),underline:["border-b-2 border-transparent","hover:border-[var(--atom-card-border)]","data-[state=active]:border-[var(--atom-primary)] data-[state=active]:text-[var(--atom-primary)]"].join(" ")}},defaultVariants:{variant:"default"}}),Uw=te("mt-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--atom-primary)] focus-visible:ring-offset-2",{variants:{orientation:{horizontal:"",vertical:"ml-4"}},defaultVariants:{orientation:"horizontal"}}),bd=w.forwardRef(({defaultValue:e,value:t,onValueChange:n,variant:r="default",orientation:o="horizontal",className:s,children:a,...i},c)=>{const[l,u]=w.useState(e),d=t!==void 0,f=d?t:l,m=w.useCallback(p=>{d||u(p),n?.(p)},[d,n]),y=w.useMemo(()=>({activeTab:f,setActiveTab:m,orientation:o,variant:r}),[f,m,o,r]);return h.jsx(gd.Provider,{value:y,children:h.jsx("div",{ref:c,"data-orientation":o,className:R("w-full ",s),...i,children:a})})});bd.displayName="Tabs";const yd=w.forwardRef(({className:e,children:t,"aria-label":n,...r},o)=>{const{orientation:s,variant:a}=As();return h.jsx("div",{ref:o,role:"tablist","aria-label":n,"aria-orientation":s,className:R(Hw({variant:a,orientation:s}),e),...r,children:t})});yd.displayName="TabsList";const vd=w.forwardRef(({className:e,value:t,disabled:n,asChild:r=!1,children:o,...s},a)=>{const{activeTab:i,setActiveTab:c,variant:l,orientation:u}=As(),d=i===t,f=w.useRef(null),m=w.useRef(null);w.useImperativeHandle(a,()=>m.current,[]),w.useEffect(()=>{m.current&&(f.current=m.current.closest('[role="tablist"]'))},[]);const y=b=>{if(!f.current)return;const v=Array.from(f.current.querySelectorAll('[role="tab"]:not([disabled])')),C=v.indexOf(m.current);let x=-1;const k=u==="horizontal";switch(b.key){case"ArrowLeft":k&&(b.preventDefault(),x=C-1,x<0&&(x=v.length-1));break;case"ArrowRight":k&&(b.preventDefault(),x=(C+1)%v.length);break;case"ArrowUp":k||(b.preventDefault(),x=C-1,x<0&&(x=v.length-1));break;case"ArrowDown":k||(b.preventDefault(),x=(C+1)%v.length);break;case"Home":b.preventDefault(),x=0;break;case"End":b.preventDefault(),x=v.length-1;break}if(x!==-1&&v[x]){v[x].focus();const S=v[x].getAttribute("data-value");S&&c(S)}},p=r?Me:"button";return h.jsx(p,{ref:m,role:"tab",type:r?void 0:"button",id:`tab-${t}`,"aria-selected":d,"aria-controls":`tabpanel-${t}`,"data-state":d?"active":"inactive","data-value":t,tabIndex:d?0:-1,disabled:n,className:R(Gw({variant:l}),e),onClick:()=>c(t),onKeyDown:y,...s,children:o})});vd.displayName="TabTrigger";const xd=w.forwardRef(({className:e,value:t,children:n,...r},o)=>{const{activeTab:s,orientation:a}=As();return s===t?h.jsx("div",{ref:o,role:"tabpanel",id:`tabpanel-${t}`,"aria-labelledby":`tab-${t}`,tabIndex:0,className:R(Uw({orientation:a}),e),...r,children:n}):null});xd.displayName="TabContent";const qw=te("text-[var(--atom-text)] leading-tight tracking-tight",{variants:{variant:{primary:"text-[var(--atom-primary)]",secondary:"text-[var(--atom-theme-surface-secondary)]",tertiary:"text-[var(--atom-theme-surface-secondary)]",neutral:"text-[var(--atom-text)]",success:"text-[var(--atom-success)]",error:"text-[var(--atom-error)]",info:"text-[var(--atom-info)]",warning:"text-[var(--atom-warning)]",disabled:"text-[var(--atom-theme-text-secondary)]"},size:{none:"",xs:"text-[calc(var(--atom-text-xs))]",sm:"text-[calc(var(--atom-text-sm))]",md:"text-[calc(var(--atom-text-md))]",lg:"text-[calc(var(--atom-text-lg))]",xl:"text-[calc(var(--atom-text-xl))]"},weight:{none:"",normal:"font-[var(--atom-font-weight-normal)]",medium:"font-[var(--atom-font-weight-medium)]",bold:"font-[var(--atom-font-weight-bold)]"}},defaultVariants:{size:"md",variant:"primary"}}),wd=g.forwardRef(({className:e,asChild:t=!1,size:n,weight:r,variant:o,...s},a)=>{const i=t?Me:"span";return h.jsx(i,{ref:a,"data-slot":"text",className:R(qw({size:n,weight:r,variant:o}),e),...s})});wd.displayName="Text";const Kw=te(["resize","flex field-sizing-content w-full rounded-md border px-3 py-2","min-h-16 text-base md:text-sm","outline-none disabled:cursor-not-allowed disabled:opacity-50","border-[var(--atom-theme-border-primary)]","placeholder:text-muted-foreground","hover:bg-[color-mix(in_srgb,var(--atom-theme-border-primary)_6%,transparent)]","hover:border-[color-mix(in_srgb,var(--atom-theme-border-primary)_25%,transparent)] ","focus-visible:border-[var(--atom-theme-border-primary))]","focus-visible:ring-1 focus-visible:ring-[color-mix(in_srgb,var(--atom-theme-border-primary)_35%,transparent)]","focus-visible:ring-offset-0","aria-invalid:border-destructive","aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40","dark:bg-input/30","transition-[background-color,border-color,box-shadow,color]","placeholder:text-muted-foreground placeholder-shown:border-[var(--atom-theme-border-primary)] [&:not(:placeholder-shown)]:border-[color-mix(in_srgb,var(--atom-theme-border-primary)_70%,var(--atom-primary))] focus-visible:border-[var(--atom-primary)] "].join(" "),{variants:{variant:{default:"",outline:"bg-transparent",subtle:"bg-input-background/60"},size:{sm:"min-h-10 px-2 py-1 text-xs w-64",md:"min-h-16 px-3 py-2 text-sm w-80",lg:"min-h-24 px-4 py-3 text-base w-96"}},defaultVariants:{variant:"default",size:"md"}}),Cd=g.forwardRef(({className:e,variant:t,size:n,placeholder:r,...o},s)=>h.jsx("textarea",{ref:s,"data-slot":"textArea",placeholder:r??" ",className:R(Kw({variant:t,size:n}),e),...o}));Cd.displayName="TextArea";const Xw=["top","right","bottom","left"],bt=Math.min,Ae=Math.max,wr=Math.round,ar=Math.floor,Xe=e=>({x:e,y:e}),Zw={left:"right",right:"left",bottom:"top",top:"bottom"},Qw={start:"end",end:"start"};function Lo(e,t,n){return Ae(e,bt(t,n))}function at(e,t){return typeof e=="function"?e(t):e}function it(e){return e.split("-")[0]}function an(e){return e.split("-")[1]}function Os(e){return e==="x"?"y":"x"}function js(e){return e==="y"?"height":"width"}const Jw=new Set(["top","bottom"]);function Ke(e){return Jw.has(it(e))?"y":"x"}function _s(e){return Os(Ke(e))}function e0(e,t,n){n===void 0&&(n=!1);const r=an(e),o=_s(e),s=js(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Cr(a)),[a,Cr(a)]}function t0(e){const t=Cr(e);return[Wo(e),t,Wo(t)]}function Wo(e){return e.replace(/start|end/g,t=>Qw[t])}const fi=["left","right"],mi=["right","left"],n0=["top","bottom"],r0=["bottom","top"];function o0(e,t,n){switch(e){case"top":case"bottom":return n?t?mi:fi:t?fi:mi;case"left":case"right":return t?n0:r0;default:return[]}}function s0(e,t,n,r){const o=an(e);let s=o0(it(e),n==="start",r);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(Wo)))),s}function Cr(e){return e.replace(/left|right|bottom|top/g,t=>Zw[t])}function a0(e){return{top:0,right:0,bottom:0,left:0,...e}}function kd(e){return typeof e!="number"?a0(e):{top:e,right:e,bottom:e,left:e}}function kr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function hi(e,t,n){let{reference:r,floating:o}=e;const s=Ke(t),a=_s(t),i=js(a),c=it(t),l=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[i]/2-o[i]/2;let m;switch(c){case"top":m={x:u,y:r.y-o.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(an(t)){case"start":m[a]-=f*(n&&l?-1:1);break;case"end":m[a]+=f*(n&&l?-1:1);break}return m}const i0=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,i=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=hi(l,r,c),f=r,m={},y=0;for(let p=0;p<i.length;p++){const{name:b,fn:v}=i[p],{x:C,y:x,data:k,reset:S}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:l,platform:a,elements:{reference:e,floating:t}});u=C??u,d=x??d,m={...m,[b]:{...m[b],...k}},S&&y<=50&&(y++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(l=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:d}=hi(l,f,c)),p=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:m}};async function Rn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:a,elements:i,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=at(t,e),y=kd(m),b=i[f?d==="floating"?"reference":"floating":d],v=kr(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:l,rootBoundary:u,strategy:c})),C=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),k=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},S=kr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:C,offsetParent:x,strategy:c}):C);return{top:(v.top-S.top+y.top)/k.y,bottom:(S.bottom-v.bottom+y.bottom)/k.y,left:(v.left-S.left+y.left)/k.x,right:(S.right-v.right+y.right)/k.x}}const c0=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:a,elements:i,middlewareData:c}=t,{element:l,padding:u=0}=at(e,t)||{};if(l==null)return{};const d=kd(u),f={x:n,y:r},m=_s(o),y=js(m),p=await a.getDimensions(l),b=m==="y",v=b?"top":"left",C=b?"bottom":"right",x=b?"clientHeight":"clientWidth",k=s.reference[y]+s.reference[m]-f[m]-s.floating[y],S=f[m]-s.reference[m],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let E=T?T[x]:0;(!E||!await(a.isElement==null?void 0:a.isElement(T)))&&(E=i.floating[x]||s.floating[y]);const D=k/2-S/2,N=E/2-p[y]/2-1,M=bt(d[v],N),j=bt(d[C],N),_=M,B=E-p[y]-j,z=E/2-p[y]/2+D,K=Lo(_,z,B),$=!c.arrow&&an(o)!=null&&z!==K&&s.reference[y]/2-(z<_?M:j)-p[y]/2<0,W=$?z<_?z-_:z-B:0;return{[m]:f[m]+W,data:{[m]:K,centerOffset:z-K-W,...$&&{alignmentOffset:W}},reset:$}}}),l0=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:p=!0,...b}=at(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=it(o),C=Ke(i),x=it(i)===i,k=await(c.isRTL==null?void 0:c.isRTL(l.floating)),S=f||(x||!p?[Cr(i)]:t0(i)),T=y!=="none";!f&&T&&S.push(...s0(i,p,y,k));const E=[i,...S],D=await Rn(t,b),N=[];let M=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&N.push(D[v]),d){const z=e0(o,a,k);N.push(D[z[0]],D[z[1]])}if(M=[...M,{placement:o,overflows:N}],!N.every(z=>z<=0)){var j,_;const z=(((j=s.flip)==null?void 0:j.index)||0)+1,K=E[z];if(K&&(!(d==="alignment"?C!==Ke(K):!1)||M.every(O=>Ke(O.placement)===C?O.overflows[0]>0:!0)))return{data:{index:z,overflows:M},reset:{placement:K}};let $=(_=M.filter(W=>W.overflows[0]<=0).sort((W,O)=>W.overflows[1]-O.overflows[1])[0])==null?void 0:_.placement;if(!$)switch(m){case"bestFit":{var B;const W=(B=M.filter(O=>{if(T){const H=Ke(O.placement);return H===C||H==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(H=>H>0).reduce((H,ee)=>H+ee,0)]).sort((O,H)=>O[1]-H[1])[0])==null?void 0:B[0];W&&($=W);break}case"initialPlacement":$=i;break}if(o!==$)return{reset:{placement:$}}}return{}}}};function pi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gi(e){return Xw.some(t=>e[t]>=0)}const u0=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=at(e,t);switch(r){case"referenceHidden":{const s=await Rn(t,{...o,elementContext:"reference"}),a=pi(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:gi(a)}}}case"escaped":{const s=await Rn(t,{...o,altBoundary:!0}),a=pi(s,n.floating);return{data:{escapedOffsets:a,escaped:gi(a)}}}default:return{}}}}},Sd=new Set(["left","top"]);async function d0(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=it(n),i=an(n),c=Ke(n)==="y",l=Sd.has(a)?-1:1,u=s&&c?-1:1,d=at(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof y=="number"&&(m=i==="end"?y*-1:y),c?{x:m*u,y:f*l}:{x:f*l,y:m*u}}const f0=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:a,middlewareData:i}=t,c=await d0(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},m0=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:b=>{let{x:v,y:C}=b;return{x:v,y:C}}},...c}=at(e,t),l={x:n,y:r},u=await Rn(t,c),d=Ke(it(o)),f=Os(d);let m=l[f],y=l[d];if(s){const b=f==="y"?"top":"left",v=f==="y"?"bottom":"right",C=m+u[b],x=m-u[v];m=Lo(C,m,x)}if(a){const b=d==="y"?"top":"left",v=d==="y"?"bottom":"right",C=y+u[b],x=y-u[v];y=Lo(C,y,x)}const p=i.fn({...t,[f]:m,[d]:y});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[f]:s,[d]:a}}}}}},h0=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:l=!0}=at(e,t),u={x:n,y:r},d=Ke(o),f=Os(d);let m=u[f],y=u[d];const p=at(i,t),b=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const x=f==="y"?"height":"width",k=s.reference[f]-s.floating[x]+b.mainAxis,S=s.reference[f]+s.reference[x]-b.mainAxis;m<k?m=k:m>S&&(m=S)}if(l){var v,C;const x=f==="y"?"width":"height",k=Sd.has(it(o)),S=s.reference[d]-s.floating[x]+(k&&((v=a.offset)==null?void 0:v[d])||0)+(k?0:b.crossAxis),T=s.reference[d]+s.reference[x]+(k?0:((C=a.offset)==null?void 0:C[d])||0)-(k?b.crossAxis:0);y<S?y=S:y>T&&(y=T)}return{[f]:m,[d]:y}}}},p0=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:c=()=>{},...l}=at(e,t),u=await Rn(t,l),d=it(o),f=an(o),m=Ke(o)==="y",{width:y,height:p}=s.floating;let b,v;d==="top"||d==="bottom"?(b=d,v=f===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(v=d,b=f==="end"?"top":"bottom");const C=p-u.top-u.bottom,x=y-u.left-u.right,k=bt(p-u[b],C),S=bt(y-u[v],x),T=!t.middlewareData.shift;let E=k,D=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=C),T&&!f){const M=Ae(u.left,0),j=Ae(u.right,0),_=Ae(u.top,0),B=Ae(u.bottom,0);m?D=y-2*(M!==0||j!==0?M+j:Ae(u.left,u.right)):E=p-2*(_!==0||B!==0?_+B:Ae(u.top,u.bottom))}await c({...t,availableWidth:D,availableHeight:E});const N=await a.getDimensions(i.floating);return y!==N.width||p!==N.height?{reset:{rects:!0}}:{}}}};function Vr(){return typeof window<"u"}function cn(e){return Dd(e)?(e.nodeName||"").toLowerCase():"#document"}function Oe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function nt(e){var t;return(t=(Dd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Dd(e){return Vr()?e instanceof Node||e instanceof Oe(e).Node:!1}function ze(e){return Vr()?e instanceof Element||e instanceof Oe(e).Element:!1}function Je(e){return Vr()?e instanceof HTMLElement||e instanceof Oe(e).HTMLElement:!1}function bi(e){return!Vr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Oe(e).ShadowRoot}const g0=new Set(["inline","contents"]);function Hn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ye(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!g0.has(o)}const b0=new Set(["table","td","th"]);function y0(e){return b0.has(cn(e))}const v0=[":popover-open",":modal"];function Fr(e){return v0.some(t=>{try{return e.matches(t)}catch{return!1}})}const x0=["transform","translate","scale","rotate","perspective"],w0=["transform","translate","scale","rotate","perspective","filter"],C0=["paint","layout","strict","content"];function Is(e){const t=Vs(),n=ze(e)?Ye(e):e;return x0.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||w0.some(r=>(n.willChange||"").includes(r))||C0.some(r=>(n.contain||"").includes(r))}function k0(e){let t=yt(e);for(;Je(t)&&!Qt(t);){if(Is(t))return t;if(Fr(t))return null;t=yt(t)}return null}function Vs(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const S0=new Set(["html","body","#document"]);function Qt(e){return S0.has(cn(e))}function Ye(e){return Oe(e).getComputedStyle(e)}function Lr(e){return ze(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yt(e){if(cn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bi(e)&&e.host||nt(e);return bi(t)?t.host:t}function Td(e){const t=yt(e);return Qt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Je(t)&&Hn(t)?t:Td(t)}function Nn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Td(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=Oe(o);if(s){const i=Bo(a);return t.concat(a,a.visualViewport||[],Hn(o)?o:[],i&&n?Nn(i):[])}return t.concat(o,Nn(o,[],n))}function Bo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ed(e){const t=Ye(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Je(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=wr(n)!==s||wr(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function Fs(e){return ze(e)?e:e.contextElement}function Kt(e){const t=Fs(e);if(!Je(t))return Xe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Ed(t);let a=(s?wr(n.width):n.width)/r,i=(s?wr(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const D0=Xe(0);function Pd(e){const t=Oe(e);return!Vs()||!t.visualViewport?D0:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function T0(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Oe(e)?!1:t}function jt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Fs(e);let a=Xe(1);t&&(r?ze(r)&&(a=Kt(r)):a=Kt(e));const i=T0(s,n,r)?Pd(s):Xe(0);let c=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(s){const f=Oe(s),m=r&&ze(r)?Oe(r):r;let y=f,p=Bo(y);for(;p&&r&&m!==y;){const b=Kt(p),v=p.getBoundingClientRect(),C=Ye(p),x=v.left+(p.clientLeft+parseFloat(C.paddingLeft))*b.x,k=v.top+(p.clientTop+parseFloat(C.paddingTop))*b.y;c*=b.x,l*=b.y,u*=b.x,d*=b.y,c+=x,l+=k,y=Oe(p),p=Bo(y)}}return kr({width:u,height:d,x:c,y:l})}function Wr(e,t){const n=Lr(e).scrollLeft;return t?t.left+n:jt(nt(e)).left+n}function Md(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Wr(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function E0(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=nt(r),i=t?Fr(t.floating):!1;if(r===a||i&&s)return n;let c={scrollLeft:0,scrollTop:0},l=Xe(1);const u=Xe(0),d=Je(r);if((d||!d&&!s)&&((cn(r)!=="body"||Hn(a))&&(c=Lr(r)),Je(r))){const m=jt(r);l=Kt(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}const f=a&&!d&&!s?Md(a,c):Xe(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function P0(e){return Array.from(e.getClientRects())}function M0(e){const t=nt(e),n=Lr(e),r=e.ownerDocument.body,o=Ae(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ae(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Wr(e);const i=-n.scrollTop;return Ye(r).direction==="rtl"&&(a+=Ae(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:i}}const yi=25;function R0(e,t){const n=Oe(e),r=nt(e),o=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,i=0,c=0;if(o){s=o.width,a=o.height;const u=Vs();(!u||u&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}const l=Wr(r);if(l<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),m=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,y=Math.abs(r.clientWidth-d.clientWidth-m);y<=yi&&(s-=y)}else l<=yi&&(s+=l);return{width:s,height:a,x:i,y:c}}const N0=new Set(["absolute","fixed"]);function A0(e,t){const n=jt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Je(e)?Kt(e):Xe(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,c=o*s.x,l=r*s.y;return{width:a,height:i,x:c,y:l}}function vi(e,t,n){let r;if(t==="viewport")r=R0(e,n);else if(t==="document")r=M0(nt(e));else if(ze(t))r=A0(t,n);else{const o=Pd(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return kr(r)}function Rd(e,t){const n=yt(e);return n===t||!ze(n)||Qt(n)?!1:Ye(n).position==="fixed"||Rd(n,t)}function O0(e,t){const n=t.get(e);if(n)return n;let r=Nn(e,[],!1).filter(i=>ze(i)&&cn(i)!=="body"),o=null;const s=Ye(e).position==="fixed";let a=s?yt(e):e;for(;ze(a)&&!Qt(a);){const i=Ye(a),c=Is(a);!c&&i.position==="fixed"&&(o=null),(s?!c&&!o:!c&&i.position==="static"&&!!o&&N0.has(o.position)||Hn(a)&&!c&&Rd(e,a))?r=r.filter(u=>u!==a):o=i,a=yt(a)}return t.set(e,r),r}function j0(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Fr(t)?[]:O0(t,this._c):[].concat(n),r],i=a[0],c=a.reduce((l,u)=>{const d=vi(t,u,o);return l.top=Ae(d.top,l.top),l.right=bt(d.right,l.right),l.bottom=bt(d.bottom,l.bottom),l.left=Ae(d.left,l.left),l},vi(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function _0(e){const{width:t,height:n}=Ed(e);return{width:t,height:n}}function I0(e,t,n){const r=Je(t),o=nt(t),s=n==="fixed",a=jt(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const c=Xe(0);function l(){c.x=Wr(o)}if(r||!r&&!s)if((cn(t)!=="body"||Hn(o))&&(i=Lr(t)),r){const m=jt(t,!0,s,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else o&&l();s&&!r&&o&&l();const u=o&&!r&&!s?Md(o,i):Xe(0),d=a.left+i.scrollLeft-c.x-u.x,f=a.top+i.scrollTop-c.y-u.y;return{x:d,y:f,width:a.width,height:a.height}}function po(e){return Ye(e).position==="static"}function xi(e,t){if(!Je(e)||Ye(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return nt(e)===n&&(n=n.ownerDocument.body),n}function Nd(e,t){const n=Oe(e);if(Fr(e))return n;if(!Je(e)){let o=yt(e);for(;o&&!Qt(o);){if(ze(o)&&!po(o))return o;o=yt(o)}return n}let r=xi(e,t);for(;r&&y0(r)&&po(r);)r=xi(r,t);return r&&Qt(r)&&po(r)&&!Is(r)?n:r||k0(e)||n}const V0=async function(e){const t=this.getOffsetParent||Nd,n=this.getDimensions,r=await n(e.floating);return{reference:I0(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function F0(e){return Ye(e).direction==="rtl"}const L0={convertOffsetParentRelativeRectToViewportRelativeRect:E0,getDocumentElement:nt,getClippingRect:j0,getOffsetParent:Nd,getElementRects:V0,getClientRects:P0,getDimensions:_0,getScale:Kt,isElement:ze,isRTL:F0};function Ad(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function W0(e,t){let n=null,r;const o=nt(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:m}=l;if(i||t(),!f||!m)return;const y=ar(d),p=ar(o.clientWidth-(u+f)),b=ar(o.clientHeight-(d+m)),v=ar(u),x={rootMargin:-y+"px "+-p+"px "+-b+"px "+-v+"px",threshold:Ae(0,bt(1,c))||1};let k=!0;function S(T){const E=T[0].intersectionRatio;if(E!==c){if(!k)return a();E?a(!1,E):r=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!Ad(l,e.getBoundingClientRect())&&a(),k=!1}try{n=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return a(!0),s}function B0(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Fs(e),u=o||s?[...l?Nn(l):[],...Nn(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=l&&i?W0(l,n):null;let f=-1,m=null;a&&(m=new ResizeObserver(v=>{let[C]=v;C&&C.target===l&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),n()}),l&&!c&&m.observe(l),m.observe(t));let y,p=c?jt(e):null;c&&b();function b(){const v=jt(e);p&&!Ad(p,v)&&n(),p=v,y=requestAnimationFrame(b)}return n(),()=>{var v;u.forEach(C=>{o&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),d?.(),(v=m)==null||v.disconnect(),m=null,c&&cancelAnimationFrame(y)}}const $0=f0,z0=m0,Y0=l0,H0=p0,G0=u0,wi=c0,U0=h0,q0=(e,t,n)=>{const r=new Map,o={platform:L0,...n},s={...o.platform,_c:r};return i0(e,t,{...o,platform:s})};var K0=typeof document<"u",X0=function(){},mr=K0?w.useLayoutEffect:X0;function Sr(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,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Sr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Sr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Od(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ci(e,t){const n=Od(e);return Math.round(t*n)/n}function go(e){const t=g.useRef(e);return mr(()=>{t.current=e}),t}function Z0(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:c,open:l}=e,[u,d]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=g.useState(r);Sr(f,r)||m(r);const[y,p]=g.useState(null),[b,v]=g.useState(null),C=g.useCallback(O=>{O!==T.current&&(T.current=O,p(O))},[]),x=g.useCallback(O=>{O!==E.current&&(E.current=O,v(O))},[]),k=s||y,S=a||b,T=g.useRef(null),E=g.useRef(null),D=g.useRef(u),N=c!=null,M=go(c),j=go(o),_=go(l),B=g.useCallback(()=>{if(!T.current||!E.current)return;const O={placement:t,strategy:n,middleware:f};j.current&&(O.platform=j.current),q0(T.current,E.current,O).then(H=>{const ee={...H,isPositioned:_.current!==!1};z.current&&!Sr(D.current,ee)&&(D.current=ee,Bc.flushSync(()=>{d(ee)}))})},[f,t,n,j,_]);mr(()=>{l===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,d(O=>({...O,isPositioned:!1})))},[l]);const z=g.useRef(!1);mr(()=>(z.current=!0,()=>{z.current=!1}),[]),mr(()=>{if(k&&(T.current=k),S&&(E.current=S),k&&S){if(M.current)return M.current(k,S,B);B()}},[k,S,B,M,N]);const K=g.useMemo(()=>({reference:T,floating:E,setReference:C,setFloating:x}),[C,x]),$=g.useMemo(()=>({reference:k,floating:S}),[k,S]),W=g.useMemo(()=>{const O={position:n,left:0,top:0};if(!$.floating)return O;const H=Ci($.floating,u.x),ee=Ci($.floating,u.y);return i?{...O,transform:"translate("+H+"px, "+ee+"px)",...Od($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:ee}},[n,i,$.floating,u.x,u.y]);return g.useMemo(()=>({...u,update:B,refs:K,elements:$,floatingStyles:W}),[u,B,K,$,W])}const Q0=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?wi({element:r.current,padding:o}).fn(n):{}:r?wi({element:r,padding:o}).fn(n):{}}}},J0=(e,t)=>({...$0(e),options:[e,t]}),eC=(e,t)=>({...z0(e),options:[e,t]}),tC=(e,t)=>({...U0(e),options:[e,t]}),nC=(e,t)=>({...Y0(e),options:[e,t]}),rC=(e,t)=>({...H0(e),options:[e,t]}),oC=(e,t)=>({...G0(e),options:[e,t]}),sC=(e,t)=>({...Q0(e),options:[e,t]});var aC="Arrow",jd=g.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return h.jsx(he.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});jd.displayName=aC;var iC=jd,Ls="Popper",[_d,Id]=wt(Ls),[cC,Vd]=_d(Ls),Fd=e=>{const{__scopePopper:t,children:n}=e,[r,o]=g.useState(null);return h.jsx(cC,{scope:t,anchor:r,onAnchorChange:o,children:n})};Fd.displayName=Ls;var Ld="PopperAnchor",Wd=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Vd(Ld,n),a=g.useRef(null),i=xe(t,a),c=g.useRef(null);return g.useEffect(()=>{const l=c.current;c.current=r?.current||a.current,l!==c.current&&s.onAnchorChange(c.current)}),r?null:h.jsx(he.div,{...o,ref:i})});Wd.displayName=Ld;var Ws="PopperContent",[lC,uC]=_d(Ws),Bd=g.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:m="optimized",onPlaced:y,...p}=e,b=Vd(Ws,n),[v,C]=g.useState(null),x=xe(t,A=>C(A)),[k,S]=g.useState(null),T=Rs(k),E=T?.width??0,D=T?.height??0,N=r+(s!=="center"?"-"+s:""),M=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},j=Array.isArray(l)?l:[l],_=j.length>0,B={padding:M,boundary:j.filter(fC),altBoundary:_},{refs:z,floatingStyles:K,placement:$,isPositioned:W,middlewareData:O}=Z0({strategy:"fixed",placement:N,whileElementsMounted:(...A)=>B0(...A,{animationFrame:m==="always"}),elements:{reference:b.anchor},middleware:[J0({mainAxis:o+D,alignmentAxis:a}),c&&eC({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?tC():void 0,...B}),c&&nC({...B}),rC({...B,apply:({elements:A,rects:U,availableWidth:ne,availableHeight:Z})=>{const{width:re,height:be}=U.reference,Ce=A.floating.style;Ce.setProperty("--radix-popper-available-width",`${ne}px`),Ce.setProperty("--radix-popper-available-height",`${Z}px`),Ce.setProperty("--radix-popper-anchor-width",`${re}px`),Ce.setProperty("--radix-popper-anchor-height",`${be}px`)}}),k&&sC({element:k,padding:i}),mC({arrowWidth:E,arrowHeight:D}),f&&oC({strategy:"referenceHidden",...B})]}),[H,ee]=Yd($),P=At(y);gt(()=>{W&&P?.()},[W,P]);const Y=O.arrow?.x,G=O.arrow?.y,X=O.arrow?.centerOffset!==0,[we,Pe]=g.useState();return gt(()=>{v&&Pe(window.getComputedStyle(v).zIndex)},[v]),h.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:W?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:we,"--radix-popper-transform-origin":[O.transformOrigin?.x,O.transformOrigin?.y].join(" "),...O.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsx(lC,{scope:n,placedSide:H,onArrowChange:S,arrowX:Y,arrowY:G,shouldHideArrow:X,children:h.jsx(he.div,{"data-side":H,"data-align":ee,...p,ref:x,style:{...p.style,animation:W?void 0:"none"}})})})});Bd.displayName=Ws;var $d="PopperArrow",dC={top:"bottom",right:"left",bottom:"top",left:"right"},zd=g.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=uC($d,r),a=dC[s.placedSide];return h.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:h.jsx(iC,{...o,ref:n,style:{...o.style,display:"block"}})})});zd.displayName=$d;function fC(e){return e!==null}var mC=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[l,u]=Yd(n),d={start:"0%",center:"50%",end:"100%"}[u],f=(o.arrow?.x??0)+i/2,m=(o.arrow?.y??0)+c/2;let y="",p="";return l==="bottom"?(y=a?d:`${f}px`,p=`${-c}px`):l==="top"?(y=a?d:`${f}px`,p=`${r.floating.height+c}px`):l==="right"?(y=`${-c}px`,p=a?d:`${m}px`):l==="left"&&(y=`${r.floating.width+c}px`,p=a?d:`${m}px`),{data:{x:y,y:p}}}});function Yd(e){const[t,n="center"]=e.split("-");return[t,n]}var hC=Fd,pC=Wd,gC=Bd,bC=zd,yC=Symbol("radix.slottable");function vC(e){const t=({children:n})=>h.jsx(h.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=yC,t}var xC=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),wC="VisuallyHidden",Hd=g.forwardRef((e,t)=>h.jsx(he.span,{...e,ref:t,style:{...xC,...e.style}}));Hd.displayName=wC;var CC=Hd,[Br]=wt("Tooltip",[Id]),$r=Id(),Gd="TooltipProvider",kC=700,$o="tooltip.open",[SC,Bs]=Br(Gd),Ud=e=>{const{__scopeTooltip:t,delayDuration:n=kC,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,a=g.useRef(!0),i=g.useRef(!1),c=g.useRef(0);return g.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),h.jsx(SC,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:g.useCallback(l=>{i.current=l},[]),disableHoverableContent:o,children:s})};Ud.displayName=Gd;var An="Tooltip",[DC,Gn]=Br(An),qd=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:i}=e,c=Bs(An,e.__scopeTooltip),l=$r(t),[u,d]=g.useState(null),f=Sn(),m=g.useRef(0),y=a??c.disableHoverableContent,p=i??c.delayDuration,b=g.useRef(!1),[v,C]=zn({prop:r,defaultProp:o??!1,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent($o))):c.onClose(),s?.(E)},caller:An}),x=g.useMemo(()=>v?b.current?"delayed-open":"instant-open":"closed",[v]),k=g.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b.current=!1,C(!0)},[C]),S=g.useCallback(()=>{window.clearTimeout(m.current),m.current=0,C(!1)},[C]),T=g.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{b.current=!0,C(!0),m.current=0},p)},[p,C]);return g.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),h.jsx(hC,{...l,children:h.jsx(DC,{scope:t,contentId:f,open:v,stateAttribute:x,trigger:u,onTriggerChange:d,onTriggerEnter:g.useCallback(()=>{c.isOpenDelayedRef.current?T():k()},[c.isOpenDelayedRef,T,k]),onTriggerLeave:g.useCallback(()=>{y?S():(window.clearTimeout(m.current),m.current=0)},[S,y]),onOpen:k,onClose:S,disableHoverableContent:y,children:n})})};qd.displayName=An;var zo="TooltipTrigger",Kd=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Gn(zo,n),s=Bs(zo,n),a=$r(n),i=g.useRef(null),c=xe(t,i,o.onTriggerChange),l=g.useRef(!1),u=g.useRef(!1),d=g.useCallback(()=>l.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),h.jsx(pC,{asChild:!0,...a,children:h.jsx(he.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:ue(e.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:ue(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:ue(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:ue(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:ue(e.onBlur,o.onClose),onClick:ue(e.onClick,o.onClose)})})});Kd.displayName=zo;var $s="TooltipPortal",[TC,EC]=Br($s,{forceMount:void 0}),Xd=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Gn($s,t);return h.jsx(TC,{scope:t,forceMount:n,children:h.jsx(_t,{present:n||s.open,children:h.jsx(Ss,{asChild:!0,container:o,children:r})})})};Xd.displayName=$s;var Jt="TooltipContent",Zd=g.forwardRef((e,t)=>{const n=EC(Jt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,a=Gn(Jt,e.__scopeTooltip);return h.jsx(_t,{present:r||a.open,children:a.disableHoverableContent?h.jsx(Qd,{side:o,...s,ref:t}):h.jsx(PC,{side:o,...s,ref:t})})}),PC=g.forwardRef((e,t)=>{const n=Gn(Jt,e.__scopeTooltip),r=Bs(Jt,e.__scopeTooltip),o=g.useRef(null),s=xe(t,o),[a,i]=g.useState(null),{trigger:c,onClose:l}=n,u=o.current,{onPointerInTransitChange:d}=r,f=g.useCallback(()=>{i(null),d(!1)},[d]),m=g.useCallback((y,p)=>{const b=y.currentTarget,v={x:y.clientX,y:y.clientY},C=AC(v,b.getBoundingClientRect()),x=OC(v,C),k=jC(p.getBoundingClientRect()),S=IC([...x,...k]);i(S),d(!0)},[d]);return g.useEffect(()=>()=>f(),[f]),g.useEffect(()=>{if(c&&u){const y=b=>m(b,u),p=b=>m(b,c);return c.addEventListener("pointerleave",y),u.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",y),u.removeEventListener("pointerleave",p)}}},[c,u,m,f]),g.useEffect(()=>{if(a){const y=p=>{const b=p.target,v={x:p.clientX,y:p.clientY},C=c?.contains(b)||u?.contains(b),x=!_C(v,a);C?f():x&&(f(),l())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,u,a,l,f]),h.jsx(Qd,{...e,ref:s})}),[MC,RC]=Br(An,{isInside:!1}),NC=vC("TooltipContent"),Qd=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=e,c=Gn(Jt,n),l=$r(n),{onClose:u}=c;return g.useEffect(()=>(document.addEventListener($o,u),()=>document.removeEventListener($o,u)),[u]),g.useEffect(()=>{if(c.trigger){const d=f=>{f.target?.contains(c.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,u]),h.jsx(ks,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:h.jsxs(gC,{"data-state":c.stateAttribute,...l,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[h.jsx(NC,{children:r}),h.jsx(MC,{scope:n,isInside:!0,children:h.jsx(CC,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Zd.displayName=Jt;var Jd="TooltipArrow",ef=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=$r(n);return RC(Jd,n).isInside?null:h.jsx(bC,{...o,...r,ref:t})});ef.displayName=Jd;function AC(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function OC(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function jC(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function _C(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],c=t[a],l=i.x,u=i.y,d=c.x,f=c.y;u>r!=f>r&&n<(d-l)*(r-u)/(f-u)+l&&(o=!o)}return o}function IC(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),VC(t)}function VC(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var FC=Ud,LC=qd,WC=Kd,BC=Xd,$C=Zd,zC=ef;const YC=te("z-50 rounded-lg border bg-[var(--atom-card-bg)] px-3 py-1.5 text-xs text-[var(--atom-text)] shadow-md data-[state=delayed-open]:animate-in data-[state=closed]:animate-out data-[state=delayed-open]:fade-in data-[state=closed]:fade-out data-[side=top]:slide-in-from-bottom-1 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1",{variants:{variant:{soft:"bg-[color-mix(in_srgb,var(--atom-muted)_40%,var(--atom-card-bg))] text-[var(--atom-text)] border-[var(--atom-border)]",solid:"bg-[var(--atom-primary)] text-[var(--atom-primary-contrast)] border-transparent",outline:"bg-transparent text-[var(--atom-text)] border-[var(--atom-border)]",default:"bg-[var(--atom-theme-surface-secondary)] text-white border-none"},size:{sm:"px-2 py-1 text-[11px]",md:"px-3 py-1.5 text-xs",lg:"px-4 py-2 text-sm"},showArrow:{true:"",false:""}},defaultVariants:{variant:"default",size:"md",showArrow:!1}});function tf({children:e,content:t,variant:n,size:r,showArrow:o,className:s,side:a="right",align:i="center",sideOffset:c=6,...l}){const u=_r();return h.jsx(FC,{delayDuration:200,children:h.jsxs(LC,{children:[h.jsx(WC,{asChild:!0,children:e}),h.jsx(BC,{container:u||void 0,children:h.jsxs($C,{side:a,align:i,sideOffset:c,className:R(YC({variant:n,size:r,showArrow:o}),s),...l,children:[t,o&&h.jsx(zC,{className:"fill-(--atom-primary) stroke-(--atom-primary)",width:12,height:6})]})})]})})}tf.displayName="Tooltip";const ki=te(["flex w-full rounded-md border px-3 py-2","text-base md:text-sm","outline-none disabled:cursor-not-allowed disabled:opacity-50","border-[var(--atom-theme-border-primary)]","placeholder:text-muted-foreground","hover:bg-[color-mix(in_srgb,var(--atom-theme-border-primary)_6%,transparent)]","hover:border-[color-mix(in_srgb,var(--atom-theme-border-primary)_25%,transparent)]","focus-visible:border-[var(--atom-theme-border-primary)]","focus-visible:ring-1 focus-visible:ring-[color-mix(in_srgb,var(--atom-theme-border-primary)_35%,transparent)]","focus-visible:ring-offset-0","aria-[invalid=true]:border-destructive","aria-[invalid=true]:ring-2 aria-[invalid=true]:ring-destructive/20","dark:aria-[invalid=true]:ring-destructive/40","dark:bg-input/30","transition-[background-color,border-color,box-shadow,color]","placeholder:text-muted-foreground","placeholder-shown:border-[var(--atom-theme-border-primary)]","[&:not(:placeholder-shown)]:border-[color-mix(in_srgb,var(--atom-theme-border-primary)_70%,var(--atom-primary))]","focus-visible:border-[var(--atom-primary)]","[&::-webkit-inner-spin-button]:appearance-none","[&::-webkit-outer-spin-button]:appearance-none","[&::-webkit-inner-spin-button]:m-0","[&::-webkit-outer-spin-button]:m-0"].join(" "),{variants:{variant:{numeric:"",alphanumeric:"",alpha:""},size:{sm:"h-9 px-2 py-1 text-xs w-38",md:"h-10 px-3 py-2 text-sm w-40",lg:"h-12 px-4 py-3 text-base w-48"}},defaultVariants:{variant:"numeric",size:"md"}}),bo=(e,t=3)=>{if(!e||e===""||e==="-")return e;const n=e.split(".");if(n.length===1)return e;const r=n[0],s=n[1].slice(0,t);return`${r}.${s}`},HC=e=>{if(!e)return"A";const t=e.match(/^([A-Za-z]+)$/);if(!t)return e;const r=t[1].toUpperCase().split("");let o=!0;for(let s=r.length-1;s>=0&&o;s--){const a=r[s].charCodeAt(0);a===90?r[s]="A":(r[s]=String.fromCharCode(a+1),o=!1)}return o&&r.unshift("A"),r.join("")},GC=e=>{if(!e)return"A";const t=e.match(/^([A-Za-z]+)$/);if(!t)return e;const r=t[1].toUpperCase().split("");let o=!0;for(let s=r.length-1;s>=0&&o;s--){const a=r[s].charCodeAt(0);a===65?r[s]="Z":(r[s]=String.fromCharCode(a-1),o=!1)}return o&&r.length>1&&r.shift(),r.join("")},UC=e=>{if(!e)return"A";const t=e.match(/^([A-Za-z]+)(\d*)$/);if(!t)return e;const n=t[1].toUpperCase(),r=t[2],o=n.split("");let s=!0;for(let a=o.length-1;a>=0&&s;a--){const i=o[a].charCodeAt(0);i===90?o[a]="A":(o[a]=String.fromCharCode(i+1),s=!1)}return s&&o.unshift("A"),o.join("")+r},qC=e=>{if(!e)return"A";const t=e.match(/^([A-Za-z]+)(\d*)$/);if(!t)return e;const n=t[1].toUpperCase(),r=t[2],o=n.split("");let s=!0;for(let a=o.length-1;a>=0&&s;a--){const i=o[a].charCodeAt(0);i===65?o[a]="Z":(o[a]=String.fromCharCode(i-1),s=!1)}return s&&o.length>1&&o.shift(),o.join("")+r},nf=g.forwardRef(({className:e,variant:t="numeric",size:n="md",value:r,onChange:o,min:s,max:a,step:i=1,placeholder:c,disabled:l=!1,showSpinners:u=!1,decimalPlaces:d=3,...f},m)=>{const y=g.useCallback(()=>{if(l)return;const k=String(r??"");if(t==="numeric"){const T=(parseFloat(k)||0)+i,E=a!==void 0?Math.min(T,a):T,D=bo(String(E),d);o?.(D)}else if(t==="alphanumeric"){const S=UC(k);o?.(S)}else if(t==="alpha"){const S=HC(k);o?.(S)}},[l,r,t,i,a,d,o]),p=g.useCallback(()=>{if(l)return;const k=String(r??"");if(t==="numeric"){const T=(parseFloat(k)||0)-i,E=s!==void 0?Math.max(T,s):T,D=bo(String(E),d);o?.(D)}else if(t==="alphanumeric"){const S=qC(k);o?.(S)}else if(t==="alpha"){const S=GC(k);o?.(S)}},[l,r,t,i,s,d,o]),b=g.useCallback(k=>{l||(k.key==="ArrowUp"?(k.preventDefault(),y()):k.key==="ArrowDown"&&(k.preventDefault(),p()),f.onKeyDown?.(k))},[l,y,p,f]),v=g.useCallback(k=>{const S=k.target.value;if(t==="numeric"){if(S===""||/^-?\d*\.?\d*$/.test(S)){const T=bo(S,d);o?.(T)}}else t==="alphanumeric"?(S===""||/^[A-Za-z0-9]*$/.test(S))&&o?.(S.toUpperCase()):t==="alpha"&&(S===""||/^[A-Za-z]*$/.test(S))&&o?.(S.toUpperCase())},[t,d,o]),C=g.useMemo(()=>{switch(n){case"sm":return{iconSize:14,spinnerWidth:"w-[20px]",inputPadding:"pr-[22px]"};case"lg":return{iconSize:18,spinnerWidth:"w-[28px]",inputPadding:"pr-[30px]"};default:return{iconSize:16,spinnerWidth:"w-[24px]",inputPadding:"pr-[26px]"}}},[n]),x=g.useMemo(()=>t==="numeric"?"numeric":"text",[t]);return u?h.jsxs("div",{className:"relative w-full",children:[h.jsx("input",{ref:m,type:"text",inputMode:x,"data-slot":"number-input","data-variant":t,value:r??"",onChange:v,onKeyDown:b,placeholder:c??" ",disabled:l,"aria-valuemin":s,"aria-valuemax":a,role:"spinbutton",className:R(ki({variant:t,size:n}),C.inputPadding,e),...f}),h.jsxs("div",{className:R("absolute top-px right-px bottom-px flex flex-col","border-l border-(--atom-theme-border-primary)","rounded-r-[calc(0.375rem-1px)] overflow-hidden",C.spinnerWidth),role:"group","aria-label":"Increment and decrement controls",children:[h.jsx("button",{type:"button",onClick:y,disabled:l||a!==void 0&&Number(r)>=a,"aria-label":"Increment value",tabIndex:-1,className:R("flex items-center justify-center flex-1","hover:bg-[color-mix(in_srgb,var(--atom-theme-border-primary)_10%,transparent)]","active:bg-[color-mix(in_srgb,var(--atom-theme-border-primary)_20%,transparent)]","disabled:opacity-50 disabled:cursor-not-allowed","transition-colors border-b border-(--atom-theme-border-primary)","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-(--atom-primary) focus-visible:ring-inset","cursor-pointer"),children:h.jsx(Vy,{size:C.iconSize,className:"text-muted-foreground",strokeWidth:2,"aria-hidden":"true"})}),h.jsx("button",{type:"button",onClick:p,disabled:l||s!==void 0&&Number(r)<=s,"aria-label":"Decrement value",tabIndex:-1,className:R("flex items-center justify-center flex-1","hover:bg-[color-mix(in_srgb,var(--atom-theme-border-primary)_10%,transparent)]","active:bg-[color-mix(in_srgb,var(--atom-theme-border-primary)_20%,transparent)]","disabled:opacity-50 disabled:cursor-not-allowed","transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-(--atom-primary) focus-visible:ring-inset","cursor-pointer"),children:h.jsx(Fl,{size:C.iconSize,className:"text-muted-foreground",strokeWidth:2,"aria-hidden":"true"})})]})]}):h.jsx("input",{ref:m,type:"text",inputMode:x,"data-slot":"number-input","data-variant":t,value:r??"",onChange:v,onKeyDown:b,placeholder:c??" ",disabled:l,"aria-valuemin":s,"aria-valuemax":a,className:R(ki({variant:t,size:n}),e),...f})});nf.displayName="NumberInput";const zs=w.createContext({});function Ys(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const Hs=typeof window<"u",rf=Hs?w.useLayoutEffect:w.useEffect,zr=w.createContext(null);function Gs(e,t){e.indexOf(t)===-1&&e.push(t)}function Us(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const et=(e,t,n)=>n>t?t:n<e?e:n;function Yo(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ln=()=>{},ct=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(ln=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Yo(t,n))},ct=(e,t,n)=>{if(!e)throw new Error(Yo(t,n))});const lt={},of=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function sf(e){return typeof e=="object"&&e!==null}const af=e=>/^0[^.\s]+$/u.test(e);function qs(e){let t;return()=>(t===void 0&&(t=e()),t)}const Fe=e=>e,KC=(e,t)=>n=>t(e(n)),Un=(...e)=>e.reduce(KC),On=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Ks{constructor(){this.subscriptions=[]}add(t){return Gs(this.subscriptions,t),()=>Us(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const a=this.subscriptions[s];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ze=e=>e*1e3,Ve=e=>e/1e3;function cf(e,t){return t?e*(1e3/t):0}const Si=new Set;function Xs(e,t,n){e||Si.has(t)||(console.warn(Yo(t,n)),Si.add(t))}const lf=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,XC=1e-7,ZC=12;function QC(e,t,n,r,o){let s,a,i=0;do a=t+(n-t)/2,s=lf(a,r,o)-e,s>0?n=a:t=a;while(Math.abs(s)>XC&&++i<ZC);return a}function qn(e,t,n,r){if(e===t&&n===r)return Fe;const o=s=>QC(s,0,1,e,n);return s=>s===0||s===1?s:lf(o(s),t,r)}const uf=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,df=e=>t=>1-e(1-t),ff=qn(.33,1.53,.69,.99),Zs=df(ff),mf=uf(Zs),hf=e=>(e*=2)<1?.5*Zs(e):.5*(2-Math.pow(2,-10*(e-1))),Qs=e=>1-Math.sin(Math.acos(e)),pf=df(Qs),gf=uf(Qs),JC=qn(.42,0,1,1),ek=qn(0,0,.58,1),bf=qn(.42,0,.58,1),tk=e=>Array.isArray(e)&&typeof e[0]!="number",yf=e=>Array.isArray(e)&&typeof e[0]=="number",Di={linear:Fe,easeIn:JC,easeInOut:bf,easeOut:ek,circIn:Qs,circInOut:gf,circOut:pf,backIn:Zs,backInOut:mf,backOut:ff,anticipate:hf},nk=e=>typeof e=="string",Ti=e=>{if(yf(e)){ct(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return qn(t,n,r,o)}else if(nk(e))return ct(Di[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Di[e];return e},ir=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function rk(e,t){let n=new Set,r=new Set,o=!1,s=!1;const a=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function c(u){a.has(u)&&(l.schedule(u),e()),u(i)}const l={schedule:(u,d=!1,f=!1)=>{const y=f&&o?n:r;return d&&a.add(u),y.has(u)||y.add(u),u},cancel:u=>{r.delete(u),a.delete(u)},process:u=>{if(i=u,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),n.clear(),o=!1,s&&(s=!1,l.process(u))}};return l}const ok=40;function vf(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=ir.reduce((x,k)=>(x[k]=rk(s),x),{}),{setup:i,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:m,postRender:y}=a,p=()=>{const x=lt.useManualTiming?o.timestamp:performance.now();n=!1,lt.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,ok),1)),o.timestamp=x,o.isProcessing=!0,i.process(o),c.process(o),l.process(o),u.process(o),d.process(o),f.process(o),m.process(o),y.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(p))},b=()=>{n=!0,r=!0,o.isProcessing||e(p)};return{schedule:ir.reduce((x,k)=>{const S=a[k];return x[k]=(T,E=!1,D=!1)=>(n||b(),S.schedule(T,E,D)),x},{}),cancel:x=>{for(let k=0;k<ir.length;k++)a[ir[k]].cancel(x)},state:o,steps:a}}const{schedule:le,cancel:vt,state:ke,steps:yo}=vf(typeof requestAnimationFrame<"u"?requestAnimationFrame:Fe,!0);let hr;function sk(){hr=void 0}const Te={now:()=>(hr===void 0&&Te.set(ke.isProcessing||lt.useManualTiming?ke.timestamp:performance.now()),hr),set:e=>{hr=e,queueMicrotask(sk)}},xf=e=>t=>typeof t=="string"&&t.startsWith(e),wf=xf("--"),ak=xf("var(--"),Js=e=>ak(e)?ik.test(e.split("/*")[0].trim()):!1,ik=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ei(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const un={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},jn={...un,transform:e=>et(0,1,e)},cr={...un,default:1},Dn=e=>Math.round(e*1e5)/1e5,ea=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ck(e){return e==null}const lk=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ta=(e,t)=>n=>!!(typeof n=="string"&&lk.test(n)&&n.startsWith(e)||t&&!ck(n)&&Object.prototype.hasOwnProperty.call(n,t)),Cf=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,a,i]=r.match(ea);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(a),alpha:i!==void 0?parseFloat(i):1}},uk=e=>et(0,255,e),vo={...un,transform:e=>Math.round(uk(e))},Mt={test:ta("rgb","red"),parse:Cf("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+vo.transform(e)+", "+vo.transform(t)+", "+vo.transform(n)+", "+Dn(jn.transform(r))+")"};function dk(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Ho={test:ta("#"),parse:dk,transform:Mt.transform},Kn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),mt=Kn("deg"),Qe=Kn("%"),I=Kn("px"),fk=Kn("vh"),mk=Kn("vw"),Pi={...Qe,parse:e=>Qe.parse(e)/100,transform:e=>Qe.transform(e*100)},zt={test:ta("hsl","hue"),parse:Cf("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Qe.transform(Dn(t))+", "+Qe.transform(Dn(n))+", "+Dn(jn.transform(r))+")"},pe={test:e=>Mt.test(e)||Ho.test(e)||zt.test(e),parse:e=>Mt.test(e)?Mt.parse(e):zt.test(e)?zt.parse(e):Ho.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Mt.transform(e):zt.transform(e),getAnimatableNone:e=>{const t=pe.parse(e);return t.alpha=0,pe.transform(t)}},hk=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function pk(e){return isNaN(e)&&typeof e=="string"&&(e.match(ea)?.length||0)+(e.match(hk)?.length||0)>0}const kf="number",Sf="color",gk="var",bk="var(",Mi="${}",yk=/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 _n(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const i=t.replace(yk,c=>(pe.test(c)?(r.color.push(s),o.push(Sf),n.push(pe.parse(c))):c.startsWith(bk)?(r.var.push(s),o.push(gk),n.push(c)):(r.number.push(s),o.push(kf),n.push(parseFloat(c))),++s,Mi)).split(Mi);return{values:n,split:i,indexes:r,types:o}}function Df(e){return _n(e).values}function Tf(e){const{split:t,types:n}=_n(e),r=t.length;return o=>{let s="";for(let a=0;a<r;a++)if(s+=t[a],o[a]!==void 0){const i=n[a];i===kf?s+=Dn(o[a]):i===Sf?s+=pe.transform(o[a]):s+=o[a]}return s}}const vk=e=>typeof e=="number"?0:pe.test(e)?pe.getAnimatableNone(e):e;function xk(e){const t=Df(e);return Tf(e)(t.map(vk))}const xt={test:pk,parse:Df,createTransformer:Tf,getAnimatableNone:xk};function xo(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 wk({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,a=0;if(!t)o=s=a=n;else{const i=n<.5?n*(1+t):n+t-n*t,c=2*n-i;o=xo(c,i,e+1/3),s=xo(c,i,e),a=xo(c,i,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:r}}function Dr(e,t){return n=>n>0?t:e}const me=(e,t,n)=>e+(t-e)*n,wo=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Ck=[Ho,Mt,zt],kk=e=>Ck.find(t=>t.test(e));function Ri(e){const t=kk(e);if(ln(!!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===zt&&(n=wk(n)),n}const Ni=(e,t)=>{const n=Ri(e),r=Ri(t);if(!n||!r)return Dr(e,t);const o={...n};return s=>(o.red=wo(n.red,r.red,s),o.green=wo(n.green,r.green,s),o.blue=wo(n.blue,r.blue,s),o.alpha=me(n.alpha,r.alpha,s),Mt.transform(o))},Go=new Set(["none","hidden"]);function Sk(e,t){return Go.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Dk(e,t){return n=>me(e,t,n)}function na(e){return typeof e=="number"?Dk:typeof e=="string"?Js(e)?Dr:pe.test(e)?Ni:Pk:Array.isArray(e)?Ef:typeof e=="object"?pe.test(e)?Ni:Tk:Dr}function Ef(e,t){const n=[...e],r=n.length,o=e.map((s,a)=>na(s)(s,t[a]));return s=>{for(let a=0;a<r;a++)n[a]=o[a](s);return n}}function Tk(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=na(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function Ek(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],a=e.indexes[s][r[s]],i=e.values[a]??0;n[o]=i,r[s]++}return n}const Pk=(e,t)=>{const n=xt.createTransformer(t),r=_n(e),o=_n(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Go.has(e)&&!o.values.length||Go.has(t)&&!r.values.length?Sk(e,t):Un(Ef(Ek(r,o),o.values),n):(ln(!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"),Dr(e,t))};function Pf(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?me(e,t,n):na(e)(e,t)}const Mk=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>le.update(t,n),stop:()=>vt(t),now:()=>ke.isProcessing?ke.timestamp:Te.now()}},Mf=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=Math.round(e(s/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Tr=2e4;function ra(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Tr;)t+=n,r=e.next(t);return t>=Tr?1/0:t}function Rk(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(ra(r),Tr);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:Ve(o)}}const Nk=5;function Rf(e,t,n){const r=Math.max(t-Nk,0);return cf(n-e(r),t-r)}const de={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},Co=.001;function Ak({duration:e=de.duration,bounce:t=de.bounce,velocity:n=de.velocity,mass:r=de.mass}){let o,s;ln(e<=Ze(de.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=et(de.minDamping,de.maxDamping,a),e=et(de.minDuration,de.maxDuration,Ve(e)),a<1?(o=l=>{const u=l*a,d=u*e,f=u-n,m=Uo(l,a),y=Math.exp(-d);return Co-f/m*y},s=l=>{const d=l*a*e,f=d*n+n,m=Math.pow(a,2)*Math.pow(l,2)*e,y=Math.exp(-d),p=Uo(Math.pow(l,2),a);return(-o(l)+Co>0?-1:1)*((f-m)*y)/p}):(o=l=>{const u=Math.exp(-l*e),d=(l-n)*e+1;return-Co+u*d},s=l=>{const u=Math.exp(-l*e),d=(n-l)*(e*e);return u*d});const i=5/e,c=jk(o,s,i);if(e=Ze(e),isNaN(c))return{stiffness:de.stiffness,damping:de.damping,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:a*2*Math.sqrt(r*l),duration:e}}}const Ok=12;function jk(e,t,n){let r=n;for(let o=1;o<Ok;o++)r=r-e(r)/t(r);return r}function Uo(e,t){return e*Math.sqrt(1-t*t)}const _k=["duration","bounce"],Ik=["stiffness","damping","mass"];function Ai(e,t){return t.some(n=>e[n]!==void 0)}function Vk(e){let t={velocity:de.velocity,stiffness:de.stiffness,damping:de.damping,mass:de.mass,isResolvedFromDuration:!1,...e};if(!Ai(e,Ik)&&Ai(e,_k))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*et(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:de.mass,stiffness:o,damping:s}}else{const n=Ak(e);t={...t,...n,mass:de.mass},t.isResolvedFromDuration=!0}return t}function Er(e=de.visualDuration,t=de.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],i={done:!1,value:s},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:m}=Vk({...n,velocity:-Ve(n.velocity||0)}),y=f||0,p=l/(2*Math.sqrt(c*u)),b=a-s,v=Ve(Math.sqrt(c/u)),C=Math.abs(b)<5;r||(r=C?de.restSpeed.granular:de.restSpeed.default),o||(o=C?de.restDelta.granular:de.restDelta.default);let x;if(p<1){const S=Uo(v,p);x=T=>{const E=Math.exp(-p*v*T);return a-E*((y+p*v*b)/S*Math.sin(S*T)+b*Math.cos(S*T))}}else if(p===1)x=S=>a-Math.exp(-v*S)*(b+(y+v*b)*S);else{const S=v*Math.sqrt(p*p-1);x=T=>{const E=Math.exp(-p*v*T),D=Math.min(S*T,300);return a-E*((y+p*v*b)*Math.sinh(D)+S*b*Math.cosh(D))/S}}const k={calculatedDuration:m&&d||null,next:S=>{const T=x(S);if(m)i.done=S>=d;else{let E=S===0?y:0;p<1&&(E=S===0?Ze(y):Rf(x,S,T));const D=Math.abs(E)<=r,N=Math.abs(a-T)<=o;i.done=D&&N}return i.value=i.done?a:T,i},toString:()=>{const S=Math.min(ra(k),Tr),T=Mf(E=>k.next(S*E).value,S,30);return S+"ms "+T},toTransition:()=>{}};return k}Er.applyToOptions=e=>{const t=Rk(e,100,Er);return e.ease=t.ease,e.duration=Ze(t.duration),e.type="keyframes",e};function qo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:a,min:i,max:c,restDelta:l=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},m=D=>i!==void 0&&D<i||c!==void 0&&D>c,y=D=>i===void 0?c:c===void 0||Math.abs(i-D)<Math.abs(c-D)?i:c;let p=n*t;const b=d+p,v=a===void 0?b:a(b);v!==b&&(p=v-d);const C=D=>-p*Math.exp(-D/r),x=D=>v+C(D),k=D=>{const N=C(D),M=x(D);f.done=Math.abs(N)<=l,f.value=f.done?v:M};let S,T;const E=D=>{m(f.value)&&(S=D,T=Er({keyframes:[f.value,y(f.value)],velocity:Rf(x,D,f.value),damping:o,stiffness:s,restDelta:l,restSpeed:u}))};return E(0),{calculatedDuration:null,next:D=>{let N=!1;return!T&&S===void 0&&(N=!0,k(D),E(D)),S!==void 0&&D>=S?T.next(D-S):(!N&&k(D),f)}}}function Fk(e,t,n){const r=[],o=n||lt.mix||Pf,s=e.length-1;for(let a=0;a<s;a++){let i=o(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||Fe:t;i=Un(c,i)}r.push(i)}return r}function Lk(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(ct(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=Fk(t,r,o),c=i.length,l=u=>{if(a&&u<e[0])return t[0];let d=0;if(c>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=On(e[d],e[d+1],u);return i[d](f)};return n?u=>l(et(e[0],e[s-1],u)):l}function Wk(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=On(0,t,r);e.push(me(n,1,o))}}function Bk(e){const t=[0];return Wk(t,e.length-1),t}function $k(e,t){return e.map(n=>n*t)}function zk(e,t){return e.map(()=>t||bf).splice(0,e.length-1)}function Yt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=tk(r)?r.map(Ti):Ti(r),s={done:!1,value:t[0]},a=$k(n&&n.length===t.length?n:Bk(t),e),i=Lk(a,t,{ease:Array.isArray(o)?o:zk(t,o)});return{calculatedDuration:e,next:c=>(s.value=i(c),s.done=c>=e,s)}}const Yk=e=>e!==null;function oa(e,{repeat:t,repeatType:n="loop"},r,o=1){const s=e.filter(Yk),i=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}const Hk={decay:qo,inertia:qo,tween:Yt,keyframes:Yt,spring:Er};function Nf(e){typeof e.type=="string"&&(e.type=Hk[e.type])}class sa{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 Gk=e=>e/100;class aa extends sa{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!==Te.now()&&this.tick(Te.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;Nf(t);const{type:n=Yt,repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:a=0}=t;let{keyframes:i}=t;const c=n||Yt;process.env.NODE_ENV!=="production"&&c!==Yt&&ct(i.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${i}`,"spring-two-frames"),c!==Yt&&typeof i[0]!="number"&&(this.mixKeyframes=Un(Gk,Pf(i[0],i[1])),i=[0,100]);const l=c({...t,keyframes:i});s==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...i].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=ra(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=l}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:r,totalDuration:o,mixKeyframes:s,mirroredGenerator:a,resolvedDuration:i,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:m,type:y,onUpdate:p,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-l*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,k=r;if(d){const D=Math.min(this.currentTime,o)/i;let N=Math.floor(D),M=D%1;!M&&D>=1&&(M=1),M===1&&N--,N=Math.min(N,d+1),!!(N%2)&&(f==="reverse"?(M=1-M,m&&(M-=m/i)):f==="mirror"&&(k=a)),x=et(0,1,M)*i}const S=C?{done:!1,value:u[0]}:k.next(x);s&&(S.value=s(S.value));let{done:T}=S;!C&&c!==null&&(T=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return E&&y!==qo&&(S.value=oa(u,this.options,b,this.speed)),p&&p(S.value),E&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return Ve(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ve(t)}get time(){return Ve(this.currentTime)}set time(t){t=Ze(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(Te.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ve(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Mk,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),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(Te.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 Uk(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Rt=e=>e*180/Math.PI,Ko=e=>{const t=Rt(Math.atan2(e[1],e[0]));return Xo(t)},qk={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ko,rotateZ:Ko,skewX:e=>Rt(Math.atan(e[1])),skewY:e=>Rt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Xo=e=>(e=e%360,e<0&&(e+=360),e),Oi=Ko,ji=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),_i=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Kk={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ji,scaleY:_i,scale:e=>(ji(e)+_i(e))/2,rotateX:e=>Xo(Rt(Math.atan2(e[6],e[5]))),rotateY:e=>Xo(Rt(Math.atan2(-e[2],e[0]))),rotateZ:Oi,rotate:Oi,skewX:e=>Rt(Math.atan(e[4])),skewY:e=>Rt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Zo(e){return e.includes("scale")?1:0}function Qo(e,t){if(!e||e==="none")return Zo(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=Kk,o=n;else{const i=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=qk,o=i}if(!o)return Zo(t);const s=r[t],a=o[1].split(",").map(Zk);return typeof s=="function"?s(a):a[s]}const Xk=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Qo(n,t)};function Zk(e){return parseFloat(e.trim())}const dn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],fn=new Set(dn),Ii=e=>e===un||e===I,Qk=new Set(["x","y","z"]),Jk=dn.filter(e=>!Qk.has(e));function eS(e){const t=[];return Jk.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ht={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")};ht.translateX=ht.x;ht.translateY=ht.y;const Nt=new Set;let Jo=!1,es=!1,ts=!1;function Af(){if(es){const e=Array.from(Nt).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=eS(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,a])=>{r.getValue(s)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}es=!1,Jo=!1,Nt.forEach(e=>e.complete(ts)),Nt.clear()}function Of(){Nt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(es=!0)})}function tS(){ts=!0,Of(),Af(),ts=!1}class ia{constructor(t,n,r,o,s,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Nt.add(this),Jo||(Jo=!0,le.read(Of),le.resolveKeyframes(Af))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const s=o?.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const i=r.readValue(n,a);i!=null&&(t[0]=i)}t[0]===void 0&&(t[0]=a),o&&s===void 0&&o.set(t[0])}Uk(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Nt.delete(this)}cancel(){this.state==="scheduled"&&(Nt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const nS=e=>e.startsWith("--");function rS(e,t,n){nS(t)?e.style.setProperty(t,n):e.style[t]=n}const oS=qs(()=>window.ScrollTimeline!==void 0),sS={};function aS(e,t){const n=qs(e);return()=>sS[t]??n()}const jf=aS(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Cn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Vi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Cn([0,.65,.55,1]),circOut:Cn([.55,0,1,.45]),backIn:Cn([.31,.01,.66,-.59]),backOut:Cn([.33,1.53,.69,.99])};function _f(e,t){if(e)return typeof e=="function"?jf()?Mf(e,t):"ease-out":yf(e)?Cn(e):Array.isArray(e)?e.map(n=>_f(n,t)||Vi.easeOut):Vi[e]}function iS(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:a="loop",ease:i="easeOut",times:c}={},l=void 0){const u={[t]:n};c&&(u.offset=c);const d=_f(i,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"};return l&&(f.pseudoElement=l),e.animate(u,f)}function If(e){return typeof e=="function"&&"applyToOptions"in e}function cS({type:e,...t}){return If(e)&&jf()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class lS extends sa{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:s,allowFlatten:a=!1,finalKeyframe:i,onComplete:c}=t;this.isPseudoElement=!!s,this.allowFlatten=a,this.options=t,ct(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const l=cS(t);this.animation=iS(n,r,o,l,s),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const u=oa(o,this.options,i,this.speed);this.updateMotionValue?this.updateMotionValue(u):rS(n,r,u),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,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 Ve(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ve(t)}get time(){return Ve(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ze(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 this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&oS()?(this.animation.timeline=t,Fe):n(this)}}const Vf={anticipate:hf,backInOut:mf,circInOut:gf};function uS(e){return e in Vf}function dS(e){typeof e.ease=="string"&&uS(e.ease)&&(e.ease=Vf[e.ease])}const ko=10;class fS extends lS{constructor(t){dS(t),Nf(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:s,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const i=new aa({...a,autoplay:!1}),c=Math.max(ko,Te.now()-this.startTime),l=et(0,ko,c-ko);n.setWithVelocity(i.sample(Math.max(0,c-l)).value,i.sample(c).value,l),i.stop()}}const Fi=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(xt.test(e)||e==="0")&&!e.startsWith("url("));function mS(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 hS(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],a=Fi(o,t),i=Fi(s,t);return ln(a===i,`You are trying to animate ${t} from "${o}" to "${s}". "${a?s:o}" is not an animatable value.`,"value-not-animatable"),!a||!i?!1:mS(e)||(n==="spring"||If(n))&&r}function ns(e){e.duration=0,e.type="keyframes"}const pS=new Set(["opacity","clipPath","filter","transform"]),gS=qs(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function bS(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:s,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=t.owner.getProps();return gS()&&n&&pS.has(n)&&(n!=="transform"||!l)&&!c&&!r&&o!=="mirror"&&s!==0&&a!=="inertia"}const yS=40;class vS extends sa{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",keyframes:i,name:c,motionValue:l,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Te.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:a,name:c,motionValue:l,element:u,...d},m=u?.KeyframeResolver||ia;this.keyframeResolver=new m(i,(y,p,b)=>this.onKeyframesResolved(y,p,f,!b),c,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:s,type:a,velocity:i,delay:c,isHandoff:l,onUpdate:u}=r;this.resolvedAt=Te.now(),hS(t,s,a,i)||((lt.instantAnimations||!c)&&u?.(oa(t,r,n)),t[0]=t[t.length-1],ns(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>yS?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},m=!l&&bS(f)?new fS({...f,element:f.motionValue.owner.current}):new aa(f);m.finished.then(()=>this.notifyFinished()).catch(Fe),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}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(),tS()),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 xS=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function wS(e){const t=xS.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const CS=4;function Ff(e,t,n=1){ct(n<=CS,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=wS(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const a=s.trim();return of(a)?parseFloat(a):a}return Js(o)?Ff(o,t,n+1):o}function ca(e,t){return e?.[t]??e?.default??e}const Lf=new Set(["width","height","top","left","right","bottom",...dn]),kS={test:e=>e==="auto",parse:e=>e},Wf=e=>t=>t.test(e),Bf=[un,I,Qe,mt,mk,fk,kS],Li=e=>Bf.find(Wf(e));function SS(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||af(e):!0}const DS=new Set(["brightness","contrast","saturate","opacity"]);function TS(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ea)||[];if(!r)return e;const o=n.replace(r,"");let s=DS.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const ES=/\b([a-z-]*)\(.*?\)/gu,rs={...xt,getAnimatableNone:e=>{const t=e.match(ES);return t?t.map(TS).join(" "):e}},Wi={...un,transform:Math.round},PS={rotate:mt,rotateX:mt,rotateY:mt,rotateZ:mt,scale:cr,scaleX:cr,scaleY:cr,scaleZ:cr,skew:mt,skewX:mt,skewY:mt,distance:I,translateX:I,translateY:I,translateZ:I,x:I,y:I,z:I,perspective:I,transformPerspective:I,opacity:jn,originX:Pi,originY:Pi,originZ:I},la={borderWidth:I,borderTopWidth:I,borderRightWidth:I,borderBottomWidth:I,borderLeftWidth:I,borderRadius:I,radius:I,borderTopLeftRadius:I,borderTopRightRadius:I,borderBottomRightRadius:I,borderBottomLeftRadius:I,width:I,maxWidth:I,height:I,maxHeight:I,top:I,right:I,bottom:I,left:I,inset:I,insetBlock:I,insetBlockStart:I,insetBlockEnd:I,insetInline:I,insetInlineStart:I,insetInlineEnd:I,padding:I,paddingTop:I,paddingRight:I,paddingBottom:I,paddingLeft:I,paddingBlock:I,paddingBlockStart:I,paddingBlockEnd:I,paddingInline:I,paddingInlineStart:I,paddingInlineEnd:I,margin:I,marginTop:I,marginRight:I,marginBottom:I,marginLeft:I,marginBlock:I,marginBlockStart:I,marginBlockEnd:I,marginInline:I,marginInlineStart:I,marginInlineEnd:I,backgroundPositionX:I,backgroundPositionY:I,...PS,zIndex:Wi,fillOpacity:jn,strokeOpacity:jn,numOctaves:Wi},MS={...la,color:pe,backgroundColor:pe,outlineColor:pe,fill:pe,stroke:pe,borderColor:pe,borderTopColor:pe,borderRightColor:pe,borderBottomColor:pe,borderLeftColor:pe,filter:rs,WebkitFilter:rs},$f=e=>MS[e];function zf(e,t){let n=$f(e);return n!==rs&&(n=xt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const RS=new Set(["auto","none","0"]);function NS(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!RS.has(s)&&_n(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=zf(n,o)}class AS extends ia{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),Js(d))){const f=Ff(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Lf.has(r)||t.length!==2)return;const[o,s]=t,a=Li(o),i=Li(s),c=Ei(o),l=Ei(s);if(c!==l&&ht[r]){this.needsMeasurement=!0;return}if(a!==i)if(Ii(a)&&Ii(i))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else ht[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||SS(t[o]))&&r.push(o);r.length&&NS(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ht[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const s=r.length-1,a=r[s];r[s]=ht[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([i,c])=>{t.getValue(i).set(c)}),this.resolveNoneKeyframes()}}function OS(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const Yf=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Hf(e){return sf(e)&&"offsetHeight"in e}const Bi=30,jS=e=>!isNaN(parseFloat(e));class _S{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=Te.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Te.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=jS(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 Ks);const r=this.events[t].add(n);return t==="change"?()=>{r(),le.read(()=>{this.events.change.getSize()||this.stop()})}:r}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,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}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=Te.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Bi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Bi);return cf(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 en(e,t){return new _S(e,t)}const{schedule:ua}=vf(queueMicrotask,!1),Be={x:!1,y:!1};function Gf(){return Be.x||Be.y}function IS(e){return e==="x"||e==="y"?Be[e]?null:(Be[e]=!0,()=>{Be[e]=!1}):Be.x||Be.y?null:(Be.x=Be.y=!0,()=>{Be.x=Be.y=!1})}function Uf(e,t){const n=OS(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function $i(e){return!(e.pointerType==="touch"||Gf())}function VS(e,t,n={}){const[r,o,s]=Uf(e,n),a=i=>{if(!$i(i))return;const{target:c}=i,l=t(c,i);if(typeof l!="function"||!c)return;const u=d=>{$i(d)&&(l(d),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,o)};return r.forEach(i=>{i.addEventListener("pointerenter",a,o)}),s}const qf=(e,t)=>t?e===t?!0:qf(e,t.parentElement):!1,da=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,FS=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Kf(e){return FS.has(e.tagName)||e.isContentEditable===!0}const pr=new WeakSet;function zi(e){return t=>{t.key==="Enter"&&e(t)}}function So(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const LS=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=zi(()=>{if(pr.has(n))return;So(n,"down");const o=zi(()=>{So(n,"up")}),s=()=>So(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Yi(e){return da(e)&&!Gf()}function WS(e,t,n={}){const[r,o,s]=Uf(e,n),a=i=>{const c=i.currentTarget;if(!Yi(i))return;pr.add(c);const l=t(c,i),u=(m,y)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),pr.has(c)&&pr.delete(c),Yi(m)&&typeof l=="function"&&l(m,{success:y})},d=m=>{u(m,c===window||c===document||n.useGlobalTarget||qf(c,m.target))},f=m=>{u(m,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(i=>{(n.useGlobalTarget?window:i).addEventListener("pointerdown",a,o),Hf(i)&&(i.addEventListener("focus",l=>LS(l,o)),!Kf(i)&&!i.hasAttribute("tabindex")&&(i.tabIndex=0))}),s}function Xf(e){return sf(e)&&"ownerSVGElement"in e}function BS(e){return Xf(e)&&e.tagName==="svg"}const De=e=>!!(e&&e.getVelocity),$S=[...Bf,pe,xt],zS=e=>$S.find(Wf(e)),fa=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Hi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function YS(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Hi(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Hi(e[o],null)}}}}function HS(...e){return g.useCallback(YS(...e),e)}class GS extends g.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=Hf(r)&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=o-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function US({children:e,isPresent:t,anchorX:n,root:r}){const o=w.useId(),s=w.useRef(null),a=w.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:i}=w.useContext(fa),c=e.props?.ref??e?.ref,l=HS(s,c);return w.useInsertionEffect(()=>{const{width:u,height:d,top:f,left:m,right:y}=a.current;if(t||!s.current||!u||!d)return;const p=n==="left"?`left: ${m}`:`right: ${y}`;s.current.dataset.motionPopId=o;const b=document.createElement("style");i&&(b.nonce=i);const v=r??document.head;return v.appendChild(b),b.sheet&&b.sheet.insertRule(`
61
61
  [data-motion-pop-id="${o}"] {
62
62
  position: absolute !important;
63
63
  width: ${u}px !important;
64
64
  height: ${d}px !important;
65
- ${h}px !important;
65
+ ${p}px !important;
66
66
  top: ${f}px !important;
67
67
  }
68
- `),()=>{v.contains(g)&&v.removeChild(g)}},[t]),p.jsx(PS,{isPresent:t,childRef:s,sizeRef:a,children:y.cloneElement(e,{ref:l})})}const AS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:a,anchorX:i,root:c})=>{const l=$s(RS),u=x.useId();let d=!0,f=x.useMemo(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:o,onExitComplete:m=>{l.set(m,!0);for(const b of l.values())if(!b)return;r&&r()},register:m=>(l.set(m,!1),()=>l.delete(m))}),[n,l,r]);return s&&d&&(f={...f}),x.useMemo(()=>{l.forEach((m,b)=>l.set(b,!1))},[n]),y.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=p.jsx(MS,{isPresent:n,anchorX:i,root:c,children:e})),p.jsx($r.Provider,{value:f,children:e})};function RS(){return new Map}function $f(e=!0){const t=x.useContext($r);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=x.useId();x.useEffect(()=>{if(e)return o(s)},[e]);const a=x.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,a]:[!0]}const ar=e=>e.key||"";function zi(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const zf=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:a=!1,anchorX:i="left",root:c})=>{const[l,u]=$f(a),d=x.useMemo(()=>zi(e),[e]),f=a&&!l?[]:d.map(ar),m=x.useRef(!0),b=x.useRef(d),h=$s(()=>new Map),g=x.useRef(new Set),[v,C]=x.useState(d),[w,S]=x.useState(d);qd(()=>{m.current=!1,b.current=d;for(let E=0;E<w.length;E++){const D=ar(w[E]);f.includes(D)?(h.delete(D),g.current.delete(D)):h.get(D)!==!0&&h.set(D,!1)}},[w,f.length,f.join("-")]);const k=[];if(d!==v){let E=[...d];for(let D=0;D<w.length;D++){const A=w[D],M=ar(A);f.includes(M)||(E.splice(D,0,A),k.push(A))}return s==="wait"&&k.length&&(E=k),S(zi(E)),C(d),null}process.env.NODE_ENV!=="production"&&s==="wait"&&w.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:T}=x.useContext(Bs);return p.jsx(p.Fragment,{children:w.map(E=>{const D=ar(E),A=a&&!l?!1:d===w||f.includes(D),M=()=>{if(g.current.has(D))return;if(g.current.add(D),h.has(D))h.set(D,!0);else return;let j=!0;h.forEach(_=>{_||(j=!1)}),j&&(T?.(),S(b.current),a&&u?.(),r&&r())};return p.jsx(AS,{isPresent:A,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:c,onExitComplete:A?void 0:M,anchorX:i,children:E},D)})})},Yf=x.createContext({strict:!1}),Yi={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"]},en={};for(const e in Yi)en[e]={isEnabled:t=>Yi[e].some(n=>!!t[n])};function NS(e){for(const t in e)en[t]={...en[t],...e[t]}}const OS=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 Dr(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||OS.has(e)}let Hf=e=>!Dr(e);function jS(e){typeof e=="function"&&(Hf=t=>t.startsWith("on")?!Dr(t):e(t))}try{jS(require("@emotion/is-prop-valid").default)}catch{}function _S(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Hf(o)||n===!0&&Dr(o)||!t&&!Dr(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const zr=x.createContext({});function Yr(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function _n(e){return typeof e=="string"||Array.isArray(e)}const da=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],fa=["initial",...da];function Hr(e){return Yr(e.animate)||fa.some(t=>_n(e[t]))}function Gf(e){return!!(Hr(e)||e.variants)}function IS(e,t){if(Hr(e)){const{initial:n,animate:r}=e;return{initial:n===!1||_n(n)?n:void 0,animate:_n(r)?r:void 0}}return e.inherit!==!1?t:{}}function VS(e){const{initial:t,animate:n}=IS(e,x.useContext(zr));return x.useMemo(()=>({initial:t,animate:n}),[Hi(t),Hi(n)])}function Hi(e){return Array.isArray(e)?e.join(" "):e}function Gi(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const bn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(I.test(e))e=parseFloat(e);else return e;const n=Gi(e,t.target.x),r=Gi(e,t.target.y);return`${n}% ${r}%`}},FS={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=vt.parse(e);if(o.length>5)return r;const s=vt.createTransformer(e),a=typeof o[0]!="number"?1:0,i=n.x.scale*t.x,c=n.y.scale*t.y;o[0+a]/=i,o[1+a]/=c;const l=me(i,c,.5);return typeof o[2+a]=="number"&&(o[2+a]/=l),typeof o[3+a]=="number"&&(o[3+a]/=l),s(o)}},ns={borderRadius:{...bn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:bn,borderTopRightRadius:bn,borderBottomLeftRadius:bn,borderBottomRightRadius:bn,boxShadow:FS};function Uf(e,{layout:t,layoutId:n}){return dn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ns[e]||e==="opacity")}const LS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},WS=un.length;function BS(e,t,n){let r="",o=!0;for(let s=0;s<WS;s++){const a=un[s],i=e[a];if(i===void 0)continue;let c=!0;if(typeof i=="number"?c=i===(a.startsWith("scale")?1:0):c=parseFloat(i)===0,!c||n){const l=_f(i,ia[a]);if(!c){o=!1;const u=LS[a]||a;r+=`${u}(${l}) `}n&&(t[a]=l)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function ma(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let a=!1,i=!1;for(const c in t){const l=t[c];if(dn.has(c)){a=!0;continue}else if(ff(c)){o[c]=l;continue}else{const u=_f(l,ia[c]);c.startsWith("origin")?(i=!0,s[c]=u):r[c]=u}}if(t.transform||(a||n?r.transform=BS(t,e.transform,n):r.transform&&(r.transform="none")),i){const{originX:c="50%",originY:l="50%",originZ:u=0}=s;r.transformOrigin=`${c} ${l} ${u}`}}const ha=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function qf(e,t,n){for(const r in t)!De(t[r])&&!Uf(r,n)&&(e[r]=t[r])}function $S({transformTemplate:e},t){return x.useMemo(()=>{const n=ha();return ma(n,t,e),Object.assign({},n.vars,n.style)},[t])}function zS(e,t){const n=e.style||{},r={};return qf(r,n,e),Object.assign(r,$S(e,t)),r}function YS(e,t){const n={},r=zS(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.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=r,n}const HS={offset:"stroke-dashoffset",array:"stroke-dasharray"},GS={offset:"strokeDashoffset",array:"strokeDasharray"};function US(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?HS:GS;e[s.offset]=I.transform(-r);const a=I.transform(t),i=I.transform(n);e[s.array]=`${a} ${i}`}const qS=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Kf(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:s=1,pathOffset:a=0,...i},c,l,u){if(ma(e,i,l),c){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);for(const m of qS)d[m]!==void 0&&(f[m]=d[m],delete d[m]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&US(d,o,s,a,!1)}const Xf=()=>({...ha(),attrs:{}}),Zf=e=>typeof e=="string"&&e.toLowerCase()==="svg";function KS(e,t,n,r){const o=x.useMemo(()=>{const s=Xf();return Kf(s,t,Zf(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};qf(s,e.style,e),o.style={...s,...o.style}}return o}const XS=["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 pa(e){return typeof e!="string"||e.includes("-")?!1:!!(XS.indexOf(e)>-1||/[A-Z]/u.test(e))}function ZS(e,t,n,{latestValues:r},o,s=!1,a){const c=(a??pa(e)?KS:YS)(t,r,o,e),l=_S(t,typeof e=="string",s),u=e!==x.Fragment?{...l,...c,ref:n}:{},{children:d}=t,f=x.useMemo(()=>De(d)?d.get():d,[d]);return x.createElement(e,{...u,children:f})}function Ui(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ga(e,t,n,r){if(typeof t=="function"){const[o,s]=Ui(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=Ui(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function mr(e){return De(e)?e.get():e}function QS({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:JS(n,r,o,e),renderState:t()}}function JS(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=mr(s[f]);let{initial:a,animate:i}=e;const c=Hr(e),l=Gf(e);t&&l&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),i===void 0&&(i=t.animate));let u=n?n.initial===!1:!1;u=u||a===!1;const d=u?i:a;if(d&&typeof d!="boolean"&&!Yr(d)){const f=Array.isArray(d)?d:[d];for(let m=0;m<f.length;m++){const b=ga(e,f[m]);if(b){const{transitionEnd:h,transition:g,...v}=b;for(const C in v){let w=v[C];if(Array.isArray(w)){const S=u?w.length-1:0;w=w[S]}w!==null&&(o[C]=w)}for(const C in h)o[C]=h[C]}}}return o}const Qf=e=>(t,n)=>{const r=x.useContext(zr),o=x.useContext($r),s=()=>QS(e,t,r,o);return n?s():$s(s)};function ya(e,t,n){const{style:r}=e,o={};for(const s in r)(De(r[s])||t.style&&De(t.style[s])||Uf(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(o[s]=r[s]);return o}const eD=Qf({scrapeMotionValuesFromProps:ya,createRenderState:ha});function Jf(e,t,n){const r=ya(e,t,n);for(const o in e)if(De(e[o])||De(t[o])){const s=un.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const tD=Qf({scrapeMotionValuesFromProps:Jf,createRenderState:Xf}),nD=Symbol.for("motionComponentSymbol");function rD(e,t,n){const r=x.useRef(n);x.useInsertionEffect(()=>{r.current=n});const o=x.useRef(null);return x.useCallback(s=>{s&&e.onMount?.(s),t&&(s?t.mount(s):t.unmount());const a=r.current;if(typeof a=="function")if(s){const i=a(s);typeof i=="function"&&(o.current=i)}else o.current?(o.current(),o.current=null):a(s);else a&&(a.current=s)},[t])}const ba=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),oD="framerAppearId",em="data-"+ba(oD),tm=x.createContext({});function Cn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function sD(e,t,n,r,o,s){const{visualElement:a}=x.useContext(zr),i=x.useContext(Yf),c=x.useContext($r),l=x.useContext(ua).reducedMotion,u=x.useRef(null);r=r||i.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:l,isSVG:s}));const d=u.current,f=x.useContext(tm);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&aD(u.current,n,o,f);const m=x.useRef(!1);x.useInsertionEffect(()=>{d&&m.current&&d.update(n,c)});const b=n[em],h=x.useRef(!!b&&!window.MotionHandoffIsComplete?.(b)&&window.MotionHasOptimisedAnimation?.(b));return qd(()=>{d&&(m.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),h.current&&d.animationState&&d.animationState.animateChanges())}),x.useEffect(()=>{d&&(!h.current&&d.animationState&&d.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(b)}),h.current=!1),d.enteringChildren=void 0)}),d}function aD(e,t,n,r){const{layoutId:o,layout:s,drag:a,dragConstraints:i,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:nm(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!a||i&&Cn(i),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:c,layoutRoot:l})}function nm(e){if(e)return e.options.allowProjection!==!1?e.projection:nm(e.parent)}function ko(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&NS(r);const s=n?n==="svg":pa(e),a=s?tD:eD;function i(l,u){let d;const f={...x.useContext(ua),...l,layoutId:iD(l)},{isStatic:m}=f,b=VS(l),h=a(l,m);if(!m&&zs){cD(f,r);const g=lD(f);d=g.MeasureLayout,b.visualElement=sD(e,h,f,o,g.ProjectionNode,s)}return p.jsxs(zr.Provider,{value:b,children:[d&&b.visualElement?p.jsx(d,{visualElement:b.visualElement,...f}):null,ZS(e,l,rD(h,b.visualElement,u),h,m,t,s)]})}i.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=x.forwardRef(i);return c[nD]=e,c}function iD({layoutId:e}){const t=x.useContext(Bs).id;return t&&e!==void 0?t+"-"+e:e}function cD(e,t){const n=x.useContext(Yf).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?cn(!1,r,"lazy-strict-mode"):ct(!1,r,"lazy-strict-mode")}}function lD(e){const{drag:t,layout:n}=en;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function uD(e,t){if(typeof Proxy>"u")return ko;const n=new Map,r=(s,a)=>ko(s,a,e,t),o=(s,a)=>(process.env.NODE_ENV!=="production"&&qs(!1,"motion() is deprecated. Use motion.create() instead."),r(s,a));return new Proxy(o,{get:(s,a)=>a==="create"?r:(n.has(a)||n.set(a,ko(a,void 0,e,t)),n.get(a))})}function rm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function dD({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function fD(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function So(e){return e===void 0||e===1}function rs({scale:e,scaleX:t,scaleY:n}){return!So(e)||!So(t)||!So(n)}function Dt(e){return rs(e)||om(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function om(e){return qi(e.x)||qi(e.y)}function qi(e){return e&&e!=="0%"}function Tr(e,t,n){const r=e-n,o=t*r;return n+o}function Ki(e,t,n,r,o){return o!==void 0&&(e=Tr(e,o,r)),Tr(e,n,r)+t}function os(e,t=0,n=1,r,o){e.min=Ki(e.min,t,n,r,o),e.max=Ki(e.max,t,n,r,o)}function sm(e,{x:t,y:n}){os(e.x,t.translate,t.scale,t.originPoint),os(e.y,n.translate,n.scale,n.originPoint)}const Xi=.999999999999,Zi=1.0000000000001;function mD(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,a;for(let i=0;i<o;i++){s=n[i],a=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Ht(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,sm(e,a)),r&&Dt(s.latestValues)&&Ht(e,s.latestValues))}t.x<Zi&&t.x>Xi&&(t.x=1),t.y<Zi&&t.y>Xi&&(t.y=1)}function Yt(e,t){e.min=e.min+t,e.max=e.max+t}function Qi(e,t,n,r,o=.5){const s=me(e.min,e.max,o);os(e,t,n,s,r)}function Ht(e,t){Qi(e.x,t.x,t.scaleX,t.scale,t.originX),Qi(e.y,t.y,t.scaleY,t.scale,t.originY)}function am(e,t){return rm(fD(e.getBoundingClientRect(),t))}function hD(e,t,n){const r=am(e,n),{scroll:o}=t;return o&&(Yt(r.x,o.offset.x),Yt(r.y,o.offset.y)),r}const Ji=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gt=()=>({x:Ji(),y:Ji()}),ec=()=>({min:0,max:0}),ve=()=>({x:ec(),y:ec()}),ss={current:null},im={current:!1};function pD(){if(im.current=!0,!!zs)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ss.current=e.matches;e.addEventListener("change",t),t()}else ss.current=!1}const gD=new WeakMap;function yD(e,t,n){for(const r in t){const o=t[r],s=n[r];if(De(o))e.addValue(r,o);else if(De(s))e.addValue(r,Jt(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,Jt(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const tc=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class bD{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:a},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=sa,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=Te.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,le.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=i,this.blockInitialAnimation=!!s,this.isControllingVariants=Hr(n),this.isVariantNode=Gf(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 m=d[f];c[f]!==void 0&&De(m)&&m.set(c[f])}}mount(t){this.current=t,gD.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,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(im.current||pD(),this.shouldReduceMotion=ss.current),process.env.NODE_ENV!=="production"&&qs(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(),bt(this.notifyUpdate),bt(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 r=dn.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&le.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in en){const n=en[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ve()}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 r=0;r<tc.length;r++){const o=tc[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,a=t[s];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=yD(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 r=this.values.get(t);n!==r&&(r&&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 r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Jt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Kd(r)||Zd(r))?r=parseFloat(r):!DS(r)&&vt.test(n)&&(r=jf(t,n)),this.setBaseTarget(t,De(r)?r.get():r)),De(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=ga(this.props,n,this.presenceContext?.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!De(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Us),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ca.render(this.render)}}class cm extends bD{constructor(){super(...arguments),this.KeyframeResolver=hS}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:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;De(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function lm(e,{style:t,vars:n},r,o){const s=e.style;let a;for(a in t)s[a]=t[a];o?.applyProjectionStyles(s,r);for(a in n)s.setProperty(a,n[a])}function vD(e){return window.getComputedStyle(e)}class xD extends cm{constructor(){super(...arguments),this.type="html",this.renderInstance=lm}readValueFromInstance(t,n){if(dn.has(n))return this.projection?.isProjecting?Ko(n):Nk(t,n);{const r=vD(t),o=(ff(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return am(t,n)}build(t,n,r){ma(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return ya(t,n,r)}}const um=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 wD(e,t,n,r){lm(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(um.has(o)?o:ba(o),t.attrs[o])}class CD extends cm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ve}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(dn.has(n)){const r=Of(n);return r&&r.default||0}return n=um.has(n)?n:ba(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Jf(t,n,r)}build(t,n,r){Kf(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){wD(t,n,r,o)}mount(t){this.isSVGTag=Zf(t.tagName),super.mount(t)}}const kD=(e,t)=>t.isSVG??pa(e)?new CD(t):new xD(t,{allowProjection:e!==x.Fragment});function Kt(e,t,n){const r=e.getProps();return ga(r,t,n!==void 0?n:r.custom,e)}const as=e=>Array.isArray(e);function SD(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Jt(n))}function DD(e){return as(e)?e[e.length-1]||0:e}function TD(e,t){const n=Kt(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const a in s){const i=DD(s[a]);SD(e,a,i)}}function ED(e){return!!(De(e)&&e.add)}function is(e,t){const n=e.getValue("willChange");if(ED(n))return n.add(t);if(!n&&lt.WillChange){const r=new lt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function dm(e){return e.props[em]}const PD=e=>e!==null;function MD(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(PD),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[s]}const AD={type:"spring",stiffness:500,damping:25,restSpeed:10},RD=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ND={type:"keyframes",duration:.8},OD={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},jD=(e,{keyframes:t})=>t.length>2?ND:dn.has(e)?e.startsWith("scale")?RD(t[1]):AD:OD;function _D({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:a,repeatDelay:i,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const va=(e,t,n,r={},o,s)=>a=>{const i=aa(r,e)||{},c=i.delay||r.delay||0;let{elapsed:l=0}=r;l=l-Ze(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...i,delay:-l,onUpdate:f=>{t.set(f),i.onUpdate&&i.onUpdate(f)},onComplete:()=>{a(),i.onComplete&&i.onComplete()},name:e,motionValue:t,element:s?void 0:o};_D(i)||Object.assign(u,jD(e,u)),u.duration&&(u.duration=Ze(u.duration)),u.repeatDelay&&(u.repeatDelay=Ze(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(es(u),u.delay===0&&(d=!0)),(lt.instantAnimations||lt.skipAnimations)&&(d=!0,es(u),u.delay=0),u.allowFlatten=!i.type&&!i.ease,d&&!s&&t.get()!==void 0){const f=MD(u.keyframes,i);if(f!==void 0){le.update(()=>{u.onUpdate(f),u.onComplete()});return}}return i.isSync?new oa(u):new tS(u)};function ID({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function fm(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:a,...i}=t;r&&(s=r);const c=[],l=o&&e.animationState&&e.animationState.getState()[o];for(const u in i){const d=e.getValue(u,e.latestValues[u]??null),f=i[u];if(f===void 0||l&&ID(l,u))continue;const m={delay:n,...aa(s||{},u)},b=d.get();if(b!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===b&&!m.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){const v=dm(e);if(v){const C=window.MotionHandoffAnimation(v,u,le);C!==null&&(m.startTime=C,h=!0)}}is(e,u),d.start(va(u,d,f,e.shouldReduceMotion&&Af.has(u)?{type:!1}:m,e,h));const g=d.animation;g&&c.push(g)}return a&&Promise.all(c).then(()=>{le.update(()=>{a&&TD(e,a)})}),c}function mm(e,t,n,r=0,o=1){const s=Array.from(e).sort((l,u)=>l.sortNodePosition(u)).indexOf(t),a=e.size,i=(a-1)*r;return typeof n=="function"?n(s,a):o===1?s*r:i-s*r}function cs(e,t,n={}){const r=Kt(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(fm(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:d}=o;return VD(e,t,c,l,u,d,n)}:()=>Promise.resolve(),{when:i}=o;if(i){const[c,l]=i==="beforeChildren"?[s,a]:[a,s];return c().then(()=>l())}else return Promise.all([s(),a(n.delay)])}function VD(e,t,n=0,r=0,o=0,s=1,a){const i=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),i.push(cs(c,t,{...a,delay:n+(typeof r=="function"?0:r)+mm(e.variantChildren,c,r,o,s)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(i)}function FD(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>cs(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=cs(e,t,n);else{const o=typeof t=="function"?Kt(e,t,n.custom):t;r=Promise.all(fm(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function hm(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const LD=fa.length;function pm(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?pm(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<LD;n++){const r=fa[n],o=e.props[r];(_n(o)||o===!1)&&(t[r]=o)}return t}const WD=[...da].reverse(),BD=da.length;function $D(e){return t=>Promise.all(t.map(({animation:n,options:r})=>FD(e,n,r)))}function zD(e){let t=$D(e),n=nc(),r=!0;const o=c=>(l,u)=>{const d=Kt(e,u,c==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:m,...b}=d;l={...l,...b,...m}}return l};function s(c){t=c(e)}function a(c){const{props:l}=e,u=pm(e.parent)||{},d=[],f=new Set;let m={},b=1/0;for(let g=0;g<BD;g++){const v=WD[g],C=n[v],w=l[v]!==void 0?l[v]:u[v],S=_n(w),k=v===c?C.isActive:null;k===!1&&(b=g);let T=w===u[v]&&w!==l[v]&&S;if(T&&r&&e.manuallyAnimateOnMount&&(T=!1),C.protectedKeys={...m},!C.isActive&&k===null||!w&&!C.prevProp||Yr(w)||typeof w=="boolean")continue;const E=YD(C.prevProp,w);let D=E||v===c&&C.isActive&&!T&&S||g>b&&S,A=!1;const M=Array.isArray(w)?w:[w];let j=M.reduce(o(v),{});k===!1&&(j={});const{prevResolvedValues:_={}}=C,B={..._,...j},z=W=>{D=!0,f.has(W)&&(A=!0,f.delete(W)),C.needsAnimating[W]=!0;const N=e.getValue(W);N&&(N.liveStyle=!1)};for(const W in B){const N=j[W],H=_[W];if(m.hasOwnProperty(W))continue;let ee=!1;as(N)&&as(H)?ee=!hm(N,H):ee=N!==H,ee?N!=null?z(W):f.add(W):N!==void 0&&f.has(W)?z(W):C.protectedKeys[W]=!0}C.prevProp=w,C.prevResolvedValues=j,C.isActive&&(m={...m,...j}),r&&e.blockInitialAnimation&&(D=!1);const K=T&&E;D&&(!K||A)&&d.push(...M.map(W=>{const N={type:v};if(typeof W=="string"&&r&&!K&&e.manuallyAnimateOnMount&&e.parent){const{parent:H}=e,ee=Kt(H,W);if(H.enteringChildren&&ee){const{delayChildren:P}=ee.transition||{};N.delay=mm(H.enteringChildren,e,P)}}return{animation:W,options:N}}))}if(f.size){const g={};if(typeof l.initial!="boolean"){const v=Kt(e,Array.isArray(l.initial)?l.initial[0]:l.initial);v&&v.transition&&(g.transition=v.transition)}f.forEach(v=>{const C=e.getBaseTarget(v),w=e.getValue(v);w&&(w.liveStyle=!0),g[v]=C??null}),d.push({animation:g})}let h=!!d.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(h=!1),r=!1,h?t(d):Promise.resolve()}function i(c,l){if(n[c].isActive===l)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(c,l)),n[c].isActive=l;const u=a(c);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:a,setActive:i,setAnimateFunction:s,getState:()=>n,reset:()=>{n=nc()}}}function YD(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!hm(t,e):!1}function kt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nc(){return{animate:kt(!0),whileInView:kt(),whileHover:kt(),whileTap:kt(),whileDrag:kt(),whileFocus:kt(),exit:kt()}}class xt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class HD extends xt{constructor(t){super(t),t.animationState||(t.animationState=zD(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Yr(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 GD=0;class UD extends xt{constructor(){super(...arguments),this.id=GD++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.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 qD={animation:{Feature:HD},exit:{Feature:UD}};function In(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Un(e){return{point:{x:e.pageX,y:e.pageY}}}const KD=e=>t=>la(t)&&e(t,Un(t));function Dn(e,t,n,r){return In(e,t,KD(n),r)}const gm=1e-4,XD=1-gm,ZD=1+gm,ym=.01,QD=0-ym,JD=0+ym;function Ee(e){return e.max-e.min}function eT(e,t,n){return Math.abs(e-t)<=n}function rc(e,t,n,r=.5){e.origin=r,e.originPoint=me(t.min,t.max,e.origin),e.scale=Ee(n)/Ee(t),e.translate=me(n.min,n.max,e.origin)-e.originPoint,(e.scale>=XD&&e.scale<=ZD||isNaN(e.scale))&&(e.scale=1),(e.translate>=QD&&e.translate<=JD||isNaN(e.translate))&&(e.translate=0)}function Tn(e,t,n,r){rc(e.x,t.x,n.x,r?r.originX:void 0),rc(e.y,t.y,n.y,r?r.originY:void 0)}function oc(e,t,n){e.min=n.min+t.min,e.max=e.min+Ee(t)}function tT(e,t,n){oc(e.x,t.x,n.x),oc(e.y,t.y,n.y)}function sc(e,t,n){e.min=t.min-n.min,e.max=e.min+Ee(t)}function Er(e,t,n){sc(e.x,t.x,n.x),sc(e.y,t.y,n.y)}function _e(e){return[e("x"),e("y")]}const bm=({current:e})=>e?e.ownerDocument.defaultView:null,ac=(e,t)=>Math.abs(e-t);function nT(e,t){const n=ac(e.x,t.x),r=ac(e.y,t.y);return Math.sqrt(n**2+r**2)}const ic=new Set(["auto","scroll"]);class vm{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:a=3,element:i}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=To(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,h=nT(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!b&&!h)return;const{point:g}=m,{timestamp:v}=Ce;this.history.push({...g,timestamp:v});const{onStart:C,onMove:w}=this.handlers;b||(C&&C(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,m)},this.handlePointerMove=(m,b)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=Do(b,this.transformPagePoint),le.update(this.updatePoint,!0)},this.handlePointerUp=(m,b)=>{this.end();const{onEnd:h,onSessionEnd:g,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const C=To(m.type==="pointercancel"?this.lastMoveEventInfo:Do(b,this.transformPagePoint),this.history);this.startEvent&&h&&h(m,C),g&&g(m,C)},!la(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=o||window;const c=Un(t),l=Do(c,this.transformPagePoint),{point:u}=l,{timestamp:d}=Ce;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,To(l,this.history)),this.removeListeners=Yn(Dn(this.contextWindow,"pointermove",this.handlePointerMove),Dn(this.contextWindow,"pointerup",this.handlePointerUp),Dn(this.contextWindow,"pointercancel",this.handlePointerUp)),i&&this.startScrollTracking(i)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(ic.has(r.overflowX)||ic.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:o.x-n.x,y:o.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,o),le.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),bt(this.updatePoint)}}function Do(e,t){return t?{point:t(e.point)}:e}function cc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function To({point:e},t){return{point:e,delta:cc(e,xm(t)),offset:cc(e,rT(t)),velocity:oT(t,.1)}}function rT(e){return e[0]}function xm(e){return e[e.length-1]}function oT(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=xm(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Ze(t)));)n--;if(!r)return{x:0,y:0};const s=Ve(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const a={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function sT(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?me(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?me(n,e,r.max):Math.min(e,n)),e}function lc(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 aT(e,{top:t,left:n,bottom:r,right:o}){return{x:lc(e.x,n,o),y:lc(e.y,t,r)}}function uc(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function iT(e,t){return{x:uc(e.x,t.x),y:uc(e.y,t.y)}}function cT(e,t){let n=.5;const r=Ee(e),o=Ee(t);return o>r?n=Nn(t.min,t.max-r,e.min):r>o&&(n=Nn(e.min,e.max-o,t.min)),et(0,1,n)}function lT(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 ls=.35;function uT(e=ls){return e===!1?e=0:e===!0&&(e=ls),{x:dc(e,"left","right"),y:dc(e,"top","bottom")}}function dc(e,t,n){return{min:fc(e,t),max:fc(e,n)}}function fc(e,t){return typeof e=="number"?e:e[t]||0}const dT=new WeakMap;class fT{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=ve(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=d=>{n?(this.stopAnimation(),this.snapToCursor(Un(d).point)):this.pauseAnimation()},a=(d,f)=>{this.stopAnimation();const{drag:m,dragPropagation:b,onDragStart:h}=this.getProps();if(m&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=bS(m),!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(v=>{let C=this.getAxisMotionValue(v).get()||0;if(Qe.test(C)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[v];S&&(C=Ee(S)*(parseFloat(C)/100))}}this.originPoint[v]=C}),h&&le.postRender(()=>h(d,f)),is(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},i=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:m,dragDirectionLock:b,onDirectionLock:h,onDrag:g}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:v}=f;if(b&&this.currentDirection===null){this.currentDirection=mT(v),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),g&&g(d,f)},c=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>_e(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new vm(t,{onSessionStart:s,onStart:a,onMove:i,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:bm(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!r)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:i}=this.getProps();i&&le.postRender(()=>i(r,o))}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:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!ir(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=sT(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&Cn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=aT(r.layoutBox,t):this.constraints=!1,this.elastic=uT(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&_e(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=lT(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Cn(t))return!1;const r=t.current;ct(r!==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:o}=this.visualElement;if(!o||!o.layout)return!1;const s=hD(r,o.root,this.visualElement.getTransformPagePoint());let a=iT(o.layout.layoutBox,s);if(n){const i=n(dD(a));this.hasMutatedConstraints=!!i,i&&(a=rm(i))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:i}=this.getProps(),c=this.constraints||{},l=_e(u=>{if(!ir(u,n,this.currentDirection))return;let d=c&&c[u]||{};a&&(d={min:0,max:0});const f=o?200:1e6,m=o?40:1e7,b={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,b)});return Promise.all(l).then(i)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return is(this.visualElement,t),r.start(va(t,r,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()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){_e(n=>{const{drag:r}=this.getProps();if(!ir(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:i}=o.layout.layoutBox[n],c=s.get()||0;s.set(t[n]-me(a,i,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Cn(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};_e(a=>{const i=this.getAxisMotionValue(a);if(i&&this.constraints!==!1){const c=i.get();o[a]=cT({min:c,max:c},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),_e(a=>{if(!ir(a,t,null))return;const i=this.getAxisMotionValue(a),{min:c,max:l}=this.constraints[a];i.set(me(c,l,o[a]))})}addListeners(){if(!this.visualElement.current)return;dT.set(this.visualElement,this);const t=this.visualElement.current,n=Dn(t,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&!Wf(c.target)&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();Cn(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),le.read(r);const a=In(window,"resize",()=>this.scalePositionWithinConstraints()),i=o.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(_e(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=c[u].translate,d.set(d.get()+c[u].translate))}),this.visualElement.render())}));return()=>{a(),n(),s(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:a=ls,dragMomentum:i=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:a,dragMomentum:i}}}function ir(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function mT(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class hT extends xt{constructor(t){super(t),this.removeGroupControls=Fe,this.removeListeners=Fe,this.controls=new fT(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Fe}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const mc=e=>(t,n)=>{e&&le.postRender(()=>e(t,n))};class pT extends xt{constructor(){super(...arguments),this.removePointerDownListener=Fe}onPointerDown(t){this.session=new vm(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:bm(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:mc(t),onStart:mc(n),onMove:r,onEnd:(s,a)=>{delete this.session,o&&le.postRender(()=>o(s,a))}}}mount(){this.removePointerDownListener=Dn(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 hr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Eo=!1;class gT extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),Eo&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),hr.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:a}=r;return a&&(a.isPresent=s,Eo=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||le.postRender(()=>{const i=a.getStack();(!i||!i.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ca.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Eo=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function wm(e){const[t,n]=$f(),r=x.useContext(Bs);return p.jsx(gT,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(tm),isPresent:t,safeToRemove:n})}function yT(e,t,n){const r=De(e)?e:Jt(e);return r.start(va("",r,t,n)),r.animation}const bT=(e,t)=>e.depth-t.depth;class vT{constructor(){this.children=[],this.isDirty=!1}add(t){Ys(this.children,t),this.isDirty=!0}remove(t){Hs(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(bT),this.isDirty=!1,this.children.forEach(t)}}function xT(e,t){const n=Te.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(bt(r),e(s-t))};return le.setup(r,!0),()=>bt(r)}const Cm=["TopLeft","TopRight","BottomLeft","BottomRight"],wT=Cm.length,hc=e=>typeof e=="string"?parseFloat(e):e,pc=e=>typeof e=="number"||I.test(e);function CT(e,t,n,r,o,s){o?(e.opacity=me(0,n.opacity??1,kT(r)),e.opacityExit=me(t.opacity??1,0,ST(r))):s&&(e.opacity=me(t.opacity??1,n.opacity??1,r));for(let a=0;a<wT;a++){const i=`border${Cm[a]}Radius`;let c=gc(t,i),l=gc(n,i);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||pc(c)===pc(l)?(e[i]=Math.max(me(hc(c),hc(l),r),0),(Qe.test(l)||Qe.test(c))&&(e[i]+="%")):e[i]=l}(t.rotate||n.rotate)&&(e.rotate=me(t.rotate||0,n.rotate||0,r))}function gc(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const kT=km(0,.5,sf),ST=km(.5,.95,Fe);function km(e,t,n){return r=>r<e?0:r>t?1:n(Nn(e,t,r))}function yc(e,t){e.min=t.min,e.max=t.max}function We(e,t){yc(e.x,t.x),yc(e.y,t.y)}function bc(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function vc(e,t,n,r,o){return e-=t,e=Tr(e,1/n,r),o!==void 0&&(e=Tr(e,1/o,r)),e}function DT(e,t=0,n=1,r=.5,o,s=e,a=e){if(Qe.test(t)&&(t=parseFloat(t),t=me(a.min,a.max,t/100)-a.min),typeof t!="number")return;let i=me(s.min,s.max,r);e===s&&(i-=t),e.min=vc(e.min,t,n,i,o),e.max=vc(e.max,t,n,i,o)}function xc(e,t,[n,r,o],s,a){DT(e,t[n],t[r],t[o],t.scale,s,a)}const TT=["x","scaleX","originX"],ET=["y","scaleY","originY"];function wc(e,t,n,r){xc(e.x,t,TT,n?n.x:void 0,r?r.x:void 0),xc(e.y,t,ET,n?n.y:void 0,r?r.y:void 0)}function Cc(e){return e.translate===0&&e.scale===1}function Sm(e){return Cc(e.x)&&Cc(e.y)}function kc(e,t){return e.min===t.min&&e.max===t.max}function PT(e,t){return kc(e.x,t.x)&&kc(e.y,t.y)}function Sc(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Dm(e,t){return Sc(e.x,t.x)&&Sc(e.y,t.y)}function Dc(e){return Ee(e.x)/Ee(e.y)}function Tc(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class MT{constructor(){this.members=[]}add(t){Ys(this.members,t),t.scheduleRender()}remove(t){if(Hs(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(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function AT(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,a=n?.z||0;if((o||s||a)&&(r=`translate3d(${o}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:u,rotateX:d,rotateY:f,skewX:m,skewY:b}=n;l&&(r=`perspective(${l}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),m&&(r+=`skewX(${m}deg) `),b&&(r+=`skewY(${b}deg) `)}const i=e.x.scale*t.x,c=e.y.scale*t.y;return(i!==1||c!==1)&&(r+=`scale(${i}, ${c})`),r||"none"}const Po=["","X","Y","Z"],RT=1e3;let NT=0;function Mo(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Tm(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=dm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",le,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Tm(r)}function Em({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},i=t?.()){this.id=NT++,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(_T),this.nodes.forEach(LT),this.nodes.forEach(WT),this.nodes.forEach(IT)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new vT)}addEventListener(a,i){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Us),this.eventHandlers.get(a).add(i)}notifyListeners(a,...i){const c=this.eventHandlers.get(a);c&&c.notify(...i)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=Bf(a)&&!kS(a),this.instance=a;const{layoutId:i,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||i)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;le.read(()=>{d=window.innerWidth}),e(a,()=>{const m=window.innerWidth;m!==d&&(d=m,this.root.updateBlockedByResize=!0,u&&u(),u=xT(f,250),hr.hasAnimatedSinceResize&&(hr.hasAnimatedSinceResize=!1,this.nodes.forEach(Mc)))})}i&&this.root.registerSharedNode(i,this),this.options.animate!==!1&&l&&(i||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||l.getDefaultTransition()||HT,{onLayoutAnimationStart:h,onLayoutAnimationComplete:g}=l.getProps(),v=!this.targetLayout||!Dm(this.targetLayout,m),C=!d&&f;if(this.options.layoutRoot||this.resumeFrom||C||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...aa(b,"layout"),onPlay:h,onComplete:g};(l.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(u,C)}else d||Mc(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),bt(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(BT),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Tm(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:i,layout:c}=this.options;if(i===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ec);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Pc);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(FT),this.nodes.forEach(OT),this.nodes.forEach(jT)):this.nodes.forEach(Pc),this.clearAllSnapshots();const i=Te.now();Ce.delta=et(0,1e3/60,i-Ce.timestamp),Ce.timestamp=i,Ce.isProcessing=!0,go.update.process(Ce),go.preRender.process(Ce),go.render.process(Ce),Ce.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ca.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(VT),this.sharedNodes.forEach($T)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,le.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){le.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ee(this.snapshot.measuredBox.x)&&!Ee(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=ve(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:i}=this.options;i&&i.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let i=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(i=!1),i&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,i=this.projectionDelta&&!Sm(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;a&&this.instance&&(i||Dt(this.latestValues)||u)&&(o(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const i=this.measurePageBox();let c=this.removeElementScroll(i);return a&&(c=this.removeTransform(c)),GT(c),{animationId:this.root.animationId,measuredBox:i,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return ve();const i=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(UT))){const{scroll:l}=this.root;l&&(Yt(i.x,l.offset.x),Yt(i.y,l.offset.y))}return i}removeElementScroll(a){const i=ve();if(We(i,a),this.scroll?.wasRoot)return i;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:u,options:d}=l;l!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&We(i,a),Yt(i.x,u.offset.x),Yt(i.y,u.offset.y))}return i}applyTransform(a,i=!1){const c=ve();We(c,a);for(let l=0;l<this.path.length;l++){const u=this.path[l];!i&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Ht(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Dt(u.latestValues)&&Ht(c,u.latestValues)}return Dt(this.latestValues)&&Ht(c,this.latestValues),c}removeTransform(a){const i=ve();We(i,a);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!Dt(l.latestValues))continue;rs(l.latestValues)&&l.updateSnapshot();const u=ve(),d=l.measurePageBox();We(u,d),wc(i,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,u)}return Dt(this.latestValues)&&wc(i,this.latestValues),i}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==Ce.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const i=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=i.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=i.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=i.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==i;if(!(a||c&&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))return;this.resolvedRelativeTargetAt=Ce.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ve(),this.targetWithTransforms=ve()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),tT(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):We(this.target,this.layout.layoutBox),sm(this.target,this.targetDelta)):We(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||rs(this.parent.latestValues)||om(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,i,c){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ve(),this.relativeTargetOrigin=ve(),Er(this.relativeTargetOrigin,i,c),We(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),i=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),i&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Ce.timestamp&&(c=!1),c)return;const{layout:l,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||!(l||u))return;We(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;mD(this.layoutCorrected,this.treeScale,this.path,i),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=ve());const{target:m}=a;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(bc(this.prevProjectionDelta.x,this.projectionDelta.x),bc(this.prevProjectionDelta.y,this.projectionDelta.y)),Tn(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Tc(this.projectionDelta.x,this.prevProjectionDelta.x)||!Tc(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const i=this.getStack();i&&i.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Gt(),this.projectionDelta=Gt(),this.projectionDeltaWithTransform=Gt()}setAnimationOrigin(a,i=!1){const c=this.snapshot,l=c?c.latestValues:{},u={...this.latestValues},d=Gt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!i;const f=ve(),m=c?c.source:void 0,b=this.layout?this.layout.source:void 0,h=m!==b,g=this.getStack(),v=!g||g.members.length<=1,C=!!(h&&!v&&this.options.crossfade===!0&&!this.path.some(YT));this.animationProgress=0;let w;this.mixTargetDelta=S=>{const k=S/1e3;Ac(d.x,a.x,k),Ac(d.y,a.y,k),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Er(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),zT(this.relativeTarget,this.relativeTargetOrigin,f,k),w&&PT(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=ve()),We(w,this.relativeTarget)),h&&(this.animationValues=u,CT(u,l,this.latestValues,k,C,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(bt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=le.update(()=>{hr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Jt(0)),this.currentAnimation=yT(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:i=>{this.mixTargetDelta(i),a.onUpdate&&a.onUpdate(i)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(RT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:i,target:c,layout:l,latestValues:u}=a;if(!(!i||!c||!l)){if(this!==a&&this.layout&&l&&Pm(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||ve();const d=Ee(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+d;const f=Ee(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+f}We(i,c),Ht(i,u),Tn(this.projectionDeltaWithTransform,this.layoutCorrected,i,u)}}registerSharedNode(a,i){this.sharedNodes.has(a)||this.sharedNodes.set(a,new MT),this.sharedNodes.get(a).add(i);const l=i.options.initialPromotionConfig;i.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(i):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:i,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),i&&this.setOptions({transition:i})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let i=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(i=!0),!i)return;const l={};c.z&&Mo("z",a,l,this.animationValues);for(let u=0;u<Po.length;u++)Mo(`rotate${Po[u]}`,a,l,this.animationValues),Mo(`skew${Po[u]}`,a,l,this.animationValues);a.render();for(const u in l)a.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);a.scheduleRender()}applyProjectionStyles(a,i){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=mr(i?.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=mr(i?.pointerEvents)||""),this.hasProjected&&!Dt(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let d=AT(this.projectionDeltaWithTransform,this.treeScale,u);c&&(d=c(u,d)),a.transform=d;const{x:f,y:m}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,l.animationValues?a.opacity=l===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:a.opacity=l===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const b in ns){if(u[b]===void 0)continue;const{correct:h,applyTo:g,isCSSVariable:v}=ns[b],C=d==="none"?u[b]:h(u[b],l);if(g){const w=g.length;for(let S=0;S<w;S++)a[g[S]]=C}else v?this.options.visualElement.renderState.vars[b]=C:a[b]=C}this.options.layoutId&&(a.pointerEvents=l===this?mr(i?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(Ec),this.root.sharedNodes.clear()}}}function OT(e){e.updateLayout()}function jT(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,s=t.source!==e.layout.source;o==="size"?_e(u=>{const d=s?t.measuredBox[u]:t.layoutBox[u],f=Ee(d);d.min=n[u].min,d.max=d.min+f}):Pm(o,t.layoutBox,n)&&_e(u=>{const d=s?t.measuredBox[u]:t.layoutBox[u],f=Ee(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const a=Gt();Tn(a,n,t.layoutBox);const i=Gt();s?Tn(i,e.applyTransform(r,!0),t.measuredBox):Tn(i,n,t.layoutBox);const c=!Sm(a);let l=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const m=ve();Er(m,t.layoutBox,d.layoutBox);const b=ve();Er(b,n,f.layoutBox),Dm(m,b)||(l=!0),u.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=m,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:i,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function _T(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 IT(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function VT(e){e.clearSnapshot()}function Ec(e){e.clearMeasurements()}function Pc(e){e.isLayoutDirty=!1}function FT(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Mc(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function LT(e){e.resolveTargetDelta()}function WT(e){e.calcProjection()}function BT(e){e.resetSkewAndRotation()}function $T(e){e.removeLeadSnapshot()}function Ac(e,t,n){e.translate=me(t.translate,0,n),e.scale=me(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Rc(e,t,n,r){e.min=me(t.min,n.min,r),e.max=me(t.max,n.max,r)}function zT(e,t,n,r){Rc(e.x,t.x,n.x,r),Rc(e.y,t.y,n.y,r)}function YT(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const HT={duration:.45,ease:[.4,0,.1,1]},Nc=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Oc=Nc("applewebkit/")&&!Nc("chrome/")?Math.round:Fe;function jc(e){e.min=Oc(e.min),e.max=Oc(e.max)}function GT(e){jc(e.x),jc(e.y)}function Pm(e,t,n){return e==="position"||e==="preserve-aspect"&&!eT(Dc(t),Dc(n),.2)}function UT(e){return e!==e.root&&e.scroll?.wasRoot}const qT=Em({attachResizeListener:(e,t)=>In(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ao={current:void 0},Mm=Em({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ao.current){const e=new qT({});e.mount(window),e.setOptions({layoutScroll:!0}),Ao.current=e}return Ao.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),KT={pan:{Feature:pT},drag:{Feature:hT,ProjectionNode:Mm,MeasureLayout:wm}};function _c(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&le.postRender(()=>s(t,Un(t)))}class XT extends xt{mount(){const{current:t}=this.node;t&&(this.unmount=vS(t,(n,r)=>(_c(this.node,r,"Start"),o=>_c(this.node,o,"End"))))}unmount(){}}class ZT extends xt{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=Yn(In(this.node.current,"focus",()=>this.onFocus()),In(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ic(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&le.postRender(()=>s(t,Un(t)))}class QT extends xt{mount(){const{current:t}=this.node;t&&(this.unmount=CS(t,(n,r)=>(Ic(this.node,r,"Start"),(o,{success:s})=>Ic(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const us=new WeakMap,Ro=new WeakMap,JT=e=>{const t=us.get(e.target);t&&t(e)},eE=e=>{e.forEach(JT)};function tE({root:e,...t}){const n=e||document;Ro.has(n)||Ro.set(n,{});const r=Ro.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(eE,{root:e,...t})),r[o]}function nE(e,t,n){const r=tE(t);return us.set(e,n),r.observe(e),()=>{us.delete(e),r.unobserve(e)}}const rE={some:0,all:1};class oE extends xt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:rE[o]},i=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,s&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=l?u:d;f&&f(c)};return nE(this.node.current,a,i)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(sE(t,n))&&this.startObserver()}unmount(){}}function sE({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const aE={inView:{Feature:oE},tap:{Feature:QT},focus:{Feature:ZT},hover:{Feature:XT}},iE={layout:{ProjectionNode:Mm,MeasureLayout:wm}},cE={...qD,...aE,...KT,...iE},Pr=uD(cE,kD);class lE extends x.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Dropdown Error:",t,n),this.props.onError?.(t,n)}render(){return this.state.hasError?this.props.fallback||null:this.props.children}}const Am=x.createContext(void 0);function xa(){const e=x.useContext(Am);if(!e)throw new Error("Dropdown components must be used within Dropdown");return e}const uE=te(["absolute z-[1000] min-w-[8rem] overflow-hidden","rounded-md border shadow-lg","bg-[var(--atom-theme-surface-primary)] border-[var(--atom-theme-border-primary)] px-1.5 py-2"].join(" "),{variants:{side:{top:"",bottom:"",left:"",right:""},align:{start:"",center:"",end:""}},defaultVariants:{side:"bottom",align:"start"}}),dE=te(["relative flex cursor-pointer select-none items-center","rounded-sm px-3 py-2 text-sm outline-none","transition-colors duration-150","focus:bg-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_15%,transparent)] focus:text-[var(--atom-text)]","hover:bg-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_15%,transparent)] hover:text-[var(--atom-text)]","focus:hover:bg-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_20%,transparent)]","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","data-[selected]:text-[var(--atom-primary)] data-[selected]:font-medium"].join(" ")),fE=te(["inline-flex items-center justify-center gap-2","px-4 py-2 rounded-md text-sm font-medium","transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--atom-primary)] focus-visible:ring-offset-2","cursor-pointer","disabled:pointer-events-none disabled:opacity-50"].join(" "),{variants:{variant:{default:["bg-[var(--atom-theme-surface-primary)]","border border-[var(--atom-theme-border-primary)]","text-[var(--atom-theme-text-primary)]"].join(" "),ghost:["bg-transparent","hover:bg-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_15%,transparent)]","text-[var(--atom-text)]"].join(" ")}},defaultVariants:{variant:"ghost"}}),mE=e=>{const n={top:{y:8,x:0},bottom:{y:-8,x:0},left:{y:0,x:8},right:{y:0,x:-8}};return{initial:{opacity:0,scale:.95,...n[e]},animate:{opacity:1,scale:1,x:0,y:0},exit:{opacity:0,scale:.95,...n[e]}}};function hE(e,t,n,r=!0){x.useEffect(()=>{if(!r||typeof document>"u")return;const o=s=>{const a=s.target;!e.current||e.current.contains(a)||t.current&&t.current.contains(a)||n()};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}},[e,t,n,r])}function pE(e,t,n,r,o,s,a){const[i,c]=x.useState({top:0,left:0}),l=x.useCallback(()=>{if(typeof window>"u"||!n||!e.current||!t.current)return;const u=e.current.getBoundingClientRect(),d=t.current.getBoundingClientRect(),f={width:window.innerWidth,height:window.innerHeight},m=window.scrollY,b=window.scrollX;let h=0,g=0;switch(r){case"top":h=u.top+m-d.height-s;break;case"bottom":h=u.bottom+m+s;break;case"left":case"right":switch(o){case"start":h=u.top+m+a;break;case"center":h=u.top+m+u.height/2-d.height/2;break;case"end":h=u.bottom+m-d.height-a;break}break}switch(r){case"left":g=u.left+b-d.width-s;break;case"right":g=u.right+b+s;break;case"top":case"bottom":switch(o){case"start":g=u.left+b+a;break;case"center":g=u.left+b+u.width/2-d.width/2;break;case"end":g=u.right+b-d.width-a;break}break}const v=8;g<v&&(g=v),g+d.width>f.width-v&&(g=f.width-d.width-v),h<m+v&&(h=m+v),h+d.height>m+f.height-v&&(h=m+f.height-d.height-v),c({top:h,left:g})},[n,r,o,s,a,t,e]);return x.useEffect(()=>{if(typeof window>"u"||!n||!e.current||!t.current)return;l();let u=null;return typeof ResizeObserver<"u"&&t.current&&(u=new ResizeObserver(l),u.observe(t.current)),window.addEventListener("scroll",l,{passive:!0,capture:!0}),window.addEventListener("resize",l,{passive:!0}),()=>{u?.disconnect(),window.removeEventListener("scroll",l,!0),window.removeEventListener("resize",l)}},[l,n,t,e]),i}const Rm=({open:e,onOpenChange:t,defaultOpen:n=!1,value:r,onValueChange:o,disabled:s=!1,animateItems:a=!1,errorFallback:i,onError:c,children:l})=>{const[u,d]=x.useState(n),[f,m]=x.useState(r||""),[b,h]=x.useState(""),[g,v]=x.useState(!1),C=x.useId(),w=`dropdown-trigger-${C}`,S=`dropdown-content-${C}`,k=e!==void 0,T=s?!1:k?e:u,E=x.useCallback((M,j=!1)=>{s||(v(j),k||d(M),t?.(M))},[k,t,s]),D=x.useCallback(M=>{m(M),o?.(M)},[o]);x.useEffect(()=>{r!==void 0&&m(r)},[r]);const A=x.useMemo(()=>({open:T,setOpen:E,triggerId:w,contentId:S,selectedValue:r||f,setSelectedValue:D,activeDescendant:b,setActiveDescendant:h,animateItems:a,openedViaKeyboard:g}),[T,E,w,S,r,f,D,b,a,g]);return p.jsx(lE,{fallback:i,onError:c,children:p.jsx(Am.Provider,{value:A,children:p.jsxs("div",{className:"relative inline-block",children:[l,p.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:f&&`Selected: ${f}`})]})})})};Rm.displayName="Dropdown";const Nm=x.forwardRef(({className:e,children:t,onClick:n,onMouseDown:r,onKeyDown:o,variant:s,asChild:a=!1,disabled:i,...c},l)=>{const{open:u,setOpen:d,triggerId:f,contentId:m}=xa(),b=x.useRef(null);x.useEffect(()=>{l&&(typeof l=="function"?l(b.current):l.current=b.current)},[l]);const h=w=>{w.preventDefault(),r?.(w)},g=w=>{i||(w.stopPropagation(),d(!u,!1),n?.(w))},v=w=>{if(!i){switch(w.key){case"ArrowDown":w.preventDefault(),u||d(!0,!0);break;case"ArrowUp":w.preventDefault(),u||d(!0,!0);break;case"Enter":case" ":w.preventDefault(),d(!u,!0);break}o?.(w)}},C=a?je:"button";return p.jsx(C,{ref:b,id:f,type:a?void 0:"button","aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?m:void 0,disabled:i,"data-testid":"dropdown-trigger",className:a?e:O(fE({variant:s}),e),onMouseDown:h,onClick:g,onKeyDown:v,...c,children:t})});Nm.displayName="DropdownTrigger";const Om=x.forwardRef(({className:e,children:t,side:n="bottom",align:r="start",sideOffset:o=4,alignOffset:s=0,container:a,preventClose:i=!1,...c},l)=>{const{open:u,setOpen:d,triggerId:f,contentId:m,activeDescendant:b,openedViaKeyboard:h}=xa(),g=x.useRef(null),v=x.useRef(null),C=Ws();x.useEffect(()=>{l&&(typeof l=="function"?l(g.current):l.current=g.current)},[l]);const w=n??"bottom",S=r??"start",k=pE(v,g,u,w,S,o,s);x.useEffect(()=>{if(typeof document>"u")return;const A=document.getElementById(f);A&&(v.current=A)},[f]),hE(g,v,()=>{u&&!i&&d(!1)},u),x.useEffect(()=>{if(typeof document>"u"||!u||!g.current)return;if(h){const M=g.current.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])');M.length>0&&M[0].focus()}const A=M=>{M.key==="Escape"&&(M.preventDefault(),M.stopPropagation(),d(!1),v.current?.focus())};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[u,d,h]);const T=x.useMemo(()=>mE(w),[w]),E=a||C||(typeof document<"u"?document.body:null);if(!E)return null;const D=p.jsx(zf,{mode:"wait",children:u&&p.jsx(Pr.div,{ref:g,id:m,role:"menu","aria-labelledby":f,"aria-orientation":"vertical","aria-activedescendant":b||void 0,"data-testid":"dropdown-content",initial:"initial",animate:"animate",exit:"exit",variants:T,transition:{duration:.2,ease:[.16,1,.3,1]},className:O(uE({side:w,align:S}),e),style:{position:"fixed",top:`${k.top}px`,left:`${k.left}px`,pointerEvents:"auto"},...c,children:t})});return Mr.createPortal(p.jsx(x.Suspense,{fallback:null,children:D}),E)});Om.displayName="DropdownContent";const jm=x.forwardRef(({className:e,children:t,disabled:n,preventClose:r=!1,value:o,onClick:s,onKeyDown:a,...i},c)=>{const{setOpen:l,selectedValue:u,setSelectedValue:d,setActiveDescendant:f,animateItems:m}=xa(),b=o!==void 0&&o===u,h=x.useRef(null),v=`dropdown-item-${x.useId()}`,[C,w]=x.useState(!1);x.useEffect(()=>{c&&(typeof c=="function"?c(h.current):c.current=h.current)},[c]);const S=x.useCallback(()=>{n||C||(w(!0),o!==void 0&&d(o),r||l(!1),setTimeout(()=>w(!1),300))},[n,C,o,d,r,l]),k=D=>{n||C||(D.stopPropagation(),s?.(D),S())},T=D=>{if(n)return;const A=h.current;if(!A)return;const M=Array.from(A.closest('[role="menu"]')?.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')||[]),j=M.indexOf(A);switch(D.key){case"Enter":case" ":D.preventDefault(),D.stopPropagation(),a?.(D),S();break;case"ArrowDown":if(D.preventDefault(),D.stopPropagation(),M.length>0){const _=(j+1)%M.length,B=M[_];B?.focus(),f(B.id)}break;case"ArrowUp":if(D.preventDefault(),D.stopPropagation(),M.length>0){const _=j===0?M.length-1:j-1,B=M[_];B?.focus(),f(B.id)}break;case"Home":if(D.preventDefault(),D.stopPropagation(),M.length>0){const _=M[0];_?.focus(),f(_.id)}break;case"End":if(D.preventDefault(),D.stopPropagation(),M.length>0){const _=M[M.length-1];_?.focus(),f(_.id)}break;case"Tab":if(M.length>0)if(D.shiftKey)if(j===0)l(!1);else{D.preventDefault();const _=M[j-1];_?.focus(),f(_.id)}else if(j===M.length-1)l(!1);else{D.preventDefault();const _=M[j+1];_?.focus(),f(_.id)}break;default:a?.(D)}},E=()=>{f(v)};return p.jsx(Pr.div,{ref:h,id:v,role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,"data-selected":b?"":void 0,"data-testid":`dropdown-item-${o||v}`,className:O(dE(),e),onClick:k,onKeyDown:T,onFocus:E,whileHover:n||!m?void 0:{scale:1.01},whileTap:n||!m?void 0:{scale:.98},...i,children:t})});jm.displayName="DropdownItem";const _m=x.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,role:"separator","aria-orientation":"horizontal","data-testid":"dropdown-separator",className:O("my-1 h-px bg-(--atom-theme-border-primary)",e),...t}));_m.displayName="DropdownSeparator";const Im=x.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,role:"presentation","data-testid":"dropdown-label",className:O("px-3 py-1.5 text-xs font-semibold text-(--atom-text-secondary)",e),...t}));Im.displayName="DropdownLabel";const Vm=x.forwardRef(({className:e,children:t,...n},r)=>p.jsx("div",{ref:r,role:"group","data-testid":"dropdown-group",className:O("py-1",e),...n,children:t}));Vm.displayName="DropdownGroup";class gE extends x.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){console.error("Popover Error:",t,n),this.props.onError?.(t,n)}render(){return this.state.hasError?this.props.fallback||null:this.props.children}}const Fm=x.createContext(void 0);function wa(){const e=x.useContext(Fm);if(!e)throw new Error("Popover components must be used within Popover");return e}const yE=te(["absolute z-[1000] rounded-lg border shadow-lg","bg-[var(--atom-theme-surface-primary)] border-[var(--atom-theme-border-primary)]","outline-none overflow-hidden"].join(" "),{variants:{side:{top:"",bottom:"",left:"",right:""},align:{start:"",center:"",end:""},size:{sm:"w-64",md:"w-80",lg:"w-96",xl:"w-[32rem]",full:"w-screen max-w-md"}},defaultVariants:{side:"bottom",align:"center",size:"md"}}),bE=te(["inline-flex items-center justify-center","transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--atom-primary)] focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","cursor-pointer"].join(" ")),vE=e=>{const n={top:{y:8,x:0},bottom:{y:-8,x:0},left:{y:0,x:8},right:{y:0,x:-8}};return{initial:{opacity:0,scale:.96,...n[e]},animate:{opacity:1,scale:1,x:0,y:0},exit:{opacity:0,scale:.95,...n[e]}}};function xE(e,t,n,r=!0){x.useEffect(()=>{if(!r||typeof document>"u")return;const o=s=>{const a=s.target;!e.current||e.current.contains(a)||t.current&&t.current.contains(a)||n()};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}},[e,t,n,r])}function wE(e,t,n,r,o,s,a){const[i,c]=x.useState({top:0,left:0}),l=x.useCallback(()=>{if(typeof window>"u"||!n||!e.current||!t.current)return;const u=e.current.getBoundingClientRect(),d=t.current.getBoundingClientRect(),f={width:window.innerWidth,height:window.innerHeight},m=window.scrollY,b=window.scrollX;let h=0,g=0;switch(r){case"top":h=u.top+m-d.height-s;break;case"bottom":h=u.bottom+m+s;break;case"left":case"right":switch(o){case"start":h=u.top+m+a;break;case"center":h=u.top+m+u.height/2-d.height/2;break;case"end":h=u.bottom+m-d.height-a;break}break}switch(r){case"left":g=u.left+b-d.width-s;break;case"right":g=u.right+b+s;break;case"top":case"bottom":switch(o){case"start":g=u.left+b+a;break;case"center":g=u.left+b+u.width/2-d.width/2;break;case"end":g=u.right+b-d.width-a;break}break}const v=8;g<v&&(g=v),g+d.width>f.width-v&&(g=f.width-d.width-v),h<m+v&&(h=m+v),h+d.height>m+f.height-v&&(h=m+f.height-d.height-v),c({top:h,left:g})},[n,r,o,s,a,t,e]);return x.useEffect(()=>{if(typeof window>"u"||!n||!e.current||!t.current)return;l();let u=null;return typeof ResizeObserver<"u"&&t.current&&(u=new ResizeObserver(l),u.observe(t.current)),window.addEventListener("scroll",l,{passive:!0,capture:!0}),window.addEventListener("resize",l,{passive:!0}),()=>{u?.disconnect(),window.removeEventListener("scroll",l,!0),window.removeEventListener("resize",l)}},[l,n,t,e]),i}const Lm=({open:e,onOpenChange:t,defaultOpen:n=!1,modal:r=!1,errorFallback:o,onError:s,children:a})=>{const[i,c]=x.useState(n),l=x.useId(),u=`popover-trigger-${l}`,d=`popover-content-${l}`,f=e!==void 0,m=f?e:i,b=x.useCallback(g=>{f||c(g),t?.(g)},[f,t]),h=x.useMemo(()=>({open:m,setOpen:b,triggerId:u,contentId:d,modal:r}),[m,b,u,d,r]);return p.jsx(gE,{fallback:o,onError:s,children:p.jsx(Fm.Provider,{value:h,children:p.jsx("div",{className:"relative inline-block",children:a})})})};Lm.displayName="Popover";const Wm=x.forwardRef(({className:e,children:t,onClick:n,onKeyDown:r,asChild:o=!1,disabled:s,...a},i)=>{const{open:c,setOpen:l,triggerId:u,contentId:d}=wa(),f=x.useRef(null);x.useEffect(()=>{i&&(typeof i=="function"?i(f.current):i.current=f.current)},[i]);const m=g=>{s||(g.stopPropagation(),l(!c),n?.(g))},b=g=>{s||((g.key==="Enter"||g.key===" ")&&(g.preventDefault(),l(!c)),r?.(g))},h=o?je:"button";return p.jsx(h,{ref:f,id:u,type:o?void 0:"button","aria-haspopup":"dialog","aria-expanded":c,"aria-controls":c?d:void 0,disabled:s,"data-state":c?"open":"closed","data-testid":"popover-trigger",className:o?e:O(bE(),e),onClick:m,onKeyDown:b,...a,children:t})});Wm.displayName="PopoverTrigger";const Bm=x.forwardRef(({className:e,children:t,side:n="bottom",align:r="center",size:o="md",sideOffset:s=8,alignOffset:a=0,container:i,preventClose:c=!1,preventOutsideClick:l=!1,showArrow:u=!1,...d},f)=>{const{open:m,setOpen:b,triggerId:h,contentId:g,modal:v}=wa(),C=x.useRef(null),w=x.useRef(null),S=Ws();x.useEffect(()=>{f&&(typeof f=="function"?f(C.current):f.current=C.current)},[f]);const k=wE(w,C,m,n??"bottom",r??"center",s,a);x.useEffect(()=>{if(typeof document>"u")return;const j=document.getElementById(h);j&&(w.current=j)},[h]),xE(C,w,()=>{m&&!c&&!l&&b(!1)},m),x.useEffect(()=>{if(typeof document>"u"||!m)return;const j=_=>{_.key==="Escape"&&(_.preventDefault(),_.stopPropagation(),b(!1),w.current?.focus())};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[m,b]),x.useEffect(()=>{if(typeof document>"u"||!m||!v)return;const j=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=j}},[m,v]),x.useEffect(()=>{if(typeof document>"u"||!m||!v||!C.current)return;const j=C.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),_=j[0],B=j[j.length-1],z=K=>{K.key==="Tab"&&(K.shiftKey?document.activeElement===_&&(K.preventDefault(),B?.focus()):document.activeElement===B&&(K.preventDefault(),_?.focus()))};return _?.focus(),document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[m,v]);const T=x.useMemo(()=>vE(n??"bottom"),[n]),E=i||S||(typeof document<"u"?document.body:null);if(!E)return null;const D=()=>O("absolute h-2 w-2 rotate-45 bg-[var(--atom-theme-surface-primary)] border-[var(--atom-theme-border-primary)]",{top:"bottom-[-5px] border-r border-b",bottom:"top-[-5px] border-l border-t",left:"right-[-5px] border-t border-r",right:"left-[-5px] border-b border-l"}[n??"bottom"]),A=()=>r==="center"?{left:"calc(50% - 4px)"}:r==="start"?{left:"16px"}:r==="end"?{right:"16px"}:{},M=p.jsx(zf,{mode:"wait",children:m&&p.jsxs(p.Fragment,{children:[v&&p.jsx(Pr.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"fixed inset-0 z-999 bg-black/50 backdrop-blur-sm","data-testid":"popover-backdrop",onClick:()=>!c&&!l&&b(!1),"aria-hidden":"true"}),p.jsxs(Pr.div,{ref:C,id:g,role:"dialog","aria-labelledby":h,"aria-modal":v,"data-state":m?"open":"closed","data-testid":"popover-content",initial:"initial",animate:"animate",exit:"exit",variants:T,transition:{duration:.2,ease:[.16,1,.3,1]},className:O(yE({side:n,align:r,size:o}),e),style:{position:"fixed",top:`${k.top}px`,left:`${k.left}px`,pointerEvents:"auto"},...d,children:[u&&p.jsx("div",{className:D(),style:A(),"aria-hidden":"true"}),t]})]})});return Mr.createPortal(p.jsx(x.Suspense,{fallback:null,children:M}),E)});Bm.displayName="PopoverContent";const $m=x.forwardRef(({className:e,children:t,...n},r)=>p.jsx("div",{ref:r,"data-testid":"popover-header",className:O("flex items-center justify-between px-4 py-3 border-b border-(--atom-theme-border-primary)",e),...n,children:t}));$m.displayName="PopoverHeader";const zm=x.forwardRef(({className:e,children:t,...n},r)=>p.jsx("div",{ref:r,"data-testid":"popover-body",className:O("px-4 py-3",e),...n,children:t}));zm.displayName="PopoverBody";const Ym=x.forwardRef(({className:e,children:t,...n},r)=>p.jsx("div",{ref:r,"data-testid":"popover-footer",className:O("flex items-center justify-end gap-2 px-4 py-3 border-t border-(--atom-theme-border-primary)",e),...n,children:t}));Ym.displayName="PopoverFooter";const Hm=x.forwardRef(({className:e,children:t,...n},r)=>p.jsx("h3",{ref:r,"data-testid":"popover-title",className:O("text-lg font-semibold text-(--atom-text)",e),...n,children:t}));Hm.displayName="PopoverTitle";const Gm=x.forwardRef(({className:e,children:t,...n},r)=>p.jsx("p",{ref:r,"data-testid":"popover-description",className:O("text-sm text-(--atom-text)",e),...n,children:t}));Gm.displayName="PopoverDescription";const Um=x.forwardRef(({className:e,children:t,onClick:n,asChild:r=!1,...o},s)=>{const{setOpen:a}=wa(),i=l=>{a(!1),n?.(l)},c=r?je:"button";return p.jsx(c,{ref:s,type:r?void 0:"button","data-testid":"popover-close",className:r?e:O("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--atom-primary)","disabled:pointer-events-none disabled:opacity-50","h-8 w-8",e),onClick:i,"aria-label":"Close popover",...o,children:t||p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),p.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})});Um.displayName="PopoverClose";const CE=te(["block w-full rounded-md outline-none leading-none","bg-[var(--atom-input-bg)] text-[var(--atom-input-fg)]","border border-[var(--atom-theme-border-primary)]","transition-[background-color,border-color,box-shadow,color] duration-150 ease-in-out","placeholder:text-[color-mix(in_srgb,var(--atom-input-fg)_55%,transparent)]","caret-[var(--atom-primary)]","selection:bg-[color-mix(in_srgb,var(--atom-primary)_30%,transparent)]","hover:bg-[color-mix(in_srgb,var(--atom-primary)_1%,transparent)]","hover:border-[color-mix(in_srgb,var(--atom-input-border)_70%,var(--atom-primary)_30%)]","focus-visible:border-[var(--atom-input-focus,var(--atom-primary))]","focus-visible:ring-1 focus-visible:ring-[color-mix(in_srgb,var(--atom-primary)_35%,transparent)]","focus-visible:ring-offset-0","disabled:opacity-60 disabled:cursor-not-allowed","disabled:hover:bg-[var(--atom-input-bg)] disabled:hover:border-[var(--atom-input-border)]","read-only:bg-[color-mix(in_srgb,var(--atom-input-bg)_90%,var(--atom-border)_10%)] read-only:cursor-default","read-only:hover:bg-[color-mix(in_srgb,var(--atom-input-bg)_90%,var(--atom-border)_10%)]","placeholder:text-muted-foreground [&:not(:placeholder-shown)]:border-[color-mix(in_srgb,var(--atom-theme-border-primary)_70%,var(--atom-primary))]focus-visible:border-[var(--atom-primary)]"].join(" "),{variants:{size:{sm:"h-9 px-3 text-sm",md:"h-10 px-3.5 text-sm",lg:"h-11 px-4 text-base"},tone:{default:"",invalid:"border-[var(--atom-error)] focus-visible:border-[var(--atom-error)]",success:"border-[var(--atom-success)]"},hasLeft:{true:"pl-9"},hasRight:{true:"pr-9"}},defaultVariants:{size:"md",tone:"default"}}),qm=y.forwardRef(({className:e,size:t,tone:n="default",leftIcon:r,rightIcon:o,hint:s,errorText:a,loading:i=!1,id:c,placeholder:l,label:u,required:d=!1,requiredText:f="This field is required",value:m,onBlur:b,...h},g)=>{const v=y.useId(),C=c??`inp_${v}`,[w,S]=y.useState(!1),k=!!r,T=!!o||i,D=a??(d&&w&&!a&&(m===""||m===void 0)?f:void 0),A=s?`${C}__hint`:void 0,M=D?`${C}__err`:void 0,j=[A,M].filter(Boolean).join(" ")||void 0,_=n==="invalid"||!!D;return p.jsxs("div",{className:"w-full",children:[u&&p.jsxs("label",{htmlFor:C,className:"mb-1 block text-sm font-medium text-[var(--atom-text)]",children:[u,d&&p.jsx("span",{className:"ml-0.5 text-[var(--atom-error)]",children:"*"})]}),p.jsxs("div",{className:"relative",children:[k&&p.jsx("span",{className:"pointer-events-none absolute left-0 top-1/2 -translate-y-1/2 flex w-9 items-center justify-center",children:r}),T&&p.jsx("span",{className:"absolute right-0 top-1/2 -translate-y-1/2 flex w-9 items-center justify-center",children:i?p.jsxs("svg",{viewBox:"0 0 24 24",className:"animate-spin h-4 w-4",fill:"none",stroke:"currentColor",children:[p.jsx("circle",{cx:"12",cy:"12",r:"9",strokeOpacity:".2",strokeWidth:"3"}),p.jsx("path",{d:"M21 12a9 9 0 0 1-9 9",strokeWidth:"3",strokeLinecap:"round"})]}):o}),p.jsx("input",{ref:g,id:C,className:O(CE({size:t,tone:n,hasLeft:k,hasRight:T}),_&&"border-[var(--atom-error)]",e),value:m,placeholder:l??" ","aria-required":d||void 0,"aria-invalid":_||void 0,"aria-errormessage":M,"aria-describedby":j,onBlur:B=>{S(!0),b?.(B)},...h})]}),(s||D)&&p.jsxs("div",{className:"mt-1 text-xs leading-snug",children:[D&&p.jsx("p",{id:M,className:"text-[var(--atom-error)]",children:D}),s&&!D&&p.jsx("p",{id:A,className:"text-[var(--atom-text-muted)]",children:s})]})]})});qm.displayName="Input";exports.Avatar=nl;exports.Badge=pp;exports.Button=fs;exports.Calendar=Tb;exports.Card=Il;exports.CardBody=Wl;exports.CardFooter=Bl;exports.CardHeader=Vl;exports.CardMedia=$l;exports.CardSubtitle=Ll;exports.CardTitle=Fl;exports.Checkbox=zl;exports.ContentCard=Yl;exports.DataTable=Tw;exports.Dialog=wx;exports.DialogBody=Tu;exports.DialogContent=Su;exports.DialogDescription=Mu;exports.DialogFooter=Eu;exports.DialogHeader=Du;exports.DialogOverlay=Es;exports.DialogPortal=Ts;exports.DialogTitle=Pu;exports.DialogTrigger=Cx;exports.Dropdown=Rm;exports.DropdownContent=Om;exports.DropdownGroup=Vm;exports.DropdownItem=jm;exports.DropdownLabel=Im;exports.DropdownSeparator=_m;exports.DropdownTrigger=Nm;exports.Heading=Au;exports.Input=qm;exports.NumberInput=Ud;exports.Paper=Ru;exports.Popover=Lm;exports.PopoverBody=zm;exports.PopoverClose=Um;exports.PopoverContent=Bm;exports.PopoverDescription=Gm;exports.PopoverFooter=Ym;exports.PopoverHeader=$m;exports.PopoverTitle=Hm;exports.PopoverTrigger=Wm;exports.ProgressBar=Nu;exports.Radio=Ju;exports.RadioDescription=nd;exports.RadioGroup=rd;exports.RadioLabel=ed;exports.RadioOption=td;exports.StatCardA=od;exports.StatCardB=sd;exports.StatCardC=ad;exports.TabContent=dd;exports.TabTrigger=ud;exports.Tabs=cd;exports.TabsList=ld;exports.Text=fd;exports.TextArea=md;exports.Tooltip=Gd;exports.avatarVariants=tl;exports.badgeVariants=el;
68
+ `),()=>{v.contains(b)&&v.removeChild(b)}},[t]),h.jsx(GS,{isPresent:t,childRef:s,sizeRef:a,children:g.cloneElement(e,{ref:l})})}const qS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:a,anchorX:i,root:c})=>{const l=Ys(KS),u=w.useId();let d=!0,f=w.useMemo(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:o,onExitComplete:m=>{l.set(m,!0);for(const y of l.values())if(!y)return;r&&r()},register:m=>(l.set(m,!1),()=>l.delete(m))}),[n,l,r]);return s&&d&&(f={...f}),w.useMemo(()=>{l.forEach((m,y)=>l.set(y,!1))},[n]),g.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=h.jsx(US,{isPresent:n,anchorX:i,root:c,children:e})),h.jsx(zr.Provider,{value:f,children:e})};function KS(){return new Map}function Zf(e=!0){const t=w.useContext(zr);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=w.useId();w.useEffect(()=>{if(e)return o(s)},[e]);const a=w.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,a]:[!0]}const lr=e=>e.key||"";function Gi(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const ma=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:a=!1,anchorX:i="left",root:c})=>{const[l,u]=Zf(a),d=w.useMemo(()=>Gi(e),[e]),f=a&&!l?[]:d.map(lr),m=w.useRef(!0),y=w.useRef(d),p=Ys(()=>new Map),b=w.useRef(new Set),[v,C]=w.useState(d),[x,k]=w.useState(d);rf(()=>{m.current=!1,y.current=d;for(let E=0;E<x.length;E++){const D=lr(x[E]);f.includes(D)?(p.delete(D),b.current.delete(D)):p.get(D)!==!0&&p.set(D,!1)}},[x,f.length,f.join("-")]);const S=[];if(d!==v){let E=[...d];for(let D=0;D<x.length;D++){const N=x[D],M=lr(N);f.includes(M)||(E.splice(D,0,N),S.push(N))}return s==="wait"&&S.length&&(E=S),k(Gi(E)),C(d),null}process.env.NODE_ENV!=="production"&&s==="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:T}=w.useContext(zs);return h.jsx(h.Fragment,{children:x.map(E=>{const D=lr(E),N=a&&!l?!1:d===x||f.includes(D),M=()=>{if(b.current.has(D))return;if(b.current.add(D),p.has(D))p.set(D,!0);else return;let j=!0;p.forEach(_=>{_||(j=!1)}),j&&(T?.(),k(y.current),a&&u?.(),r&&r())};return h.jsx(qS,{isPresent:N,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:c,onExitComplete:N?void 0:M,anchorX:i,children:E},D)})})},Qf=w.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"]},tn={};for(const e in Ui)tn[e]={isEnabled:t=>Ui[e].some(n=>!!t[n])};function XS(e){for(const t in e)tn[t]={...tn[t],...e[t]}}const ZS=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 Pr(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||ZS.has(e)}let Jf=e=>!Pr(e);function QS(e){typeof e=="function"&&(Jf=t=>t.startsWith("on")?!Pr(t):e(t))}try{QS(require("@emotion/is-prop-valid").default)}catch{}function JS(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Jf(o)||n===!0&&Pr(o)||!t&&!Pr(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const Yr=w.createContext({});function Hr(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function In(e){return typeof e=="string"||Array.isArray(e)}const ha=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],pa=["initial",...ha];function Gr(e){return Hr(e.animate)||pa.some(t=>In(e[t]))}function em(e){return!!(Gr(e)||e.variants)}function e1(e,t){if(Gr(e)){const{initial:n,animate:r}=e;return{initial:n===!1||In(n)?n:void 0,animate:In(r)?r:void 0}}return e.inherit!==!1?t:{}}function t1(e){const{initial:t,animate:n}=e1(e,w.useContext(Yr));return w.useMemo(()=>({initial:t,animate:n}),[qi(t),qi(n)])}function qi(e){return Array.isArray(e)?e.join(" "):e}function Ki(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const vn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(I.test(e))e=parseFloat(e);else return e;const n=Ki(e,t.target.x),r=Ki(e,t.target.y);return`${n}% ${r}%`}},n1={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=xt.parse(e);if(o.length>5)return r;const s=xt.createTransformer(e),a=typeof o[0]!="number"?1:0,i=n.x.scale*t.x,c=n.y.scale*t.y;o[0+a]/=i,o[1+a]/=c;const l=me(i,c,.5);return typeof o[2+a]=="number"&&(o[2+a]/=l),typeof o[3+a]=="number"&&(o[3+a]/=l),s(o)}},os={borderRadius:{...vn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vn,borderTopRightRadius:vn,borderBottomLeftRadius:vn,borderBottomRightRadius:vn,boxShadow:n1};function tm(e,{layout:t,layoutId:n}){return fn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!os[e]||e==="opacity")}const r1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},o1=dn.length;function s1(e,t,n){let r="",o=!0;for(let s=0;s<o1;s++){const a=dn[s],i=e[a];if(i===void 0)continue;let c=!0;if(typeof i=="number"?c=i===(a.startsWith("scale")?1:0):c=parseFloat(i)===0,!c||n){const l=Yf(i,la[a]);if(!c){o=!1;const u=r1[a]||a;r+=`${u}(${l}) `}n&&(t[a]=l)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function ga(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let a=!1,i=!1;for(const c in t){const l=t[c];if(fn.has(c)){a=!0;continue}else if(wf(c)){o[c]=l;continue}else{const u=Yf(l,la[c]);c.startsWith("origin")?(i=!0,s[c]=u):r[c]=u}}if(t.transform||(a||n?r.transform=s1(t,e.transform,n):r.transform&&(r.transform="none")),i){const{originX:c="50%",originY:l="50%",originZ:u=0}=s;r.transformOrigin=`${c} ${l} ${u}`}}const ba=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function nm(e,t,n){for(const r in t)!De(t[r])&&!tm(r,n)&&(e[r]=t[r])}function a1({transformTemplate:e},t){return w.useMemo(()=>{const n=ba();return ga(n,t,e),Object.assign({},n.vars,n.style)},[t])}function i1(e,t){const n=e.style||{},r={};return nm(r,n,e),Object.assign(r,a1(e,t)),r}function c1(e,t){const n={},r=i1(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.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=r,n}const l1={offset:"stroke-dashoffset",array:"stroke-dasharray"},u1={offset:"strokeDashoffset",array:"strokeDasharray"};function d1(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?l1:u1;e[s.offset]=I.transform(-r);const a=I.transform(t),i=I.transform(n);e[s.array]=`${a} ${i}`}const f1=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function rm(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:s=1,pathOffset:a=0,...i},c,l,u){if(ga(e,i,l),c){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);for(const m of f1)d[m]!==void 0&&(f[m]=d[m],delete d[m]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&d1(d,o,s,a,!1)}const om=()=>({...ba(),attrs:{}}),sm=e=>typeof e=="string"&&e.toLowerCase()==="svg";function m1(e,t,n,r){const o=w.useMemo(()=>{const s=om();return rm(s,t,sm(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};nm(s,e.style,e),o.style={...s,...o.style}}return o}const h1=["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 ya(e){return typeof e!="string"||e.includes("-")?!1:!!(h1.indexOf(e)>-1||/[A-Z]/u.test(e))}function p1(e,t,n,{latestValues:r},o,s=!1,a){const c=(a??ya(e)?m1:c1)(t,r,o,e),l=JS(t,typeof e=="string",s),u=e!==w.Fragment?{...l,...c,ref:n}:{},{children:d}=t,f=w.useMemo(()=>De(d)?d.get():d,[d]);return w.createElement(e,{...u,children:f})}function Xi(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function va(e,t,n,r){if(typeof t=="function"){const[o,s]=Xi(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=Xi(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function gr(e){return De(e)?e.get():e}function g1({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:b1(n,r,o,e),renderState:t()}}function b1(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=gr(s[f]);let{initial:a,animate:i}=e;const c=Gr(e),l=em(e);t&&l&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),i===void 0&&(i=t.animate));let u=n?n.initial===!1:!1;u=u||a===!1;const d=u?i:a;if(d&&typeof d!="boolean"&&!Hr(d)){const f=Array.isArray(d)?d:[d];for(let m=0;m<f.length;m++){const y=va(e,f[m]);if(y){const{transitionEnd:p,transition:b,...v}=y;for(const C in v){let x=v[C];if(Array.isArray(x)){const k=u?x.length-1:0;x=x[k]}x!==null&&(o[C]=x)}for(const C in p)o[C]=p[C]}}}return o}const am=e=>(t,n)=>{const r=w.useContext(Yr),o=w.useContext(zr),s=()=>g1(e,t,r,o);return n?s():Ys(s)};function xa(e,t,n){const{style:r}=e,o={};for(const s in r)(De(r[s])||t.style&&De(t.style[s])||tm(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(o[s]=r[s]);return o}const y1=am({scrapeMotionValuesFromProps:xa,createRenderState:ba});function im(e,t,n){const r=xa(e,t,n);for(const o in e)if(De(e[o])||De(t[o])){const s=dn.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const v1=am({scrapeMotionValuesFromProps:im,createRenderState:om}),x1=Symbol.for("motionComponentSymbol");function w1(e,t,n){const r=w.useRef(n);w.useInsertionEffect(()=>{r.current=n});const o=w.useRef(null);return w.useCallback(s=>{s&&e.onMount?.(s),t&&(s?t.mount(s):t.unmount());const a=r.current;if(typeof a=="function")if(s){const i=a(s);typeof i=="function"&&(o.current=i)}else o.current?(o.current(),o.current=null):a(s);else a&&(a.current=s)},[t])}const wa=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),C1="framerAppearId",cm="data-"+wa(C1),lm=w.createContext({});function kn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function k1(e,t,n,r,o,s){const{visualElement:a}=w.useContext(Yr),i=w.useContext(Qf),c=w.useContext(zr),l=w.useContext(fa).reducedMotion,u=w.useRef(null);r=r||i.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:l,isSVG:s}));const d=u.current,f=w.useContext(lm);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&S1(u.current,n,o,f);const m=w.useRef(!1);w.useInsertionEffect(()=>{d&&m.current&&d.update(n,c)});const y=n[cm],p=w.useRef(!!y&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return rf(()=>{d&&(m.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),p.current&&d.animationState&&d.animationState.animateChanges())}),w.useEffect(()=>{d&&(!p.current&&d.animationState&&d.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),p.current=!1),d.enteringChildren=void 0)}),d}function S1(e,t,n,r){const{layoutId:o,layout:s,drag:a,dragConstraints:i,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:um(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!a||i&&kn(i),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:c,layoutRoot:l})}function um(e){if(e)return e.options.allowProjection!==!1?e.projection:um(e.parent)}function Do(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&XS(r);const s=n?n==="svg":ya(e),a=s?v1:y1;function i(l,u){let d;const f={...w.useContext(fa),...l,layoutId:D1(l)},{isStatic:m}=f,y=t1(l),p=a(l,m);if(!m&&Hs){T1(f,r);const b=E1(f);d=b.MeasureLayout,y.visualElement=k1(e,p,f,o,b.ProjectionNode,s)}return h.jsxs(Yr.Provider,{value:y,children:[d&&y.visualElement?h.jsx(d,{visualElement:y.visualElement,...f}):null,p1(e,l,w1(p,y.visualElement,u),p,m,t,s)]})}i.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=w.forwardRef(i);return c[x1]=e,c}function D1({layoutId:e}){const t=w.useContext(zs).id;return t&&e!==void 0?t+"-"+e:e}function T1(e,t){const n=w.useContext(Qf).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?ln(!1,r,"lazy-strict-mode"):ct(!1,r,"lazy-strict-mode")}}function E1(e){const{drag:t,layout:n}=tn;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function P1(e,t){if(typeof Proxy>"u")return Do;const n=new Map,r=(s,a)=>Do(s,a,e,t),o=(s,a)=>(process.env.NODE_ENV!=="production"&&Xs(!1,"motion() is deprecated. Use motion.create() instead."),r(s,a));return new Proxy(o,{get:(s,a)=>a==="create"?r:(n.has(a)||n.set(a,Do(a,void 0,e,t)),n.get(a))})}function dm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function M1({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function R1(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function To(e){return e===void 0||e===1}function ss({scale:e,scaleX:t,scaleY:n}){return!To(e)||!To(t)||!To(n)}function Et(e){return ss(e)||fm(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function fm(e){return Zi(e.x)||Zi(e.y)}function Zi(e){return e&&e!=="0%"}function Mr(e,t,n){const r=e-n,o=t*r;return n+o}function Qi(e,t,n,r,o){return o!==void 0&&(e=Mr(e,o,r)),Mr(e,n,r)+t}function as(e,t=0,n=1,r,o){e.min=Qi(e.min,t,n,r,o),e.max=Qi(e.max,t,n,r,o)}function mm(e,{x:t,y:n}){as(e.x,t.translate,t.scale,t.originPoint),as(e.y,n.translate,n.scale,n.originPoint)}const Ji=.999999999999,ec=1.0000000000001;function N1(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,a;for(let i=0;i<o;i++){s=n[i],a=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Gt(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,mm(e,a)),r&&Et(s.latestValues)&&Gt(e,s.latestValues))}t.x<ec&&t.x>Ji&&(t.x=1),t.y<ec&&t.y>Ji&&(t.y=1)}function Ht(e,t){e.min=e.min+t,e.max=e.max+t}function tc(e,t,n,r,o=.5){const s=me(e.min,e.max,o);as(e,t,n,s,r)}function Gt(e,t){tc(e.x,t.x,t.scaleX,t.scale,t.originX),tc(e.y,t.y,t.scaleY,t.scale,t.originY)}function hm(e,t){return dm(R1(e.getBoundingClientRect(),t))}function A1(e,t,n){const r=hm(e,n),{scroll:o}=t;return o&&(Ht(r.x,o.offset.x),Ht(r.y,o.offset.y)),r}const nc=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ut=()=>({x:nc(),y:nc()}),rc=()=>({min:0,max:0}),ve=()=>({x:rc(),y:rc()}),is={current:null},pm={current:!1};function O1(){if(pm.current=!0,!!Hs)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>is.current=e.matches;e.addEventListener("change",t),t()}else is.current=!1}const j1=new WeakMap;function _1(e,t,n){for(const r in t){const o=t[r],s=n[r];if(De(o))e.addValue(r,o);else if(De(s))e.addValue(r,en(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,en(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const oc=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class I1{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:a},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ia,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=Te.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,le.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=i,this.blockInitialAnimation=!!s,this.isControllingVariants=Gr(n),this.isVariantNode=em(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 m=d[f];c[f]!==void 0&&De(m)&&m.set(c[f])}}mount(t){this.current=t,j1.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,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(pm.current||O1(),this.shouldReduceMotion=is.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(),vt(this.notifyUpdate),vt(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 r=fn.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&le.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in tn){const n=tn[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ve()}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 r=0;r<oc.length;r++){const o=oc[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,a=t[s];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=_1(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 r=this.values.get(t);n!==r&&(r&&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 r=this.values.get(t);return r===void 0&&n!==void 0&&(r=en(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(of(r)||af(r))?r=parseFloat(r):!zS(r)&&xt.test(n)&&(r=zf(t,n)),this.setBaseTarget(t,De(r)?r.get():r)),De(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=va(this.props,n,this.presenceContext?.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!De(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ks),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ua.render(this.render)}}class gm extends I1{constructor(){super(...arguments),this.KeyframeResolver=AS}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:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;De(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function bm(e,{style:t,vars:n},r,o){const s=e.style;let a;for(a in t)s[a]=t[a];o?.applyProjectionStyles(s,r);for(a in n)s.setProperty(a,n[a])}function V1(e){return window.getComputedStyle(e)}class F1 extends gm{constructor(){super(...arguments),this.type="html",this.renderInstance=bm}readValueFromInstance(t,n){if(fn.has(n))return this.projection?.isProjecting?Zo(n):Xk(t,n);{const r=V1(t),o=(wf(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return hm(t,n)}build(t,n,r){ga(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return xa(t,n,r)}}const ym=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 L1(e,t,n,r){bm(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(ym.has(o)?o:wa(o),t.attrs[o])}class W1 extends gm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ve}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(fn.has(n)){const r=$f(n);return r&&r.default||0}return n=ym.has(n)?n:wa(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return im(t,n,r)}build(t,n,r){rm(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){L1(t,n,r,o)}mount(t){this.isSVGTag=sm(t.tagName),super.mount(t)}}const B1=(e,t)=>t.isSVG??ya(e)?new W1(t):new F1(t,{allowProjection:e!==w.Fragment});function Xt(e,t,n){const r=e.getProps();return va(r,t,n!==void 0?n:r.custom,e)}const cs=e=>Array.isArray(e);function $1(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,en(n))}function z1(e){return cs(e)?e[e.length-1]||0:e}function Y1(e,t){const n=Xt(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const a in s){const i=z1(s[a]);$1(e,a,i)}}function H1(e){return!!(De(e)&&e.add)}function ls(e,t){const n=e.getValue("willChange");if(H1(n))return n.add(t);if(!n&&lt.WillChange){const r=new lt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function vm(e){return e.props[cm]}const G1=e=>e!==null;function U1(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(G1),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[s]}const q1={type:"spring",stiffness:500,damping:25,restSpeed:10},K1=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),X1={type:"keyframes",duration:.8},Z1={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Q1=(e,{keyframes:t})=>t.length>2?X1:fn.has(e)?e.startsWith("scale")?K1(t[1]):q1:Z1;function J1({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:a,repeatDelay:i,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const Ca=(e,t,n,r={},o,s)=>a=>{const i=ca(r,e)||{},c=i.delay||r.delay||0;let{elapsed:l=0}=r;l=l-Ze(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...i,delay:-l,onUpdate:f=>{t.set(f),i.onUpdate&&i.onUpdate(f)},onComplete:()=>{a(),i.onComplete&&i.onComplete()},name:e,motionValue:t,element:s?void 0:o};J1(i)||Object.assign(u,Q1(e,u)),u.duration&&(u.duration=Ze(u.duration)),u.repeatDelay&&(u.repeatDelay=Ze(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ns(u),u.delay===0&&(d=!0)),(lt.instantAnimations||lt.skipAnimations)&&(d=!0,ns(u),u.delay=0),u.allowFlatten=!i.type&&!i.ease,d&&!s&&t.get()!==void 0){const f=U1(u.keyframes,i);if(f!==void 0){le.update(()=>{u.onUpdate(f),u.onComplete()});return}}return i.isSync?new aa(u):new vS(u)};function eD({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function xm(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:a,...i}=t;r&&(s=r);const c=[],l=o&&e.animationState&&e.animationState.getState()[o];for(const u in i){const d=e.getValue(u,e.latestValues[u]??null),f=i[u];if(f===void 0||l&&eD(l,u))continue;const m={delay:n,...ca(s||{},u)},y=d.get();if(y!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===y&&!m.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const v=vm(e);if(v){const C=window.MotionHandoffAnimation(v,u,le);C!==null&&(m.startTime=C,p=!0)}}ls(e,u),d.start(Ca(u,d,f,e.shouldReduceMotion&&Lf.has(u)?{type:!1}:m,e,p));const b=d.animation;b&&c.push(b)}return a&&Promise.all(c).then(()=>{le.update(()=>{a&&Y1(e,a)})}),c}function wm(e,t,n,r=0,o=1){const s=Array.from(e).sort((l,u)=>l.sortNodePosition(u)).indexOf(t),a=e.size,i=(a-1)*r;return typeof n=="function"?n(s,a):o===1?s*r:i-s*r}function us(e,t,n={}){const r=Xt(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(xm(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:d}=o;return tD(e,t,c,l,u,d,n)}:()=>Promise.resolve(),{when:i}=o;if(i){const[c,l]=i==="beforeChildren"?[s,a]:[a,s];return c().then(()=>l())}else return Promise.all([s(),a(n.delay)])}function tD(e,t,n=0,r=0,o=0,s=1,a){const i=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),i.push(us(c,t,{...a,delay:n+(typeof r=="function"?0:r)+wm(e.variantChildren,c,r,o,s)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(i)}function nD(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>us(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=us(e,t,n);else{const o=typeof t=="function"?Xt(e,t,n.custom):t;r=Promise.all(xm(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Cm(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const rD=pa.length;function km(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?km(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<rD;n++){const r=pa[n],o=e.props[r];(In(o)||o===!1)&&(t[r]=o)}return t}const oD=[...ha].reverse(),sD=ha.length;function aD(e){return t=>Promise.all(t.map(({animation:n,options:r})=>nD(e,n,r)))}function iD(e){let t=aD(e),n=sc(),r=!0;const o=c=>(l,u)=>{const d=Xt(e,u,c==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:m,...y}=d;l={...l,...y,...m}}return l};function s(c){t=c(e)}function a(c){const{props:l}=e,u=km(e.parent)||{},d=[],f=new Set;let m={},y=1/0;for(let b=0;b<sD;b++){const v=oD[b],C=n[v],x=l[v]!==void 0?l[v]:u[v],k=In(x),S=v===c?C.isActive:null;S===!1&&(y=b);let T=x===u[v]&&x!==l[v]&&k;if(T&&r&&e.manuallyAnimateOnMount&&(T=!1),C.protectedKeys={...m},!C.isActive&&S===null||!x&&!C.prevProp||Hr(x)||typeof x=="boolean")continue;const E=cD(C.prevProp,x);let D=E||v===c&&C.isActive&&!T&&k||b>y&&k,N=!1;const M=Array.isArray(x)?x:[x];let j=M.reduce(o(v),{});S===!1&&(j={});const{prevResolvedValues:_={}}=C,B={..._,...j},z=W=>{D=!0,f.has(W)&&(N=!0,f.delete(W)),C.needsAnimating[W]=!0;const O=e.getValue(W);O&&(O.liveStyle=!1)};for(const W in B){const O=j[W],H=_[W];if(m.hasOwnProperty(W))continue;let ee=!1;cs(O)&&cs(H)?ee=!Cm(O,H):ee=O!==H,ee?O!=null?z(W):f.add(W):O!==void 0&&f.has(W)?z(W):C.protectedKeys[W]=!0}C.prevProp=x,C.prevResolvedValues=j,C.isActive&&(m={...m,...j}),r&&e.blockInitialAnimation&&(D=!1);const K=T&&E;D&&(!K||N)&&d.push(...M.map(W=>{const O={type:v};if(typeof W=="string"&&r&&!K&&e.manuallyAnimateOnMount&&e.parent){const{parent:H}=e,ee=Xt(H,W);if(H.enteringChildren&&ee){const{delayChildren:P}=ee.transition||{};O.delay=wm(H.enteringChildren,e,P)}}return{animation:W,options:O}}))}if(f.size){const b={};if(typeof l.initial!="boolean"){const v=Xt(e,Array.isArray(l.initial)?l.initial[0]:l.initial);v&&v.transition&&(b.transition=v.transition)}f.forEach(v=>{const C=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),b[v]=C??null}),d.push({animation:b})}let p=!!d.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(d):Promise.resolve()}function i(c,l){if(n[c].isActive===l)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(c,l)),n[c].isActive=l;const u=a(c);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:a,setActive:i,setAnimateFunction:s,getState:()=>n,reset:()=>{n=sc()}}}function cD(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Cm(t,e):!1}function Dt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function sc(){return{animate:Dt(!0),whileInView:Dt(),whileHover:Dt(),whileTap:Dt(),whileDrag:Dt(),whileFocus:Dt(),exit:Dt()}}class Ct{constructor(t){this.isMounted=!1,this.node=t}update(){}}class lD extends Ct{constructor(t){super(t),t.animationState||(t.animationState=iD(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Hr(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 uD=0;class dD extends Ct{constructor(){super(...arguments),this.id=uD++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.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 fD={animation:{Feature:lD},exit:{Feature:dD}};function Vn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Xn(e){return{point:{x:e.pageX,y:e.pageY}}}const mD=e=>t=>da(t)&&e(t,Xn(t));function Tn(e,t,n,r){return Vn(e,t,mD(n),r)}const Sm=1e-4,hD=1-Sm,pD=1+Sm,Dm=.01,gD=0-Dm,bD=0+Dm;function Ee(e){return e.max-e.min}function yD(e,t,n){return Math.abs(e-t)<=n}function ac(e,t,n,r=.5){e.origin=r,e.originPoint=me(t.min,t.max,e.origin),e.scale=Ee(n)/Ee(t),e.translate=me(n.min,n.max,e.origin)-e.originPoint,(e.scale>=hD&&e.scale<=pD||isNaN(e.scale))&&(e.scale=1),(e.translate>=gD&&e.translate<=bD||isNaN(e.translate))&&(e.translate=0)}function En(e,t,n,r){ac(e.x,t.x,n.x,r?r.originX:void 0),ac(e.y,t.y,n.y,r?r.originY:void 0)}function ic(e,t,n){e.min=n.min+t.min,e.max=e.min+Ee(t)}function vD(e,t,n){ic(e.x,t.x,n.x),ic(e.y,t.y,n.y)}function cc(e,t,n){e.min=t.min-n.min,e.max=e.min+Ee(t)}function Rr(e,t,n){cc(e.x,t.x,n.x),cc(e.y,t.y,n.y)}function _e(e){return[e("x"),e("y")]}const Tm=({current:e})=>e?e.ownerDocument.defaultView:null,lc=(e,t)=>Math.abs(e-t);function xD(e,t){const n=lc(e.x,t.x),r=lc(e.y,t.y);return Math.sqrt(n**2+r**2)}const uc=new Set(["auto","scroll"]);class Em{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:a=3,element:i}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Po(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,p=xD(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!p)return;const{point:b}=m,{timestamp:v}=ke;this.history.push({...b,timestamp:v});const{onStart:C,onMove:x}=this.handlers;y||(C&&C(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,m)},this.handlePointerMove=(m,y)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=Eo(y,this.transformPagePoint),le.update(this.updatePoint,!0)},this.handlePointerUp=(m,y)=>{this.end();const{onEnd:p,onSessionEnd:b,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const C=Po(m.type==="pointercancel"?this.lastMoveEventInfo:Eo(y,this.transformPagePoint),this.history);this.startEvent&&p&&p(m,C),b&&b(m,C)},!da(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=o||window;const c=Xn(t),l=Eo(c,this.transformPagePoint),{point:u}=l,{timestamp:d}=ke;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Po(l,this.history)),this.removeListeners=Un(Tn(this.contextWindow,"pointermove",this.handlePointerMove),Tn(this.contextWindow,"pointerup",this.handlePointerUp),Tn(this.contextWindow,"pointercancel",this.handlePointerUp)),i&&this.startScrollTracking(i)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(uc.has(r.overflowX)||uc.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:o.x-n.x,y:o.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,o),le.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),vt(this.updatePoint)}}function Eo(e,t){return t?{point:t(e.point)}:e}function dc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Po({point:e},t){return{point:e,delta:dc(e,Pm(t)),offset:dc(e,wD(t)),velocity:CD(t,.1)}}function wD(e){return e[0]}function Pm(e){return e[e.length-1]}function CD(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Pm(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Ze(t)));)n--;if(!r)return{x:0,y:0};const s=Ve(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const a={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function kD(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?me(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?me(n,e,r.max):Math.min(e,n)),e}function fc(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function SD(e,{top:t,left:n,bottom:r,right:o}){return{x:fc(e.x,n,o),y:fc(e.y,t,r)}}function mc(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function DD(e,t){return{x:mc(e.x,t.x),y:mc(e.y,t.y)}}function TD(e,t){let n=.5;const r=Ee(e),o=Ee(t);return o>r?n=On(t.min,t.max-r,e.min):r>o&&(n=On(e.min,e.max-o,t.min)),et(0,1,n)}function ED(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 ds=.35;function PD(e=ds){return e===!1?e=0:e===!0&&(e=ds),{x:hc(e,"left","right"),y:hc(e,"top","bottom")}}function hc(e,t,n){return{min:pc(e,t),max:pc(e,n)}}function pc(e,t){return typeof e=="number"?e:e[t]||0}const MD=new WeakMap;class RD{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=ve(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=d=>{n?(this.stopAnimation(),this.snapToCursor(Xn(d).point)):this.pauseAnimation()},a=(d,f)=>{this.stopAnimation();const{drag:m,dragPropagation:y,onDragStart:p}=this.getProps();if(m&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=IS(m),!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(v=>{let C=this.getAxisMotionValue(v).get()||0;if(Qe.test(C)){const{projection:x}=this.visualElement;if(x&&x.layout){const k=x.layout.layoutBox[v];k&&(C=Ee(k)*(parseFloat(C)/100))}}this.originPoint[v]=C}),p&&le.postRender(()=>p(d,f)),ls(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},i=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:m,dragDirectionLock:y,onDirectionLock:p,onDrag:b}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:v}=f;if(y&&this.currentDirection===null){this.currentDirection=ND(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),b&&b(d,f)},c=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>_e(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Em(t,{onSessionStart:s,onStart:a,onMove:i,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:Tm(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!r)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:i}=this.getProps();i&&le.postRender(()=>i(r,o))}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:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!ur(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=kD(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&kn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=SD(r.layoutBox,t):this.constraints=!1,this.elastic=PD(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&_e(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=ED(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!kn(t))return!1;const r=t.current;ct(r!==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:o}=this.visualElement;if(!o||!o.layout)return!1;const s=A1(r,o.root,this.visualElement.getTransformPagePoint());let a=DD(o.layout.layoutBox,s);if(n){const i=n(M1(a));this.hasMutatedConstraints=!!i,i&&(a=dm(i))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:i}=this.getProps(),c=this.constraints||{},l=_e(u=>{if(!ur(u,n,this.currentDirection))return;let d=c&&c[u]||{};a&&(d={min:0,max:0});const f=o?200:1e6,m=o?40:1e7,y={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,y)});return Promise.all(l).then(i)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ls(this.visualElement,t),r.start(Ca(t,r,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()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){_e(n=>{const{drag:r}=this.getProps();if(!ur(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:i}=o.layout.layoutBox[n],c=s.get()||0;s.set(t[n]-me(a,i,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!kn(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};_e(a=>{const i=this.getAxisMotionValue(a);if(i&&this.constraints!==!1){const c=i.get();o[a]=TD({min:c,max:c},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),_e(a=>{if(!ur(a,t,null))return;const i=this.getAxisMotionValue(a),{min:c,max:l}=this.constraints[a];i.set(me(c,l,o[a]))})}addListeners(){if(!this.visualElement.current)return;MD.set(this.visualElement,this);const t=this.visualElement.current,n=Tn(t,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&!Kf(c.target)&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();kn(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),le.read(r);const a=Vn(window,"resize",()=>this.scalePositionWithinConstraints()),i=o.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(_e(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=c[u].translate,d.set(d.get()+c[u].translate))}),this.visualElement.render())}));return()=>{a(),n(),s(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:a=ds,dragMomentum:i=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:a,dragMomentum:i}}}function ur(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function ND(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class AD extends Ct{constructor(t){super(t),this.removeGroupControls=Fe,this.removeListeners=Fe,this.controls=new RD(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Fe}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const gc=e=>(t,n)=>{e&&le.postRender(()=>e(t,n))};class OD extends Ct{constructor(){super(...arguments),this.removePointerDownListener=Fe}onPointerDown(t){this.session=new Em(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Tm(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:gc(t),onStart:gc(n),onMove:r,onEnd:(s,a)=>{delete this.session,o&&le.postRender(()=>o(s,a))}}}mount(){this.removePointerDownListener=Tn(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 br={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Mo=!1;class jD extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),Mo&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),br.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:a}=r;return a&&(a.isPresent=s,Mo=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||le.postRender(()=>{const i=a.getStack();(!i||!i.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ua.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Mo=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Mm(e){const[t,n]=Zf(),r=w.useContext(zs);return h.jsx(jD,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(lm),isPresent:t,safeToRemove:n})}function _D(e,t,n){const r=De(e)?e:en(e);return r.start(Ca("",r,t,n)),r.animation}const ID=(e,t)=>e.depth-t.depth;class VD{constructor(){this.children=[],this.isDirty=!1}add(t){Gs(this.children,t),this.isDirty=!0}remove(t){Us(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ID),this.isDirty=!1,this.children.forEach(t)}}function FD(e,t){const n=Te.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(vt(r),e(s-t))};return le.setup(r,!0),()=>vt(r)}const Rm=["TopLeft","TopRight","BottomLeft","BottomRight"],LD=Rm.length,bc=e=>typeof e=="string"?parseFloat(e):e,yc=e=>typeof e=="number"||I.test(e);function WD(e,t,n,r,o,s){o?(e.opacity=me(0,n.opacity??1,BD(r)),e.opacityExit=me(t.opacity??1,0,$D(r))):s&&(e.opacity=me(t.opacity??1,n.opacity??1,r));for(let a=0;a<LD;a++){const i=`border${Rm[a]}Radius`;let c=vc(t,i),l=vc(n,i);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||yc(c)===yc(l)?(e[i]=Math.max(me(bc(c),bc(l),r),0),(Qe.test(l)||Qe.test(c))&&(e[i]+="%")):e[i]=l}(t.rotate||n.rotate)&&(e.rotate=me(t.rotate||0,n.rotate||0,r))}function vc(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const BD=Nm(0,.5,pf),$D=Nm(.5,.95,Fe);function Nm(e,t,n){return r=>r<e?0:r>t?1:n(On(e,t,r))}function xc(e,t){e.min=t.min,e.max=t.max}function We(e,t){xc(e.x,t.x),xc(e.y,t.y)}function wc(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Cc(e,t,n,r,o){return e-=t,e=Mr(e,1/n,r),o!==void 0&&(e=Mr(e,1/o,r)),e}function zD(e,t=0,n=1,r=.5,o,s=e,a=e){if(Qe.test(t)&&(t=parseFloat(t),t=me(a.min,a.max,t/100)-a.min),typeof t!="number")return;let i=me(s.min,s.max,r);e===s&&(i-=t),e.min=Cc(e.min,t,n,i,o),e.max=Cc(e.max,t,n,i,o)}function kc(e,t,[n,r,o],s,a){zD(e,t[n],t[r],t[o],t.scale,s,a)}const YD=["x","scaleX","originX"],HD=["y","scaleY","originY"];function Sc(e,t,n,r){kc(e.x,t,YD,n?n.x:void 0,r?r.x:void 0),kc(e.y,t,HD,n?n.y:void 0,r?r.y:void 0)}function Dc(e){return e.translate===0&&e.scale===1}function Am(e){return Dc(e.x)&&Dc(e.y)}function Tc(e,t){return e.min===t.min&&e.max===t.max}function GD(e,t){return Tc(e.x,t.x)&&Tc(e.y,t.y)}function Ec(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Om(e,t){return Ec(e.x,t.x)&&Ec(e.y,t.y)}function Pc(e){return Ee(e.x)/Ee(e.y)}function Mc(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class UD{constructor(){this.members=[]}add(t){Gs(this.members,t),t.scheduleRender()}remove(t){if(Us(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(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function qD(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,a=n?.z||0;if((o||s||a)&&(r=`translate3d(${o}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:u,rotateX:d,rotateY:f,skewX:m,skewY:y}=n;l&&(r=`perspective(${l}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),m&&(r+=`skewX(${m}deg) `),y&&(r+=`skewY(${y}deg) `)}const i=e.x.scale*t.x,c=e.y.scale*t.y;return(i!==1||c!==1)&&(r+=`scale(${i}, ${c})`),r||"none"}const Ro=["","X","Y","Z"],KD=1e3;let XD=0;function No(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function jm(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=vm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",le,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&jm(r)}function _m({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},i=t?.()){this.id=XD++,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(JD),this.nodes.forEach(rT),this.nodes.forEach(oT),this.nodes.forEach(eT)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new VD)}addEventListener(a,i){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Ks),this.eventHandlers.get(a).add(i)}notifyListeners(a,...i){const c=this.eventHandlers.get(a);c&&c.notify(...i)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=Xf(a)&&!BS(a),this.instance=a;const{layoutId:i,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||i)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;le.read(()=>{d=window.innerWidth}),e(a,()=>{const m=window.innerWidth;m!==d&&(d=m,this.root.updateBlockedByResize=!0,u&&u(),u=FD(f,250),br.hasAnimatedSinceResize&&(br.hasAnimatedSinceResize=!1,this.nodes.forEach(Ac)))})}i&&this.root.registerSharedNode(i,this),this.options.animate!==!1&&l&&(i||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||l.getDefaultTransition()||lT,{onLayoutAnimationStart:p,onLayoutAnimationComplete:b}=l.getProps(),v=!this.targetLayout||!Om(this.targetLayout,m),C=!d&&f;if(this.options.layoutRoot||this.resumeFrom||C||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...ca(y,"layout"),onPlay:p,onComplete:b};(l.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,C)}else d||Ac(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),vt(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(sT),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&jm(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:i,layout:c}=this.options;if(i===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Rc);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Nc);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(nT),this.nodes.forEach(ZD),this.nodes.forEach(QD)):this.nodes.forEach(Nc),this.clearAllSnapshots();const i=Te.now();ke.delta=et(0,1e3/60,i-ke.timestamp),ke.timestamp=i,ke.isProcessing=!0,yo.update.process(ke),yo.preRender.process(ke),yo.render.process(ke),ke.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ua.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tT),this.sharedNodes.forEach(aT)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,le.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){le.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ee(this.snapshot.measuredBox.x)&&!Ee(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=ve(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:i}=this.options;i&&i.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let i=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(i=!1),i&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,i=this.projectionDelta&&!Am(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;a&&this.instance&&(i||Et(this.latestValues)||u)&&(o(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const i=this.measurePageBox();let c=this.removeElementScroll(i);return a&&(c=this.removeTransform(c)),uT(c),{animationId:this.root.animationId,measuredBox:i,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return ve();const i=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(dT))){const{scroll:l}=this.root;l&&(Ht(i.x,l.offset.x),Ht(i.y,l.offset.y))}return i}removeElementScroll(a){const i=ve();if(We(i,a),this.scroll?.wasRoot)return i;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:u,options:d}=l;l!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&We(i,a),Ht(i.x,u.offset.x),Ht(i.y,u.offset.y))}return i}applyTransform(a,i=!1){const c=ve();We(c,a);for(let l=0;l<this.path.length;l++){const u=this.path[l];!i&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Gt(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Et(u.latestValues)&&Gt(c,u.latestValues)}return Et(this.latestValues)&&Gt(c,this.latestValues),c}removeTransform(a){const i=ve();We(i,a);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!Et(l.latestValues))continue;ss(l.latestValues)&&l.updateSnapshot();const u=ve(),d=l.measurePageBox();We(u,d),Sc(i,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,u)}return Et(this.latestValues)&&Sc(i,this.latestValues),i}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==ke.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const i=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=i.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=i.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=i.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==i;if(!(a||c&&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))return;this.resolvedRelativeTargetAt=ke.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ve(),this.targetWithTransforms=ve()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),vD(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):We(this.target,this.layout.layoutBox),mm(this.target,this.targetDelta)):We(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||ss(this.parent.latestValues)||fm(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,i,c){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ve(),this.relativeTargetOrigin=ve(),Rr(this.relativeTargetOrigin,i,c),We(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),i=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),i&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ke.timestamp&&(c=!1),c)return;const{layout:l,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||!(l||u))return;We(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;N1(this.layoutCorrected,this.treeScale,this.path,i),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=ve());const{target:m}=a;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(wc(this.prevProjectionDelta.x,this.projectionDelta.x),wc(this.prevProjectionDelta.y,this.projectionDelta.y)),En(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Mc(this.projectionDelta.x,this.prevProjectionDelta.x)||!Mc(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const i=this.getStack();i&&i.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ut(),this.projectionDelta=Ut(),this.projectionDeltaWithTransform=Ut()}setAnimationOrigin(a,i=!1){const c=this.snapshot,l=c?c.latestValues:{},u={...this.latestValues},d=Ut();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!i;const f=ve(),m=c?c.source:void 0,y=this.layout?this.layout.source:void 0,p=m!==y,b=this.getStack(),v=!b||b.members.length<=1,C=!!(p&&!v&&this.options.crossfade===!0&&!this.path.some(cT));this.animationProgress=0;let x;this.mixTargetDelta=k=>{const S=k/1e3;Oc(d.x,a.x,S),Oc(d.y,a.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Rr(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),iT(this.relativeTarget,this.relativeTargetOrigin,f,S),x&&GD(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=ve()),We(x,this.relativeTarget)),p&&(this.animationValues=u,WD(u,l,this.latestValues,S,C,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(vt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=le.update(()=>{br.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=en(0)),this.currentAnimation=_D(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:i=>{this.mixTargetDelta(i),a.onUpdate&&a.onUpdate(i)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(KD),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:i,target:c,layout:l,latestValues:u}=a;if(!(!i||!c||!l)){if(this!==a&&this.layout&&l&&Im(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||ve();const d=Ee(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+d;const f=Ee(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+f}We(i,c),Gt(i,u),En(this.projectionDeltaWithTransform,this.layoutCorrected,i,u)}}registerSharedNode(a,i){this.sharedNodes.has(a)||this.sharedNodes.set(a,new UD),this.sharedNodes.get(a).add(i);const l=i.options.initialPromotionConfig;i.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(i):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:i,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),i&&this.setOptions({transition:i})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let i=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(i=!0),!i)return;const l={};c.z&&No("z",a,l,this.animationValues);for(let u=0;u<Ro.length;u++)No(`rotate${Ro[u]}`,a,l,this.animationValues),No(`skew${Ro[u]}`,a,l,this.animationValues);a.render();for(const u in l)a.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);a.scheduleRender()}applyProjectionStyles(a,i){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=gr(i?.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=gr(i?.pointerEvents)||""),this.hasProjected&&!Et(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let d=qD(this.projectionDeltaWithTransform,this.treeScale,u);c&&(d=c(u,d)),a.transform=d;const{x:f,y:m}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,l.animationValues?a.opacity=l===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:a.opacity=l===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const y in os){if(u[y]===void 0)continue;const{correct:p,applyTo:b,isCSSVariable:v}=os[y],C=d==="none"?u[y]:p(u[y],l);if(b){const x=b.length;for(let k=0;k<x;k++)a[b[k]]=C}else v?this.options.visualElement.renderState.vars[y]=C:a[y]=C}this.options.layoutId&&(a.pointerEvents=l===this?gr(i?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(Rc),this.root.sharedNodes.clear()}}}function ZD(e){e.updateLayout()}function QD(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,s=t.source!==e.layout.source;o==="size"?_e(u=>{const d=s?t.measuredBox[u]:t.layoutBox[u],f=Ee(d);d.min=n[u].min,d.max=d.min+f}):Im(o,t.layoutBox,n)&&_e(u=>{const d=s?t.measuredBox[u]:t.layoutBox[u],f=Ee(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const a=Ut();En(a,n,t.layoutBox);const i=Ut();s?En(i,e.applyTransform(r,!0),t.measuredBox):En(i,n,t.layoutBox);const c=!Am(a);let l=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const m=ve();Rr(m,t.layoutBox,d.layoutBox);const y=ve();Rr(y,n,f.layoutBox),Om(m,y)||(l=!0),u.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=m,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:i,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function JD(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function eT(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function tT(e){e.clearSnapshot()}function Rc(e){e.clearMeasurements()}function Nc(e){e.isLayoutDirty=!1}function nT(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ac(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function rT(e){e.resolveTargetDelta()}function oT(e){e.calcProjection()}function sT(e){e.resetSkewAndRotation()}function aT(e){e.removeLeadSnapshot()}function Oc(e,t,n){e.translate=me(t.translate,0,n),e.scale=me(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function jc(e,t,n,r){e.min=me(t.min,n.min,r),e.max=me(t.max,n.max,r)}function iT(e,t,n,r){jc(e.x,t.x,n.x,r),jc(e.y,t.y,n.y,r)}function cT(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const lT={duration:.45,ease:[.4,0,.1,1]},_c=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ic=_c("applewebkit/")&&!_c("chrome/")?Math.round:Fe;function Vc(e){e.min=Ic(e.min),e.max=Ic(e.max)}function uT(e){Vc(e.x),Vc(e.y)}function Im(e,t,n){return e==="position"||e==="preserve-aspect"&&!yD(Pc(t),Pc(n),.2)}function dT(e){return e!==e.root&&e.scroll?.wasRoot}const fT=_m({attachResizeListener:(e,t)=>Vn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ao={current:void 0},Vm=_m({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ao.current){const e=new fT({});e.mount(window),e.setOptions({layoutScroll:!0}),Ao.current=e}return Ao.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),mT={pan:{Feature:OD},drag:{Feature:AD,ProjectionNode:Vm,MeasureLayout:Mm}};function Fc(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&le.postRender(()=>s(t,Xn(t)))}class hT extends Ct{mount(){const{current:t}=this.node;t&&(this.unmount=VS(t,(n,r)=>(Fc(this.node,r,"Start"),o=>Fc(this.node,o,"End"))))}unmount(){}}class pT extends Ct{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=Un(Vn(this.node.current,"focus",()=>this.onFocus()),Vn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Lc(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&le.postRender(()=>s(t,Xn(t)))}class gT extends Ct{mount(){const{current:t}=this.node;t&&(this.unmount=WS(t,(n,r)=>(Lc(this.node,r,"Start"),(o,{success:s})=>Lc(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const fs=new WeakMap,Oo=new WeakMap,bT=e=>{const t=fs.get(e.target);t&&t(e)},yT=e=>{e.forEach(bT)};function vT({root:e,...t}){const n=e||document;Oo.has(n)||Oo.set(n,{});const r=Oo.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(yT,{root:e,...t})),r[o]}function xT(e,t,n){const r=vT(t);return fs.set(e,n),r.observe(e),()=>{fs.delete(e),r.unobserve(e)}}const wT={some:0,all:1};class CT extends Ct{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:wT[o]},i=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,s&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=l?u:d;f&&f(c)};return xT(this.node.current,a,i)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(kT(t,n))&&this.startObserver()}unmount(){}}function kT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const ST={inView:{Feature:CT},tap:{Feature:gT},focus:{Feature:pT},hover:{Feature:hT}},DT={layout:{ProjectionNode:Vm,MeasureLayout:Mm}},TT={...fD,...ST,...mT,...DT},pt=P1(TT,B1);class ET extends w.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Dropdown Error:",t,n),this.props.onError?.(t,n)}render(){return this.state.hasError?this.props.fallback||null:this.props.children}}const Fm=w.createContext(void 0);function ka(){const e=w.useContext(Fm);if(!e)throw new Error("Dropdown components must be used within Dropdown");return e}const PT=te(["absolute z-[1000] min-w-[8rem] overflow-hidden","rounded-md border shadow-lg","bg-[var(--atom-theme-surface-primary)] border-[var(--atom-theme-border-primary)] px-1.5 py-2"].join(" "),{variants:{side:{top:"",bottom:"",left:"",right:""},align:{start:"",center:"",end:""}},defaultVariants:{side:"bottom",align:"start"}}),MT=te(["relative flex cursor-pointer select-none items-center","rounded-sm px-3 py-2 text-sm outline-none","transition-colors duration-150","focus:bg-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_15%,transparent)] focus:text-[var(--atom-text)]","hover:bg-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_15%,transparent)] hover:text-[var(--atom-text)]","focus:hover:bg-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_20%,transparent)]","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","data-[selected]:text-[var(--atom-primary)] data-[selected]:font-medium"].join(" ")),RT=te(["inline-flex items-center justify-center gap-2","px-4 py-2 rounded-md text-sm font-medium","transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--atom-primary)] focus-visible:ring-offset-2","cursor-pointer","disabled:pointer-events-none disabled:opacity-50"].join(" "),{variants:{variant:{default:["bg-[var(--atom-theme-surface-primary)]","border border-[var(--atom-theme-border-primary)]","text-[var(--atom-theme-text-primary)]"].join(" "),ghost:["bg-transparent","hover:bg-[color-mix(in_oklab,var(--atom-theme-surface-secondary)_15%,transparent)]","text-[var(--atom-text)]"].join(" ")}},defaultVariants:{variant:"ghost"}}),NT=e=>{const n={top:{y:8,x:0},bottom:{y:-8,x:0},left:{y:0,x:8},right:{y:0,x:-8}};return{initial:{opacity:0,scale:.95,...n[e]},animate:{opacity:1,scale:1,x:0,y:0},exit:{opacity:0,scale:.95,...n[e]}}};function AT(e,t,n,r=!0){w.useEffect(()=>{if(!r||typeof document>"u")return;const o=s=>{const a=s.target;!e.current||e.current.contains(a)||t.current&&t.current.contains(a)||n()};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}},[e,t,n,r])}function OT(e,t,n,r,o,s,a){const[i,c]=w.useState({top:0,left:0}),l=w.useCallback(()=>{if(typeof window>"u"||!n||!e.current||!t.current)return;const u=e.current.getBoundingClientRect(),d=t.current.getBoundingClientRect(),f={width:window.innerWidth,height:window.innerHeight},m=window.scrollY,y=window.scrollX;let p=0,b=0;switch(r){case"top":p=u.top+m-d.height-s;break;case"bottom":p=u.bottom+m+s;break;case"left":case"right":switch(o){case"start":p=u.top+m+a;break;case"center":p=u.top+m+u.height/2-d.height/2;break;case"end":p=u.bottom+m-d.height-a;break}break}switch(r){case"left":b=u.left+y-d.width-s;break;case"right":b=u.right+y+s;break;case"top":case"bottom":switch(o){case"start":b=u.left+y+a;break;case"center":b=u.left+y+u.width/2-d.width/2;break;case"end":b=u.right+y-d.width-a;break}break}const v=8;b<v&&(b=v),b+d.width>f.width-v&&(b=f.width-d.width-v),p<m+v&&(p=m+v),p+d.height>m+f.height-v&&(p=m+f.height-d.height-v),c({top:p,left:b})},[n,r,o,s,a,t,e]);return w.useEffect(()=>{if(typeof window>"u"||!n||!e.current||!t.current)return;l();let u=null;return typeof ResizeObserver<"u"&&t.current&&(u=new ResizeObserver(l),u.observe(t.current)),window.addEventListener("scroll",l,{passive:!0,capture:!0}),window.addEventListener("resize",l,{passive:!0}),()=>{u?.disconnect(),window.removeEventListener("scroll",l,!0),window.removeEventListener("resize",l)}},[l,n,t,e]),i}const Lm=({open:e,onOpenChange:t,defaultOpen:n=!1,value:r,onValueChange:o,disabled:s=!1,animateItems:a=!1,errorFallback:i,onError:c,children:l})=>{const[u,d]=w.useState(n),[f,m]=w.useState(r||""),[y,p]=w.useState(""),[b,v]=w.useState(!1),C=w.useId(),x=`dropdown-trigger-${C}`,k=`dropdown-content-${C}`,S=e!==void 0,T=s?!1:S?e:u,E=w.useCallback((M,j=!1)=>{s||(v(j),S||d(M),t?.(M))},[S,t,s]),D=w.useCallback(M=>{m(M),o?.(M)},[o]);w.useEffect(()=>{r!==void 0&&m(r)},[r]);const N=w.useMemo(()=>({open:T,setOpen:E,triggerId:x,contentId:k,selectedValue:r||f,setSelectedValue:D,activeDescendant:y,setActiveDescendant:p,animateItems:a,openedViaKeyboard:b}),[T,E,x,k,r,f,D,y,a,b]);return h.jsx(ET,{fallback:i,onError:c,children:h.jsx(Fm.Provider,{value:N,children:h.jsxs("div",{className:"relative inline-block",children:[l,h.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:f&&`Selected: ${f}`})]})})})};Lm.displayName="Dropdown";const Wm=w.forwardRef(({className:e,children:t,onClick:n,onMouseDown:r,onKeyDown:o,variant:s,asChild:a=!1,disabled:i,...c},l)=>{const{open:u,setOpen:d,triggerId:f,contentId:m}=ka(),y=w.useRef(null);w.useEffect(()=>{l&&(typeof l=="function"?l(y.current):l.current=y.current)},[l]);const p=x=>{x.preventDefault(),r?.(x)},b=x=>{i||(x.stopPropagation(),d(!u,!1),n?.(x))},v=x=>{if(!i){switch(x.key){case"ArrowDown":x.preventDefault(),u||d(!0,!0);break;case"ArrowUp":x.preventDefault(),u||d(!0,!0);break;case"Enter":case" ":x.preventDefault(),d(!u,!0);break}o?.(x)}},C=a?Me:"button";return h.jsx(C,{ref:y,id:f,type:a?void 0:"button","aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?m:void 0,disabled:i,"data-testid":"dropdown-trigger",className:a?e:R(RT({variant:s}),e),onMouseDown:p,onClick:b,onKeyDown:v,...c,children:t})});Wm.displayName="DropdownTrigger";const Bm=w.forwardRef(({className:e,children:t,side:n="bottom",align:r="start",sideOffset:o=4,alignOffset:s=0,container:a,preventClose:i=!1,...c},l)=>{const{open:u,setOpen:d,triggerId:f,contentId:m,activeDescendant:y,openedViaKeyboard:p}=ka(),b=w.useRef(null),v=w.useRef(null),C=_r();w.useEffect(()=>{l&&(typeof l=="function"?l(b.current):l.current=b.current)},[l]);const x=n??"bottom",k=r??"start",S=OT(v,b,u,x,k,o,s);w.useEffect(()=>{if(typeof document>"u")return;const N=document.getElementById(f);N&&(v.current=N)},[f]),AT(b,v,()=>{u&&!i&&d(!1)},u),w.useEffect(()=>{if(typeof document>"u"||!u||!b.current)return;if(p){const M=b.current.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])');M.length>0&&M[0].focus()}const N=M=>{M.key==="Escape"&&(M.preventDefault(),M.stopPropagation(),d(!1),v.current?.focus())};return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[u,d,p]);const T=w.useMemo(()=>NT(x),[x]),E=a||C||(typeof document<"u"?document.body:null);if(!E)return null;const D=h.jsx(ma,{mode:"wait",children:u&&h.jsx(pt.div,{ref:b,id:m,role:"menu","aria-labelledby":f,"aria-orientation":"vertical","aria-activedescendant":y||void 0,"data-testid":"dropdown-content",initial:"initial",animate:"animate",exit:"exit",variants:T,transition:{duration:.2,ease:[.16,1,.3,1]},className:R(PT({side:x,align:k}),e),style:{position:"fixed",top:`${S.top}px`,left:`${S.left}px`,pointerEvents:"auto"},...c,children:t})});return Fn.createPortal(h.jsx(w.Suspense,{fallback:null,children:D}),E)});Bm.displayName="DropdownContent";const $m=w.forwardRef(({className:e,children:t,disabled:n,preventClose:r=!1,value:o,onClick:s,onKeyDown:a,...i},c)=>{const{setOpen:l,selectedValue:u,setSelectedValue:d,setActiveDescendant:f,animateItems:m}=ka(),y=o!==void 0&&o===u,p=w.useRef(null),v=`dropdown-item-${w.useId()}`,[C,x]=w.useState(!1);w.useEffect(()=>{c&&(typeof c=="function"?c(p.current):c.current=p.current)},[c]);const k=w.useCallback(()=>{n||C||(x(!0),o!==void 0&&d(o),r||l(!1),setTimeout(()=>x(!1),300))},[n,C,o,d,r,l]),S=D=>{n||C||(D.stopPropagation(),s?.(D),k())},T=D=>{if(n)return;const N=p.current;if(!N)return;const M=Array.from(N.closest('[role="menu"]')?.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')||[]),j=M.indexOf(N);switch(D.key){case"Enter":case" ":D.preventDefault(),D.stopPropagation(),a?.(D),k();break;case"ArrowDown":if(D.preventDefault(),D.stopPropagation(),M.length>0){const _=(j+1)%M.length,B=M[_];B?.focus(),f(B.id)}break;case"ArrowUp":if(D.preventDefault(),D.stopPropagation(),M.length>0){const _=j===0?M.length-1:j-1,B=M[_];B?.focus(),f(B.id)}break;case"Home":if(D.preventDefault(),D.stopPropagation(),M.length>0){const _=M[0];_?.focus(),f(_.id)}break;case"End":if(D.preventDefault(),D.stopPropagation(),M.length>0){const _=M[M.length-1];_?.focus(),f(_.id)}break;case"Tab":if(M.length>0)if(D.shiftKey)if(j===0)l(!1);else{D.preventDefault();const _=M[j-1];_?.focus(),f(_.id)}else if(j===M.length-1)l(!1);else{D.preventDefault();const _=M[j+1];_?.focus(),f(_.id)}break;default:a?.(D)}},E=()=>{f(v)};return h.jsx(pt.div,{ref:p,id:v,role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,"data-selected":y?"":void 0,"data-testid":`dropdown-item-${o||v}`,className:R(MT(),e),onClick:S,onKeyDown:T,onFocus:E,whileHover:n||!m?void 0:{scale:1.01},whileTap:n||!m?void 0:{scale:.98},...i,children:t})});$m.displayName="DropdownItem";const zm=w.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,role:"separator","aria-orientation":"horizontal","data-testid":"dropdown-separator",className:R("my-1 h-px bg-(--atom-theme-border-primary)",e),...t}));zm.displayName="DropdownSeparator";const Ym=w.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,role:"presentation","data-testid":"dropdown-label",className:R("px-3 py-1.5 text-xs font-semibold text-(--atom-text-secondary)",e),...t}));Ym.displayName="DropdownLabel";const Hm=w.forwardRef(({className:e,children:t,...n},r)=>h.jsx("div",{ref:r,role:"group","data-testid":"dropdown-group",className:R("py-1",e),...n,children:t}));Hm.displayName="DropdownGroup";class jT extends w.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){console.error("Popover Error:",t,n),this.props.onError?.(t,n)}render(){return this.state.hasError?this.props.fallback||null:this.props.children}}const Gm=w.createContext(void 0);function Sa(){const e=w.useContext(Gm);if(!e)throw new Error("Popover components must be used within Popover");return e}const _T=te(["absolute z-[1000] rounded-lg border shadow-lg","bg-[var(--atom-theme-surface-primary)] border-[var(--atom-theme-border-primary)]","outline-none overflow-hidden"].join(" "),{variants:{side:{top:"",bottom:"",left:"",right:""},align:{start:"",center:"",end:""},size:{sm:"w-64",md:"w-80",lg:"w-96",xl:"w-[32rem]",full:"w-screen max-w-md"}},defaultVariants:{side:"bottom",align:"center",size:"md"}}),IT=te(["inline-flex items-center justify-center","transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--atom-primary)] focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","cursor-pointer"].join(" ")),VT=e=>{const n={top:{y:8,x:0},bottom:{y:-8,x:0},left:{y:0,x:8},right:{y:0,x:-8}};return{initial:{opacity:0,scale:.96,...n[e]},animate:{opacity:1,scale:1,x:0,y:0},exit:{opacity:0,scale:.95,...n[e]}}};function FT(e,t,n,r=!0){w.useEffect(()=>{if(!r||typeof document>"u")return;const o=s=>{const a=s.target;!e.current||e.current.contains(a)||t.current&&t.current.contains(a)||n()};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}},[e,t,n,r])}function LT(e,t,n,r,o,s,a){const[i,c]=w.useState({top:0,left:0}),l=w.useCallback(()=>{if(typeof window>"u"||!n||!e.current||!t.current)return;const u=e.current.getBoundingClientRect(),d=t.current.getBoundingClientRect(),f={width:window.innerWidth,height:window.innerHeight},m=window.scrollY,y=window.scrollX;let p=0,b=0;switch(r){case"top":p=u.top+m-d.height-s;break;case"bottom":p=u.bottom+m+s;break;case"left":case"right":switch(o){case"start":p=u.top+m+a;break;case"center":p=u.top+m+u.height/2-d.height/2;break;case"end":p=u.bottom+m-d.height-a;break}break}switch(r){case"left":b=u.left+y-d.width-s;break;case"right":b=u.right+y+s;break;case"top":case"bottom":switch(o){case"start":b=u.left+y+a;break;case"center":b=u.left+y+u.width/2-d.width/2;break;case"end":b=u.right+y-d.width-a;break}break}const v=8;b<v&&(b=v),b+d.width>f.width-v&&(b=f.width-d.width-v),p<m+v&&(p=m+v),p+d.height>m+f.height-v&&(p=m+f.height-d.height-v),c({top:p,left:b})},[n,r,o,s,a,t,e]);return w.useEffect(()=>{if(typeof window>"u"||!n||!e.current||!t.current)return;l();let u=null;return typeof ResizeObserver<"u"&&t.current&&(u=new ResizeObserver(l),u.observe(t.current)),window.addEventListener("scroll",l,{passive:!0,capture:!0}),window.addEventListener("resize",l,{passive:!0}),()=>{u?.disconnect(),window.removeEventListener("scroll",l,!0),window.removeEventListener("resize",l)}},[l,n,t,e]),i}const Um=({open:e,onOpenChange:t,defaultOpen:n=!1,modal:r=!1,errorFallback:o,onError:s,children:a})=>{const[i,c]=w.useState(n),l=w.useId(),u=`popover-trigger-${l}`,d=`popover-content-${l}`,f=e!==void 0,m=f?e:i,y=w.useCallback(b=>{f||c(b),t?.(b)},[f,t]),p=w.useMemo(()=>({open:m,setOpen:y,triggerId:u,contentId:d,modal:r}),[m,y,u,d,r]);return h.jsx(jT,{fallback:o,onError:s,children:h.jsx(Gm.Provider,{value:p,children:h.jsx("div",{className:"relative inline-block",children:a})})})};Um.displayName="Popover";const qm=w.forwardRef(({className:e,children:t,onClick:n,onKeyDown:r,asChild:o=!1,disabled:s,...a},i)=>{const{open:c,setOpen:l,triggerId:u,contentId:d}=Sa(),f=w.useRef(null);w.useEffect(()=>{i&&(typeof i=="function"?i(f.current):i.current=f.current)},[i]);const m=b=>{s||(b.stopPropagation(),l(!c),n?.(b))},y=b=>{s||((b.key==="Enter"||b.key===" ")&&(b.preventDefault(),l(!c)),r?.(b))},p=o?Me:"button";return h.jsx(p,{ref:f,id:u,type:o?void 0:"button","aria-haspopup":"dialog","aria-expanded":c,"aria-controls":c?d:void 0,disabled:s,"data-state":c?"open":"closed","data-testid":"popover-trigger",className:o?e:R(IT(),e),onClick:m,onKeyDown:y,...a,children:t})});qm.displayName="PopoverTrigger";const Km=w.forwardRef(({className:e,children:t,side:n="bottom",align:r="center",size:o="md",sideOffset:s=8,alignOffset:a=0,container:i,preventClose:c=!1,preventOutsideClick:l=!1,showArrow:u=!1,...d},f)=>{const{open:m,setOpen:y,triggerId:p,contentId:b,modal:v}=Sa(),C=w.useRef(null),x=w.useRef(null),k=_r();w.useEffect(()=>{f&&(typeof f=="function"?f(C.current):f.current=C.current)},[f]);const S=LT(x,C,m,n??"bottom",r??"center",s,a);w.useEffect(()=>{if(typeof document>"u")return;const j=document.getElementById(p);j&&(x.current=j)},[p]),FT(C,x,()=>{m&&!c&&!l&&y(!1)},m),w.useEffect(()=>{if(typeof document>"u"||!m)return;const j=_=>{_.key==="Escape"&&(_.preventDefault(),_.stopPropagation(),y(!1),x.current?.focus())};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[m,y]),w.useEffect(()=>{if(typeof document>"u"||!m||!v)return;const j=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=j}},[m,v]),w.useEffect(()=>{if(typeof document>"u"||!m||!v||!C.current)return;const j=C.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),_=j[0],B=j[j.length-1],z=K=>{K.key==="Tab"&&(K.shiftKey?document.activeElement===_&&(K.preventDefault(),B?.focus()):document.activeElement===B&&(K.preventDefault(),_?.focus()))};return _?.focus(),document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[m,v]);const T=w.useMemo(()=>VT(n??"bottom"),[n]),E=i||k||(typeof document<"u"?document.body:null);if(!E)return null;const D=()=>R("absolute h-2 w-2 rotate-45 bg-[var(--atom-theme-surface-primary)] border-[var(--atom-theme-border-primary)]",{top:"bottom-[-5px] border-r border-b",bottom:"top-[-5px] border-l border-t",left:"right-[-5px] border-t border-r",right:"left-[-5px] border-b border-l"}[n??"bottom"]),N=()=>r==="center"?{left:"calc(50% - 4px)"}:r==="start"?{left:"16px"}:r==="end"?{right:"16px"}:{},M=h.jsx(ma,{mode:"wait",children:m&&h.jsxs(h.Fragment,{children:[v&&h.jsx(pt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"fixed inset-0 z-999 bg-black/50 backdrop-blur-sm","data-testid":"popover-backdrop",onClick:()=>!c&&!l&&y(!1),"aria-hidden":"true"}),h.jsxs(pt.div,{ref:C,id:b,role:"dialog","aria-labelledby":p,"aria-modal":v,"data-state":m?"open":"closed","data-testid":"popover-content",initial:"initial",animate:"animate",exit:"exit",variants:T,transition:{duration:.2,ease:[.16,1,.3,1]},className:R(_T({side:n,align:r,size:o}),e),style:{position:"fixed",top:`${S.top}px`,left:`${S.left}px`,pointerEvents:"auto"},...d,children:[u&&h.jsx("div",{className:D(),style:N(),"aria-hidden":"true"}),t]})]})});return Fn.createPortal(h.jsx(w.Suspense,{fallback:null,children:M}),E)});Km.displayName="PopoverContent";const Xm=w.forwardRef(({className:e,children:t,...n},r)=>h.jsx("div",{ref:r,"data-testid":"popover-header",className:R("flex items-center justify-between px-4 py-3 border-b border-(--atom-theme-border-primary)",e),...n,children:t}));Xm.displayName="PopoverHeader";const Zm=w.forwardRef(({className:e,children:t,...n},r)=>h.jsx("div",{ref:r,"data-testid":"popover-body",className:R("px-4 py-3",e),...n,children:t}));Zm.displayName="PopoverBody";const Qm=w.forwardRef(({className:e,children:t,...n},r)=>h.jsx("div",{ref:r,"data-testid":"popover-footer",className:R("flex items-center justify-end gap-2 px-4 py-3 border-t border-(--atom-theme-border-primary)",e),...n,children:t}));Qm.displayName="PopoverFooter";const Jm=w.forwardRef(({className:e,children:t,...n},r)=>h.jsx("h3",{ref:r,"data-testid":"popover-title",className:R("text-lg font-semibold text-(--atom-text)",e),...n,children:t}));Jm.displayName="PopoverTitle";const eh=w.forwardRef(({className:e,children:t,...n},r)=>h.jsx("p",{ref:r,"data-testid":"popover-description",className:R("text-sm text-(--atom-text)",e),...n,children:t}));eh.displayName="PopoverDescription";const th=w.forwardRef(({className:e,children:t,onClick:n,asChild:r=!1,...o},s)=>{const{setOpen:a}=Sa(),i=l=>{a(!1),n?.(l)},c=r?Me:"button";return h.jsx(c,{ref:s,type:r?void 0:"button","data-testid":"popover-close",className:r?e:R("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--atom-primary)","disabled:pointer-events-none disabled:opacity-50","h-8 w-8",e),onClick:i,"aria-label":"Close popover",...o,children:t||h.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[h.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),h.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})});th.displayName="PopoverClose";const WT=te(["block w-full rounded-md outline-none leading-none","bg-[var(--atom-input-bg)] text-[var(--atom-input-fg)]","border border-[var(--atom-theme-border-primary)]","transition-[background-color,border-color,box-shadow,color] duration-150 ease-in-out","placeholder:text-[color-mix(in_srgb,var(--atom-input-fg)_55%,transparent)]","caret-[var(--atom-primary)]","selection:bg-[color-mix(in_srgb,var(--atom-primary)_30%,transparent)]","hover:bg-[color-mix(in_srgb,var(--atom-primary)_1%,transparent)]","hover:border-[color-mix(in_srgb,var(--atom-input-border)_70%,var(--atom-primary)_30%)]","focus-visible:border-[var(--atom-input-focus,var(--atom-primary))]","focus-visible:ring-1 focus-visible:ring-[color-mix(in_srgb,var(--atom-primary)_35%,transparent)]","focus-visible:ring-offset-0","disabled:opacity-60 disabled:cursor-not-allowed","disabled:hover:bg-[var(--atom-input-bg)] disabled:hover:border-[var(--atom-input-border)]","read-only:bg-[color-mix(in_srgb,var(--atom-input-bg)_90%,var(--atom-border)_10%)] read-only:cursor-default","read-only:hover:bg-[color-mix(in_srgb,var(--atom-input-bg)_90%,var(--atom-border)_10%)]","placeholder:text-muted-foreground [&:not(:placeholder-shown)]:border-[color-mix(in_srgb,var(--atom-theme-border-primary)_70%,var(--atom-primary))]focus-visible:border-[var(--atom-primary)]"].join(" "),{variants:{size:{sm:"h-9 px-3 text-sm",md:"h-10 px-3.5 text-sm",lg:"h-11 px-4 text-base"},tone:{default:"",invalid:"border-[var(--atom-error)] focus-visible:border-[var(--atom-error)]",success:"border-[var(--atom-success)]"},hasLeft:{true:"pl-9"},hasRight:{true:"pr-9"}},defaultVariants:{size:"md",tone:"default"}}),nh=g.forwardRef(({className:e,size:t,tone:n="default",leftIcon:r,rightIcon:o,hint:s,errorText:a,loading:i=!1,id:c,placeholder:l,label:u,required:d=!1,requiredText:f="This field is required",value:m,onBlur:y,...p},b)=>{const v=g.useId(),C=c??`inp_${v}`,[x,k]=g.useState(!1),S=!!r,T=!!o||i,D=a??(d&&x&&!a&&(m===""||m===void 0)?f:void 0),N=s?`${C}__hint`:void 0,M=D?`${C}__err`:void 0,j=[N,M].filter(Boolean).join(" ")||void 0,_=n==="invalid"||!!D;return h.jsxs("div",{className:"w-full",children:[u&&h.jsxs("label",{htmlFor:C,className:"mb-1 block text-sm font-medium text-[var(--atom-text)]",children:[u,d&&h.jsx("span",{className:"ml-0.5 text-[var(--atom-error)]",children:"*"})]}),h.jsxs("div",{className:"relative",children:[S&&h.jsx("span",{className:"pointer-events-none absolute left-0 top-1/2 -translate-y-1/2 flex w-9 items-center justify-center",children:r}),T&&h.jsx("span",{className:"absolute right-0 top-1/2 -translate-y-1/2 flex w-9 items-center justify-center",children:i?h.jsxs("svg",{viewBox:"0 0 24 24",className:"animate-spin h-4 w-4",fill:"none",stroke:"currentColor",children:[h.jsx("circle",{cx:"12",cy:"12",r:"9",strokeOpacity:".2",strokeWidth:"3"}),h.jsx("path",{d:"M21 12a9 9 0 0 1-9 9",strokeWidth:"3",strokeLinecap:"round"})]}):o}),h.jsx("input",{ref:b,id:C,className:R(WT({size:t,tone:n,hasLeft:S,hasRight:T}),_&&"border-[var(--atom-error)]",e),value:m,placeholder:l??" ","aria-required":d||void 0,"aria-invalid":_||void 0,"aria-errormessage":M,"aria-describedby":j,onBlur:B=>{k(!0),y?.(B)},...p})]}),(s||D)&&h.jsxs("div",{className:"mt-1 text-xs leading-snug",children:[D&&h.jsx("p",{id:M,className:"text-[var(--atom-error)]",children:D}),s&&!D&&h.jsx("p",{id:N,className:"text-[var(--atom-text-muted)]",children:s})]})]})});nh.displayName="Input";var Ur="Switch",[BT]=wt(Ur),[$T,zT]=BT(Ur),rh=g.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:a,disabled:i,value:c="on",onCheckedChange:l,form:u,...d}=e,[f,m]=g.useState(null),y=xe(t,x=>m(x)),p=g.useRef(!1),b=f?u||!!f.closest("form"):!0,[v,C]=zn({prop:o,defaultProp:s??!1,onChange:l,caller:Ur});return h.jsxs($T,{scope:n,checked:v,disabled:i,children:[h.jsx(he.button,{type:"button",role:"switch","aria-checked":v,"aria-required":a,"data-state":ih(v),"data-disabled":i?"":void 0,disabled:i,value:c,...d,ref:y,onClick:ue(e.onClick,x=>{C(k=>!k),b&&(p.current=x.isPropagationStopped(),p.current||x.stopPropagation())})}),b&&h.jsx(ah,{control:f,bubbles:!p.current,name:r,value:c,checked:v,required:a,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});rh.displayName=Ur;var oh="SwitchThumb",sh=g.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=zT(oh,n);return h.jsx(he.span,{"data-state":ih(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});sh.displayName=oh;var YT="SwitchBubbleInput",ah=g.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const a=g.useRef(null),i=xe(a,s),c=Ku(n),l=Rs(t);return g.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==n&&m){const y=new Event("click",{bubbles:r});m.call(u,n),u.dispatchEvent(y)}},[c,n,r]),h.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...o.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ah.displayName=YT;function ih(e){return e?"checked":"unchecked"}var HT=rh,GT=sh;const ch=te(["relative inline-flex shrink-0 cursor-pointer items-center","rounded-full transition-colors","focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-[var(--atom-ring-color)]","disabled:cursor-not-allowed disabled:opacity-50"].join(" "),{variants:{variant:{default:"bg-[color-mix(in_srgb,var(--atom-border)_40%,transparent)] data-[state=checked]:bg-[var(--atom-primary)]",theme:"bg-[color-mix(in_srgb,var(--atom-border)_35%,transparent)] data-[state=checked]:bg-[var(--atom-primary)]"},size:{sm:"h-5 w-9",md:"h-6 w-11",lg:"h-7 w-14"},fullWidth:{true:"w-full",false:""}},defaultVariants:{variant:"default",size:"md",fullWidth:!1}}),lh={sm:{size:"h-4 w-4",translateX:16},md:{size:"h-5 w-5",translateX:20},lg:{size:"h-6 w-6",translateX:28}},UT=pt(GT),qT=({size:e=12})=>h.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[h.jsx("circle",{cx:"12",cy:"12",r:"4",fill:"white"}),h.jsx("path",{d:"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})]}),KT=({size:e=12})=>h.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",children:h.jsx("path",{d:"M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8z"})}),XT=({size:e=8})=>h.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",children:h.jsx("path",{d:"M12 2l3 6.3 7 1-5 4.9 1.2 6.9L12 17.8l-6.2 3.3L7 14.1 2 9.3l7-1z"})}),uh=g.forwardRef(({className:e,variant:t,size:n,fullWidth:r,checked:o,onCheckedChange:s,...a},i)=>{const[c,l]=g.useState(o??!1),[u,d]=g.useState(!1),f=n??"md",m=lh[f],y=f==="sm"?10:f==="md"?12:14;g.useEffect(()=>{o!==void 0&&l(o)},[o]);const p=b=>{d(!0),setTimeout(()=>d(!1),250),l(b),s?.(b)};return h.jsxs(HT,{ref:i,"data-slot":"switch",className:R(ch({variant:t,size:f,fullWidth:r}),e),checked:c,onCheckedChange:p,...a,children:[t==="theme"&&h.jsx(ma,{mode:"wait",children:c?h.jsxs(h.Fragment,{children:[h.jsx(pt.div,{className:"absolute left-1 top-1/2 -translate-y-1/2 text-white/80",initial:{opacity:0,scale:.4},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:h.jsx(KT,{size:y})},"moon"),h.jsx(pt.div,{className:"absolute right-3 top-1 text-white/60",initial:{opacity:0},animate:{opacity:1},children:h.jsx(XT,{})},"star")]}):h.jsx(pt.div,{className:"absolute right-1 top-1/2 -translate-y-1/2 text-amber-500",initial:{opacity:0,scale:.4,rotate:-180},animate:{opacity:1,scale:1,rotate:0},exit:{opacity:0,scale:0,rotate:180},children:h.jsx(qT,{size:y})},"sun")}),h.jsx(UT,{"data-slot":"switch-thumb",className:R(m.size,"block rounded-full bg-[var(--atom-bg)] shadow-md"),animate:{x:c?m.translateX:0,scaleX:u?[1,1.25,1]:1,scaleY:u?[1,.9,1]:1},transition:{type:"spring",stiffness:500,damping:30}})]})});uh.displayName="Switch";exports.Avatar=sl;exports.Badge=Np;exports.Button=hs;exports.Calendar=$y;exports.Card=Ll;exports.CardBody=zl;exports.CardFooter=Yl;exports.CardHeader=Wl;exports.CardMedia=Hl;exports.CardSubtitle=$l;exports.CardTitle=Bl;exports.Checkbox=Gl;exports.ContentCard=Ul;exports.DataTable=Yw;exports.Dialog=Vx;exports.DialogBody=Mu;exports.DialogContent=Eu;exports.DialogDescription=Au;exports.DialogFooter=Ru;exports.DialogHeader=Pu;exports.DialogOverlay=Ms;exports.DialogPortal=Ps;exports.DialogTitle=Nu;exports.DialogTrigger=Fx;exports.Drawer=Ou;exports.DrawerBody=Vu;exports.DrawerDescription=Iu;exports.DrawerFooter=Fu;exports.DrawerHeader=ju;exports.DrawerTitle=_u;exports.Dropdown=Lm;exports.DropdownContent=Bm;exports.DropdownGroup=Hm;exports.DropdownItem=$m;exports.DropdownLabel=Ym;exports.DropdownSeparator=zm;exports.DropdownTrigger=Wm;exports.Heading=Lu;exports.Input=nh;exports.NumberInput=nf;exports.Paper=Wu;exports.Popover=Um;exports.PopoverBody=Zm;exports.PopoverClose=th;exports.PopoverContent=Km;exports.PopoverDescription=eh;exports.PopoverFooter=Qm;exports.PopoverHeader=Xm;exports.PopoverTitle=Jm;exports.PopoverTrigger=qm;exports.ProgressBar=Bu;exports.Radio=cd;exports.RadioDescription=dd;exports.RadioGroup=fd;exports.RadioLabel=ld;exports.RadioOption=ud;exports.StatCardA=md;exports.StatCardB=hd;exports.StatCardC=pd;exports.Switch=uh;exports.TabContent=xd;exports.TabTrigger=vd;exports.Tabs=bd;exports.TabsList=yd;exports.Text=wd;exports.TextArea=Cd;exports.Tooltip=tf;exports.avatarVariants=ol;exports.badgeVariants=rl;exports.switchVariants=ch;exports.thumbConfig=lh;
69
69
  //# sourceMappingURL=index.cjs.map