@pondipondi/mimas 0.1.4 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/crumbs/bubble-input.d.ts +33 -0
- package/dist/components/crumbs/{Button.d.ts → button.d.ts} +114 -107
- package/dist/components/crumbs/checkbox.d.ts +565 -0
- package/dist/components/crumbs/input-group.d.ts +29 -0
- package/dist/components/crumbs/input.d.ts +305 -0
- package/dist/components/crumbs/{LoadingRing.d.ts → loading-ring.d.ts} +10 -3
- package/dist/components/crumbs/select.d.ts +95 -0
- package/dist/components/crumbs/tooltip.d.ts +20 -0
- package/dist/components/frames/dialog.d.ts +17 -0
- package/dist/components/frames/drawer.d.ts +215 -0
- package/dist/components/frames/inset.d.ts +7 -0
- package/dist/components/frames/modal.d.ts +14 -0
- package/dist/components/frames/panel.d.ts +9 -0
- package/dist/components/index.d.ts +38 -6
- package/dist/components/layout/between.d.ts +7 -0
- package/dist/components/layout/centre.d.ts +7 -0
- package/dist/components/layout/column.d.ts +7 -0
- package/dist/components/layout/flex.d.ts +7 -0
- package/dist/components/layout/grid.d.ts +7 -0
- package/dist/components/plates/bar-chart.d.ts +55 -0
- package/dist/components/plates/heatmap.d.ts +31 -0
- package/dist/components/util/icons.d.ts +10 -0
- package/dist/components/util/{MimasProvider.d.ts → mimas-provider.d.ts} +1 -1
- package/dist/components/util/noise.d.ts +5 -0
- package/dist/components/util/palette.d.ts +36 -0
- package/dist/components/util/rabbet.d.ts +11 -0
- package/dist/config/palettes.d.ts +73 -0
- package/dist/hooks/use-async-component.d.ts +49 -0
- package/dist/hooks/use-container-width.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/lib/classnames.d.ts +2 -0
- package/dist/lib/colour.d.ts +17 -0
- package/dist/lib/corners.d.ts +20 -0
- package/dist/mimas.cjs.js +135 -10
- package/dist/mimas.es.js +16126 -1361
- package/dist/stories/Mimas/Crumbs/BubbleInput.stories.d.ts +42 -0
- package/dist/stories/Mimas/Crumbs/Button.stories.d.ts +5 -3
- package/dist/stories/Mimas/Crumbs/Checkbox.stories.d.ts +313 -0
- package/dist/stories/Mimas/Crumbs/Input.stories.d.ts +339 -0
- package/dist/stories/Mimas/Crumbs/InputGroup.stories.d.ts +36 -0
- package/dist/stories/Mimas/Crumbs/Select.stories.d.ts +13 -0
- package/dist/stories/Mimas/Crumbs/Tooltip.stories.d.ts +27 -0
- package/dist/stories/Mimas/Frames/Dialog.stories.d.ts +14 -0
- package/dist/stories/Mimas/Frames/Drawer.stories.d.ts +28 -0
- package/dist/stories/Mimas/Frames/Modal.stories.d.ts +17 -0
- package/dist/stories/Mimas/Frames/Panel.stories.d.ts +11 -0
- package/dist/stories/Mimas/Plates/BarChart.stories.d.ts +20 -0
- package/dist/stories/Mimas/Plates/Heatmap.stories.d.ts +32 -0
- package/dist/stories/Mimas/Util/Palette.stories.d.ts +31 -0
- package/dist/style.css +1 -1
- package/package.json +79 -68
- package/dist/components/crumbs/ToggleSet.d.ts +0 -2
- package/dist/components/frames/Inset.d.ts +0 -50
- package/dist/components/util/Noise.d.ts +0 -2
package/dist/mimas.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";var Qf=Object.defineProperty;var ep=(e,t,n)=>t in e?Qf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ot=(e,t,n)=>ep(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("react"),tp=require("react-dom");function Pa(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 l=Pa(Z),Ft=Pa(tp);var bs={exports:{}},tr={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var $i;function np(){if($i)return tr;$i=1;var e=Z,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(c,a,u){var d,f={},y=null,h=null;u!==void 0&&(y=""+u),a.key!==void 0&&(y=""+a.key),a.ref!==void 0&&(h=a.ref);for(d in a)r.call(a,d)&&!s.hasOwnProperty(d)&&(f[d]=a[d]);if(c&&c.defaultProps)for(d in a=c.defaultProps,a)f[d]===void 0&&(f[d]=a[d]);return{$$typeof:t,type:c,key:y,ref:h,props:f,_owner:o.current}}return tr.Fragment=n,tr.jsx=i,tr.jsxs=i,tr}var nr={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,17 +14,142 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`)
|
|
21
|
-
`+
|
|
17
|
+
*/var Vi;function rp(){return Vi||(Vi=1,process.env.NODE_ENV!=="production"&&function(){var e=Z,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),c=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),v=Symbol.iterator,p="@@iterator";function g(E){if(E===null||typeof E!="object")return null;var F=v&&E[v]||E[p];return typeof F=="function"?F:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function m(E){{for(var F=arguments.length,X=new Array(F>1?F-1:0),fe=1;fe<F;fe++)X[fe-1]=arguments[fe];S("error",E,X)}}function S(E,F,X){{var fe=b.ReactDebugCurrentFrame,xe=fe.getStackAddendum();xe!==""&&(F+="%s",X=X.concat([xe]));var Ce=X.map(function(Re){return String(Re)});Ce.unshift("Warning: "+F),Function.prototype.apply.call(console[E],console,Ce)}}var x=!1,C=!1,R=!1,T=!1,k=!1,A;A=Symbol.for("react.module.reference");function H(E){return!!(typeof E=="string"||typeof E=="function"||E===r||E===s||k||E===o||E===u||E===d||T||E===h||x||C||R||typeof E=="object"&&E!==null&&(E.$$typeof===y||E.$$typeof===f||E.$$typeof===i||E.$$typeof===c||E.$$typeof===a||E.$$typeof===A||E.getModuleId!==void 0))}function M(E,F,X){var fe=E.displayName;if(fe)return fe;var xe=F.displayName||F.name||"";return xe!==""?X+"("+xe+")":X}function O(E){return E.displayName||"Context"}function P(E){if(E==null)return null;if(typeof E.tag=="number"&&m("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof E=="function")return E.displayName||E.name||null;if(typeof E=="string")return E;switch(E){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if(typeof E=="object")switch(E.$$typeof){case c:var F=E;return O(F)+".Consumer";case i:var X=E;return O(X._context)+".Provider";case a:return M(E,E.render,"ForwardRef");case f:var fe=E.displayName||null;return fe!==null?fe:P(E.type)||"Memo";case y:{var xe=E,Ce=xe._payload,Re=xe._init;try{return P(Re(Ce))}catch{return null}}}return null}var N=Object.assign,B=0,j,W,L,U,D,le,te;function be(){}be.__reactDisabledLog=!0;function Se(){{if(B===0){j=console.log,W=console.info,L=console.warn,U=console.error,D=console.group,le=console.groupCollapsed,te=console.groupEnd;var E={configurable:!0,enumerable:!0,value:be,writable:!0};Object.defineProperties(console,{info:E,log:E,warn:E,error:E,group:E,groupCollapsed:E,groupEnd:E})}B++}}function pe(){{if(B--,B===0){var E={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},E,{value:j}),info:N({},E,{value:W}),warn:N({},E,{value:L}),error:N({},E,{value:U}),group:N({},E,{value:D}),groupCollapsed:N({},E,{value:le}),groupEnd:N({},E,{value:te})})}B<0&&m("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ge=b.ReactCurrentDispatcher,Y;function z(E,F,X){{if(Y===void 0)try{throw Error()}catch(xe){var fe=xe.stack.trim().match(/\n( *(at )?)/);Y=fe&&fe[1]||""}return`
|
|
18
|
+
`+Y+E}}var J=!1,re;{var K=typeof WeakMap=="function"?WeakMap:Map;re=new K}function V(E,F){if(!E||J)return"";{var X=re.get(E);if(X!==void 0)return X}var fe;J=!0;var xe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ce;Ce=ge.current,ge.current=null,Se();try{if(F){var Re=function(){throw Error()};if(Object.defineProperty(Re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Re,[])}catch(Ct){fe=Ct}Reflect.construct(E,[],Re)}else{try{Re.call()}catch(Ct){fe=Ct}E.call(Re.prototype)}}else{try{throw Error()}catch(Ct){fe=Ct}E()}}catch(Ct){if(Ct&&fe&&typeof Ct.stack=="string"){for(var ke=Ct.stack.split(`
|
|
19
|
+
`),dt=fe.stack.split(`
|
|
20
|
+
`),Je=ke.length-1,He=dt.length-1;Je>=1&&He>=0&&ke[Je]!==dt[He];)He--;for(;Je>=1&&He>=0;Je--,He--)if(ke[Je]!==dt[He]){if(Je!==1||He!==1)do if(Je--,He--,He<0||ke[Je]!==dt[He]){var yt=`
|
|
21
|
+
`+ke[Je].replace(" at new "," at ");return E.displayName&&yt.includes("<anonymous>")&&(yt=yt.replace("<anonymous>",E.displayName)),typeof E=="function"&&re.set(E,yt),yt}while(Je>=1&&He>=0);break}}}finally{J=!1,ge.current=Ce,pe(),Error.prepareStackTrace=xe}var qt=E?E.displayName||E.name:"",Bt=qt?z(qt):"";return typeof E=="function"&&re.set(E,Bt),Bt}function he(E,F,X){return V(E,!1)}function Q(E){var F=E.prototype;return!!(F&&F.isReactComponent)}function Ne(E,F,X){if(E==null)return"";if(typeof E=="function")return V(E,Q(E));if(typeof E=="string")return z(E);switch(E){case u:return z("Suspense");case d:return z("SuspenseList")}if(typeof E=="object")switch(E.$$typeof){case a:return he(E.render);case f:return Ne(E.type,F,X);case y:{var fe=E,xe=fe._payload,Ce=fe._init;try{return Ne(Ce(xe),F,X)}catch{}}}return""}var De=Object.prototype.hasOwnProperty,ue={},de=b.ReactDebugCurrentFrame;function q(E){if(E){var F=E._owner,X=Ne(E.type,E._source,F?F.type:null);de.setExtraStackFrame(X)}else de.setExtraStackFrame(null)}function Ee(E,F,X,fe,xe){{var Ce=Function.call.bind(De);for(var Re in E)if(Ce(E,Re)){var ke=void 0;try{if(typeof E[Re]!="function"){var dt=Error((fe||"React class")+": "+X+" type `"+Re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof E[Re]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw dt.name="Invariant Violation",dt}ke=E[Re](F,Re,fe,X,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Je){ke=Je}ke&&!(ke instanceof Error)&&(q(xe),m("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",fe||"React class",X,Re,typeof ke),q(null)),ke instanceof Error&&!(ke.message in ue)&&(ue[ke.message]=!0,q(xe),m("Failed %s type: %s",X,ke.message),q(null))}}}var ve=Array.isArray;function ye(E){return ve(E)}function at(E){{var F=typeof Symbol=="function"&&Symbol.toStringTag,X=F&&E[Symbol.toStringTag]||E.constructor.name||"Object";return X}}function ae(E){try{return me(E),!1}catch{return!0}}function me(E){return""+E}function I(E){if(ae(E))return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",at(E)),me(E)}var $=b.ReactCurrentOwner,ne={key:!0,ref:!0,__self:!0,__source:!0},oe,Pe;function ee(E){if(De.call(E,"ref")){var F=Object.getOwnPropertyDescriptor(E,"ref").get;if(F&&F.isReactWarning)return!1}return E.ref!==void 0}function we(E){if(De.call(E,"key")){var F=Object.getOwnPropertyDescriptor(E,"key").get;if(F&&F.isReactWarning)return!1}return E.key!==void 0}function Me(E,F){typeof E.ref=="string"&&$.current}function Ue(E,F){{var X=function(){oe||(oe=!0,m("%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://reactjs.org/link/special-props)",F))};X.isReactWarning=!0,Object.defineProperty(E,"key",{get:X,configurable:!0})}}function ut(E,F){{var X=function(){Pe||(Pe=!0,m("%s: `ref` 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://reactjs.org/link/special-props)",F))};X.isReactWarning=!0,Object.defineProperty(E,"ref",{get:X,configurable:!0})}}var nt=function(E,F,X,fe,xe,Ce,Re){var ke={$$typeof:t,type:E,key:F,ref:X,props:Re,_owner:Ce};return ke._store={},Object.defineProperty(ke._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ke,"_self",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.defineProperty(ke,"_source",{configurable:!1,enumerable:!1,writable:!1,value:xe}),Object.freeze&&(Object.freeze(ke.props),Object.freeze(ke)),ke};function Ye(E,F,X,fe,xe){{var Ce,Re={},ke=null,dt=null;X!==void 0&&(I(X),ke=""+X),we(F)&&(I(F.key),ke=""+F.key),ee(F)&&(dt=F.ref,Me(F,xe));for(Ce in F)De.call(F,Ce)&&!ne.hasOwnProperty(Ce)&&(Re[Ce]=F[Ce]);if(E&&E.defaultProps){var Je=E.defaultProps;for(Ce in Je)Re[Ce]===void 0&&(Re[Ce]=Je[Ce])}if(ke||dt){var He=typeof E=="function"?E.displayName||E.name||"Unknown":E;ke&&Ue(Re,He),dt&&ut(Re,He)}return nt(E,ke,dt,xe,fe,$.current,Re)}}var pt=b.ReactCurrentOwner,kt=b.ReactDebugCurrentFrame;function lt(E){if(E){var F=E._owner,X=Ne(E.type,E._source,F?F.type:null);kt.setExtraStackFrame(X)}else kt.setExtraStackFrame(null)}var Pt;Pt=!1;function Vt(E){return typeof E=="object"&&E!==null&&E.$$typeof===t}function _(){{if(pt.current){var E=P(pt.current.type);if(E)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+E+"`."}return""}}function G(E){return""}var se={};function Ae(E){{var F=_();if(!F){var X=typeof E=="string"?E:E.displayName||E.name;X&&(F=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+X+">.")}return F}}function Fe(E,F){{if(!E._store||E._store.validated||E.key!=null)return;E._store.validated=!0;var X=Ae(F);if(se[X])return;se[X]=!0;var fe="";E&&E._owner&&E._owner!==pt.current&&(fe=" It was passed a child from "+P(E._owner.type)+"."),lt(E),m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',X,fe),lt(null)}}function $e(E,F){{if(typeof E!="object")return;if(ye(E))for(var X=0;X<E.length;X++){var fe=E[X];Vt(fe)&&Fe(fe,F)}else if(Vt(E))E._store&&(E._store.validated=!0);else if(E){var xe=g(E);if(typeof xe=="function"&&xe!==E.entries)for(var Ce=xe.call(E),Re;!(Re=Ce.next()).done;)Vt(Re.value)&&Fe(Re.value,F)}}}function ze(E){{var F=E.type;if(F==null||typeof F=="string")return;var X;if(typeof F=="function")X=F.propTypes;else if(typeof F=="object"&&(F.$$typeof===a||F.$$typeof===f))X=F.propTypes;else return;if(X){var fe=P(F);Ee(X,E.props,"prop",fe,E)}else if(F.PropTypes!==void 0&&!Pt){Pt=!0;var xe=P(F);m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",xe||"Unknown")}typeof F.getDefaultProps=="function"&&!F.getDefaultProps.isReactClassApproved&&m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function tt(E){{for(var F=Object.keys(E.props),X=0;X<F.length;X++){var fe=F[X];if(fe!=="children"&&fe!=="key"){lt(E),m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),lt(null);break}}E.ref!==null&&(lt(E),m("Invalid attribute `ref` supplied to `React.Fragment`."),lt(null))}}var Te={};function je(E,F,X,fe,xe,Ce){{var Re=H(E);if(!Re){var ke="";(E===void 0||typeof E=="object"&&E!==null&&Object.keys(E).length===0)&&(ke+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var dt=G();dt?ke+=dt:ke+=_();var Je;E===null?Je="null":ye(E)?Je="array":E!==void 0&&E.$$typeof===t?(Je="<"+(P(E.type)||"Unknown")+" />",ke=" Did you accidentally export a JSX literal instead of a component?"):Je=typeof E,m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Je,ke)}var He=Ye(E,F,X,xe,Ce);if(He==null)return He;if(Re){var yt=F.children;if(yt!==void 0)if(fe)if(ye(yt)){for(var qt=0;qt<yt.length;qt++)$e(yt[qt],E);Object.freeze&&Object.freeze(yt)}else m("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 $e(yt,E)}if(De.call(F,"key")){var Bt=P(E),Ct=Object.keys(F).filter(function(Jf){return Jf!=="key"}),Lo=Ct.length>0?"{key: someKey, "+Ct.join(": ..., ")+": ...}":"{key: someKey}";if(!Te[Bt+Lo]){var Zf=Ct.length>0?"{"+Ct.join(": ..., ")+": ...}":"{}";m(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,ze,ae,Br,ae),tr[ae+ze]=!0}}return e===s?Wr(V):Gr(V),V}}function Lr(e,n,l){return or(e,n,l,!0)}function Dr(e,n,l){return or(e,n,l,!1)}var Yr=Dr,Ur=Lr;me.Fragment=s,me.jsx=Yr,me.jsxs=Ur}()),me}process.env.NODE_ENV==="production"?Ne.exports=Jr():Ne.exports=Kr();var G=Ne.exports;function Xr({children:r}){return G.jsx(G.Fragment,{children:r})}function Hr(){return G.jsx(G.Fragment,{children:G.jsxs("svg",{className:"pointer-events-none absolute inset-0 isolate z-10 h-full w-full opacity-15",height:"100%",id:"texture",children:[G.jsx("filter",{id:"noise",children:G.jsx("feTurbulence",{type:"fractalNoise",baseFrequency:"0.75",numOctaves:"4",stitchTiles:"stitch"})}),G.jsx("rect",{width:"100%",height:"100%",filter:"url(#noise)"})]})})}var sr=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,Y=r=>!r||typeof r!="object"||Object.keys(r).length===0,Zr=(r,o)=>JSON.stringify(r)===JSON.stringify(o);function fr(r,o){r.forEach(function(t){Array.isArray(t)?fr(t,o):o.push(t)})}function pr(r){let o=[];return fr(r,o),o}var br=(...r)=>pr(r).filter(Boolean),gr=(r,o)=>{let t={},s=Object.keys(r),d=Object.keys(o);for(let a of s)if(d.includes(a)){let c=r[a],i=o[a];typeof c=="object"&&typeof i=="object"?t[a]=gr(c,i):Array.isArray(c)||Array.isArray(i)?t[a]=br(i,c):t[a]=i+" "+c}else t[a]=r[a];for(let a of d)s.includes(a)||(t[a]=o[a]);return t},ir=r=>!r||typeof r!="string"?r:r.replace(/\s+/g," ").trim();const We="-",Qr=r=>{const o=rt(r),{conflictingClassGroups:t,conflictingClassGroupModifiers:s}=r;return{getClassGroupId:c=>{const i=c.split(We);return i[0]===""&&i.length!==1&&i.shift(),vr(i,o)||et(c)},getConflictingClassGroupIds:(c,i)=>{const f=t[c]||[];return i&&s[c]?[...f,...s[c]]:f}}},vr=(r,o)=>{var c;if(r.length===0)return o.classGroupId;const t=r[0],s=o.nextPart.get(t),d=s?vr(r.slice(1),s):void 0;if(d)return d;if(o.validators.length===0)return;const a=r.join(We);return(c=o.validators.find(({validator:i})=>i(a)))==null?void 0:c.classGroupId},lr=/^\[(.+)\]$/,et=r=>{if(lr.test(r)){const o=lr.exec(r)[1],t=o==null?void 0:o.substring(0,o.indexOf(":"));if(t)return"arbitrary.."+t}},rt=r=>{const{theme:o,prefix:t}=r,s={nextPart:new Map,validators:[]};return ot(Object.entries(r.classGroups),t).forEach(([a,c])=>{$e(c,s,a,o)}),s},$e=(r,o,t,s)=>{r.forEach(d=>{if(typeof d=="string"){const a=d===""?o:cr(o,d);a.classGroupId=t;return}if(typeof d=="function"){if(tt(d)){$e(d(s),o,t,s);return}o.validators.push({validator:d,classGroupId:t});return}Object.entries(d).forEach(([a,c])=>{$e(c,cr(o,a),t,s)})})},cr=(r,o)=>{let t=r;return o.split(We).forEach(s=>{t.nextPart.has(s)||t.nextPart.set(s,{nextPart:new Map,validators:[]}),t=t.nextPart.get(s)}),t},tt=r=>r.isThemeGetter,ot=(r,o)=>o?r.map(([t,s])=>{const d=s.map(a=>typeof a=="string"?o+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([c,i])=>[o+c,i])):a);return[t,d]}):r,nt=r=>{if(r<1)return{get:()=>{},set:()=>{}};let o=0,t=new Map,s=new Map;const d=(a,c)=>{t.set(a,c),o++,o>r&&(o=0,s=t,t=new Map)};return{get(a){let c=t.get(a);if(c!==void 0)return c;if((c=s.get(a))!==void 0)return d(a,c),c},set(a,c){t.has(a)?t.set(a,c):d(a,c)}}},mr="!",at=r=>{const{separator:o,experimentalParseClassName:t}=r,s=o.length===1,d=o[0],a=o.length,c=i=>{const f=[];let _=0,b=0,T;for(let C=0;C<i.length;C++){let z=i[C];if(_===0){if(z===d&&(s||i.slice(C,C+a)===o)){f.push(i.slice(b,C)),b=C+a;continue}if(z==="/"){T=C;continue}}z==="["?_++:z==="]"&&_--}const O=f.length===0?i:i.substring(b),F=O.startsWith(mr),I=F?O.substring(1):O,P=T&&T>b?T-b:void 0;return{modifiers:f,hasImportantModifier:F,baseClassName:I,maybePostfixModifierPosition:P}};return t?i=>t({className:i,parseClassName:c}):c},st=r=>{if(r.length<=1)return r;const o=[];let t=[];return r.forEach(s=>{s[0]==="["?(o.push(...t.sort(),s),t=[]):t.push(s)}),o.push(...t.sort()),o},it=r=>({cache:nt(r.cacheSize),parseClassName:at(r),...Qr(r)}),lt=/\s+/,ct=(r,o)=>{const{parseClassName:t,getClassGroupId:s,getConflictingClassGroupIds:d}=o,a=[],c=r.trim().split(lt);let i="";for(let f=c.length-1;f>=0;f-=1){const _=c[f],{modifiers:b,hasImportantModifier:T,baseClassName:O,maybePostfixModifierPosition:F}=t(_);let I=!!F,P=s(I?O.substring(0,F):O);if(!P){if(!I){i=_+(i.length>0?" "+i:i);continue}if(P=s(O),!P){i=_+(i.length>0?" "+i:i);continue}I=!1}const C=st(b).join(":"),z=T?C+mr:C,g=z+P;if(a.includes(g))continue;a.push(g);const J=d(P,I);for(let U=0;U<J.length;++U){const Z=J[U];a.push(z+Z)}i=_+(i.length>0?" "+i:i)}return i};function ut(){let r=0,o,t,s="";for(;r<arguments.length;)(o=arguments[r++])&&(t=hr(o))&&(s&&(s+=" "),s+=t);return s}const hr=r=>{if(typeof r=="string")return r;let o,t="";for(let s=0;s<r.length;s++)r[s]&&(o=hr(r[s]))&&(t&&(t+=" "),t+=o);return t};function Fe(r,...o){let t,s,d,a=c;function c(f){const _=o.reduce((b,T)=>T(b),r());return t=it(_),s=t.cache.get,d=t.cache.set,a=i,i(f)}function i(f){const _=s(f);if(_)return _;const b=ct(f,t);return d(f,b),b}return function(){return a(ut.apply(null,arguments))}}const M=r=>{const o=t=>t[r]||[];return o.isThemeGetter=!0,o},yr=/^\[(?:([a-z-]+):)?(.+)\]$/i,dt=/^\d+\/\d+$/,ft=new Set(["px","full","screen"]),pt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bt=/\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$/,gt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,vt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,X=r=>ue(r)||ft.has(r)||dt.test(r),Q=r=>de(r,"length",kt),ue=r=>!!r&&!Number.isNaN(Number(r)),Me=r=>de(r,"number",ue),he=r=>!!r&&Number.isInteger(Number(r)),ht=r=>r.endsWith("%")&&ue(r.slice(0,-1)),h=r=>yr.test(r),ee=r=>pt.test(r),yt=new Set(["length","size","percentage"]),xt=r=>de(r,yt,xr),wt=r=>de(r,"position",xr),Rt=new Set(["image","url"]),Ct=r=>de(r,Rt,jt),Et=r=>de(r,"",_t),ye=()=>!0,de=(r,o,t)=>{const s=yr.exec(r);return s?s[1]?typeof o=="string"?s[1]===o:o.has(s[1]):t(s[2]):!1},kt=r=>bt.test(r)&&!gt.test(r),xr=()=>!1,_t=r=>vt.test(r),jt=r=>mt.test(r),Ve=()=>{const r=M("colors"),o=M("spacing"),t=M("blur"),s=M("brightness"),d=M("borderColor"),a=M("borderRadius"),c=M("borderSpacing"),i=M("borderWidth"),f=M("contrast"),_=M("grayscale"),b=M("hueRotate"),T=M("invert"),O=M("gap"),F=M("gradientColorStops"),I=M("gradientColorStopPositions"),P=M("inset"),C=M("margin"),z=M("opacity"),g=M("padding"),J=M("saturate"),U=M("scale"),Z=M("sepia"),se=M("skew"),re=M("space"),te=M("translate"),K=()=>["auto","contain","none"],oe=()=>["auto","hidden","clip","visible","scroll"],ne=()=>["auto",h,o],u=()=>[h,o],m=()=>["",X,Q],v=()=>["auto",ue,h],x=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],y=()=>["solid","dashed","dotted","double","none"],E=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>["start","end","center","between","around","evenly","stretch"],S=()=>["","0",h],N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>[ue,h];return{cacheSize:500,separator:":",theme:{colors:[ye],spacing:[X,Q],blur:["none","",ee,h],brightness:W(),borderColor:[r],borderRadius:["none","","full",ee,h],borderSpacing:u(),borderWidth:m(),contrast:W(),grayscale:S(),hueRotate:W(),invert:S(),gap:u(),gradientColorStops:[r],gradientColorStopPositions:[ht,Q],inset:ne(),margin:ne(),opacity:W(),padding:u(),saturate:W(),scale:W(),sepia:S(),skew:W(),space:u(),translate:u()},classGroups:{aspect:[{aspect:["auto","square","video",h]}],container:["container"],columns:[{columns:[ee]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"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"],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:[...x(),h]}],overflow:[{overflow:oe()}],"overflow-x":[{"overflow-x":oe()}],"overflow-y":[{"overflow-y":oe()}],overscroll:[{overscroll:K()}],"overscroll-x":[{"overscroll-x":K()}],"overscroll-y":[{"overscroll-y":K()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[P]}],"inset-x":[{"inset-x":[P]}],"inset-y":[{"inset-y":[P]}],start:[{start:[P]}],end:[{end:[P]}],top:[{top:[P]}],right:[{right:[P]}],bottom:[{bottom:[P]}],left:[{left:[P]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",he,h]}],basis:[{basis:ne()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",h]}],grow:[{grow:S()}],shrink:[{shrink:S()}],order:[{order:["first","last","none",he,h]}],"grid-cols":[{"grid-cols":[ye]}],"col-start-end":[{col:["auto",{span:["full",he,h]},h]}],"col-start":[{"col-start":v()}],"col-end":[{"col-end":v()}],"grid-rows":[{"grid-rows":[ye]}],"row-start-end":[{row:["auto",{span:[he,h]},h]}],"row-start":[{"row-start":v()}],"row-end":[{"row-end":v()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",h]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",h]}],gap:[{gap:[O]}],"gap-x":[{"gap-x":[O]}],"gap-y":[{"gap-y":[O]}],"justify-content":[{justify:["normal",...j()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...j(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...j(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[re]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[re]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",h,o]}],"min-w":[{"min-w":[h,o,"min","max","fit"]}],"max-w":[{"max-w":[h,o,"none","full","min","max","fit","prose",{screen:[ee]},ee]}],h:[{h:[h,o,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[h,o,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[h,o,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[h,o,"auto","min","max","fit"]}],"font-size":[{text:["base",ee,Q]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Me]}],"font-family":[{font:[ye]}],"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:["tighter","tight","normal","wide","wider","widest",h]}],"line-clamp":[{"line-clamp":["none",ue,Me]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",X,h]}],"list-image":[{"list-image":["none",h]}],"list-style-type":[{list:["none","disc","decimal",h]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[z]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...y(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",X,Q]}],"underline-offset":[{"underline-offset":["auto",X,h]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:u()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",h]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",h]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[z]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...x(),wt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",xt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ct]}],"bg-color":[{bg:[r]}],"gradient-from-pos":[{from:[I]}],"gradient-via-pos":[{via:[I]}],"gradient-to-pos":[{to:[I]}],"gradient-from":[{from:[F]}],"gradient-via":[{via:[F]}],"gradient-to":[{to:[F]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[z]}],"border-style":[{border:[...y(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[z]}],"divide-style":[{divide:y()}],"border-color":[{border:[d]}],"border-color-x":[{"border-x":[d]}],"border-color-y":[{"border-y":[d]}],"border-color-s":[{"border-s":[d]}],"border-color-e":[{"border-e":[d]}],"border-color-t":[{"border-t":[d]}],"border-color-r":[{"border-r":[d]}],"border-color-b":[{"border-b":[d]}],"border-color-l":[{"border-l":[d]}],"divide-color":[{divide:[d]}],"outline-style":[{outline:["",...y()]}],"outline-offset":[{"outline-offset":[X,h]}],"outline-w":[{outline:[X,Q]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:m()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[z]}],"ring-offset-w":[{"ring-offset":[X,Q]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",ee,Et]}],"shadow-color":[{shadow:[ye]}],opacity:[{opacity:[z]}],"mix-blend":[{"mix-blend":[...E(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":E()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[s]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",ee,h]}],grayscale:[{grayscale:[_]}],"hue-rotate":[{"hue-rotate":[b]}],invert:[{invert:[T]}],saturate:[{saturate:[J]}],sepia:[{sepia:[Z]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[_]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b]}],"backdrop-invert":[{"backdrop-invert":[T]}],"backdrop-opacity":[{"backdrop-opacity":[z]}],"backdrop-saturate":[{"backdrop-saturate":[J]}],"backdrop-sepia":[{"backdrop-sepia":[Z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",h]}],duration:[{duration:W()}],ease:[{ease:["linear","in","out","in-out",h]}],delay:[{delay:W()}],animate:[{animate:["none","spin","ping","pulse","bounce",h]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[U]}],"scale-x":[{"scale-x":[U]}],"scale-y":[{"scale-y":[U]}],rotate:[{rotate:[he,h]}],"translate-x":[{"translate-x":[te]}],"translate-y":[{"translate-y":[te]}],"skew-x":[{"skew-x":[se]}],"skew-y":[{"skew-y":[se]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",h]}],accent:[{accent:["auto",r]}],appearance:[{appearance:["none","auto"]}],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",h]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":u()}],"scroll-mx":[{"scroll-mx":u()}],"scroll-my":[{"scroll-my":u()}],"scroll-ms":[{"scroll-ms":u()}],"scroll-me":[{"scroll-me":u()}],"scroll-mt":[{"scroll-mt":u()}],"scroll-mr":[{"scroll-mr":u()}],"scroll-mb":[{"scroll-mb":u()}],"scroll-ml":[{"scroll-ml":u()}],"scroll-p":[{"scroll-p":u()}],"scroll-px":[{"scroll-px":u()}],"scroll-py":[{"scroll-py":u()}],"scroll-ps":[{"scroll-ps":u()}],"scroll-pe":[{"scroll-pe":u()}],"scroll-pt":[{"scroll-pt":u()}],"scroll-pr":[{"scroll-pr":u()}],"scroll-pb":[{"scroll-pb":u()}],"scroll-pl":[{"scroll-pl":u()}],"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",h]}],fill:[{fill:[r,"none"]}],"stroke-w":[{stroke:[X,Q,Me]}],stroke:[{stroke:[r,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},St=(r,{cacheSize:o,prefix:t,separator:s,experimentalParseClassName:d,extend:a={},override:c={}})=>{we(r,"cacheSize",o),we(r,"prefix",t),we(r,"separator",s),we(r,"experimentalParseClassName",d);for(const i in c)Tt(r[i],c[i]);for(const i in a)Pt(r[i],a[i]);return r},we=(r,o,t)=>{t!==void 0&&(r[o]=t)},Tt=(r,o)=>{if(o)for(const t in o)we(r,t,o[t])},Pt=(r,o)=>{if(o)for(const t in o){const s=o[t];s!==void 0&&(r[t]=(r[t]||[]).concat(s))}},At=(r,...o)=>typeof r=="function"?Fe(Ve,r,...o):Fe(()=>St(Ve(),r),...o),Ot=Fe(Ve);var zt={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},wr=r=>r||void 0,Re=(...r)=>wr(pr(r).filter(Boolean).join(" ")),Ie=null,H={},Ge=!1,xe=(...r)=>o=>o.twMerge?((!Ie||Ge)&&(Ge=!1,Ie=Y(H)?Ot:At({...H,extend:{theme:H.theme,classGroups:H.classGroups,conflictingClassGroupModifiers:H.conflictingClassGroupModifiers,conflictingClassGroups:H.conflictingClassGroups,...H.extend}})),wr(Ie(Re(r)))):Re(r),ur=(r,o)=>{for(let t in o)r.hasOwnProperty(t)?r[t]=Re(r[t],o[t]):r[t]=o[t];return r},Le=(r,o)=>{let{extend:t=null,slots:s={},variants:d={},compoundVariants:a=[],compoundSlots:c=[],defaultVariants:i={}}=r,f={...zt,...o},_=t!=null&&t.base?Re(t.base,r==null?void 0:r.base):r==null?void 0:r.base,b=t!=null&&t.variants&&!Y(t.variants)?gr(d,t.variants):d,T=t!=null&&t.defaultVariants&&!Y(t.defaultVariants)?{...t.defaultVariants,...i}:i;!Y(f.twMergeConfig)&&!Zr(f.twMergeConfig,H)&&(Ge=!0,H=f.twMergeConfig);let O=Y(t==null?void 0:t.slots),F=Y(s)?{}:{base:Re(r==null?void 0:r.base,O&&(t==null?void 0:t.base)),...s},I=O?F:ur({...t==null?void 0:t.slots},Y(F)?{base:r==null?void 0:r.base}:F),P=Y(t==null?void 0:t.compoundVariants)?a:br(t==null?void 0:t.compoundVariants,a),C=g=>{if(Y(b)&&Y(s)&&O)return xe(_,g==null?void 0:g.class,g==null?void 0:g.className)(f);if(P&&!Array.isArray(P))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof P}`);if(c&&!Array.isArray(c))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof c}`);let J=(u,m,v=[],x)=>{let y=v;if(typeof m=="string")y=y.concat(ir(m).split(" ").map(E=>`${u}:${E}`));else if(Array.isArray(m))y=y.concat(m.reduce((E,j)=>E.concat(`${u}:${j}`),[]));else if(typeof m=="object"&&typeof x=="string"){for(let E in m)if(m.hasOwnProperty(E)&&E===x){let j=m[E];if(j&&typeof j=="string"){let S=ir(j);y[x]?y[x]=y[x].concat(S.split(" ").map(N=>`${u}:${N}`)):y[x]=S.split(" ").map(N=>`${u}:${N}`)}else Array.isArray(j)&&j.length>0&&(y[x]=j.reduce((S,N)=>S.concat(`${u}:${N}`),[]))}}return y},U=(u,m=b,v=null,x=null)=>{var y;let E=m[u];if(!E||Y(E))return null;let j=(y=x==null?void 0:x[u])!=null?y:g==null?void 0:g[u];if(j===null)return null;let S=sr(j),N=Array.isArray(f.responsiveVariants)&&f.responsiveVariants.length>0||f.responsiveVariants===!0,W=T==null?void 0:T[u],q=[];if(typeof S=="object"&&N)for(let[pe,ie]of Object.entries(S)){let be=E[ie];if(pe==="initial"){W=ie;continue}Array.isArray(f.responsiveVariants)&&!f.responsiveVariants.includes(pe)||(q=J(pe,be,q,v))}let Ce=S!=null&&typeof S!="object"?S:sr(W),fe=E[Ce||"false"];return typeof q=="object"&&typeof v=="string"&&q[v]?ur(q,fe):q.length>0?(q.push(fe),q):fe},Z=()=>b?Object.keys(b).map(u=>U(u,b)):null,se=(u,m)=>{if(!b||typeof b!="object")return null;let v=new Array;for(let x in b){let y=U(x,b,u,m),E=u==="base"&&typeof y=="string"?y:y&&y[u];E&&(v[v.length]=E)}return v},re={};for(let u in g)g[u]!==void 0&&(re[u]=g[u]);let te=(u,m)=>{var v;let x=typeof(g==null?void 0:g[u])=="object"?{[u]:(v=g[u])==null?void 0:v.initial}:{};return{...T,...re,...x,...m}},K=(u=[],m)=>{let v=[];for(let{class:x,className:y,...E}of u){let j=!0;for(let[S,N]of Object.entries(E)){let W=te(S,m);if(Array.isArray(N)){if(!N.includes(W[S])){j=!1;break}}else if(W[S]!==N){j=!1;break}}j&&(x&&v.push(x),y&&v.push(y))}return v},oe=u=>{let m=K(P,u);if(!Array.isArray(m))return m;let v={};for(let x of m)if(typeof x=="string"&&(v.base=xe(v.base,x)(f)),typeof x=="object")for(let[y,E]of Object.entries(x))v[y]=xe(v[y],E)(f);return v},ne=u=>{if(c.length<1)return null;let m={};for(let{slots:v=[],class:x,className:y,...E}of c){if(!Y(E)){let j=!0;for(let S of Object.keys(E)){let N=te(S,u)[S];if(N===void 0||(Array.isArray(E[S])?!E[S].includes(N):E[S]!==N)){j=!1;break}}if(!j)continue}for(let j of v)m[j]=m[j]||[],m[j].push([x,y])}return m};if(!Y(s)||!O){let u={};if(typeof I=="object"&&!Y(I))for(let m of Object.keys(I))u[m]=v=>{var x,y;return xe(I[m],se(m,v),((x=oe(v))!=null?x:[])[m],((y=ne(v))!=null?y:[])[m],v==null?void 0:v.class,v==null?void 0:v.className)(f)};return u}return xe(_,Z(),K(P),g==null?void 0:g.class,g==null?void 0:g.className)(f)},z=()=>{if(!(!b||typeof b!="object"))return Object.keys(b)};return C.variantKeys=z(),C.extend=t,C.base=_,C.slots=I,C.variants=b,C.defaultVariants=T,C.compoundSlots=c,C.compoundVariants=P,C};const Mt=Le({base:"bg-base-800 rounded-lg border-2 border-t-[3px] border-base-900 shadow-inner shadow-base-900/50",variants:{padding:{small:"p-2",medium:"p-4",large:"p-8"}},defaultVariants:{padding:"medium"}}),It=r=>{const{children:o,padding:t}=r;return G.jsx("div",{className:Mt({padding:t}),children:o})},Nt=Le({base:"animate-spin",variants:{size:{small:"w-5 h-5",large:"w-8 h-8"}}});function Rr({size:r}){return G.jsx("div",{className:Nt({size:r}),children:G.jsx("svg",{viewBox:"0 0 800 800",xmlns:"http://www.w3.org/2000/svg",children:G.jsx("circle",{cx:"400",cy:"400",fill:"none",r:"200","stroke-width":"50","stroke-dasharray":"269 150",stroke:"currentColor",opacity:.5,"stroke-linecap":"round"})})})}const $t=Le({slots:{outer:"group p-[2px] bg-base-200 dark:bg-base-900 cursor-pointer",inner:"relative shadow-form border overflow-hidden animate-press",chip:"pb-[2px]"},variants:{corners:{sharp:{inner:"rounded-sm",outer:"rounded-sm",chip:"rounded-sm"},round:{inner:"rounded-md",outer:"rounded-lg",chip:"rounded-md"},circle:{inner:"rounded-full",outer:"rounded-full",chip:"rounded-full"}},leftCorners:{none:{},sharp:{inner:"rounded-s-sm",outer:"rounded-s-sm",chip:"rounded-s-sm"},round:{inner:"rounded-s-md",outer:"rounded-s-lg",chip:"rounded-s-md"},circle:{inner:"rounded-s-full",outer:"rounded-s-full",chip:"rounded-s-full"}},size:{small:{inner:"py-[2px] px-2 text-xs min-h-5"},large:{inner:"py-1 px-3 min-h-8"}},colour:{base:{inner:"bg-base-700 border-base-700/70 group-disabled:border-base-700/40 group-active:border-base-700/40 text-base-200",chip:"bg-base-800"},primary:{inner:"bg-primary-700 border-primary-600/70 group-disabled:border-primary-600/40 group-active:border-primary-600/40 text-primary-text",chip:"bg-primary-900"},negative:{inner:"bg-negative-700 border-negative-500/60 group-disabled:border-negative-600/40 group-active:border-negative-600/40 text-negative-text",chip:"bg-negative-900"},positive:{inner:"bg-positive-700 border-positive-600/70 group-disabled:border-positive-600/40 group-active:border-positive-600/40 text-positive-text",chip:"bg-positive-900"},warning:{inner:"bg-warning-500 border-warning-400/70 group-disabled:border-warning-400/40 group-active:border-warning-400/40 text-warning-text",chip:"bg-warning-800"},invert:{inner:"bg-base-300 border-base-300/70 group-disabled:border-base-300/40 group-active:border-base-300/40 text-base-800",chip:"bg-base-400"}},width:{fit:{},grow:{inner:"w-full",outer:"w-full",chip:"w-full"}}},defaultVariants:{size:"large",colour:"base",corners:"round",leftCorners:"none"}});function Ft(r){const{size:o,colour:t,width:s,corners:d,leftCorners:a,loading:c,text:i,children:f,className:_,disabled:b,onClick:T,...O}=r,{outer:F,chip:I,inner:P}=$t({size:o,colour:t,width:s,corners:d,leftCorners:a});return G.jsx("button",{className:F(),disabled:b||c,onClick:T,...O,children:G.jsx("div",{className:I(),children:G.jsxs("div",{className:P({className:_}),children:[G.jsxs("span",{className:"relative z-10 block text-inherit group-disabled:opacity-50",style:{visibility:c?"hidden":"visible"},children:[f,i]}),c&&G.jsx("div",{className:"absolute inset-0 flex h-full w-full items-center justify-center",children:G.jsx(Rr,{size:o})})]})})})}function Vt(){return G.jsx("div",{children:"ToggleSet"})}exports.Button=Ft;exports.Inset=It;exports.LoadingRing=Rr;exports.MimasProvider=Xr;exports.Noise=Hr;exports.ToggleSet=Vt;
|
|
30
|
+
<%s key={someKey} {...props} />`,Lo,Bt,Zf,Bt),Te[Bt+Lo]=!0}}return E===r?tt(He):ze(He),He}}function Be(E,F,X){return je(E,F,X,!0)}function Xe(E,F,X){return je(E,F,X,!1)}var rt=Xe,Ge=Be;nr.Fragment=r,nr.jsx=rt,nr.jsxs=Ge}()),nr}process.env.NODE_ENV==="production"?bs.exports=np():bs.exports=rp();var w=bs.exports;function Ta(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=Ta(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function op(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ta(e))&&(r&&(r+=" "),r+=t);return r}const sp=(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},ip=(e,t)=>({classGroupId:e,validator:t}),Oa=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),qr="-",Bi=[],cp="arbitrary..",ap=e=>{const t=up(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return lp(i);const c=i.split(qr),a=c[0]===""&&c.length>1?1:0;return Na(c,a,t)},getConflictingClassGroupIds:(i,c)=>{if(c){const a=r[i],u=n[i];return a?u?sp(u,a):a:u||Bi}return n[i]||Bi}}},Na=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const u=Na(e,t+1,s);if(u)return u}const i=n.validators;if(i===null)return;const c=t===0?e.join(qr):e.slice(t).join(qr),a=i.length;for(let u=0;u<a;u++){const d=i[u];if(d.validator(c))return d.classGroupId}},lp=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?cp+r:void 0})(),up=e=>{const{theme:t,classGroups:n}=e;return dp(n,t)},dp=(e,t)=>{const n=Oa();for(const r in e){const o=e[r];Xs(o,n,r,t)}return n},Xs=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];fp(i,t,n,r)}},fp=(e,t,n,r)=>{if(typeof e=="string"){pp(e,t,n);return}if(typeof e=="function"){hp(e,t,n,r);return}mp(e,t,n,r)},pp=(e,t,n)=>{const r=e===""?t:Da(t,e);r.classGroupId=n},hp=(e,t,n,r)=>{if(gp(e)){Xs(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(ip(n,e))},mp=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[c,a]=o[i];Xs(a,Da(t,c),n,r)}},Da=(e,t)=>{let n=e;const r=t.split(qr),o=r.length;for(let s=0;s<o;s++){const i=r[s];let c=n.nextPart.get(i);c||(c=Oa(),n.nextPart.set(i,c)),n=c}return n},gp=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,bp=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,i)=>{n[s]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let i=n[s];if(i!==void 0)return i;if((i=r[s])!==void 0)return o(s,i),i},set(s,i){s in n?n[s]=i:o(s,i)}}},vs="!",Wi=":",vp=[],zi=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),yp=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,c=0,a=0,u;const d=o.length;for(let p=0;p<d;p++){const g=o[p];if(i===0&&c===0){if(g===Wi){s.push(o.slice(a,p)),a=p+1;continue}if(g==="/"){u=p;continue}}g==="["?i++:g==="]"?i--:g==="("?c++:g===")"&&c--}const f=s.length===0?o:o.slice(a);let y=f,h=!1;f.endsWith(vs)?(y=f.slice(0,-1),h=!0):f.startsWith(vs)&&(y=f.slice(1),h=!0);const v=u&&u>a?u-a:void 0;return zi(s,h,y,v)};if(t){const o=t+Wi,s=r;r=i=>i.startsWith(o)?s(i.slice(o.length)):zi(vp,!1,i,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},wp=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 i=n[s],c=i[0]==="[",a=t.has(i);c||a?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(i)):o.push(i)}return o.length>0&&(o.sort(),r.push(...o)),r}},xp=e=>({cache:bp(e.cacheSize),parseClassName:yp(e),sortModifiers:wp(e),postfixLookupClassGroupIds:Sp(e),...ap(e)}),Sp=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},Ep=/\s+/,Cp=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s,postfixLookupClassGroupIds:i}=t,c=[],a=e.trim().split(Ep);let u="";for(let d=a.length-1;d>=0;d-=1){const f=a[d],{isExternal:y,modifiers:h,hasImportantModifier:v,baseClassName:p,maybePostfixModifierPosition:g}=n(f);if(y){u=f+(u.length>0?" "+u:u);continue}let b=!!g,m;if(b){const T=p.substring(0,g);m=r(T);const k=m&&i[m]?r(p):void 0;k&&k!==m&&(m=k,b=!1)}else m=r(p);if(!m){if(!b){u=f+(u.length>0?" "+u:u);continue}if(m=r(p),!m){u=f+(u.length>0?" "+u:u);continue}b=!1}const S=h.length===0?"":h.length===1?h[0]:s(h).join(":"),x=v?S+vs:S,C=x+m;if(c.indexOf(C)>-1)continue;c.push(C);const R=o(m,b);for(let T=0;T<R.length;++T){const k=R[T];c.push(x+k)}u=f+(u.length>0?" "+u:u)}return u},Rp=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Aa(n))&&(o&&(o+=" "),o+=r);return o},Aa=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Aa(e[r]))&&(n&&(n+=" "),n+=t);return n},kp=(e,...t)=>{let n,r,o,s;const i=a=>{const u=t.reduce((d,f)=>f(d),e());return n=xp(u),r=n.cache.get,o=n.cache.set,s=c,c(a)},c=a=>{const u=r(a);if(u)return u;const d=Cp(a,n);return o(a,d),d};return s=i,(...a)=>s(Rp(...a))},Pp=[],gt=e=>{const t=n=>n[e]||Pp;return t.isThemeGetter=!0,t},Ia=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_a=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Tp=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Op=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Np=/\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$/,Dp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ap=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ip=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,an=e=>Tp.test(e),Le=e=>!!e&&!Number.isNaN(Number(e)),Wt=e=>!!e&&Number.isInteger(Number(e)),Fo=e=>e.endsWith("%")&&Le(e.slice(0,-1)),Zt=e=>Op.test(e),Ma=()=>!0,_p=e=>Np.test(e)&&!Dp.test(e),Ks=()=>!1,Mp=e=>Ap.test(e),jp=e=>Ip.test(e),Lp=e=>!ie(e)&&!ce(e),Fp=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),$p=e=>yn(e,Fa,Ks),ie=e=>Ia.test(e),kn=e=>yn(e,$a,_p),Hi=e=>yn(e,Yp,Le),Vp=e=>yn(e,Ba,Ma),Bp=e=>yn(e,Va,Ks),Ui=e=>yn(e,ja,Ks),Wp=e=>yn(e,La,jp),Pr=e=>yn(e,Wa,Mp),ce=e=>_a.test(e),rr=e=>Mn(e,$a),zp=e=>Mn(e,Va),Gi=e=>Mn(e,ja),Hp=e=>Mn(e,Fa),Up=e=>Mn(e,La),Tr=e=>Mn(e,Wa,!0),Gp=e=>Mn(e,Ba,!0),yn=(e,t,n)=>{const r=Ia.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Mn=(e,t,n=!1)=>{const r=_a.exec(e);return r?r[1]?t(r[1]):n:!1},ja=e=>e==="position"||e==="percentage",La=e=>e==="image"||e==="url",Fa=e=>e==="length"||e==="size"||e==="bg-size",$a=e=>e==="length",Yp=e=>e==="number",Va=e=>e==="family-name",Ba=e=>e==="number"||e==="weight",Wa=e=>e==="shadow",Xp=()=>{const e=gt("color"),t=gt("font"),n=gt("text"),r=gt("font-weight"),o=gt("tracking"),s=gt("leading"),i=gt("breakpoint"),c=gt("container"),a=gt("spacing"),u=gt("radius"),d=gt("shadow"),f=gt("inset-shadow"),y=gt("text-shadow"),h=gt("drop-shadow"),v=gt("blur"),p=gt("perspective"),g=gt("aspect"),b=gt("ease"),m=gt("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...x(),ce,ie],R=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],k=()=>[ce,ie,a],A=()=>[an,"full","auto",...k()],H=()=>[Wt,"none","subgrid",ce,ie],M=()=>["auto",{span:["full",Wt,ce,ie]},Wt,ce,ie],O=()=>[Wt,"auto",ce,ie],P=()=>["auto","min","max","fr",ce,ie],N=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],j=()=>["auto",...k()],W=()=>[an,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],L=()=>[an,"screen","full","dvw","lvw","svw","min","max","fit",...k()],U=()=>[an,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],D=()=>[e,ce,ie],le=()=>[...x(),Gi,Ui,{position:[ce,ie]}],te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],be=()=>["auto","cover","contain",Hp,$p,{size:[ce,ie]}],Se=()=>[Fo,rr,kn],pe=()=>["","none","full",u,ce,ie],ge=()=>["",Le,rr,kn],Y=()=>["solid","dashed","dotted","double"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>[Le,Fo,Gi,Ui],re=()=>["","none",v,ce,ie],K=()=>["none",Le,ce,ie],V=()=>["none",Le,ce,ie],he=()=>[Le,ce,ie],Q=()=>[an,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Zt],breakpoint:[Zt],color:[Ma],container:[Zt],"drop-shadow":[Zt],ease:["in","out","in-out"],font:[Lp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Zt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Zt],shadow:[Zt],spacing:["px",Le],text:[Zt],"text-shadow":[Zt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",an,ie,ce,g]}],container:["container"],"container-type":[{"@container":["","normal","size",ce,ie]}],"container-named":[Fp],columns:[{columns:[Le,ie,ce,c]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"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:C()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{"inset-s":A(),start:A()}],end:[{"inset-e":A(),end:A()}],"inset-bs":[{"inset-bs":A()}],"inset-be":[{"inset-be":A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Wt,"auto",ce,ie]}],basis:[{basis:[an,"full","auto",c,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,an,"auto","initial","none",ie]}],grow:[{grow:["",Le,ce,ie]}],shrink:[{shrink:["",Le,ce,ie]}],order:[{order:[Wt,"first","last","none",ce,ie]}],"grid-cols":[{"grid-cols":H()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":H()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":P()}],"auto-rows":[{"auto-rows":P()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pbs:[{pbs:k()}],pbe:[{pbe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mbs:[{mbs:j()}],mbe:[{mbe:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],"inline-size":[{inline:["auto",...L()]}],"min-inline-size":[{"min-inline":["auto",...L()]}],"max-inline-size":[{"max-inline":["none",...L()]}],"block-size":[{block:["auto",...U()]}],"min-block-size":[{"min-block":["auto",...U()]}],"max-block-size":[{"max-block":["none",...U()]}],w:[{w:[c,"screen",...W()]}],"min-w":[{"min-w":[c,"screen","none",...W()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...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,rr,kn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Gp,Vp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Fo,ie]}],"font-family":[{font:[zp,Bp,t]}],"font-features":[{"font-features":[ie]}],"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,ce,ie]}],"line-clamp":[{"line-clamp":[Le,"none",ce,Hi]}],leading:[{leading:[s,...k()]}],"list-image":[{"list-image":["none",ce,ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,ie]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",ce,kn]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[Le,"auto",ce,ie]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"tab-size":[{tab:[Wt,ce,ie]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,ie]}],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",ce,ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:le()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:be()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Wt,ce,ie],radial:["",ce,ie],conic:[Wt,ce,ie]},Up,Wp]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:Se()}],"gradient-via-pos":[{via:Se()}],"gradient-to-pos":[{to:Se()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:pe()}],"rounded-s":[{"rounded-s":pe()}],"rounded-e":[{"rounded-e":pe()}],"rounded-t":[{"rounded-t":pe()}],"rounded-r":[{"rounded-r":pe()}],"rounded-b":[{"rounded-b":pe()}],"rounded-l":[{"rounded-l":pe()}],"rounded-ss":[{"rounded-ss":pe()}],"rounded-se":[{"rounded-se":pe()}],"rounded-ee":[{"rounded-ee":pe()}],"rounded-es":[{"rounded-es":pe()}],"rounded-tl":[{"rounded-tl":pe()}],"rounded-tr":[{"rounded-tr":pe()}],"rounded-br":[{"rounded-br":pe()}],"rounded-bl":[{"rounded-bl":pe()}],"border-w":[{border:ge()}],"border-w-x":[{"border-x":ge()}],"border-w-y":[{"border-y":ge()}],"border-w-s":[{"border-s":ge()}],"border-w-e":[{"border-e":ge()}],"border-w-bs":[{"border-bs":ge()}],"border-w-be":[{"border-be":ge()}],"border-w-t":[{"border-t":ge()}],"border-w-r":[{"border-r":ge()}],"border-w-b":[{"border-b":ge()}],"border-w-l":[{"border-l":ge()}],"divide-x":[{"divide-x":ge()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ge()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-bs":[{"border-bs":D()}],"border-color-be":[{"border-be":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,ce,ie]}],"outline-w":[{outline:["",Le,rr,kn]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",d,Tr,Pr]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",f,Tr,Pr]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[Le,kn]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":ge()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",y,Tr,Pr]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[Le,ce,ie]}],"mix-blend":[{"mix-blend":[...z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":z()}],"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":[Le]}],"mask-image-linear-from-pos":[{"mask-linear-from":J()}],"mask-image-linear-to-pos":[{"mask-linear-to":J()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":J()}],"mask-image-t-to-pos":[{"mask-t-to":J()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":J()}],"mask-image-r-to-pos":[{"mask-r-to":J()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":J()}],"mask-image-b-to-pos":[{"mask-b-to":J()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":J()}],"mask-image-l-to-pos":[{"mask-l-to":J()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":J()}],"mask-image-x-to-pos":[{"mask-x-to":J()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":J()}],"mask-image-y-to-pos":[{"mask-y-to":J()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[ce,ie]}],"mask-image-radial-from-pos":[{"mask-radial-from":J()}],"mask-image-radial-to-pos":[{"mask-radial-to":J()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"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":x()}],"mask-image-conic-pos":[{"mask-conic":[Le]}],"mask-image-conic-from-pos":[{"mask-conic-from":J()}],"mask-image-conic-to-pos":[{"mask-conic-to":J()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:le()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:be()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,ie]}],filter:[{filter:["","none",ce,ie]}],blur:[{blur:re()}],brightness:[{brightness:[Le,ce,ie]}],contrast:[{contrast:[Le,ce,ie]}],"drop-shadow":[{"drop-shadow":["","none",h,Tr,Pr]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",Le,ce,ie]}],"hue-rotate":[{"hue-rotate":[Le,ce,ie]}],invert:[{invert:["",Le,ce,ie]}],saturate:[{saturate:[Le,ce,ie]}],sepia:[{sepia:["",Le,ce,ie]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,ie]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[Le,ce,ie]}],"backdrop-contrast":[{"backdrop-contrast":[Le,ce,ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,ce,ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,ce,ie]}],"backdrop-invert":[{"backdrop-invert":["",Le,ce,ie]}],"backdrop-opacity":[{"backdrop-opacity":[Le,ce,ie]}],"backdrop-saturate":[{"backdrop-saturate":[Le,ce,ie]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,ce,ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",ce,ie]}],ease:[{ease:["linear","initial",b,ce,ie]}],delay:[{delay:[Le,ce,ie]}],animate:[{animate:["none",m,ce,ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,ce,ie]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:V()}],"scale-x":[{"scale-x":V()}],"scale-y":[{"scale-y":V()}],"scale-z":[{"scale-z":V()}],"scale-3d":["scale-3d"],skew:[{skew:he()}],"skew-x":[{"skew-x":he()}],"skew-y":[{"skew-y":he()}],transform:[{transform:[ce,ie,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Q()}],"translate-x":[{"translate-x":Q()}],"translate-y":[{"translate-y":Q()}],"translate-z":[{"translate-z":Q()}],"translate-none":["translate-none"],zoom:[{zoom:[Wt,ce,ie]}],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"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",ce,ie]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":D()}],"scrollbar-track-color":[{"scrollbar-track":D()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mbs":[{"scroll-mbs":k()}],"scroll-mbe":[{"scroll-mbe":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pbs":[{"scroll-pbs":k()}],"scroll-pbe":[{"scroll-pbe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",ce,ie]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[Le,rr,kn,Hi]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Kp=kp(Xp);function Oe(...e){return Kp(op(e))}function qe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Yi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function qp(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Yi(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():Yi(e[o],null)}}}}function Ze(...e){return l.useCallback(qp(...e),e)}function Cr(e,t=[]){let n=[];function r(s,i){const c=l.createContext(i);c.displayName=s+"Context";const a=n.length;n=[...n,i];const u=f=>{var b;const{scope:y,children:h,...v}=f,p=((b=y==null?void 0:y[e])==null?void 0:b[a])||c,g=l.useMemo(()=>v,Object.values(v));return w.jsx(p.Provider,{value:g,children:h})};u.displayName=s+"Provider";function d(f,y){var p;const h=((p=y==null?void 0:y[e])==null?void 0:p[a])||c,v=l.useContext(h);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(i=>l.createContext(i));return function(c){const a=(c==null?void 0:c[e])||s;return l.useMemo(()=>({[`__scope${e}`]:{...c,[e]:a}}),[c,a])}};return o.scopeName=e,[r,Zp(o,...t)]}function Zp(...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 i=r.reduce((c,{useScope:a,scopeName:u})=>{const f=a(s)[`__scope${u}`];return{...c,...f}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Nn(e){const t=l.forwardRef((n,r)=>{let{children:o,...s}=n,i=null,c=!1;const a=[];Xi(o)&&typeof Or=="function"&&(o=Or(o._payload)),l.Children.forEach(o,y=>{var h;if(nh(y)){c=!0;const v=y;let p="child"in v.props?v.props.child:v.props.children;Xi(p)&&typeof Or=="function"&&(p=Or(p._payload)),i=Qp(v,p),a.push((h=i==null?void 0:i.props)==null?void 0:h.children)}else a.push(y)}),i?i=l.cloneElement(i,void 0,a):!c&&l.Children.count(o)===1&&l.isValidElement(o)&&(i=o);const u=i?th(i):void 0,d=Ze(r,u);if(!i){if(o||o===0)throw new Error(c?ih(e):sh(e));return o}const f=eh(s,i.props??{});return i.type!==l.Fragment&&(f.ref=r?d:u),l.cloneElement(i,f)});return t.displayName=`${e}.Slot`,t}var wn=Nn("Slot"),za=Symbol.for("radix.slottable");function Jp(e){const t=n=>"child"in n?n.children(n.child):n.children;return t.displayName=`${e}.Slottable`,t.__radixId=za,t}var Qp=(e,t)=>{if("child"in e.props){const n=e.props.child;return l.isValidElement(n)?l.cloneElement(n,void 0,e.props.children(n.props.children)):null}return l.isValidElement(t)?t:null};function eh(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]=(...c)=>{const a=s(...c);return o(...c),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function th(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function nh(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===za}var rh=Symbol.for("react.lazy");function Xi(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===rh&&"_payload"in e&&oh(e._payload)}function oh(e){return typeof e=="object"&&e!==null&&"then"in e}var sh=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,ih=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Or=l[" use ".trim().toString()],ch=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ct=ch.reduce((e,t)=>{const n=Nn(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,a=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(a,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ah(e,t){e&&Ft.flushSync(()=>e.dispatchEvent(t))}function Dt(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function lh(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e);l.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 uh="DismissableLayer",ys="dismissableLayer.update",dh="dismissableLayer.pointerDownOutside",fh="dismissableLayer.focusOutside",Ki,Ha=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),qs=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:c,onDismiss:a,...u}=e,d=l.useContext(Ha),[f,y]=l.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=l.useState({}),p=Ze(t,A=>y(A)),g=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),m=g.indexOf(b),S=f?g.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,C=S>=m,R=l.useRef(!1),T=mh(A=>{const H=A.target;if(!(H instanceof Node))return;const M=[...d.branches].some(O=>O.contains(H));!C||M||(s==null||s(A),c==null||c(A),A.defaultPrevented||a==null||a())},{ownerDocument:h,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:R,dismissableSurfaces:d.dismissableSurfaces}),k=gh(A=>{if(r&&R.current)return;const H=A.target;[...d.branches].some(O=>O.contains(H))||(i==null||i(A),c==null||c(A),A.defaultPrevented||a==null||a())},h);return lh(A=>{S===d.layers.size-1&&(o==null||o(A),!A.defaultPrevented&&a&&(A.preventDefault(),a()))},h),l.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Ki=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),qi(),()=>{n&&(d.layersWithOutsidePointerEventsDisabled.delete(f),d.layersWithOutsidePointerEventsDisabled.size===0&&(h.body.style.pointerEvents=Ki))}},[f,h,n,d]),l.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),qi())},[f,d]),l.useEffect(()=>{const A=()=>v({});return document.addEventListener(ys,A),()=>document.removeEventListener(ys,A)},[]),w.jsx(ct.div,{...u,ref:p,style:{pointerEvents:x?C?"auto":"none":void 0,...e.style},onFocusCapture:qe(e.onFocusCapture,k.onFocusCapture),onBlurCapture:qe(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:qe(e.onPointerDownCapture,T.onPointerDownCapture)})});qs.displayName=uh;var ph="DismissableLayerBranch",hh=l.forwardRef((e,t)=>{const n=l.useContext(Ha),r=l.useRef(null),o=Ze(t,r);return l.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),w.jsx(ct.div,{...e,ref:o})});hh.displayName=ph;function mh(e,t){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:s}=t,i=Dt(e),c=l.useRef(!1),a=l.useRef(!1),u=l.useRef(new Map),d=l.useRef(()=>{});return l.useEffect(()=>{function f(){a.current=!1,o.current=!1,u.current.clear()}function y(){return Array.from(u.current.values()).some(Boolean)}function h(m){if(!a.current)return;const S=m.target;S instanceof Node&&[...s].some(C=>C.contains(S))||u.current.set(m.type,!0),m.type==="click"&&window.setTimeout(()=>{a.current&&d.current()},0)}function v(m){a.current&&u.current.set(m.type,!1)}const p=m=>{if(m.target&&!c.current){let S=function(){n.removeEventListener("click",d.current);const C=y();f(),C||Ua(dh,i,x,{discrete:!0})};const x={originalEvent:m};a.current=!0,o.current=r&&m.button===0,u.current.clear(),!r||m.button!==0?S():(n.removeEventListener("click",d.current),d.current=S,n.addEventListener("click",d.current,{once:!0}))}else n.removeEventListener("click",d.current),f();c.current=!1},g=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const m of g)n.addEventListener(m,h,!0),n.addEventListener(m,v);const b=window.setTimeout(()=>{n.addEventListener("pointerdown",p)},0);return()=>{window.clearTimeout(b),n.removeEventListener("pointerdown",p),n.removeEventListener("click",d.current);for(const m of g)n.removeEventListener(m,h,!0),n.removeEventListener(m,v)}},[n,i,r,o,s]),{onPointerDownCapture:()=>c.current=!0}}function gh(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e),r=l.useRef(!1);return l.useEffect(()=>{const o=s=>{s.target&&!r.current&&Ua(fh,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 qi(){const e=new CustomEvent(ys);document.dispatchEvent(e)}function Ua(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?ah(o,s):o.dispatchEvent(s)}var mt=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},bh=l[" useId ".trim().toString()]||(()=>{}),vh=0;function On(e){const[t,n]=l.useState(bh());return mt(()=>{n(r=>r??String(vh++))},[e]),t?`radix-${t}`:""}const yh=["top","right","bottom","left"],gn=Math.min,Tt=Math.max,Zr=Math.round,Nr=Math.floor,Xt=e=>({x:e,y:e}),wh={left:"right",right:"left",bottom:"top",top:"bottom"};function ws(e,t,n){return Tt(e,gn(t,n))}function on(e,t){return typeof e=="function"?e(t):e}function sn(e){return e.split("-")[0]}function Zn(e){return e.split("-")[1]}function Zs(e){return e==="x"?"y":"x"}function Js(e){return e==="y"?"height":"width"}function Yt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Qs(e){return Zs(Yt(e))}function xh(e,t,n){n===void 0&&(n=!1);const r=Zn(e),o=Qs(e),s=Js(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Jr(i)),[i,Jr(i)]}function Sh(e){const t=Jr(e);return[xs(e),t,xs(t)]}function xs(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Zi=["left","right"],Ji=["right","left"],Eh=["top","bottom"],Ch=["bottom","top"];function Rh(e,t,n){switch(e){case"top":case"bottom":return n?t?Ji:Zi:t?Zi:Ji;case"left":case"right":return t?Eh:Ch;default:return[]}}function kh(e,t,n,r){const o=Zn(e);let s=Rh(sn(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(xs)))),s}function Jr(e){const t=sn(e);return wh[t]+e.slice(t.length)}function Ph(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ga(e){return typeof e!="number"?Ph(e):{top:e,right:e,bottom:e,left:e}}function Qr(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 Qi(e,t,n){let{reference:r,floating:o}=e;const s=Yt(t),i=Qs(t),c=Js(i),a=sn(t),u=s==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,y=r[c]/2-o[c]/2;let h;switch(a){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(Zn(t)){case"start":h[i]-=y*(n&&u?-1:1);break;case"end":h[i]+=y*(n&&u?-1:1);break}return h}async function Th(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:c,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:y=!1,padding:h=0}=on(t,e),v=Ga(h),g=c[y?f==="floating"?"reference":"floating":f],b=Qr(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(c.floating)),boundary:u,rootBoundary:d,strategy:a})),m=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),x=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},C=Qr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:m,offsetParent:S,strategy:a}):m);return{top:(b.top-C.top+v.top)/x.y,bottom:(C.bottom-b.bottom+v.bottom)/x.y,left:(b.left-C.left+v.left)/x.x,right:(C.right-b.right+v.right)/x.x}}const Oh=50,Nh=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,c=i.detectOverflow?i:{...i,detectOverflow:Th},a=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=Qi(u,r,a),y=r,h=0;const v={};for(let p=0;p<s.length;p++){const g=s[p];if(!g)continue;const{name:b,fn:m}=g,{x:S,y:x,data:C,reset:R}=await m({x:d,y:f,initialPlacement:r,placement:y,strategy:o,middlewareData:v,rects:u,platform:c,elements:{reference:e,floating:t}});d=S??d,f=x??f,v[b]={...v[b],...C},R&&h<Oh&&(h++,typeof R=="object"&&(R.placement&&(y=R.placement),R.rects&&(u=R.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:d,y:f}=Qi(u,y,a)),p=-1)}return{x:d,y:f,placement:y,strategy:o,middlewareData:v}},Dh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:c,middlewareData:a}=t,{element:u,padding:d=0}=on(e,t)||{};if(u==null)return{};const f=Ga(d),y={x:n,y:r},h=Qs(o),v=Js(h),p=await i.getDimensions(u),g=h==="y",b=g?"top":"left",m=g?"bottom":"right",S=g?"clientHeight":"clientWidth",x=s.reference[v]+s.reference[h]-y[h]-s.floating[v],C=y[h]-s.reference[h],R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let T=R?R[S]:0;(!T||!await(i.isElement==null?void 0:i.isElement(R)))&&(T=c.floating[S]||s.floating[v]);const k=x/2-C/2,A=T/2-p[v]/2-1,H=gn(f[b],A),M=gn(f[m],A),O=H,P=T-p[v]-M,N=T/2-p[v]/2+k,B=ws(O,N,P),j=!a.arrow&&Zn(o)!=null&&N!==B&&s.reference[v]/2-(N<O?H:M)-p[v]/2<0,W=j?N<O?N-O:N-P:0;return{[h]:y[h]+W,data:{[h]:B,centerOffset:N-B-W,...j&&{alignmentOffset:W}},reset:j}}}),Ah=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:c,platform:a,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:y,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:p=!0,...g}=on(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=sn(o),m=Yt(c),S=sn(c)===c,x=await(a.isRTL==null?void 0:a.isRTL(u.floating)),C=y||(S||!p?[Jr(c)]:Sh(c)),R=v!=="none";!y&&R&&C.push(...kh(c,p,v,x));const T=[c,...C],k=await a.detectOverflow(t,g),A=[];let H=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&A.push(k[b]),f){const N=xh(o,i,x);A.push(k[N[0]],k[N[1]])}if(H=[...H,{placement:o,overflows:A}],!A.every(N=>N<=0)){var M,O;const N=(((M=s.flip)==null?void 0:M.index)||0)+1,B=T[N];if(B&&(!(f==="alignment"?m!==Yt(B):!1)||H.every(L=>Yt(L.placement)===m?L.overflows[0]>0:!0)))return{data:{index:N,overflows:H},reset:{placement:B}};let j=(O=H.filter(W=>W.overflows[0]<=0).sort((W,L)=>W.overflows[1]-L.overflows[1])[0])==null?void 0:O.placement;if(!j)switch(h){case"bestFit":{var P;const W=(P=H.filter(L=>{if(R){const U=Yt(L.placement);return U===m||U==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(U=>U>0).reduce((U,D)=>U+D,0)]).sort((L,U)=>L[1]-U[1])[0])==null?void 0:P[0];W&&(j=W);break}case"initialPlacement":j=c;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function ec(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function tc(e){return yh.some(t=>e[t]>=0)}const Ih=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=on(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),c=ec(i,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:tc(c)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),c=ec(i,n.floating);return{data:{escapedOffsets:c,escaped:tc(c)}}}default:return{}}}}},Ya=new Set(["left","top"]);async function _h(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=sn(n),c=Zn(n),a=Yt(n)==="y",u=Ya.has(i)?-1:1,d=s&&a?-1:1,f=on(t,e);let{mainAxis:y,crossAxis:h,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof v=="number"&&(h=c==="end"?v*-1:v),a?{x:h*d,y:y*u}:{x:y*u,y:h*d}}const Mh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:c}=t,a=await _h(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+a.x,y:s+a.y,data:{...a,placement:i}}}}},jh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:a={fn:b=>{let{x:m,y:S}=b;return{x:m,y:S}}},...u}=on(e,t),d={x:n,y:r},f=await s.detectOverflow(t,u),y=Yt(sn(o)),h=Zs(y);let v=d[h],p=d[y];if(i){const b=h==="y"?"top":"left",m=h==="y"?"bottom":"right",S=v+f[b],x=v-f[m];v=ws(S,v,x)}if(c){const b=y==="y"?"top":"left",m=y==="y"?"bottom":"right",S=p+f[b],x=p-f[m];p=ws(S,p,x)}const g=a.fn({...t,[h]:v,[y]:p});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:i,[y]:c}}}}}},Lh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:a=!0,crossAxis:u=!0}=on(e,t),d={x:n,y:r},f=Yt(o),y=Zs(f);let h=d[y],v=d[f];const p=on(c,t),g=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(a){const S=y==="y"?"height":"width",x=s.reference[y]-s.floating[S]+g.mainAxis,C=s.reference[y]+s.reference[S]-g.mainAxis;h<x?h=x:h>C&&(h=C)}if(u){var b,m;const S=y==="y"?"width":"height",x=Ya.has(sn(o)),C=s.reference[f]-s.floating[S]+(x&&((b=i.offset)==null?void 0:b[f])||0)+(x?0:g.crossAxis),R=s.reference[f]+s.reference[S]+(x?0:((m=i.offset)==null?void 0:m[f])||0)-(x?g.crossAxis:0);v<C?v=C:v>R&&(v=R)}return{[y]:h,[f]:v}}}},Fh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:c}=t,{apply:a=()=>{},...u}=on(e,t),d=await i.detectOverflow(t,u),f=sn(o),y=Zn(o),h=Yt(o)==="y",{width:v,height:p}=s.floating;let g,b;f==="top"||f==="bottom"?(g=f,b=y===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(b=f,g=y==="end"?"top":"bottom");const m=p-d.top-d.bottom,S=v-d.left-d.right,x=gn(p-d[g],m),C=gn(v-d[b],S),R=!t.middlewareData.shift;let T=x,k=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=m),R&&!y){const H=Tt(d.left,0),M=Tt(d.right,0),O=Tt(d.top,0),P=Tt(d.bottom,0);h?k=v-2*(H!==0||M!==0?H+M:Tt(d.left,d.right)):T=p-2*(O!==0||P!==0?O+P:Tt(d.top,d.bottom))}await a({...t,availableWidth:k,availableHeight:T});const A=await i.getDimensions(c.floating);return v!==A.width||p!==A.height?{reset:{rects:!0}}:{}}}};function ao(){return typeof window<"u"}function wt(e){return ei(e)?(e.nodeName||"").toLowerCase():"#document"}function ht(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Kt(e){var t;return(t=(ei(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ei(e){return ao()?e instanceof Node||e instanceof ht(e).Node:!1}function ft(e){return ao()?e instanceof Element||e instanceof ht(e).Element:!1}function it(e){return ao()?e instanceof HTMLElement||e instanceof ht(e).HTMLElement:!1}function Xn(e){return!ao()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ht(e).ShadowRoot}function xn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Et(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function $h(e){return/^(table|td|th)$/.test(wt(e))}function lo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Vh=/transform|translate|scale|rotate|perspective|filter/,Bh=/paint|layout|strict|content/,Pn=e=>!!e&&e!=="none";let $o;function ti(e){const t=ft(e)?Et(e):e;return Pn(t.transform)||Pn(t.translate)||Pn(t.scale)||Pn(t.rotate)||Pn(t.perspective)||!ni()&&(Pn(t.backdropFilter)||Pn(t.filter))||Vh.test(t.willChange||"")||Bh.test(t.contain||"")}function Wh(e){let t=Lt(e);for(;it(t)&&!jt(t);){if(ti(t))return t;if(lo(t))return null;t=Lt(t)}return null}function ni(){return $o==null&&($o=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),$o}function jt(e){return/^(html|body|#document)$/.test(wt(e))}function Et(e){return ht(e).getComputedStyle(e)}function uo(e){return ft(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Lt(e){if(wt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xn(e)&&e.host||Kt(e);return Xn(t)?t.host:t}function Xa(e){const t=Lt(e);return jt(t)?e.ownerDocument?e.ownerDocument.body:e.body:it(t)&&xn(t)?t:Xa(t)}function hr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Xa(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=ht(o);if(s){const c=Ss(i);return t.concat(i,i.visualViewport||[],xn(o)?o:[],c&&n?hr(c):[])}else return t.concat(o,hr(o,[],n))}function Ss(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ka(e){const t=Et(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=it(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=Zr(n)!==s||Zr(r)!==i;return c&&(n=s,r=i),{width:n,height:r,$:c}}function ri(e){return ft(e)?e:e.contextElement}function Wn(e){const t=ri(e);if(!it(t))return Xt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Ka(t);let i=(s?Zr(n.width):n.width)/r,c=(s?Zr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const zh=Xt(0);function qa(e){const t=ht(e);return!ni()||!t.visualViewport?zh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Hh(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ht(e)?!1:t}function Dn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=ri(e);let i=Xt(1);t&&(r?ft(r)&&(i=Wn(r)):i=Wn(e));const c=Hh(s,n,r)?qa(s):Xt(0);let a=(o.left+c.x)/i.x,u=(o.top+c.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const y=ht(s),h=r&&ft(r)?ht(r):r;let v=y,p=Ss(v);for(;p&&r&&h!==v;){const g=Wn(p),b=p.getBoundingClientRect(),m=Et(p),S=b.left+(p.clientLeft+parseFloat(m.paddingLeft))*g.x,x=b.top+(p.clientTop+parseFloat(m.paddingTop))*g.y;a*=g.x,u*=g.y,d*=g.x,f*=g.y,a+=S,u+=x,v=ht(p),p=Ss(v)}}return Qr({width:d,height:f,x:a,y:u})}function fo(e,t){const n=uo(e).scrollLeft;return t?t.left+n:Dn(Kt(e)).left+n}function Za(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-fo(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Uh(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Kt(r),c=t?lo(t.floating):!1;if(r===i||c&&s)return n;let a={scrollLeft:0,scrollTop:0},u=Xt(1);const d=Xt(0),f=it(r);if((f||!f&&!s)&&((wt(r)!=="body"||xn(i))&&(a=uo(r)),f)){const h=Dn(r);u=Wn(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const y=i&&!f&&!s?Za(i,a):Xt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+d.x+y.x,y:n.y*u.y-a.scrollTop*u.y+d.y+y.y}}function Gh(e){return Array.from(e.getClientRects())}function Yh(e){const t=Kt(e),n=uo(e),r=e.ownerDocument.body,o=Tt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Tt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+fo(e);const c=-n.scrollTop;return Et(r).direction==="rtl"&&(i+=Tt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:c}}const nc=25;function Xh(e,t){const n=ht(e),r=Kt(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,c=0,a=0;if(o){s=o.width,i=o.height;const d=ni();(!d||d&&t==="fixed")&&(c=o.offsetLeft,a=o.offsetTop)}const u=fo(r);if(u<=0){const d=r.ownerDocument,f=d.body,y=getComputedStyle(f),h=d.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,v=Math.abs(r.clientWidth-f.clientWidth-h);v<=nc&&(s-=v)}else u<=nc&&(s+=u);return{width:s,height:i,x:c,y:a}}function Kh(e,t){const n=Dn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=it(e)?Wn(e):Xt(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,a=o*s.x,u=r*s.y;return{width:i,height:c,x:a,y:u}}function rc(e,t,n){let r;if(t==="viewport")r=Xh(e,n);else if(t==="document")r=Yh(Kt(e));else if(ft(t))r=Kh(t,n);else{const o=qa(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Qr(r)}function Ja(e,t){const n=Lt(e);return n===t||!ft(n)||jt(n)?!1:Et(n).position==="fixed"||Ja(n,t)}function qh(e,t){const n=t.get(e);if(n)return n;let r=hr(e,[],!1).filter(c=>ft(c)&&wt(c)!=="body"),o=null;const s=Et(e).position==="fixed";let i=s?Lt(e):e;for(;ft(i)&&!jt(i);){const c=Et(i),a=ti(i);!a&&c.position==="fixed"&&(o=null),(s?!a&&!o:!a&&c.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||xn(i)&&!a&&Ja(e,i))?r=r.filter(d=>d!==i):o=c,i=Lt(i)}return t.set(e,r),r}function Zh(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?lo(t)?[]:qh(t,this._c):[].concat(n),r],c=rc(t,i[0],o);let a=c.top,u=c.right,d=c.bottom,f=c.left;for(let y=1;y<i.length;y++){const h=rc(t,i[y],o);a=Tt(h.top,a),u=gn(h.right,u),d=gn(h.bottom,d),f=Tt(h.left,f)}return{width:u-f,height:d-a,x:f,y:a}}function Jh(e){const{width:t,height:n}=Ka(e);return{width:t,height:n}}function Qh(e,t,n){const r=it(t),o=Kt(t),s=n==="fixed",i=Dn(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const a=Xt(0);function u(){a.x=fo(o)}if(r||!r&&!s)if((wt(t)!=="body"||xn(o))&&(c=uo(t)),r){const h=Dn(t,!0,s,t);a.x=h.x+t.clientLeft,a.y=h.y+t.clientTop}else o&&u();s&&!r&&o&&u();const d=o&&!r&&!s?Za(o,c):Xt(0),f=i.left+c.scrollLeft-a.x-d.x,y=i.top+c.scrollTop-a.y-d.y;return{x:f,y,width:i.width,height:i.height}}function Vo(e){return Et(e).position==="static"}function oc(e,t){if(!it(e)||Et(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Kt(e)===n&&(n=n.ownerDocument.body),n}function Qa(e,t){const n=ht(e);if(lo(e))return n;if(!it(e)){let o=Lt(e);for(;o&&!jt(o);){if(ft(o)&&!Vo(o))return o;o=Lt(o)}return n}let r=oc(e,t);for(;r&&$h(r)&&Vo(r);)r=oc(r,t);return r&&jt(r)&&Vo(r)&&!ti(r)?n:r||Wh(e)||n}const em=async function(e){const t=this.getOffsetParent||Qa,n=this.getDimensions,r=await n(e.floating);return{reference:Qh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function tm(e){return Et(e).direction==="rtl"}const nm={convertOffsetParentRelativeRectToViewportRelativeRect:Uh,getDocumentElement:Kt,getClippingRect:Zh,getOffsetParent:Qa,getElementRects:em,getClientRects:Gh,getDimensions:Jh,getScale:Wn,isElement:ft,isRTL:tm};function el(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function rm(e,t){let n=null,r;const o=Kt(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,a){c===void 0&&(c=!1),a===void 0&&(a=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:y,height:h}=u;if(c||t(),!y||!h)return;const v=Nr(f),p=Nr(o.clientWidth-(d+y)),g=Nr(o.clientHeight-(f+h)),b=Nr(d),S={rootMargin:-v+"px "+-p+"px "+-g+"px "+-b+"px",threshold:Tt(0,gn(1,a))||1};let x=!0;function C(R){const T=R[0].intersectionRatio;if(T!==a){if(!x)return i();T?i(!1,T):r=setTimeout(()=>{i(!1,1e-7)},1e3)}T===1&&!el(u,e.getBoundingClientRect())&&i(),x=!1}try{n=new IntersectionObserver(C,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,S)}n.observe(e)}return i(!0),s}function om(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=ri(e),d=o||s?[...u?hr(u):[],...t?hr(t):[]]:[];d.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const f=u&&c?rm(u,n):null;let y=-1,h=null;i&&(h=new ResizeObserver(b=>{let[m]=b;m&&m.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),n()}),u&&!a&&h.observe(u),t&&h.observe(t));let v,p=a?Dn(e):null;a&&g();function g(){const b=Dn(e);p&&!el(p,b)&&n(),p=b,v=requestAnimationFrame(g)}return n(),()=>{var b;d.forEach(m=>{o&&m.removeEventListener("scroll",n),s&&m.removeEventListener("resize",n)}),f==null||f(),(b=h)==null||b.disconnect(),h=null,a&&cancelAnimationFrame(v)}}const sm=Mh,im=jh,cm=Ah,am=Fh,lm=Ih,sc=Dh,um=Lh,dm=(e,t,n)=>{const r=new Map,o={platform:nm,...n},s={...o.platform,_c:r};return Nh(e,t,{...o,platform:s})};var fm=typeof document<"u",pm=function(){},Hr=fm?Z.useLayoutEffect:pm;function eo(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(!eo(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)&&!eo(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function tl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ic(e,t){const n=tl(e);return Math.round(t*n)/n}function Bo(e){const t=l.useRef(e);return Hr(()=>{t.current=e}),t}function hm(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:a,open:u}=e,[d,f]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,h]=l.useState(r);eo(y,r)||h(r);const[v,p]=l.useState(null),[g,b]=l.useState(null),m=l.useCallback(L=>{L!==R.current&&(R.current=L,p(L))},[]),S=l.useCallback(L=>{L!==T.current&&(T.current=L,b(L))},[]),x=s||v,C=i||g,R=l.useRef(null),T=l.useRef(null),k=l.useRef(d),A=a!=null,H=Bo(a),M=Bo(o),O=Bo(u),P=l.useCallback(()=>{if(!R.current||!T.current)return;const L={placement:t,strategy:n,middleware:y};M.current&&(L.platform=M.current),dm(R.current,T.current,L).then(U=>{const D={...U,isPositioned:O.current!==!1};N.current&&!eo(k.current,D)&&(k.current=D,Ft.flushSync(()=>{f(D)}))})},[y,t,n,M,O]);Hr(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,f(L=>({...L,isPositioned:!1})))},[u]);const N=l.useRef(!1);Hr(()=>(N.current=!0,()=>{N.current=!1}),[]),Hr(()=>{if(x&&(R.current=x),C&&(T.current=C),x&&C){if(H.current)return H.current(x,C,P);P()}},[x,C,P,H,A]);const B=l.useMemo(()=>({reference:R,floating:T,setReference:m,setFloating:S}),[m,S]),j=l.useMemo(()=>({reference:x,floating:C}),[x,C]),W=l.useMemo(()=>{const L={position:n,left:0,top:0};if(!j.floating)return L;const U=ic(j.floating,d.x),D=ic(j.floating,d.y);return c?{...L,transform:"translate("+U+"px, "+D+"px)",...tl(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:U,top:D}},[n,c,j.floating,d.x,d.y]);return l.useMemo(()=>({...d,update:P,refs:B,elements:j,floatingStyles:W}),[d,P,B,j,W])}const mm=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?sc({element:r.current,padding:o}).fn(n):{}:r?sc({element:r,padding:o}).fn(n):{}}}},gm=(e,t)=>{const n=sm(e);return{name:n.name,fn:n.fn,options:[e,t]}},bm=(e,t)=>{const n=im(e);return{name:n.name,fn:n.fn,options:[e,t]}},vm=(e,t)=>({fn:um(e).fn,options:[e,t]}),ym=(e,t)=>{const n=cm(e);return{name:n.name,fn:n.fn,options:[e,t]}},wm=(e,t)=>{const n=am(e);return{name:n.name,fn:n.fn,options:[e,t]}},xm=(e,t)=>{const n=lm(e);return{name:n.name,fn:n.fn,options:[e,t]}},Sm=(e,t)=>{const n=mm(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Em="Arrow",nl=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return w.jsx(ct.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:w.jsx("polygon",{points:"0,0 30,0 15,10"})})});nl.displayName=Em;var Cm=nl;function rl(e){const[t,n]=l.useState(void 0);return mt(()=>{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 i,c;if("borderBoxSize"in s){const a=s.borderBoxSize,u=Array.isArray(a)?a[0]:a;i=u.inlineSize,c=u.blockSize}else i=e.offsetWidth,c=e.offsetHeight;n({width:i,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var oi="Popper",[ol,po]=Cr(oi),[Rm,sl]=ol(oi),il=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null),[s,i]=l.useState(void 0);return w.jsx(Rm,{scope:t,anchor:r,onAnchorChange:o,placementState:s,setPlacementState:i,children:n})};il.displayName=oi;var cl="PopperAnchor",al=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=sl(cl,n),i=l.useRef(null),c=s.onAnchorChange,a=l.useCallback(v=>{i.current=v,v&&c(v)},[c]),u=Ze(t,a),d=l.useRef(null);l.useEffect(()=>{if(!r)return;const v=d.current;d.current=r.current,v!==d.current&&c(d.current)});const f=s.placementState&&ii(s.placementState),y=f==null?void 0:f[0],h=f==null?void 0:f[1];return r?null:w.jsx(ct.div,{"data-radix-popper-side":y,"data-radix-popper-align":h,...o,ref:u})});al.displayName=cl;var si="PopperContent",[km,Pm]=ol(si),ll=l.forwardRef((e,t)=>{var z,J,re,K,V,he;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:a=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:y=!1,updatePositionStrategy:h="optimized",onPlaced:v,...p}=e,g=sl(si,n),[b,m]=l.useState(null),S=Ze(t,Q=>m(Q)),[x,C]=l.useState(null),R=rl(x),T=(R==null?void 0:R.width)??0,k=(R==null?void 0:R.height)??0,A=r+(s!=="center"?"-"+s:""),H=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},M=Array.isArray(u)?u:[u],O=M.length>0,P={padding:H,boundary:M.filter(Om),altBoundary:O},{refs:N,floatingStyles:B,placement:j,isPositioned:W,middlewareData:L}=hm({strategy:"fixed",placement:A,whileElementsMounted:(...Q)=>om(...Q,{animationFrame:h==="always"}),elements:{reference:g.anchor},middleware:[gm({mainAxis:o+k,alignmentAxis:i}),a&&bm({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?vm():void 0,...P}),a&&ym({...P}),wm({...P,apply:({elements:Q,rects:Ne,availableWidth:De,availableHeight:ue})=>{const{width:de,height:q}=Ne.reference,Ee=Q.floating.style;Ee.setProperty("--radix-popper-available-width",`${De}px`),Ee.setProperty("--radix-popper-available-height",`${ue}px`),Ee.setProperty("--radix-popper-anchor-width",`${de}px`),Ee.setProperty("--radix-popper-anchor-height",`${q}px`)}}),x&&Sm({element:x,padding:c}),Nm({arrowWidth:T,arrowHeight:k}),y&&xm({strategy:"referenceHidden",...P,boundary:O?P.boundary:void 0})]}),U=g.setPlacementState;mt(()=>(U(j),()=>{U(void 0)}),[j,U]);const[D,le]=ii(j),te=Dt(v);mt(()=>{W&&(te==null||te())},[W,te]);const be=(z=L.arrow)==null?void 0:z.x,Se=(J=L.arrow)==null?void 0:J.y,pe=((re=L.arrow)==null?void 0:re.centerOffset)!==0,[ge,Y]=l.useState();return mt(()=>{b&&Y(window.getComputedStyle(b).zIndex)},[b]),w.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:W?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(K=L.transformOrigin)==null?void 0:K.x,(V=L.transformOrigin)==null?void 0:V.y].join(" "),...((he=L.hide)==null?void 0:he.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:w.jsx(km,{scope:n,placedSide:D,placedAlign:le,onArrowChange:C,arrowX:be,arrowY:Se,shouldHideArrow:pe,children:w.jsx(ct.div,{"data-side":D,"data-align":le,...p,ref:S,style:{...p.style,animation:W?void 0:"none"}})})})});ll.displayName=si;var ul="PopperArrow",Tm={top:"bottom",right:"left",bottom:"top",left:"right"},dl=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Pm(ul,r),i=Tm[s.placedSide];return w.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]: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:w.jsx(Cm,{...o,ref:n,style:{...o.style,display:"block"}})})});dl.displayName=ul;function Om(e){return e!==null}var Nm=e=>({name:"transformOrigin",options:e,fn(t){var g,b,m;const{placement:n,rects:r,middlewareData:o}=t,i=((g=o.arrow)==null?void 0:g.centerOffset)!==0,c=i?0:e.arrowWidth,a=i?0:e.arrowHeight,[u,d]=ii(n),f={start:"0%",center:"50%",end:"100%"}[d],y=(((b=o.arrow)==null?void 0:b.x)??0)+c/2,h=(((m=o.arrow)==null?void 0:m.y)??0)+a/2;let v="",p="";return u==="bottom"?(v=i?f:`${y}px`,p=`${-a}px`):u==="top"?(v=i?f:`${y}px`,p=`${r.floating.height+a}px`):u==="right"?(v=`${-a}px`,p=i?f:`${h}px`):u==="left"&&(v=`${r.floating.width+a}px`,p=i?f:`${h}px`),{data:{x:v,y:p}}}});function ii(e){const[t,n="center"]=e.split("-");return[t,n]}var fl=il,pl=al,hl=ll,ml=dl,Dm="Portal",ci=l.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[o,s]=l.useState(!1);mt(()=>s(!0),[]);const i=n||o&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return i?Ft.createPortal(w.jsx(ct.div,{...r,ref:t}),i):null});ci.displayName=Dm;function Am(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Rr=e=>{const{present:t,children:n}=e,r=Im(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),s=_m(r.ref,Mm(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:s}):null};Rr.displayName="Presence";function Im(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),s=l.useRef("none"),i=e?"mounted":"unmounted",[c,a]=Am(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Dr(r.current);s.current=c==="mounted"?u:"none"},[c]),mt(()=>{const u=r.current,d=o.current;if(d!==e){const y=s.current,h=Dr(u);e?a("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?a("UNMOUNT"):a(d&&y!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),mt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=h=>{const p=Dr(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&p&&(a("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},y=h=>{h.target===t&&(s.current=Dr(r.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:l.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function cc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _m(...e){const t=l.useRef(e);return t.current=e,l.useCallback(n=>{const r=t.current;let o=!1;const s=r.map(i=>{const c=cc(i,n);return!o&&typeof c=="function"&&(o=!0),c});if(o)return()=>{for(let i=0;i<s.length;i++){const c=s[i];typeof c=="function"?c():cc(r[i],null)}}},[])}function Dr(e){return(e==null?void 0:e.animationName)||"none"}function Mm(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var jm=l[" useInsertionEffect ".trim().toString()]||mt;function mr({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=Lm({defaultProp:t,onChange:n}),c=e!==void 0,a=c?e:o;{const d=l.useRef(e!==void 0);l.useEffect(()=>{const f=d.current;f!==c&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${c?"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.`),d.current=c},[c,r])}const u=l.useCallback(d=>{var f;if(c){const y=Fm(d)?d(e):d;y!==e&&((f=i.current)==null||f.call(i,y))}else s(d)},[c,e,s,i]);return[a,u]}function Lm({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),s=l.useRef(t);return jm(()=>{s.current=t},[t]),l.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function Fm(e){return typeof e=="function"}var gl=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"}),$m="VisuallyHidden",bl=l.forwardRef((e,t)=>w.jsx(ct.span,{...e,ref:t,style:{...gl,...e.style}}));bl.displayName=$m;var Vm=bl,[ho,aS]=Cr("Tooltip",[po]),mo=po(),vl="TooltipProvider",Bm=700,Es="tooltip.open",[Wm,ai]=ho(vl),yl=e=>{const{__scopeTooltip:t,delayDuration:n=Bm,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=l.useRef(!0),c=l.useRef(!1),a=l.useRef(0);return l.useEffect(()=>{const u=a.current;return()=>window.clearTimeout(u)},[]),w.jsx(Wm,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:l.useCallback(()=>{r<=0||(window.clearTimeout(a.current),i.current=!1)},[r]),onClose:l.useCallback(()=>{r<=0||(window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.current=!0,r))},[r]),isPointerInTransitRef:c,onPointerInTransitChange:l.useCallback(u=>{c.current=u},[]),disableHoverableContent:o,children:s})};yl.displayName=vl;var gr="Tooltip",[zm,kr]=ho(gr),wl=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:c}=e,a=ai(gr,e.__scopeTooltip),u=mo(t),[d,f]=l.useState(null),y=On(),h=l.useRef(0),v=i??a.disableHoverableContent,p=c??a.delayDuration,g=l.useRef(!1),[b,m]=mr({prop:r,defaultProp:o??!1,onChange:T=>{T?(a.onOpen(),document.dispatchEvent(new CustomEvent(Es))):a.onClose(),s==null||s(T)},caller:gr}),S=l.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),x=l.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g.current=!1,m(!0)},[m]),C=l.useCallback(()=>{window.clearTimeout(h.current),h.current=0,m(!1)},[m]),R=l.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,m(!0),h.current=0},p)},[p,m]);return l.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),w.jsx(fl,{...u,children:w.jsx(zm,{scope:t,contentId:y,open:b,stateAttribute:S,trigger:d,onTriggerChange:f,onTriggerEnter:l.useCallback(()=>{a.isOpenDelayedRef.current?R():x()},[a.isOpenDelayedRef,R,x]),onTriggerLeave:l.useCallback(()=>{v?C():(window.clearTimeout(h.current),h.current=0)},[C,v]),onOpen:x,onClose:C,disableHoverableContent:v,children:n})})};wl.displayName=gr;var Cs="TooltipTrigger",xl=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=kr(Cs,n),s=ai(Cs,n),i=mo(n),c=l.useRef(null),a=Ze(t,c,o.onTriggerChange),u=l.useRef(!1),d=l.useRef(!1),f=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),w.jsx(pl,{asChild:!0,...i,children:w.jsx(ct.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:a,onPointerMove:qe(e.onPointerMove,y=>{y.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:qe(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:qe(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:qe(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:qe(e.onBlur,o.onClose),onClick:qe(e.onClick,o.onClose)})})});xl.displayName=Cs;var li="TooltipPortal",[Hm,Um]=ho(li,{forceMount:void 0}),Sl=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=kr(li,t);return w.jsx(Hm,{scope:t,forceMount:n,children:w.jsx(Rr,{present:n||s.open,children:w.jsx(ci,{asChild:!0,container:o,children:r})})})};Sl.displayName=li;var Kn="TooltipContent",El=l.forwardRef((e,t)=>{const n=Um(Kn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=kr(Kn,e.__scopeTooltip);return w.jsx(Rr,{present:r||i.open,children:i.disableHoverableContent?w.jsx(Cl,{side:o,...s,ref:t}):w.jsx(Gm,{side:o,...s,ref:t})})}),Gm=l.forwardRef((e,t)=>{const n=kr(Kn,e.__scopeTooltip),r=ai(Kn,e.__scopeTooltip),o=l.useRef(null),s=Ze(t,o),[i,c]=l.useState(null),{trigger:a,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,y=l.useCallback(()=>{c(null),f(!1)},[f]),h=l.useCallback((v,p)=>{const g=v.currentTarget,b={x:v.clientX,y:v.clientY},m=Zm(b,g.getBoundingClientRect()),S=Jm(b,m),x=Qm(p.getBoundingClientRect()),C=tg([...S,...x]);c(C),f(!0)},[f]);return l.useEffect(()=>()=>y(),[y]),l.useEffect(()=>{if(a&&d){const v=g=>h(g,d),p=g=>h(g,a);return a.addEventListener("pointerleave",v),d.addEventListener("pointerleave",p),()=>{a.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",p)}}},[a,d,h,y]),l.useEffect(()=>{if(i){const v=p=>{const g=p.target,b={x:p.clientX,y:p.clientY},m=(a==null?void 0:a.contains(g))||(d==null?void 0:d.contains(g)),S=!eg(b,i);m?y():S&&(y(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[a,d,i,u,y]),w.jsx(Cl,{...e,ref:s})}),[Ym,Xm]=ho(gr,{isInside:!1}),Km=Jp("TooltipContent"),Cl=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...c}=e,a=kr(Kn,n),u=mo(n),{onClose:d}=a;return l.useEffect(()=>(document.addEventListener(Es,d),()=>document.removeEventListener(Es,d)),[d]),l.useEffect(()=>{if(a.trigger){const f=y=>{y.target instanceof Node&&y.target.contains(a.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[a.trigger,d]),w.jsx(qs,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:w.jsxs(hl,{"data-state":a.stateAttribute,...u,...c,ref:t,style:{...c.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:[w.jsx(Km,{children:r}),w.jsx(Ym,{scope:n,isInside:!0,children:w.jsx(Vm,{id:a.contentId,role:"tooltip",children:o||r})})]})})});El.displayName=Kn;var Rl="TooltipArrow",qm=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=mo(n);return Xm(Rl,n).isInside?null:w.jsx(ml,{...o,...r,ref:t})});qm.displayName=Rl;function Zm(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 Jm(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 Qm(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 eg(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const c=t[s],a=t[i],u=c.x,d=c.y,f=a.x,y=a.y;d>r!=y>r&&n<(f-u)*(r-d)/(y-d)+u&&(o=!o)}return o}function tg(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),ng(t)}function ng(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],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.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],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.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 rg=yl,og=wl,sg=xl,ig=Sl,cg=El;const kl=rg,go=og,bo=sg,vo=Z.forwardRef(function({className:t,sideOffset:n=6,...r},o){return w.jsx(ig,{children:w.jsx(cg,{ref:o,sideOffset:n,className:Oe("bg-base-900 text-base-200 z-50 overflow-hidden rounded-md px-2.5 py-1 text-xs shadow-md","translate-x-0 translate-y-0 scale-100 opacity-100 transition-all duration-150","starting:scale-95 starting:opacity-0","data-[state=closed]:scale-95 data-[state=closed]:opacity-0","data-[side=bottom]:starting:-translate-y-2 data-[side=bottom]:data-[state=closed]:-translate-y-2","data-[side=top]:starting:translate-y-2 data-[side=top]:data-[state=closed]:translate-y-2","data-[side=left]:starting:translate-x-2 data-[side=left]:data-[state=closed]:translate-x-2","data-[side=right]:starting:-translate-x-2 data-[side=right]:data-[state=closed]:-translate-x-2",t),...r})})});function ag({content:e,children:t,side:n="top",sideOffset:r=6,delayDuration:o=0}){return w.jsxs(go,{delayDuration:o,children:[w.jsx(bo,{asChild:!0,children:t}),w.jsx(vo,{side:n,sideOffset:r,children:e})]})}function lg({children:e}){return w.jsxs(kl,{delayDuration:400,children:[e,w.jsx("svg",{className:"hidden",children:w.jsx("filter",{id:"noise",children:w.jsx("feTurbulence",{type:"fractalNoise",baseFrequency:"0.75",numOctaves:"4",stitchTiles:"stitch"})})})]})}function bn(e){const{opacity:t=.15}=e;return w.jsx(w.Fragment,{children:w.jsx("svg",{className:"pointer-events-none absolute inset-0 isolate z-0 h-full w-full",height:"100%",id:"texture",style:{opacity:t},children:w.jsx("rect",{width:"100%",height:"100%",filter:"url(#noise)"})})})}const Pl=[50,100,200,300,400,500,600,700,800,900,950],Tl={50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},Ol={50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},Nl={50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},Dl={50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},Al={50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},Il={50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},_l={50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},Ml={50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},jl={50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},Ll={50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},Fl={50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},$l={50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},Vl={50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},Bl={50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},Wl={50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},zl={50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},Hl={50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"},Ul={50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},Gl={50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},Yl={50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},Xl={50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},Kl={50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},ql={red:Tl,orange:Ol,amber:Nl,yellow:Dl,lime:Al,green:Il,emerald:_l,teal:Ml,cyan:jl,sky:Ll,blue:Fl,indigo:$l,violet:Vl,purple:Bl,fuchsia:Wl,pink:zl,rose:Hl,slate:Ul,gray:Gl,zinc:Yl,neutral:Xl,stone:Kl};function ug(e){return typeof e=="string"?ql[e]:e}function yo({children:e,...t}){const n={display:"contents"};return Object.keys(t).forEach(r=>{const o=t[r];if(!o)return;const s=ug(o);for(const i of Pl)n[`--color-${r}-${i}`]=s[i];s.text&&(n[`--color-${r}-text`]=s.text)}),w.jsx("div",{style:n,children:e})}var ac=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Rt=e=>!e||typeof e!="object"||Object.keys(e).length===0,dg=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function Zl(e,t){e.forEach(function(n){Array.isArray(n)?Zl(n,t):t.push(n)})}function Jl(e){let t=[];return Zl(e,t),t}var Ql=(...e)=>Jl(e).filter(Boolean),eu=(e,t)=>{let n={},r=Object.keys(e),o=Object.keys(t);for(let s of r)if(o.includes(s)){let i=e[s],c=t[s];typeof i=="object"&&typeof c=="object"?n[s]=eu(i,c):Array.isArray(i)||Array.isArray(c)?n[s]=Ql(c,i):n[s]=c+" "+i}else n[s]=e[s];for(let s of o)r.includes(s)||(n[s]=t[s]);return n},lc=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();const ui="-",fg=e=>{const t=hg(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const c=i.split(ui);return c[0]===""&&c.length!==1&&c.shift(),tu(c,t)||pg(i)},getConflictingClassGroupIds:(i,c)=>{const a=n[i]||[];return c&&r[i]?[...a,...r[i]]:a}}},tu=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?tu(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(ui);return(i=t.validators.find(({validator:c})=>c(s)))==null?void 0:i.classGroupId},uc=/^\[(.+)\]$/,pg=e=>{if(uc.test(e)){const t=uc.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},hg=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return gg(Object.entries(e.classGroups),n).forEach(([s,i])=>{Rs(i,r,s,t)}),r},Rs=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:dc(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(mg(o)){Rs(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Rs(i,dc(t,s),n,r)})})},dc=(e,t)=>{let n=e;return t.split(ui).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},mg=e=>e.isThemeGetter,gg=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,c])=>[t+i,c])):s);return[n,o]}):e,bg=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},nu="!",vg=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,i=c=>{const a=[];let u=0,d=0,f;for(let g=0;g<c.length;g++){let b=c[g];if(u===0){if(b===o&&(r||c.slice(g,g+s)===t)){a.push(c.slice(d,g)),d=g+s;continue}if(b==="/"){f=g;continue}}b==="["?u++:b==="]"&&u--}const y=a.length===0?c:c.substring(d),h=y.startsWith(nu),v=h?y.substring(1):y,p=f&&f>d?f-d:void 0;return{modifiers:a,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:p}};return n?c=>n({className:c,parseClassName:i}):i},yg=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},wg=e=>({cache:bg(e.cacheSize),parseClassName:vg(e),...fg(e)}),xg=/\s+/,Sg=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],i=e.trim().split(xg);let c="";for(let a=i.length-1;a>=0;a-=1){const u=i[a],{modifiers:d,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:h}=n(u);let v=!!h,p=r(v?y.substring(0,h):y);if(!p){if(!v){c=u+(c.length>0?" "+c:c);continue}if(p=r(y),!p){c=u+(c.length>0?" "+c:c);continue}v=!1}const g=yg(d).join(":"),b=f?g+nu:g,m=b+p;if(s.includes(m))continue;s.push(m);const S=o(p,v);for(let x=0;x<S.length;++x){const C=S[x];s.push(b+C)}c=u+(c.length>0?" "+c:c)}return c};function Eg(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ru(t))&&(r&&(r+=" "),r+=n);return r}const ru=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ru(e[r]))&&(n&&(n+=" "),n+=t);return n};function ks(e,...t){let n,r,o,s=i;function i(a){const u=t.reduce((d,f)=>f(d),e());return n=wg(u),r=n.cache.get,o=n.cache.set,s=c,c(a)}function c(a){const u=r(a);if(u)return u;const d=Sg(a,n);return o(a,d),d}return function(){return s(Eg.apply(null,arguments))}}const st=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ou=/^\[(?:([a-z-]+):)?(.+)\]$/i,Cg=/^\d+\/\d+$/,Rg=new Set(["px","full","screen"]),kg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pg=/\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$/,Tg=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Og=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ng=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Jt=e=>zn(e)||Rg.has(e)||Cg.test(e),ln=e=>Jn(e,"length",Fg),zn=e=>!!e&&!Number.isNaN(Number(e)),Wo=e=>Jn(e,"number",zn),or=e=>!!e&&Number.isInteger(Number(e)),Dg=e=>e.endsWith("%")&&zn(e.slice(0,-1)),Ie=e=>ou.test(e),un=e=>kg.test(e),Ag=new Set(["length","size","percentage"]),Ig=e=>Jn(e,Ag,su),_g=e=>Jn(e,"position",su),Mg=new Set(["image","url"]),jg=e=>Jn(e,Mg,Vg),Lg=e=>Jn(e,"",$g),sr=()=>!0,Jn=(e,t,n)=>{const r=ou.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Fg=e=>Pg.test(e)&&!Tg.test(e),su=()=>!1,$g=e=>Og.test(e),Vg=e=>Ng.test(e),Ps=()=>{const e=st("colors"),t=st("spacing"),n=st("blur"),r=st("brightness"),o=st("borderColor"),s=st("borderRadius"),i=st("borderSpacing"),c=st("borderWidth"),a=st("contrast"),u=st("grayscale"),d=st("hueRotate"),f=st("invert"),y=st("gap"),h=st("gradientColorStops"),v=st("gradientColorStopPositions"),p=st("inset"),g=st("margin"),b=st("opacity"),m=st("padding"),S=st("saturate"),x=st("scale"),C=st("sepia"),R=st("skew"),T=st("space"),k=st("translate"),A=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",Ie,t],O=()=>[Ie,t],P=()=>["",Jt,ln],N=()=>["auto",zn,Ie],B=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],j=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",Ie],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],le=()=>[zn,Ie];return{cacheSize:500,separator:":",theme:{colors:[sr],spacing:[Jt,ln],blur:["none","",un,Ie],brightness:le(),borderColor:[e],borderRadius:["none","","full",un,Ie],borderSpacing:O(),borderWidth:P(),contrast:le(),grayscale:U(),hueRotate:le(),invert:U(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[Dg,ln],inset:M(),margin:M(),opacity:le(),padding:O(),saturate:le(),scale:le(),sepia:U(),skew:le(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",Ie]}],container:["container"],columns:[{columns:[un]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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"],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:[...B(),Ie]}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",or,Ie]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ie]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",or,Ie]}],"grid-cols":[{"grid-cols":[sr]}],"col-start-end":[{col:["auto",{span:["full",or,Ie]},Ie]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[sr]}],"row-start-end":[{row:["auto",{span:[or,Ie]},Ie]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ie]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ie]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ie,t]}],"min-w":[{"min-w":[Ie,t,"min","max","fit"]}],"max-w":[{"max-w":[Ie,t,"none","full","min","max","fit","prose",{screen:[un]},un]}],h:[{h:[Ie,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ie,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ie,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ie,t,"auto","min","max","fit"]}],"font-size":[{text:["base",un,ln]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Wo]}],"font-family":[{font:[sr]}],"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:["tighter","tight","normal","wide","wider","widest",Ie]}],"line-clamp":[{"line-clamp":["none",zn,Wo]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Jt,Ie]}],"list-image":[{"list-image":["none",Ie]}],"list-style-type":[{list:["none","disc","decimal",Ie]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Jt,ln]}],"underline-offset":[{"underline-offset":["auto",Jt,Ie]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...B(),_g]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ig]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},jg]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...j(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:j()}],"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:["",...j()]}],"outline-offset":[{"outline-offset":[Jt,Ie]}],"outline-w":[{outline:[Jt,ln]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Jt,ln]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",un,Lg]}],"shadow-color":[{shadow:[sr]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",un,Ie]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[S]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[a]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ie]}],duration:[{duration:le()}],ease:[{ease:["linear","in","out","in-out",Ie]}],delay:[{delay:le()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ie]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[or,Ie]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[R]}],"skew-y":[{"skew-y":[R]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ie]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",Ie]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",Ie]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Jt,ln,Wo]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},Bg=(e,{cacheSize:t,prefix:n,separator:r,experimentalParseClassName:o,extend:s={},override:i={}})=>{ur(e,"cacheSize",t),ur(e,"prefix",n),ur(e,"separator",r),ur(e,"experimentalParseClassName",o);for(const c in i)Wg(e[c],i[c]);for(const c in s)zg(e[c],s[c]);return e},ur=(e,t,n)=>{n!==void 0&&(e[t]=n)},Wg=(e,t)=>{if(t)for(const n in t)ur(e,n,t[n])},zg=(e,t)=>{if(t)for(const n in t){const r=t[n];r!==void 0&&(e[n]=(e[n]||[]).concat(r))}},Hg=(e,...t)=>typeof e=="function"?ks(Ps,e,...t):ks(()=>Bg(Ps(),e),...t),Ug=ks(Ps);var Gg={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},iu=e=>e||void 0,br=(...e)=>iu(Jl(e).filter(Boolean).join(" ")),zo=null,en={},Ts=!1,ir=(...e)=>t=>t.twMerge?((!zo||Ts)&&(Ts=!1,zo=Rt(en)?Ug:Hg({...en,extend:{theme:en.theme,classGroups:en.classGroups,conflictingClassGroupModifiers:en.conflictingClassGroupModifiers,conflictingClassGroups:en.conflictingClassGroups,...en.extend}})),iu(zo(br(e)))):br(e),fc=(e,t)=>{for(let n in t)e.hasOwnProperty(n)?e[n]=br(e[n],t[n]):e[n]=t[n];return e},Sn=(e,t)=>{let{extend:n=null,slots:r={},variants:o={},compoundVariants:s=[],compoundSlots:i=[],defaultVariants:c={}}=e,a={...Gg,...t},u=n!=null&&n.base?br(n.base,e==null?void 0:e.base):e==null?void 0:e.base,d=n!=null&&n.variants&&!Rt(n.variants)?eu(o,n.variants):o,f=n!=null&&n.defaultVariants&&!Rt(n.defaultVariants)?{...n.defaultVariants,...c}:c;!Rt(a.twMergeConfig)&&!dg(a.twMergeConfig,en)&&(Ts=!0,en=a.twMergeConfig);let y=Rt(n==null?void 0:n.slots),h=Rt(r)?{}:{base:br(e==null?void 0:e.base,y&&(n==null?void 0:n.base)),...r},v=y?h:fc({...n==null?void 0:n.slots},Rt(h)?{base:e==null?void 0:e.base}:h),p=Rt(n==null?void 0:n.compoundVariants)?s:Ql(n==null?void 0:n.compoundVariants,s),g=m=>{if(Rt(d)&&Rt(r)&&y)return ir(u,m==null?void 0:m.class,m==null?void 0:m.className)(a);if(p&&!Array.isArray(p))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof p}`);if(i&&!Array.isArray(i))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof i}`);let S=(O,P,N=[],B)=>{let j=N;if(typeof P=="string")j=j.concat(lc(P).split(" ").map(W=>`${O}:${W}`));else if(Array.isArray(P))j=j.concat(P.reduce((W,L)=>W.concat(`${O}:${L}`),[]));else if(typeof P=="object"&&typeof B=="string"){for(let W in P)if(P.hasOwnProperty(W)&&W===B){let L=P[W];if(L&&typeof L=="string"){let U=lc(L);j[B]?j[B]=j[B].concat(U.split(" ").map(D=>`${O}:${D}`)):j[B]=U.split(" ").map(D=>`${O}:${D}`)}else Array.isArray(L)&&L.length>0&&(j[B]=L.reduce((U,D)=>U.concat(`${O}:${D}`),[]))}}return j},x=(O,P=d,N=null,B=null)=>{var j;let W=P[O];if(!W||Rt(W))return null;let L=(j=B==null?void 0:B[O])!=null?j:m==null?void 0:m[O];if(L===null)return null;let U=ac(L),D=Array.isArray(a.responsiveVariants)&&a.responsiveVariants.length>0||a.responsiveVariants===!0,le=f==null?void 0:f[O],te=[];if(typeof U=="object"&&D)for(let[pe,ge]of Object.entries(U)){let Y=W[ge];if(pe==="initial"){le=ge;continue}Array.isArray(a.responsiveVariants)&&!a.responsiveVariants.includes(pe)||(te=S(pe,Y,te,N))}let be=U!=null&&typeof U!="object"?U:ac(le),Se=W[be||"false"];return typeof te=="object"&&typeof N=="string"&&te[N]?fc(te,Se):te.length>0?(te.push(Se),te):Se},C=()=>d?Object.keys(d).map(O=>x(O,d)):null,R=(O,P)=>{if(!d||typeof d!="object")return null;let N=new Array;for(let B in d){let j=x(B,d,O,P),W=O==="base"&&typeof j=="string"?j:j&&j[O];W&&(N[N.length]=W)}return N},T={};for(let O in m)m[O]!==void 0&&(T[O]=m[O]);let k=(O,P)=>{var N;let B=typeof(m==null?void 0:m[O])=="object"?{[O]:(N=m[O])==null?void 0:N.initial}:{};return{...f,...T,...B,...P}},A=(O=[],P)=>{let N=[];for(let{class:B,className:j,...W}of O){let L=!0;for(let[U,D]of Object.entries(W)){let le=k(U,P);if(Array.isArray(D)){if(!D.includes(le[U])){L=!1;break}}else if(le[U]!==D){L=!1;break}}L&&(B&&N.push(B),j&&N.push(j))}return N},H=O=>{let P=A(p,O);if(!Array.isArray(P))return P;let N={};for(let B of P)if(typeof B=="string"&&(N.base=ir(N.base,B)(a)),typeof B=="object")for(let[j,W]of Object.entries(B))N[j]=ir(N[j],W)(a);return N},M=O=>{if(i.length<1)return null;let P={};for(let{slots:N=[],class:B,className:j,...W}of i){if(!Rt(W)){let L=!0;for(let U of Object.keys(W)){let D=k(U,O)[U];if(D===void 0||(Array.isArray(W[U])?!W[U].includes(D):W[U]!==D)){L=!1;break}}if(!L)continue}for(let L of N)P[L]=P[L]||[],P[L].push([B,j])}return P};if(!Rt(r)||!y){let O={};if(typeof v=="object"&&!Rt(v))for(let P of Object.keys(v))O[P]=N=>{var B,j;return ir(v[P],R(P,N),((B=H(N))!=null?B:[])[P],((j=M(N))!=null?j:[])[P],N==null?void 0:N.class,N==null?void 0:N.className)(a)};return O}return ir(u,C(),A(p),m==null?void 0:m.class,m==null?void 0:m.className)(a)},b=()=>{if(!(!d||typeof d!="object"))return Object.keys(d)};return g.variantKeys=b(),g.extend=n,g.base=u,g.slots=v,g.variants=d,g.defaultVariants=f,g.compoundSlots=i,g.compoundVariants=p,g};const rn={sharp:"rounded-[0px]",round:"rounded-lg",circle:"rounded-full"},Hn={sharp:"rounded-none",round:"rounded-md",circle:"rounded-full"},tn={none:"",sharp:"rounded-s-[0px]",round:"rounded-s-lg",circle:"rounded-s-full"},Un={sharp:"rounded-s-none",round:"rounded-s-md",circle:"rounded-s-full"},Yg=Sn({base:"group p-[1px] bg-base-900 border border-base-700 relative ",variants:{corners:rn,leftCorners:tn},defaultVariants:{corners:"round",leftCorners:"none"}}),vr=Z.forwardRef(function({corners:t,leftCorners:n,className:r,children:o,...s},i){return w.jsx("div",{ref:i,"data-rabbet":"",className:Yg({corners:t,leftCorners:n,className:r}),...s,children:o})}),Xg=Z.forwardRef(function({asChild:t,className:n,children:r,...o},s){const i=Oe("bg-base-900/50 rounded-lg border-2 border-t-[3px] border-base-900/80 shadow-inner shadow-base-900/50 relative p-4",n);if(t&&Z.isValidElement(r)){const c=r;return w.jsx(wn,{ref:s,...o,className:i,children:Z.cloneElement(c,void 0,w.jsxs(w.Fragment,{children:[c.props.children,w.jsx(bn,{})]}))})}return w.jsxs("div",{ref:s,...o,className:i,children:[r,w.jsx(bn,{})]})}),Kg=Z.forwardRef(function({asChild:t,className:n,innerClassName:r,children:o,...s},i){const c=Oe("bg-base-800 rounded-lg border border-base-700 shadow-sm shadow-base-900/50 relative p-4",r),a=Oe("border-base-900 rounded-lg border-b-[3px]",n);if(t&&Z.isValidElement(o)){const u=o;return w.jsx("div",{className:a,children:w.jsx(wn,{ref:i,...s,className:c,children:Z.cloneElement(u,void 0,w.jsxs(w.Fragment,{children:[u.props.children,w.jsx(bn,{})]}))})})}return w.jsx("div",{className:a,children:w.jsxs("div",{ref:i,...s,className:c,children:[o,w.jsx(bn,{})]})})});function qg(e,t){return function(r,...o){const s=new URL(e);return s.searchParams.set("code",r.toString()),o.forEach(i=>s.searchParams.append("args[]",i)),`${t} error #${r}; visit ${s} for the full message.`}}const jn=qg("https://base-ui.com/production-error","Base UI"),wo=l.createContext(!1);process.env.NODE_ENV!=="production"&&(wo.displayName="IsDrawerContext");const di=l.createContext(void 0);process.env.NODE_ENV!=="production"&&(di.displayName="DialogRootContext");function At(e){const t=l.useContext(di);if(e===!1&&t===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.":jn(27));return t}const pc={};function Qn(e,t){const n=l.useRef(pc);return n.current===pc&&(n.current=e(t)),n}function to(e,t,n,r){const o=Qn(cu).current;return Jg(o,e,t,n,r)&&au(o,[e,t,n,r]),o.callback}function Zg(e){const t=Qn(cu).current;return Qg(t,e)&&au(t,e),t.callback}function cu(){return{callback:null,cleanup:null,refs:[]}}function Jg(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function Qg(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function au(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=s(n);typeof i=="function"&&(r[o]=i);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=r[o];typeof i=="function"?i():s(null);break}case"object":{s.current=null;break}}}}}}}const eb=parseInt(l.version,10);function fi(e){return eb>=e}function hc(e){if(!l.isValidElement(e))return null;const t=e,n=t.props;return(fi(19)?n==null?void 0:n.ref:t.ref)??null}function Os(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}let Ns;process.env.NODE_ENV!=="production"&&(Ns=new Set);function tb(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Ns.has(t)||(Ns.add(t),console.warn(`Base UI: ${t}`))}}function pi(){}const vt=Object.freeze({});function nb(e,t){const n={};for(const r in e){const o=e[r];if(t!=null&&t.hasOwnProperty(r)){const s=t[r](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function rb(e,t){return typeof e=="function"?e(t):e}function ob(e,t){return typeof e=="function"?e(t):e}const hi={};function xo(e,t,n,r,o){if(!n&&!r&&!e)return no(t);let s=no(e);return t&&(s=Ur(s,t)),n&&(s=Ur(s,n)),r&&(s=Ur(s,r)),s}function sb(e){if(e.length===0)return hi;if(e.length===1)return no(e[0]);let t=no(e[0]);for(let n=1;n<e.length;n+=1)t=Ur(t,e[n]);return t}function no(e){return mi(e)?{...uu(e,hi)}:ib(e)}function Ur(e,t){return mi(t)?uu(t,e):cb(e,t)}function ib(e){const t={...e};for(const n in t){const r=t[n];lu(n,r)&&(t[n]=du(r))}return t}function cb(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Os(e.style,r);break}case"className":{e[n]=fu(e.className,r);break}default:lu(n,r)?e[n]=ab(e[n],r):e[n]=r}}return e}function lu(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function mi(e){return typeof e=="function"}function uu(e,t){return mi(e)?e(t):e??hi}function ab(e,t){return t?e?(...n)=>{const r=n[0];if(pu(r)){const s=r;ro(s);const i=t(...n);return s.baseUIHandlerPrevented||e==null||e(...n),i}const o=t(...n);return e==null||e(...n),o}:du(t):e}function du(e){return e&&((...t)=>{const n=t[0];return pu(n)&&ro(n),e(...t)})}function ro(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function fu(e,t){return t?e?t+" "+e:t:e}function pu(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function En(e,t,n={}){const r=t.render,o=lb(t,n);if(n.enabled===!1)return null;const s=n.state??vt;return hb(e,r,o,s)}function lb(e,t={}){const{className:n,style:r,render:o}=e,{state:s=vt,ref:i,props:c,stateAttributesMapping:a,enabled:u=!0}=t,d=u?rb(n,s):void 0,f=u?ob(r,s):void 0,y=u?nb(s,a):vt,h=u&&c?ub(c):void 0,v=u?Os(y,h)??{}:vt;return typeof document<"u"&&(u?Array.isArray(i)?v.ref=Zg([v.ref,hc(o),...i]):v.ref=to(v.ref,hc(o),i):to(null,null)),u?(d!==void 0&&(v.className=fu(v.className,d)),f!==void 0&&(v.style=Os(v.style,f)),v):vt}function ub(e){return Array.isArray(e)?sb(e):xo(void 0,e)}const db=Symbol.for("react.lazy"),fb=/^[A-Z][A-Za-z0-9$]*$/,pb=/[a-z]/;function hb(e,t,n,r){if(t){if(typeof t=="function")return process.env.NODE_ENV!=="production"&&mb(t),t(n,r);const o=xo(n,t.props);o.ref=n.ref;let s=t;if((s==null?void 0:s.$$typeof)===db&&(s=l.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!l.isValidElement(s))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
|
|
31
|
+
`));return l.cloneElement(s,o)}if(e&&typeof e=="string")return gb(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":jn(8))}function mb(e){const t=e.name;t.length!==0&&fb.test(t)&&pb.test(t)&&tb(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`,"This usually means a React component was passed directly as `render={Component}`.","Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.","If this is an intentional render callback, rename it to start with a lowercase letter.","Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.","https://base-ui.com/r/invalid-render-prop")}function gb(e,t){return e==="button"?Z.createElement("button",{type:"button",...t,key:t.key}):e==="img"?Z.createElement("img",{alt:"",...t,key:t.key}):l.createElement(e,t)}let An=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const bb={[An.startingStyle]:""},vb={[An.endingStyle]:""},gi={transitionStatus(e){return e==="starting"?bb:e==="ending"?vb:null}};let Mt=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=An.startingStyle]="startingStyle",e[e.endingStyle=An.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e}({}),yb=function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e}({});const wb={[yb.popupOpen]:""},xb={[Mt.open]:""},Sb={[Mt.closed]:""},Eb={[Mt.anchorHidden]:""},Cb={open(e){return e?wb:null}},bi={open(e){return e?xb:Sb},anchorHidden(e){return e?Eb:null}};let bt=function(e){return e.nestedDrawers="--nested-drawers",e.height="--drawer-height",e.frontmostHeight="--drawer-frontmost-height",e.swipeMovementX="--drawer-swipe-movement-x",e.swipeMovementY="--drawer-swipe-movement-y",e.snapPointOffset="--drawer-snap-point-offset",e.swipeStrength="--drawer-swipe-strength",e}({}),nn=function(e){return e.swipeProgress="--drawer-swipe-progress",e}({});const Rb={...bi,...gi},hu=l.forwardRef(function(t,n){const{render:r,className:o,style:s,forceRender:i=!1,...c}=t,{store:a}=At(),u=a.useState("open"),d=a.useState("nested"),f=a.useState("mounted"),y=a.useState("transitionStatus");return En("div",t,{state:{open:u,transitionStatus:y},ref:[a.context.backdropRef,n],stateAttributesMapping:Rb,props:[{role:"presentation",hidden:!f,style:{pointerEvents:u?void 0:"none",userSelect:"none",WebkitUserSelect:"none",[nn.swipeProgress]:"0",[bt.swipeStrength]:"1"}},c],enabled:i||!d})});process.env.NODE_ENV!=="production"&&(hu.displayName="DrawerBackdrop");const Nt={...l},Ho=Nt.useInsertionEffect,kb=Ho&&Ho!==Nt.useLayoutEffect?Ho:e=>e();function _e(e){const t=Qn(Pb).current;return t.next=e,kb(t.effect),t.trampoline}function Pb(){const e={next:void 0,callback:Tb,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function Tb(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}let Ds;process.env.NODE_ENV!=="production"&&(Ds=new Set);function yr(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Ds.has(t)||(Ds.add(t),console.error(`Base UI: ${t}`))}}const Ob=()=>{},et=typeof document<"u"?l.useLayoutEffect:Ob,mu=l.createContext(void 0);process.env.NODE_ENV!=="production"&&(mu.displayName="CompositeRootContext");function Nb(e=!1){const t=l.useContext(mu);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":jn(16));return t}function Db(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:s}=e,i=r&&t!==!1,c=r&&t===!1;return{props:l.useMemo(()=>{const u={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return r||(u.tabIndex=o,!s&&n&&(u.tabIndex=t?o:-1)),(s&&(t||i)||!s&&n)&&(u["aria-disabled"]=n),s&&(!t||c)&&(u.disabled=n),u},[r,n,t,i,c,s,o])}}function gu(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0,composite:s}=e,i=l.useRef(null),c=Nb(!0),a=s??c!==void 0,{props:u}=Db({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&l.useEffect(()=>{var v,p;if(!i.current)return;const h=Ar(i.current);if(o){if(!h){const g=((v=Nt.captureOwnerStack)==null?void 0:v.call(Nt))||"";yr(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${g}`)}}else if(h){const g=((p=Nt.captureOwnerStack)==null?void 0:p.call(Nt))||"";yr(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${g}`)}},[o]);const d=l.useCallback(()=>{const h=i.current;Ar(h)&&a&&t&&u.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,u.disabled,a]);et(d,[d]);const f=l.useCallback((h={})=>{const{onClick:v,onMouseDown:p,onKeyUp:g,onKeyDown:b,onPointerDown:m,...S}=h;return xo({onClick(x){if(t){x.preventDefault();return}v==null||v(x)},onMouseDown(x){t||p==null||p(x)},onKeyDown(x){if(t||(ro(x),b==null||b(x),x.baseUIHandlerPrevented))return;const C=x.target===x.currentTarget,R=x.currentTarget,T=Ar(R),k=!o&&Ab(R),A=C&&(o?T:!k),H=x.key==="Enter",M=x.key===" ",O=R.getAttribute("role"),P=(O==null?void 0:O.startsWith("menuitem"))||O==="option"||O==="gridcell";if(C&&a&&M){if(x.defaultPrevented&&P)return;x.preventDefault(),k||o&&T?(R.click(),x.preventBaseUIHandler()):A&&(v==null||v(x),x.preventBaseUIHandler());return}A&&(!o&&(M||H)&&x.preventDefault(),!o&&H&&(v==null||v(x)))},onKeyUp(x){if(!t){if(ro(x),g==null||g(x),x.target===x.currentTarget&&o&&a&&Ar(x.currentTarget)&&x.key===" "){x.preventDefault();return}x.baseUIHandlerPrevented||x.target===x.currentTarget&&!o&&!a&&x.key===" "&&(v==null||v(x))}},onPointerDown(x){if(t){x.preventDefault();return}m==null||m(x)}},o?{type:"button"}:{role:"button"},u,S)},[t,u,a,o]),y=_e(h=>{i.current=h,d()});return{getButtonProps:f,buttonRef:y}}function Ar(e){return it(e)&&e.tagName==="BUTTON"}function Ab(e){return!!((e==null?void 0:e.tagName)==="A"&&(e!=null&&e.href))}const bu="none",vu="trigger-press",Ib="trigger-hover",yu="outside-press",_b="close-press",wu="focus-out",Mb="escape-key",jb="close-watcher",Lb="imperative-action",Ir="swipe";function xt(e,t,n,r){let o=!1,s=!1;const i=vt;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){s=!0},get isCanceled(){return o},get isPropagationAllowed(){return s},trigger:n,...i}}const xu=l.forwardRef(function(t,n){const{render:r,className:o,style:s,disabled:i=!1,nativeButton:c=!0,...a}=t,{store:u}=At(),d=u.useState("open"),{getButtonProps:f,buttonRef:y}=gu({disabled:i,native:c}),h={disabled:i};function v(p){d&&u.setOpen(!1,xt(_b,p.nativeEvent))}return En("button",t,{state:h,ref:[n,y],props:[{onClick:v},a,f]})});process.env.NODE_ENV!=="production"&&(xu.displayName="DialogClose");const Fb=xu,$b="data-drawer-content";let mc=0;function Vb(e,t="mui"){const[n,r]=l.useState(e),o=e||n;return l.useEffect(()=>{n==null&&(mc+=1,r(`${t}-${mc}`))},[n,t]),o}const gc=Nt.useId;function So(e,t){if(gc!==void 0){const n=gc();return e??(t?`${t}-${n}`:n)}return Vb(e,t)}function vi(e){return So(e,"base-ui")}const Su=l.forwardRef(function(t,n){const{render:r,className:o,style:s,id:i,...c}=t,{store:a}=At(),u=vi(i);return a.useSyncedValueWithCleanup("descriptionElementId",u),En("p",t,{ref:n,props:[{id:u},c]})});process.env.NODE_ENV!=="production"&&(Su.displayName="DialogDescription");const Bb=Su,Eu=l.createContext(void 0);process.env.NODE_ENV!=="production"&&(Eu.displayName="DrawerProviderContext");function Cu(e){return l.useContext(Eu)}const Wb=[];function Ru(e){l.useEffect(e,Wb)}const cr=0;class In{constructor(){ot(this,"currentId",cr);ot(this,"clear",()=>{this.currentId!==cr&&(clearTimeout(this.currentId),this.currentId=cr)});ot(this,"disposeEffect",()=>this.clear)}static create(){return new In}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=cr,n()},t)}isStarted(){return this.currentId!==cr}}function wr(){const e=Qn(In.create).current;return Ru(e.disposeEffect),e}function zb(){if(typeof navigator>"u")return{userAgent:"",platform:"",maxTouchPoints:0};if(process.env.NODE_ENV!=="production"){const e=navigator.userAgentData;if(e&&Array.isArray(e.brands))return{userAgent:e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "),platform:e.platform??navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}return{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:Hb,platform:Ub,maxTouchPoints:Gb}=zb(),Eo=Hb.toLowerCase(),xr=Ub.toLowerCase(),Co=/^i(os$|p)/.test(xr)||xr==="macintel"&&Gb>1,bc="android",oo=xr===bc||Eo.includes(bc),Yb=!Co&&xr.startsWith("mac");xr.startsWith("win");const Xb=Yb||Co;var ka;const er=typeof CSS<"u"&&!!((ka=CSS.supports)!=null&&ka.call(CSS,"-webkit-backdrop-filter:none"));!er&&Eo.includes("firefox");!er&&Eo.includes("chrom");const Kb=Xb,qb=/jsdom|happydom/.test(Eo);function Zb(e){e.preventDefault(),e.stopPropagation()}function Jb(e){return"nativeEvent"in e}function Qb(e){return e.pointerType===""&&e.isTrusted?!0:oo&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function e0(e){return qb?!1:!oo&&e.width===0&&e.height===0||oo&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function vc(e,t){return["mouse","pen"].includes(e)}function t0(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const As="data-base-ui-focusable",n0="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Ht(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function Ve(e,t){var r;if(!e||!t)return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e.contains(t))return!0;if(n&&Xn(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Ot(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Uo(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function r0(e){return e.matches("html,body")}function yi(e){return it(e)&&e.matches(n0)}function yc(e){return e?e.getAttribute("role")==="combobox"&&yi(e):!1}function wc(e){return e?e.hasAttribute(As)?e:e.querySelector(`[${As}]`)||e:null}function Ke(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Gn(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function _r(e){const t=Qn(o0,e).current;return t.next=e,et(t.effect),t}function o0(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const Mr=null;let xc=globalThis.requestAnimationFrame;class s0{constructor(){ot(this,"callbacks",[]);ot(this,"callbacksCount",0);ot(this,"nextId",1);ot(this,"startId",1);ot(this,"isScheduled",!1);ot(this,"tick",t=>{var o;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let s=0;s<n.length;s+=1)(o=n[s])==null||o.call(n,t)})}request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&xc!==requestAnimationFrame&&(xc=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const jr=new s0;class Ut{constructor(){ot(this,"currentId",Mr);ot(this,"cancel",()=>{this.currentId!==Mr&&(jr.cancel(this.currentId),this.currentId=Mr)});ot(this,"disposeEffect",()=>this.cancel)}static create(){return new Ut}static request(t){return jr.request(t)}static cancel(t){return jr.cancel(t)}request(t){this.cancel(),this.currentId=jr.request(()=>{this.currentId=Mr,t()})}}function Ro(){const e=Qn(Ut.create).current;return Ru(e.disposeEffect),e}function Qe(e){return(e==null?void 0:e.ownerDocument)||document}const i0={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},c0={...i0,position:"fixed",top:0,left:0},Sr=l.forwardRef(function(t,n){const[r,o]=l.useState();et(()=>{Kb&&er&&o("button")},[]);const s={tabIndex:0,role:r};return w.jsx("span",{...t,ref:n,style:c0,"aria-hidden":r?void 0:!0,...s,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(Sr.displayName="FocusGuard");function a0(e){return e.visibility==="hidden"||e.visibility==="collapse"}function ku(e,t=e?Et(e):null){return!e||!e.isConnected||!t||a0(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const l0='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function u0(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return Xn(n)?n.host:null}function Is(e){for(const t of Array.from(e.children))if(wt(t)==="summary")return t;return null}function d0(e,t){const n=Is(t);return!!n&&(e===n||Ve(n,e))}function Pu(e){const t=e?wt(e):"";return e!=null&&e.matches(l0)&&(t!=="summary"||e.parentElement!=null&&wt(e.parentElement)==="details"&&Is(e.parentElement)===e)&&(t!=="details"||Is(e)==null)&&(t!=="input"||e.type!=="hidden")}function Tu(e){if(!Pu(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=u0(t)){const n=t!==e,r=wt(t)==="slot";if(t.hasAttribute("inert")||n&&wt(t)==="details"&&!t.open&&!d0(e,t)||t.hasAttribute("hidden")||!r&&!f0(t,n))return!1}return!0}function f0(e,t){const n=Et(e);return t?n.display!=="none":ku(e,n)}function Ou(e){const t=e.tabIndex;if(t<0){const n=wt(e);if(n==="details"||n==="audio"||n==="video"||it(e)&&e.isContentEditable)return 0}return t}function Go(e){if(wt(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function p0(e,t){const n=Go(e);if(!n)return!0;const r=t.find(o=>{const s=Go(o);return(s==null?void 0:s.name)===n.name&&s.form===n.form&&s.checked});return r?r===n:t.find(o=>{const s=Go(o);return(s==null?void 0:s.name)===n.name&&s.form===n.form})===n}function Nu(e){if(it(e)&&wt(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return it(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Du(e,t){Nu(e).forEach(n=>{Pu(n)&&t.push(n),Du(n,t)})}function Au(e,t,n){Nu(e).forEach(r=>{it(r)&&r.matches(t)&&n.push(r),Au(r,t,n)})}function wi(e){return Tu(e)&&Ou(e)>=0}function Iu(e){const t=[];return Du(e,t),t.filter(Tu)}function ko(e){const t=Iu(e);return t.filter(n=>Ou(n)>=0&&p0(n,t))}function _u(e,t){const n=ko(e),r=n.length;if(r===0)return;const o=Ht(Qe(e)),s=n.indexOf(o),i=s===-1?t===1?0:r-1:s+t;return n[i]}function Mu(e){return _u(Qe(e).body,1)||e}function ju(e){return _u(Qe(e).body,-1)||e}function fr(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ve(n,r)}function h0(e){ko(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Sc(e){const t=[];Au(e,"[data-tabindex]",t),t.forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Er(e,t,n=!0){return e.filter(o=>o.parentId===t).flatMap(o=>{var s;return[...!n||(s=o.context)!=null&&s.open?[o]:[],...Er(e,o.id,n)]})}function Ec(e,t){var o;let n=[],r=(o=e.find(s=>s.id===t))==null?void 0:o.parentId;for(;r;){const s=e.find(i=>i.id===r);r=s==null?void 0:s.parentId,s&&(n=n.concat(s))}return n}function so(e){return`data-base-ui-${e}`}let Lr=0;function Yo(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:o}=t;cancelAnimationFrame(Lr);function s(){o&&!o()||e==null||e.focus({preventScroll:n})}if(r)return s(),pi;const i=requestAnimationFrame(s);return Lr=i,()=>{Lr===i&&(cancelAnimationFrame(i),Lr=0)}}const Xo={inert:new WeakMap,"aria-hidden":new WeakMap},Cc="data-base-ui-inert",_s={inert:new WeakSet,"aria-hidden":new WeakSet};let ar=new WeakMap,Ko=0;function m0(e){return _s[e]}function Lu(e){return e?Xn(e)?e.host:Lu(e.parentNode):null}const Rc=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Lu(n);return e.contains(r)?r:null}).filter(n=>n!=null),kc=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},Pc=(e,t,n)=>{const r=[],o=s=>{!s||n.has(s)||Array.from(s.children).forEach(i=>{wt(i)!=="script"&&(t.has(i)?o(i):r.push(i))})};return o(e),r};function g0(e,t,n,r,{mark:o=!0}){let s=null;r?s="inert":n&&(s="aria-hidden");let i=null,c=null;const a=Rc(t,e),u=o?Pc(t,kc(a),new Set(a)):[],d=[],f=[];if(s){const y=Xo[s],h=m0(s);c=h,i=y;const v=Rc(t,Array.from(t.querySelectorAll("[aria-live]"))),p=a.concat(v);Pc(t,kc(p),new Set(p)).forEach(b=>{const m=b.getAttribute(s),S=m!==null&&m!=="false",x=(y.get(b)||0)+1;y.set(b,x),d.push(b),x===1&&S&&h.add(b),S||b.setAttribute(s,s==="inert"?"":"true")})}return o&&u.forEach(y=>{const h=(ar.get(y)||0)+1;ar.set(y,h),f.push(y),h===1&&y.setAttribute(Cc,"")}),Ko+=1,()=>{i&&d.forEach(y=>{const v=(i.get(y)||0)-1;i.set(y,v),v||(!(c!=null&&c.has(y))&&s&&y.removeAttribute(s),c==null||c.delete(y))}),o&&f.forEach(y=>{const h=(ar.get(y)||0)-1;ar.set(y,h),h||y.removeAttribute(Cc)}),Ko-=1,Ko||(Xo.inert=new WeakMap,Xo["aria-hidden"]=new WeakMap,_s.inert=new WeakSet,_s["aria-hidden"]=new WeakSet,ar=new WeakMap)}}function Tc(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:o=!0}=t,s=Qe(e[0]).body;return g0(e,s,n,r,{mark:o})}const Fu="data-base-ui-click-trigger",b0="data-base-ui-swipe-ignore",v0=`[${b0}]`,y0={clipPath:"inset(50%)",position:"fixed",top:0,left:0},xi=l.createContext(null);process.env.NODE_ENV!=="production"&&(xi.displayName="PortalContext");const $u=()=>l.useContext(xi),w0=so("portal");function x0(e={}){const{ref:t,container:n,componentProps:r=vt,elementProps:o}=e,s=So(),i=$u(),c=i==null?void 0:i.portalNode,[a,u]=l.useState(null),[d,f]=l.useState(null),y=_e(g=>{g!==null&&f(g)}),h=l.useRef(null);et(()=>{if(n===null){h.current&&(h.current=null,f(null),u(null));return}if(s==null)return;const g=(n&&(ei(n)?n:n.current))??c??document.body;if(g==null){h.current&&(h.current=null,f(null),u(null));return}h.current!==g&&(h.current=g,f(null),u(g))},[n,c,s]);const v=En("div",r,{ref:[t,y],props:[{id:s,[w0]:""},o]});return{portalNode:d,portalSubtree:a&&v?Ft.createPortal(v,a):null}}const Vu=l.forwardRef(function(t,n){const{render:r,className:o,style:s,children:i,container:c,renderGuards:a,...u}=t,{portalNode:d,portalSubtree:f}=x0({container:c,ref:n,componentProps:t,elementProps:u}),y=l.useRef(null),h=l.useRef(null),v=l.useRef(null),p=l.useRef(null),[g,b]=l.useState(null),m=l.useRef(!1),S=g==null?void 0:g.modal,x=g==null?void 0:g.open,C=typeof a=="boolean"?a:!!g&&!g.modal&&g.open&&!!d;l.useEffect(()=>{if(!d||S)return;function T(k){d&&k.relatedTarget&&fr(k)&&(k.type==="focusin"?m.current&&(Sc(d),m.current=!1):(h0(d),m.current=!0))}return Gn(Ke(d,"focusin",T,!0),Ke(d,"focusout",T,!0))},[d,S]),et(()=>{!d||x!==!0||!m.current||(Sc(d),m.current=!1)},[x,d]);const R=l.useMemo(()=>({beforeOutsideRef:y,afterOutsideRef:h,beforeInsideRef:v,afterInsideRef:p,portalNode:d,setFocusManagerState:b}),[d]);return w.jsxs(l.Fragment,{children:[f,w.jsxs(xi.Provider,{value:R,children:[C&&d&&w.jsx(Sr,{"data-type":"outside",ref:y,onFocus:T=>{var k;if(fr(T,d))(k=v.current)==null||k.focus();else{const A=g?g.domReference:null,H=ju(A);H==null||H.focus()}}}),C&&d&&w.jsx("span",{"aria-owns":d.id,style:y0}),d&&Ft.createPortal(i,d),C&&d&&w.jsx(Sr,{"data-type":"outside",ref:h,onFocus:T=>{var k;if(fr(T,d))(k=p.current)==null||k.focus();else{const A=g?g.domReference:null,H=Mu(A);H==null||H.focus(),g!=null&&g.closeOnFocusOut&&(g==null||g.onOpenChange(!1,xt(wu,T.nativeEvent)))}}})]})]})});process.env.NODE_ENV!=="production"&&(Vu.displayName="FloatingPortal");function S0(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const Bu=l.createContext(null);process.env.NODE_ENV!=="production"&&(Bu.displayName="FloatingNodeContext");const Wu=l.createContext(null);process.env.NODE_ENV!=="production"&&(Wu.displayName="FloatingTreeContext");const E0=()=>{var e;return((e=l.useContext(Bu))==null?void 0:e.id)||null},zu=e=>{const t=l.useContext(Wu);return e??t};function Qt(e){return e==null?e:"current"in e?e.current:e}function C0(e,t){const n=ht(Ot(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const Oc=20;let pn=[];function Si(){pn=pn.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function Nc(e){Si(),e&&wt(e)!=="body"&&(pn.push(new WeakRef(e)),pn.length>Oc&&(pn=pn.slice(-Oc)))}function Dc(){var e;return Si(),(e=pn[pn.length-1])==null?void 0:e.deref()}function R0(e){return e?wi(e)?e:ko(e)[0]||e:null}function Ac(e){var o;if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!((o=e.getAttribute("role"))!=null&&o.includes("dialog")))return;const n=Iu(e).filter(s=>{const i=s.getAttribute("data-tabindex")||"";return wi(s)||s.hasAttribute("data-tabindex")&&!i.startsWith("-")}),r=e.getAttribute("tabindex");n.length===0?r!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(r!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function k0(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:s=!0,restoreFocus:i=!1,modal:c=!0,closeOnFocusOut:a=!0,openInteractionType:u="",nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:y,externalTree:h,getInsideElements:v}=e,p="rootStore"in t?t.rootStore:t,g=p.useState("open"),b=p.useState("domReferenceElement"),m=p.useState("floatingElement"),{events:S,dataRef:x}=p.context,C=_e(()=>{var V;return(V=x.current.floatingContext)==null?void 0:V.nodeId}),R=o===!1,T=yc(b)&&R,k=_r(o),A=_r(s),H=_r(u),M=_r(g),O=zu(h),P=$u(),N=l.useRef(!1),B=l.useRef(!1),j=l.useRef(!1),W=l.useRef(null),L=l.useRef(""),U=l.useRef(""),D=l.useRef(null),le=l.useRef(null),te=to(D,y,P==null?void 0:P.beforeInsideRef),be=to(le,P==null?void 0:P.afterInsideRef),Se=wr(),pe=wr(),ge=Ro(),Y=P!=null,z=wc(m),J=_e((V=z)=>V?ko(V):[]),re=_e(()=>(v==null?void 0:v().filter(V=>V!=null))??[]);l.useEffect(()=>{if(r||!c)return;function V(Q){Q.key==="Tab"&&Ve(z,Ht(Qe(z)))&&J().length===0&&!T&&Zb(Q)}const he=Qe(z);return Ke(he,"keydown",V)},[r,z,c,T,J]),l.useEffect(()=>{if(r||!g)return;const V=Qe(z);function he(){j.current=!1}function Q(De){const ue=Ot(De),de=re(),q=Ve(m,ue)||Ve(b,ue)||Ve(P==null?void 0:P.portalNode,ue)||de.some(Ee=>Ee===ue||Ve(Ee,ue));j.current=!q,U.current=De.pointerType||"keyboard",ue!=null&&ue.closest(`[${Fu}]`)&&(B.current=!0,pe.start(0,()=>{B.current=!1}))}function Ne(){U.current="keyboard"}return Gn(Ke(V,"pointerdown",Q,!0),Ke(V,"pointerup",he,!0),Ke(V,"pointercancel",he,!0),Ke(V,"keydown",Ne,!0),he)},[r,m,b,z,g,P,pe,re]),l.useEffect(()=>{if(r||!a)return;const V=Qe(z);function he(){B.current=!0,pe.start(0,()=>{B.current=!1})}function Q(de){const q=Ot(de);wi(q)&&(W.current=q)}function Ne(de){const q=de.relatedTarget,Ee=de.currentTarget,ve=Ot(de);c&&q==null&&ve!=null&&Ve(m,ve)&&Nc(ve),queueMicrotask(()=>{const ye=C(),at=p.context.triggerElements,ae=re(),me=(q==null?void 0:q.hasAttribute(so("focus-guard")))&&[D.current,le.current,P==null?void 0:P.beforeInsideRef.current,P==null?void 0:P.afterInsideRef.current,P==null?void 0:P.beforeOutsideRef.current,P==null?void 0:P.afterOutsideRef.current,Qt(f),Qt(d)].includes(q),I=!(Ve(b,q)||Ve(m,q)||Ve(q,m)||Ve(P==null?void 0:P.portalNode,q)||ae.some($=>$===q||Ve($,q))||q!=null&&at.hasElement(q)||at.hasMatchingElement($=>Ve($,q))||me||O&&(Er(O.nodesRef.current,ye).find($=>{var ne,oe;return Ve((ne=$.context)==null?void 0:ne.elements.floating,q)||Ve((oe=$.context)==null?void 0:oe.elements.domReference,q)})||Ec(O.nodesRef.current,ye).find($=>{var ne,oe,Pe;return[(ne=$.context)==null?void 0:ne.elements.floating,wc((oe=$.context)==null?void 0:oe.elements.floating)].includes(q)||((Pe=$.context)==null?void 0:Pe.elements.domReference)===q})));if(Ee===b&&z&&Ac(z),i&&Ee!==b&&!ku(ve)&&Ht(V)===V.body){if(it(z)&&(z.focus(),i==="popup")){ge.request(()=>{z.focus()});return}const $=J(),ne=W.current,oe=(ne&&$.includes(ne)?ne:null)||$[$.length-1]||z;it(oe)&&oe.focus()}if(x.current.insideReactTree){x.current.insideReactTree=!1;return}(T||!c)&&q&&I&&!B.current&&(T||q!==Dc())&&(N.current=!0,p.setOpen(!1,xt(wu,de)))})}function De(){j.current||(x.current.insideReactTree=!0,Se.start(0,()=>{x.current.insideReactTree=!1}))}const ue=it(b)?b:null;if(!(!m&&!ue))return Gn(ue&&Ke(ue,"focusout",Ne),ue&&Ke(ue,"pointerdown",he),m&&Ke(m,"focusin",Q),m&&Ke(m,"focusout",Ne),m&&P&&Ke(m,"focusout",De,!0))},[r,b,m,z,c,O,P,p,a,i,J,T,C,x,Se,pe,ge,d,f,re]),l.useEffect(()=>{var Ee,ve,ye;if(r||!m||!g)return;const V=Array.from(((Ee=P==null?void 0:P.portalNode)==null?void 0:Ee.querySelectorAll(`[${so("portal")}]`))||[]),Q=(ye=(ve=(O?Ec(O.nodesRef.current,C()):[]).find(at=>{var ae;return yc(((ae=at.context)==null?void 0:ae.elements.domReference)||null)}))==null?void 0:ve.context)==null?void 0:ye.elements.domReference,De=[...[m,...V,D.current,le.current,P==null?void 0:P.beforeOutsideRef.current,P==null?void 0:P.afterOutsideRef.current,...re()],Q,Qt(f),Qt(d),T?b:null].filter(at=>at!=null),ue=Tc(De,{ariaHidden:c||T,mark:!1}),de=[m,...V].filter(at=>at!=null),q=Tc(de);return()=>{q(),ue()}},[g,r,b,m,c,P,T,O,C,d,f,re]),et(()=>{if(!g||r||!it(z))return;const V=Qe(z),he=Ht(V);queueMicrotask(()=>{const Q=k.current,Ne=typeof Q=="function"?Q(H.current||""):Q;if(Ne===void 0||Ne===!1||Ve(z,he))return;let ue=null;const de=()=>(ue==null&&(ue=J(z)),ue[0]||z);let q;Ne===!0||Ne===null?q=de():q=Qt(Ne),q=q||de();const Ee=Ve(z,Ht(V));Yo(q,{preventScroll:q===z,shouldFocus(){if(!M.current)return!1;if(Ee)return!0;const ve=Ht(V);return!(ve!==q&&Ve(z,ve))}})})},[r,g,z,J,k,H,M]),et(()=>{if(r||!z)return;const V=Qe(z),he=Ht(V),Q=H.current==null;Nc(he);function Ne(ue){if(ue.open||(L.current=C0(ue.nativeEvent,U.current)),ue.reason===Ib&&ue.nativeEvent.type==="mouseleave"&&(N.current=!0),ue.reason===yu)if(ue.nested)N.current=!1;else if(Qb(ue.nativeEvent)||e0(ue.nativeEvent))N.current=!1;else{let de=!1;Qe(z).createElement("div").focus({get preventScroll(){return de=!0,!1}}),de?N.current=!1:N.current=!0}}S.on("openchange",Ne);function De(){const ue=A.current;let de=typeof ue=="function"?ue(L.current):ue;if(de===void 0||de===!1)return null;de===null&&(de=!0);const q=b!=null&&b.isConnected?b:null,Ee=he!=null&&he.isConnected&&wt(he)!=="body"?he:null;let ve=Q?Ee||q:q||Ee;return ve||(ve=Dc()||null),typeof de=="boolean"?ve:Qt(de)||ve||null}return()=>{S.off("openchange",Ne);const ue=Ht(V),de=re(),q=Ve(m,ue)||de.some(ye=>ye===ue||Ve(ye,ue))||O&&Er(O.nodesRef.current,C(),!1).some(ye=>{var at;return Ve((at=ye.context)==null?void 0:at.elements.floating,ue)}),Ee=A.current,ve=De();queueMicrotask(()=>{const ye=R0(ve),at=typeof Ee!="boolean";Ee&&!N.current&&it(ye)&&(!(!at&&ye!==ue&&ue!==V.body)||q)&&ye.focus({preventScroll:!0}),N.current=!1})}},[r,m,z,A,H,S,O,b,C,re]),et(()=>{if(!er||g||!m)return;const V=Ht(Qe(m));!it(V)||!yi(V)||Ve(m,V)&&V.blur()},[g,m]),et(()=>{if(!(r||!P))return P.setFocusManagerState({modal:c,closeOnFocusOut:a,open:g,onOpenChange:p.setOpen,domReference:b}),()=>{P.setFocusManagerState(null)}},[r,P,c,g,p,a,b]),et(()=>{if(!(r||!z))return Ac(z),()=>{queueMicrotask(Si)}},[r,z]);const K=!r&&(c?!T:!0)&&(Y||c);return w.jsxs(l.Fragment,{children:[K&&w.jsx(Sr,{"data-type":"inside",ref:te,onFocus:V=>{var he;if(c){const Q=J();Yo(Q[Q.length-1])}else if(P!=null&&P.portalNode)if(N.current=!1,fr(V,P.portalNode)){const Q=Mu(b);Q==null||Q.focus()}else(he=Qt(f??P.beforeOutsideRef))==null||he.focus()}}),n,K&&w.jsx(Sr,{"data-type":"inside",ref:be,onFocus:V=>{var he;if(c)Yo(J()[0]);else if(P!=null&&P.portalNode)if(a&&(N.current=!0),fr(V,P.portalNode)){const Q=ju(b);Q==null||Q.focus()}else(he=Qt(d??P.afterOutsideRef))==null||he.focus()}})]})}function P0(e,t={}){const{enabled:n=!0,event:r="click",toggle:o=!0,ignoreMouse:s=!1,stickIfOpen:i=!0,touchOpenDelay:c=0,reason:a=vu}=t,u="rootStore"in e?e.rootStore:e,d=u.context.dataRef,f=l.useRef(void 0),y=Ro(),h=wr(),v=l.useMemo(()=>{function p(b,m,S,x){const C=xt(a,m,S);b&&x==="touch"&&c>0?h.start(c,()=>{u.setOpen(!0,C)}):u.setOpen(b,C)}function g(b,m,S){const x=d.current.openEvent,C=u.select("domReferenceElement")!==m;return b&&C||!b||!o?!0:x&&i?!S(x.type):!1}return{onPointerDown(b){f.current=b.pointerType},onMouseDown(b){const m=f.current,S=b.nativeEvent,x=u.select("open");if(b.button!==0||r==="click"||vc(m)&&s)return;const C=g(x,b.currentTarget,k=>k==="click"||k==="mousedown"),R=Ot(S);if(yi(R)){p(C,S,R,m);return}const T=b.currentTarget;y.request(()=>{p(C,S,T,m)})},onClick(b){if(r==="mousedown-only")return;const m=f.current;if(r==="mousedown"&&m){f.current=void 0;return}if(vc(m)&&s)return;const S=u.select("open"),x=g(S,b.currentTarget,C=>C==="click"||C==="mousedown"||C==="keydown"||C==="keyup");p(x,b.nativeEvent,b.currentTarget,m)},onKeyDown(){f.current=void 0}}},[d,r,s,a,u,i,o,y,h,c]);return l.useMemo(()=>n?{reference:v}:vt,[n,v])}function T0(){return!1}function O0(e){return{escapeKey:typeof e=="boolean"?e:(e==null?void 0:e.escapeKey)??!1,outsidePress:typeof e=="boolean"?e:(e==null?void 0:e.outsidePress)??!0}}function N0(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:o=!0,outsidePressEvent:s="sloppy",referencePress:i=T0,bubbles:c,externalTree:a}=t,u="rootStore"in e?e.rootStore:e,d=u.useState("open"),f=u.useState("floatingElement"),{dataRef:y}=u.context,h=zu(a),v=_e(typeof o=="function"?o:()=>!1),p=typeof o=="function"?v:o,g=p!==!1,b=_e(()=>s),{escapeKey:m,outsidePress:S}=O0(c),x=l.useRef(!1),C=l.useRef(!1),R=l.useRef(!1),T=l.useRef(!1),k=l.useRef(""),A=l.useRef(null),H=wr(),M=wr(),O=_e(()=>{M.clear(),y.current.insideReactTree=!1}),P=_e(te=>{var pe;const be=(pe=y.current.floatingContext)==null?void 0:pe.nodeId;return(h?Er(h.nodesRef.current,be):[]).some(ge=>{var Y;return((Y=ge.context)==null?void 0:Y.open)&&!ge.context.dataRef.current[te]})}),N=_e(te=>Uo(te,u.select("floatingElement"))||Uo(te,u.select("domReferenceElement"))),B=_e(te=>{i()&&u.setOpen(!1,xt(vu,te.nativeEvent))}),j=_e(te=>{if(!d||!n||!r||te.key!=="Escape"||T.current||!m&&P("__escapeKeyBubbles"))return;const be=Jb(te)?te.nativeEvent:te,Se=xt(Mb,be);u.setOpen(!1,Se),Se.isCanceled||te.preventDefault(),!m&&!Se.isPropagationAllowed&&te.stopPropagation()}),W=_e(()=>{y.current.insideReactTree=!0,M.start(0,O)}),L=_e(te=>{if(!d||!n||te.button!==0)return;const be=Ot(te.nativeEvent);Ve(u.select("floatingElement"),be)&&(x.current||(x.current=!0,C.current=!1))}),U=_e(te=>{!d||!n||(te.defaultPrevented||te.nativeEvent.defaultPrevented)&&x.current&&(C.current=!0)});l.useEffect(()=>{if(!d||!n)return;y.current.__escapeKeyBubbles=m,y.current.__outsidePressBubbles=S;const te=new In,be=new In;function Se(){te.clear(),T.current=!0}function pe(){te.start(er?5:0,()=>{T.current=!1})}function ge(){R.current=!0,be.start(0,()=>{R.current=!1})}function Y(){x.current=!1,C.current=!1}function z(){const ae=k.current,me=ae==="pen"||!ae?"mouse":ae,I=b(),$=typeof I=="function"?I():I;return typeof $=="string"?$:$[me]}function J(ae){const me=z();return me==="intentional"&&ae.type!=="click"||me==="sloppy"&&ae.type==="click"}function re(ae){var $;const me=($=y.current.floatingContext)==null?void 0:$.nodeId,I=h&&Er(h.nodesRef.current,me).some(ne=>{var oe;return Uo(ae,(oe=ne.context)==null?void 0:oe.elements.floating)});return N(ae)||I}function K(ae){if(J(ae)){ae.type!=="click"&&!N(ae)&&(be.clear(),R.current=!1),O();return}if(y.current.insideReactTree){O();return}const me=Ot(ae),I=`[${so("inert")}]`,$=ft(me)?me.getRootNode():null,ne=Array.from((Xn($)?$:Qe(u.select("floatingElement"))).querySelectorAll(I)),oe=u.context.triggerElements;if(me&&(oe.hasElement(me)||oe.hasMatchingElement(ee=>Ve(ee,me))))return;let Pe=ft(me)?me:null;for(;Pe&&!jt(Pe);){const ee=Lt(Pe);if(jt(ee)||!ft(ee))break;Pe=ee}if(!(ne.length&&ft(me)&&!r0(me)&&!Ve(me,u.select("floatingElement"))&&ne.every(ee=>!Ve(Pe,ee)))){if(it(me)&&!("touches"in ae)){const ee=jt(me),we=Et(me),Me=/auto|scroll/,Ue=ee||Me.test(we.overflowX),ut=ee||Me.test(we.overflowY),nt=Ue&&me.clientWidth>0&&me.scrollWidth>me.clientWidth,Ye=ut&&me.clientHeight>0&&me.scrollHeight>me.clientHeight,pt=we.direction==="rtl",kt=Ye&&(pt?ae.offsetX<=me.offsetWidth-me.clientWidth:ae.offsetX>me.clientWidth),lt=nt&&ae.offsetY>me.clientHeight;if(kt||lt)return}if(!re(ae)){if(z()==="intentional"&&R.current){be.clear(),R.current=!1;return}typeof p=="function"&&!p(ae)||P("__outsidePressBubbles")||(u.setOpen(!1,xt(yu,ae)),O())}}}function V(ae){z()!=="sloppy"||ae.pointerType==="touch"||!u.select("open")||!n||N(ae)||K(ae)}function he(ae){if(z()!=="sloppy"||!u.select("open")||!n||N(ae))return;const me=ae.touches[0];me&&(A.current={startTime:Date.now(),startX:me.clientX,startY:me.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},H.start(1e3,()=>{A.current&&(A.current.dismissOnTouchEnd=!1,A.current.dismissOnMouseDown=!1)}))}function Q(ae,me){const I=Ot(ae);if(!I)return;const $=Ke(I,ae.type,()=>{me(ae),$()})}function Ne(ae){k.current="touch",Q(ae,he)}function De(ae){H.clear(),ae.type==="pointerdown"&&(k.current=ae.pointerType),!(ae.type==="mousedown"&&A.current&&!A.current.dismissOnMouseDown)&&Q(ae,me=>{me.type==="pointerdown"?V(me):K(me)})}function ue(ae){if(!x.current)return;const me=C.current;if(Y(),z()==="intentional"){if(ae.type==="pointercancel"){me&&ge();return}if(!re(ae)){if(me){ge();return}typeof p=="function"&&!p(ae)||(be.clear(),R.current=!0,O())}}}function de(ae){if(z()!=="sloppy"||!A.current||N(ae))return;const me=ae.touches[0];if(!me)return;const I=Math.abs(me.clientX-A.current.startX),$=Math.abs(me.clientY-A.current.startY),ne=Math.sqrt(I*I+$*$);ne>5&&(A.current.dismissOnTouchEnd=!0),ne>10&&(K(ae),H.clear(),A.current=null)}function q(ae){Q(ae,de)}function Ee(ae){z()!=="sloppy"||!A.current||N(ae)||(A.current.dismissOnTouchEnd&&K(ae),H.clear(),A.current=null)}function ve(ae){Q(ae,Ee)}const ye=Qe(f),at=Gn(r&&Gn(Ke(ye,"keydown",j),Ke(ye,"compositionstart",Se),Ke(ye,"compositionend",pe)),g&&Gn(Ke(ye,"click",De,!0),Ke(ye,"pointerdown",De,!0),Ke(ye,"pointerup",ue,!0),Ke(ye,"pointercancel",ue,!0),Ke(ye,"mousedown",De,!0),Ke(ye,"mouseup",ue,!0),Ke(ye,"touchstart",Ne,!0),Ke(ye,"touchmove",q,!0),Ke(ye,"touchend",ve,!0)));return()=>{at(),te.clear(),be.clear(),Y(),R.current=!1}},[y,f,r,g,p,d,n,m,S,j,O,b,P,N,h,u,H]),l.useEffect(O,[p,O]);const D=l.useMemo(()=>({onKeyDown:j,onPointerDown:B,onClick:B}),[j,B]),le=l.useMemo(()=>({onKeyDown:j,onPointerDown:U,onMouseDown:U,onClickCapture:W,onMouseDownCapture(te){W(),L(te)},onPointerDownCapture(te){W(),L(te)},onMouseUpCapture:W,onTouchEndCapture:W,onTouchMoveCapture:W}),[j,W,L,U]);return l.useMemo(()=>n?{reference:D,floating:le,trigger:D}:{},[n,D,le])}function D0(e){const t=l.useRef(!0);t.current&&(t.current=!1,e())}const We=(e,t,n,r,o,s,...i)=>{if(i.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":jn(1));let c;if(e)c=e;else throw new Error("Missing arguments");return c};var Ms={exports:{}},qo={};/**
|
|
32
|
+
* @license React
|
|
33
|
+
* use-sync-external-store-shim.production.js
|
|
34
|
+
*
|
|
35
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
36
|
+
*
|
|
37
|
+
* This source code is licensed under the MIT license found in the
|
|
38
|
+
* LICENSE file in the root directory of this source tree.
|
|
39
|
+
*/var Ic;function A0(){if(Ic)return qo;Ic=1;var e=Z;function t(f,y){return f===y&&(f!==0||1/f===1/y)||f!==f&&y!==y}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function c(f,y){var h=y(),v=r({inst:{value:h,getSnapshot:y}}),p=v[0].inst,g=v[1];return s(function(){p.value=h,p.getSnapshot=y,a(p)&&g({inst:p})},[f,h,y]),o(function(){return a(p)&&g({inst:p}),f(function(){a(p)&&g({inst:p})})},[f]),i(h),h}function a(f){var y=f.getSnapshot;f=f.value;try{var h=y();return!n(f,h)}catch{return!0}}function u(f,y){return y()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:c;return qo.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,qo}var Zo={};/**
|
|
40
|
+
* @license React
|
|
41
|
+
* use-sync-external-store-shim.development.js
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE file in the root directory of this source tree.
|
|
47
|
+
*/var _c;function I0(){return _c||(_c=1,process.env.NODE_ENV!=="production"&&function(){function e(h,v){return h===v&&(h!==0||1/h===1/v)||h!==h&&v!==v}function t(h,v){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var p=v();if(!f){var g=v();s(p,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}g=i({inst:{value:p,getSnapshot:v}});var b=g[0].inst,m=g[1];return a(function(){b.value=p,b.getSnapshot=v,n(b)&&m({inst:b})},[h,p,v]),c(function(){return n(b)&&m({inst:b}),h(function(){n(b)&&m({inst:b})})},[h]),u(p),p}function n(h){var v=h.getSnapshot;h=h.value;try{var p=v();return!s(h,p)}catch{return!0}}function r(h,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=Z,s=typeof Object.is=="function"?Object.is:e,i=o.useState,c=o.useEffect,a=o.useLayoutEffect,u=o.useDebugValue,d=!1,f=!1,y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Zo.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:y,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Zo}process.env.NODE_ENV==="production"?Ms.exports=A0():Ms.exports=I0();var Ei=Ms.exports,js={exports:{}},Jo={};/**
|
|
48
|
+
* @license React
|
|
49
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
50
|
+
*
|
|
51
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
52
|
+
*
|
|
53
|
+
* This source code is licensed under the MIT license found in the
|
|
54
|
+
* LICENSE file in the root directory of this source tree.
|
|
55
|
+
*/var Mc;function _0(){if(Mc)return Jo;Mc=1;var e=Z,t=Ei;function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,c=e.useMemo,a=e.useDebugValue;return Jo.useSyncExternalStoreWithSelector=function(u,d,f,y,h){var v=s(null);if(v.current===null){var p={hasValue:!1,value:null};v.current=p}else p=v.current;v=c(function(){function b(R){if(!m){if(m=!0,S=R,R=y(R),h!==void 0&&p.hasValue){var T=p.value;if(h(T,R))return x=T}return x=R}if(T=x,r(S,R))return T;var k=y(R);return h!==void 0&&h(T,k)?(S=R,T):(S=R,x=k)}var m=!1,S,x,C=f===void 0?null:f;return[function(){return b(d())},C===null?void 0:function(){return b(C())}]},[d,f,y,h]);var g=o(u,v[0],v[1]);return i(function(){p.hasValue=!0,p.value=g},[g]),a(g),g},Jo}var Qo={};/**
|
|
56
|
+
* @license React
|
|
57
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
58
|
+
*
|
|
59
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
60
|
+
*
|
|
61
|
+
* This source code is licensed under the MIT license found in the
|
|
62
|
+
* LICENSE file in the root directory of this source tree.
|
|
63
|
+
*/var jc;function M0(){return jc||(jc=1,process.env.NODE_ENV!=="production"&&function(){function e(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=Z,n=Ei,r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,s=t.useRef,i=t.useEffect,c=t.useMemo,a=t.useDebugValue;Qo.useSyncExternalStoreWithSelector=function(u,d,f,y,h){var v=s(null);if(v.current===null){var p={hasValue:!1,value:null};v.current=p}else p=v.current;v=c(function(){function b(R){if(!m){if(m=!0,S=R,R=y(R),h!==void 0&&p.hasValue){var T=p.value;if(h(T,R))return x=T}return x=R}if(T=x,r(S,R))return T;var k=y(R);return h!==void 0&&h(T,k)?(S=R,T):(S=R,x=k)}var m=!1,S,x,C=f===void 0?null:f;return[function(){return b(d())},C===null?void 0:function(){return b(C())}]},[d,f,y,h]);var g=o(u,v[0],v[1]);return i(function(){p.hasValue=!0,p.value=g},[g]),a(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Qo}process.env.NODE_ENV==="production"?js.exports=_0():js.exports=M0();var j0=js.exports;const L0=fi(19),F0=L0?V0:B0;function Hu(e,t,n,r,o){return F0(e,t,n,r,o)}function $0(e,t,n,r,o){const s=l.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return Ei.useSyncExternalStore(e.subscribe,s,s)}function V0(e,t,n,r,o){return $0(e,t,n,r,o)}function B0(e,t,n,r,o){return j0.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,n,r,o))}class W0{constructor(t){ot(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));ot(this,"getSnapshot",()=>this.state);this.state=t,this.listeners=new Set,this.updateTick=0}setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,o){return Hu(this,t,n,r,o)}}class Uu extends W0{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){l.useDebugValue(t);const r=this;et(()=>{r.state[t]!==n&&r.set(t,n)},[r,t,n])}useSyncedValueWithCleanup(t,n){const r=this;et(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this;if(process.env.NODE_ENV!=="production"){l.useDebugValue(t,i=>Object.keys(i));const o=l.useRef(Object.keys(t)).current,s=Object.keys(t);(o.length!==s.length||o.some((i,c)=>i!==s[c]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);et(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){l.useDebugValue(t);const r=this,o=n!==void 0;if(et(()=>{o&&!Object.is(r.state[t],n)&&r.setState({...r.state,[t]:n})},[r,t,n,o]),process.env.NODE_ENV!=="production"){const s=this.controlledValues??(this.controlledValues=new Map);s.has(t)||s.set(t,o);const i=s.get(t);i!==void 0&&i!==o&&console.error(`A component is changing the ${o?"":"un"}controlled state of ${t.toString()} to be ${o?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(t,n,r,o){const s=this.selectors[t];return s(this.state,n,r,o)}useState(t,n,r,o){return l.useDebugValue(t),Hu(this,this.selectors[t],n,r,o)}useContextCallback(t,n){l.useDebugValue(t);const r=_e(n??pi);this.context[t]=r}useStateSetter(t){const n=l.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(s=>{const i=r(s);if(!Object.is(o,i)){const c=o;o=i,n(i,c,this)}})}}const z0={open:We(e=>e.open),transitionStatus:We(e=>e.transitionStatus),domReferenceElement:We(e=>e.domReferenceElement),referenceElement:We(e=>e.positionReference??e.referenceElement),floatingElement:We(e=>e.floatingElement),floatingId:We(e=>e.floatingId)};class Ci extends Uu{constructor(n){const{syncOnly:r,nested:o,onOpenChange:s,triggerElements:i,...c}=n;super({...c,positionReference:c.referenceElement,domReferenceElement:c.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:S0(),nested:o,triggerElements:i},z0);ot(this,"syncOpenEvent",(n,r)=>{(!n||!this.state.open||r!=null&&t0(r))&&(this.context.dataRef.current.openEvent=n?r:void 0)});ot(this,"dispatchOpenChange",(n,r)=>{this.syncOpenEvent(n,r.event);const o={open:n,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",o)});ot(this,"setOpen",(n,r)=>{var o,s,i,c;if(this.syncOnly){(s=(o=this.context).onOpenChange)==null||s.call(o,n,r);return}this.dispatchOpenChange(n,r),(c=(i=this.context).onOpenChange)==null||c.call(i,n,r)});this.syncOnly=r}}function H0(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:o,nested:s,onOpenChange:i}=e,c=t.useState("open"),a=t.useState("activeTriggerElement"),u=t.useState(n?"popupElement":"positionerElement"),d=t.context.triggerElements,f=i,y=l.useRef(null);r===void 0&&y.current===null&&(y.current=new Ci({open:c,transitionStatus:void 0,referenceElement:a,floatingElement:u,triggerElements:d,onOpenChange:f,floatingId:o,syncOnly:!0,nested:s}));const h=r??y.current;return t.useSyncedValue("floatingId",o),et(()=>{const v={open:c,floatingId:o,referenceElement:a,floatingElement:u};ft(a)&&(v.domReferenceElement=a),h.state.positionReference===h.state.referenceElement&&(v.positionReference=a),h.update(v)},[c,o,a,u,h]),h.context.onOpenChange=f,h.context.nested=s,h}function U0(e,t=!1,n=!1){const[r,o]=l.useState(e&&t?"idle":void 0),[s,i]=l.useState(e);return e&&!s&&(i(!0),o("starting")),!e&&s&&r!=="ending"&&!n&&o("ending"),!e&&!s&&r==="ending"&&o(void 0),et(()=>{if(!e&&s&&r!=="ending"&&n){const c=Ut.request(()=>{o("ending")});return()=>{Ut.cancel(c)}}},[e,s,r,n]),et(()=>{if(!e||t)return;const c=Ut.request(()=>{o(void 0)});return()=>{Ut.cancel(c)}},[t,e]),et(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&o("starting");const c=Ut.request(()=>{o("idle")});return()=>{Ut.cancel(c)}},[t,e,s,r]),{mounted:s,setMounted:i,transitionStatus:r}}function G0(e,t=!1,n=!0){const r=Ro();return _e((o,s=null)=>{r.cancel();const i=Qt(e);if(i==null)return;const c=i,a=()=>{Ft.flushSync(o)};if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){o();return}function u(){Promise.all(c.getAnimations().map(d=>d.finished)).then(()=>{s!=null&&s.aborted||a()}).catch(()=>{if(n){s!=null&&s.aborted||a();return}const d=c.getAnimations();!(s!=null&&s.aborted)&&d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})}if(t){const d=An.startingStyle;if(!c.hasAttribute(d)){r.request(u);return}const f=new MutationObserver(()=>{c.hasAttribute(d)||(f.disconnect(),u())});f.observe(c,{attributes:!0,attributeFilter:[d]}),s==null||s.addEventListener("abort",()=>f.disconnect(),{once:!0});return}r.request(u)})}function Gu(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,s=_e(o),i=G0(r,n,!1);l.useEffect(()=>{if(!t)return;const c=new AbortController;return i(s,c.signal),()=>{c.abort()}},[t,n,s,i])}const Y0={tabIndex:-1,[As]:""};function X0(e,t,n=!1){const r=So(),o=E0()!=null,s=l.useRef(null);e===void 0&&s.current===null&&(s.current=t(r,o));const i=e??s.current;return H0({popupStore:i,treatPopupAsFloatingElement:n,floatingRootContext:i.state.floatingRootContext,floatingId:r,nested:o,onOpenChange:i.setOpen}),{store:i,internalStore:s.current}}function K0(e,t){const n=l.useRef(null),r=l.useRef(null);return l.useCallback(o=>{if(e===void 0)return;let s=!1;if(n.current!==null){const i=n.current,c=r.current,a=t.context.triggerElements.getById(i);c&&a===c&&(t.context.triggerElements.delete(i),s=!0),n.current=null,r.current=null}if(o!==null&&(n.current=e,r.current=o,t.context.triggerElements.add(e,o),s=!0),s){const i=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==i&&t.set("triggerCount",i)}},[t,e])}function q0(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);const o=(n==null?void 0:n.id)??null;(o||t)&&(e.activeTriggerId=o,e.activeTriggerElement=n??null)}function Z0(e,t,n,r){const o=n.useState("isMountedByTrigger",e),s=K0(e,n),i=_e(c=>{if(s(c),!c)return;const a=n.select("open"),u=n.select("activeTriggerId");if(u===e){n.update({activeTriggerElement:c,...a?r:null});return}u==null&&a&&n.update({activeTriggerId:e,activeTriggerElement:c,...r})});return et(()=>{o&&n.update({activeTriggerElement:t.current,...r})},[o,n,t,...Object.values(r)]),{registerTrigger:i,isMountedByThisTrigger:o}}function J0(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState("open"),o=e.useState("triggerCount");et(()=>{if(!r){e.state.triggerCount!==0&&e.set("triggerCount",0);return}const s=e.context.triggerElements.size,i={};e.state.triggerCount!==s&&(i.triggerCount=s);const c=e.select("activeTriggerId");let a=null;if(c){const u=e.context.triggerElements.getById(c);u?u!==e.state.activeTriggerElement&&(i.activeTriggerElement=u):a=c}if(!a&&!c&&s===1){const u=e.context.triggerElements.entries().next();if(!u.done){const[d,f]=u.value;i.activeTriggerId=d,i.activeTriggerElement=f}}(i.triggerCount!==void 0||i.activeTriggerId!==void 0||i.activeTriggerElement!==void 0)&&e.update(i),a&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===a&&!e.context.triggerElements.getById(a)){const u=xt(bu);e.setOpen(!1,u),u.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,o,n])}function Q0(e,t,n){const{mounted:r,setMounted:o,transitionStatus:s}=U0(e),i=t.useState("preventUnmountingOnClose"),c=e?!1:i;t.useSyncedValues({mounted:r,transitionStatus:s,preventUnmountingOnClose:c});const a=_e(()=>{var u,d;o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),(d=(u=t.context).onOpenChangeComplete)==null||d.call(u,!1)});return Gu({enabled:r&&!e&&!c,open:e,ref:t.context.popupRef,onComplete(){e||a()}}),{forceUnmount:a,transitionStatus:s}}function ev(e,t){e.useSyncedValues(t),et(()=>()=>{e.update({activeTriggerProps:vt,inactiveTriggerProps:vt,popupProps:vt})},[e])}function tv(e,t){et(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),et(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class Yu{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);if(r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n),process.env.NODE_ENV!=="production"&&this.elementsSet.size!==this.idMap.size))throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.")}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function nv(){return new Ci({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Yu,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function rv(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:nv(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:vt,inactiveTriggerProps:vt,popupProps:vt}}function ov(e,t,n=!1){return new Ci({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}const pr=We(e=>e.triggerIdProp??e.activeTriggerId),Ri=We(e=>e.openProp??e.open),Lc=We(e=>{var n;return(((n=e.popupElement)==null?void 0:n.id)??e.floatingId)||void 0});function Xu(e,t){return t!==void 0&&Ri(e)&&pr(e)===t}function sv(e,t){return Xu(e,t)?!0:t!==void 0&&Ri(e)&&pr(e)==null&&e.triggerCount===1}const iv={open:Ri,mounted:We(e=>e.mounted),transitionStatus:We(e=>e.transitionStatus),floatingRootContext:We(e=>e.floatingRootContext),triggerCount:We(e=>e.triggerCount),preventUnmountingOnClose:We(e=>e.preventUnmountingOnClose),payload:We(e=>e.payload),activeTriggerId:pr,activeTriggerElement:We(e=>e.mounted?e.activeTriggerElement:null),popupId:Lc,isTriggerActive:We((e,t)=>t!==void 0&&pr(e)===t),isOpenedByTrigger:We((e,t)=>Xu(e,t)),isMountedByTrigger:We((e,t)=>t!==void 0&&pr(e)===t&&e.mounted),triggerProps:We((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:We((e,t)=>sv(e,t)?Lc(e):void 0),popupProps:We(e=>e.popupProps),popupElement:We(e=>e.popupElement),positionerElement:We(e=>e.positionerElement)};let _t=function(e){return e[e.open=Mt.open]="open",e[e.closed=Mt.closed]="closed",e[e.startingStyle=Mt.startingStyle]="startingStyle",e[e.endingStyle=Mt.endingStyle]="endingStyle",e.expanded="data-expanded",e.nestedDrawerOpen="data-nested-drawer-open",e.nestedDrawerSwiping="data-nested-drawer-swiping",e.swipeDismiss="data-swipe-dismiss",e.swipeDirection="data-swipe-direction",e.swiping="data-swiping",e}({});const ki=l.createContext(void 0);process.env.NODE_ENV!=="production"&&(ki.displayName="DialogPortalContext");function Ku(){const e=l.useContext(ki);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Dialog.Portal> is missing.":jn(26));return e}const cv="ArrowUp",av="ArrowDown",lv="ArrowLeft",uv="ArrowRight",dv="Home",fv="End",pv=new Set([lv,uv]),hv=new Set([cv,av]),mv=new Set([...pv,...hv]),gv=new Set([...mv,dv,fv]),Pi=l.createContext(void 0);process.env.NODE_ENV!=="production"&&(Pi.displayName="DrawerRootContext");function Po(e){const t=l.useContext(Pi);if(e===!1&&t===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: DrawerRootContext is missing. Drawer parts must be placed within <Drawer.Root>.":jn(90));return t}function St(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function qu(e,t){const n=e+t;return n>=0?t:-Math.sqrt(-n)-e}function Fc(e,t,n){if(!Number.isFinite(t)||t<=0)return null;if(typeof e=="number")return Number.isFinite(e)?e<=1?St(e,0,1)*t:e:null;const r=e.trim();if(r.endsWith("px")){const o=Number.parseFloat(r);return Number.isFinite(o)?o:null}if(r.endsWith("rem")){const o=Number.parseFloat(r);return Number.isFinite(o)?o*n:null}return null}function bv(e,t){let n=null,r=1/0;for(const o of t){const s=Math.abs(o.height-e);s<r&&(r=s,n=o)}return n}function Zu(){const{store:e}=At(),{snapPoints:t,activeSnapPoint:n,setActiveSnapPoint:r,popupHeight:o}=Po(),s=e.useState("viewportElement"),[i,c]=l.useState(0),[a,u]=l.useState(16),d=_e(()=>{const v=Qe(s).documentElement;s&&c(s.offsetHeight),s||c(v.clientHeight);const p=parseFloat(getComputedStyle(v).fontSize);Number.isFinite(p)&&u(p)});et(()=>{if(d(),!s||typeof ResizeObserver!="function")return;const h=new ResizeObserver(d);return h.observe(s),()=>{h.disconnect()}},[d,s]);const f=l.useMemo(()=>{if(!t||t.length===0||i<=0||o<=0)return[];const h=Math.min(o,i);if(!Number.isFinite(h)||h<=0)return[];const v=t.map(b=>{const m=Fc(b,i,a);if(m===null||!Number.isFinite(m))return null;const S=St(m,0,h);return{value:b,height:S,offset:Math.max(0,o-S)}}).filter(b=>!!b);if(v.length<=1)return v;const p=[],g=[];for(let b=v.length-1;b>=0;b-=1){const m=v[b];g.some(x=>Math.abs(x-m.height)<=1)||(g.push(m.height),p.push(m))}return p.reverse(),p},[o,a,t,i]),y=l.useMemo(()=>{if(n===void 0)return f[0];if(n===null)return;const h=f.find(b=>Object.is(b.value,n));if(h)return h;const v=Math.min(o,i),p=Fc(n,i,a);if(p===null||!Number.isFinite(p))return;const g=St(p,0,v);return bv(g,f)??void 0},[n,o,f,a,i]);return{snapPoints:t,activeSnapPoint:n,setActiveSnapPoint:r,popupHeight:o,viewportHeight:i,resolvedSnapPoints:f,activeSnapPointOffset:(y==null?void 0:y.offset)??null}}const Ti=l.createContext(null);process.env.NODE_ENV!=="production"&&(Ti.displayName="DrawerViewportContext");function vv(e){return l.useContext(Ti)}let $c=!1;function yv(){$c||(typeof CSS<"u"&&"registerProperty"in CSS&&([bt.swipeMovementX,bt.swipeMovementY,bt.snapPointOffset].forEach(e=>{try{CSS.registerProperty({name:e,syntax:"<length>",inherits:!1,initialValue:"0px"})}catch{}}),[{name:nn.swipeProgress,initialValue:"0"},{name:bt.swipeStrength,initialValue:"1"}].forEach(({name:e,initialValue:t})=>{try{CSS.registerProperty({name:e,syntax:"<number>",inherits:!1,initialValue:t})}catch{}})),$c=!0)}const wv={...bi,...gi,expanded(e){return e?{[_t.expanded]:""}:null},nestedDrawerOpen(e){return e?{[_t.nestedDrawerOpen]:""}:null},nestedDrawerSwiping(e){return e?{[_t.nestedDrawerSwiping]:""}:null},swipeDirection(e){return e?{[_t.swipeDirection]:e}:null},swiping(e){return e?{[_t.swiping]:""}:null}},Ju=l.forwardRef(function(t,n){const{render:r,className:o,style:s,finalFocus:i,initialFocus:c,...a}=t,{store:u}=At(),d=u.context.popupRef,{swipeDirection:f,frontmostHeight:y,hasNestedDrawer:h,nestedSwiping:v,nestedSwipeProgressStore:p,onPopupHeightChange:g,notifyParentFrontmostHeight:b,notifyParentHasNestedDrawer:m}=Po(),S=u.useState("descriptionElementId"),x=u.useState("disablePointerDismissal"),C=u.useState("floatingRootContext"),R=u.useState("popupProps"),T=u.useState("modal"),k=u.useState("mounted"),A=u.useState("nested"),H=u.useState("nestedOpenDrawerCount"),M=u.useState("transitionStatus"),O=u.useState("open"),P=u.useState("openMethod"),N=u.useState("titleElementId"),B=u.useState("role"),j=C.useState("floatingId"),W=a.id??j,L=vv();Ku();const{snapPoints:U,activeSnapPoint:D,activeSnapPointOffset:le}=Zu(),te=H>0,be=(L==null?void 0:L.swiping)??!1,Se=(L==null?void 0:L.swipeStrength)??null,[pe,ge]=l.useState(0),Y=l.useRef(0);process.env.NODE_ENV!=="production"&&l.useEffect(()=>{var Ee;if(L)return;const de=((Ee=Nt.captureOwnerStack)==null?void 0:Ee.call(Nt))||"";yr(`<Drawer.Popup> expected to be rendered within <Drawer.Viewport>. Omitting the viewport disables drawer swipe handling and touch scroll locking. Wrap <Drawer.Popup> in <Drawer.Viewport>.${de}`)},[L]);const z=_e(()=>{const de=d.current;if(!de)return;const q=de.offsetHeight;if(Y.current>0&&y>Y.current&&q>Y.current)return;if(Y.current>0&&h){const ye=Y.current;ge(ye),g(ye);return}const ve=q;ve!==Y.current&&(Y.current=ve,ge(ve),g(ve))});et(()=>{if(!k){Y.current=0,ge(0),g(0);return}const de=d.current;if(!de||(yv(),z(),typeof ResizeObserver!="function"))return;const q=new ResizeObserver(z);return q.observe(de),()=>{q.disconnect()}},[z,k,te,g,d]),et(()=>{const de=()=>{const ve=d.current;if(!ve)return;const ye=p.getSnapshot();ye>0?ve.style.setProperty(nn.swipeProgress,`${ye}`):ve.style.setProperty(nn.swipeProgress,"0")};de();const q=p.subscribe(de),Ee=d.current;return()=>{q(),Ee&&Ee.style.setProperty(nn.swipeProgress,"0")}},[p,d]),l.useEffect(()=>{if(O)return b==null||b(y),()=>{b==null||b(0)}},[y,O,b]),l.useEffect(()=>m?(m(O||M==="ending"),()=>{m(!1)}):void 0,[m,O,M]),Gu({open:O,ref:d,onComplete(){var de,q;O&&((q=(de=u.context).onOpenChangeComplete)==null||q.call(de,!0))}});const J=c===void 0?d:c,re=u.useStateSetter("popupElement"),K={open:O,nested:A,transitionStatus:M,expanded:D===1,nestedDrawerOpen:te,nestedDrawerSwiping:v,swipeDirection:f,swiping:be};let V;pe&&!(!h&&M!=="ending")&&(V=`${pe}px`);const Q=U&&U.length>0&&(f==="down"||f==="up");let Ne=null;Q&&le!==null&&(Ne=f==="up"?-le:le);let De=L?L.getDragStyles():vt;if(Q&&f==="down"){const de=le??0,q=Number.parseFloat(String(De[bt.swipeMovementY]??0));be&&Number.isFinite(q)?De={...De,transform:void 0,[bt.swipeMovementY]:`${qu(de,q)}px`}:De={...De,transform:void 0}}const ue=En("div",t,{state:K,props:[R,{id:W,"aria-labelledby":N,"aria-describedby":S,role:B,...Y0,hidden:!k,onKeyDown(de){gv.has(de.key)&&de.stopPropagation()},style:{...De,[nn.swipeProgress]:"0",[bt.nestedDrawers]:H,[bt.height]:V,[bt.snapPointOffset]:typeof Ne=="number"?`${Ne}px`:"0px",[bt.frontmostHeight]:y?`${y}px`:void 0,[bt.swipeStrength]:typeof Se=="number"&&Number.isFinite(Se)&&Se>0?`${Se}`:"1"}},a],ref:[n,d,re],stateAttributesMapping:wv});return w.jsx(k0,{context:C,openInteractionType:P,disabled:!k,closeOnFocusOut:!x,initialFocus:J,returnFocus:i,modal:T!==!1,restoreFocus:"popup",children:ue})});process.env.NODE_ENV!=="production"&&(Ju.displayName="DrawerPopup");function xv(e){return fi(19)?e:e?"true":void 0}const Qu=l.forwardRef(function(t,n){const{cutout:r,...o}=t;let s;if(r){const i=r.getBoundingClientRect();s=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${i.left}px ${i.top}px,${i.left}px ${i.bottom}px,${i.right}px ${i.bottom}px,${i.right}px ${i.top}px,${i.left}px ${i.top}px)`}return w.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})});process.env.NODE_ENV!=="production"&&(Qu.displayName="InternalBackdrop");const ed=l.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,{store:s}=At(),i=s.useState("mounted"),c=s.useState("modal"),a=s.useState("open");return i||r?w.jsx(ki.Provider,{value:r,children:w.jsxs(Vu,{ref:n,...o,children:[i&&c===!0&&w.jsx(Qu,{ref:s.context.internalBackdropRef,inert:xv(!a)}),t.children]})}):null});process.env.NODE_ENV!=="production"&&(ed.displayName="DialogPortal");const Sv=ed;function Ev({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=l.useRef(e!==void 0),[s,i]=l.useState(t),c=o?e:s;if(process.env.NODE_ENV!=="production"){l.useEffect(()=>{o!==(e!==void 0)&&yr([`A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
64
|
+
`))},[r,n,e]);const{current:u}=l.useRef(t);l.useEffect(()=>{!o&&Vc(u)!==Vc(t)&&yr([`A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
65
|
+
`))},[t])}const a=l.useCallback(u=>{o||i(u)},[]);return[c,a]}function Vc(e){let t=0;const n=new WeakMap;try{return JSON.stringify(e,function(s,i){if(!(s==="_owner"&&this!=null&&typeof this=="object"&&"$$typeof"in this)){if(typeof i=="bigint")return`__bigint__:${i}`;if(i!==null&&typeof i=="object"){const c=n.get(i);if(c!==void 0)return`__object__:${c}`;n.set(i,t),t+=1}return i}})??`__top__:${typeof e}`}catch{return"__unserializable__"}}let Bc={},Wc={},zc="";function Cv(e){if(typeof document>"u")return!1;const t=Qe(e);return ht(t).innerWidth-t.documentElement.clientWidth>0}function Rv(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Qe(e),r=n.documentElement,o=n.body,s=xn(r)?r:o,i=s.style.overflowY,c=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",s.style.overflowY="scroll";const a=s.offsetWidth;s.style.overflowY="hidden";const u=s.offsetWidth;return s.style.overflowY=i,r.style.scrollbarGutter=c,a===u}function kv(e){const t=Qe(e),n=t.documentElement,r=t.body,o=xn(n)?n:r,s={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,s)}}function Pv(e){var h;const t=Qe(e),n=t.documentElement,r=t.body,o=ht(n);let s=0,i=0,c=!1;const a=Ut.create();if(er&&(((h=o.visualViewport)==null?void 0:h.scale)??1)!==1)return()=>{};function u(){const v=o.getComputedStyle(n),p=o.getComputedStyle(r),m=(v.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,i=n.scrollLeft,Bc={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},zc=n.style.scrollBehavior,Wc={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const S=n.scrollHeight>n.clientHeight,x=n.scrollWidth>n.clientWidth,C=v.overflowY==="scroll"||p.overflowY==="scroll",R=v.overflowX==="scroll"||p.overflowX==="scroll",T=Math.max(0,o.innerWidth-r.clientWidth),k=Math.max(0,o.innerHeight-r.clientHeight),A=parseFloat(p.marginTop)+parseFloat(p.marginBottom),H=parseFloat(p.marginLeft)+parseFloat(p.marginRight),M=xn(n)?n:r;if(c=Rv(e),c){n.style.scrollbarGutter=m,M.style.overflowY="hidden",M.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:m,overflowY:"hidden",overflowX:"hidden"}),(S||C)&&(n.style.overflowY="scroll"),(x||R)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:A||k?`calc(100dvh - ${A+k}px)`:"100dvh",width:H||T?`calc(100vw - ${H+T}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=s,r.scrollLeft=i,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function d(){Object.assign(n.style,Bc),Object.assign(r.style,Wc),c||(n.scrollTop=s,n.scrollLeft=i,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=zc)}function f(){d(),a.request(u)}u();const y=Ke(o,"resize",f);return()=>{a.cancel(),d(),typeof o.removeEventListener=="function"&&y()}}class Tv{constructor(){ot(this,"lockCount",0);ot(this,"restore",null);ot(this,"timeoutLock",In.create());ot(this,"timeoutUnlock",In.create());ot(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});ot(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Qe(t).documentElement,o=ht(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=pi;return}const s=Co||!Cv(t);this.restore=s?kv(t):Pv(t)}}const Ov=new Tv;function Nv(e=!0,t=null){et(()=>{if(e)return Ov.acquire(t)},[e,t])}function Dv(e){const{store:t,actionsRef:n}=e,r=t.useState("open");tv(t,r),J0(t);const{forceUnmount:o}=Q0(r,t),s=l.useCallback(()=>{t.setOpen(!1,xt(Lb))},[t]);l.useImperativeHandle(n,()=>({unmount:o,close:s}),[o,s])}function Av({store:e,parentContext:t,isDrawer:n}){const r=e.useState("open"),o=e.useState("disablePointerDismissal"),s=e.useState("modal"),i=e.useState("popupElement"),c=e.useState("floatingRootContext"),[a,u]=l.useState(0),[d,f]=l.useState(0),y=a===0,h=N0(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:s==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(b){if(!e.context.outsidePressEnabledRef.current||"button"in b&&b.button!==0||"touches"in b&&b.touches.length!==1)return!1;const m=Ot(b);return y&&!o?s&&(e.context.internalBackdropRef.current||e.context.backdropRef.current)?e.context.internalBackdropRef.current===m||e.context.backdropRef.current===m||Ve(m,i)&&!(m!=null&&m.hasAttribute("data-base-ui-portal")):!0:!1},escapeKey:y});Nv(r&&s===!0,i),e.useContextCallback("onNestedDialogOpen",(b,m)=>{u(b),f(m)}),e.useContextCallback("onNestedDialogClose",()=>{u(0),f(0)}),l.useEffect(()=>(t!=null&&t.onNestedDialogOpen&&r&&t.onNestedDialogOpen(a+1,d+(n?1:0)),t!=null&&t.onNestedDialogClose&&!r&&t.onNestedDialogClose(),()=>{t!=null&&t.onNestedDialogClose&&r&&t.onNestedDialogClose()}),[n,r,a,d,t]);const v=h.reference??vt,p=h.trigger??vt,g=h.floating??vt;return ev(e,{activeTriggerProps:v,inactiveTriggerProps:p,popupProps:g,nestedOpenDialogCount:a,nestedOpenDrawerCount:d}),null}const Iv={...iv,modal:We(e=>e.modal),nested:We(e=>e.nested),nestedOpenDialogCount:We(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:We(e=>e.nestedOpenDrawerCount),disablePointerDismissal:We(e=>e.disablePointerDismissal),openMethod:We(e=>e.openMethod),descriptionElementId:We(e=>e.descriptionElementId),titleElementId:We(e=>e.titleElementId),viewportElement:We(e=>e.viewportElement),role:We(e=>e.role)};class Oi extends Uu{constructor(n,r,o=!1){const s=new Yu,i=_v(n);i.floatingRootContext=ov(s,r,o);super(i,{popupRef:l.createRef(),backdropRef:l.createRef(),internalBackdropRef:l.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:s,onOpenChange:void 0,onOpenChangeComplete:void 0},Iv);ot(this,"setOpen",(n,r)=>{var s,i;if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!n&&r.trigger==null&&this.state.activeTriggerId!=null&&(r.trigger=this.state.activeTriggerElement??void 0),(i=(s=this.context).onOpenChange)==null||i.call(s,n,r),r.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(n,r);const o={open:n};q0(o,n,r.trigger),this.update(o)})}static useStore(n,r){return X0(n,(s,i)=>new Oi(r,s,i),!0).store}}function _v(e={}){return{...rv(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function Mv(e,t="dialog"){const{children:n,open:r,defaultOpen:o=!1,onOpenChange:s,onOpenChangeComplete:i,disablePointerDismissal:c=!1,modal:a=!0,actionsRef:u,handle:d,triggerId:f,defaultTriggerId:y=null}=e,h=t==="drawer",v=t==="alert-dialog",p=v?!0:a,g=v||c,b=v?"alertdialog":"dialog",m=At(!0),x={modal:p,disablePointerDismissal:g,nested:!!m,role:b},C=Oi.useStore(d==null?void 0:d.store,{open:o,openProp:r,activeTriggerId:y,triggerIdProp:f,...x});D0(()=>{const M=r===void 0&&C.state.open===!1&&o===!0?{open:!0,activeTriggerId:y}:null;v?C.update(M?{...x,...M}:x):M&&C.update(M)}),C.useControlledProp("openProp",r),C.useControlledProp("triggerIdProp",f),C.useSyncedValues(x),C.useContextCallback("onOpenChange",s),C.useContextCallback("onOpenChangeComplete",i);const R=C.useState("open"),T=C.useState("mounted"),k=C.useState("payload");Dv({store:C,actionsRef:u});const A=R||T,H=l.useMemo(()=>({store:C}),[C]);return w.jsx(wo.Provider,{value:!1,children:w.jsxs(di.Provider,{value:H,children:[A&&w.jsx(Av,{store:C,parentContext:m==null?void 0:m.store.context,isDrawer:h}),typeof n=="function"?n({payload:k}):n]})})}function jv(e){const t=l.useContext(wo)?"drawer":"dialog";return Mv(e,t)}let Hc=function(e){return e[e.open=Mt.open]="open",e[e.closed=Mt.closed]="closed",e[e.startingStyle=Mt.startingStyle]="startingStyle",e[e.endingStyle=Mt.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e}({});const Lv={...bi,...gi,nested(e){return e?{[Hc.nested]:""}:null},nestedDialogOpen(e){return e?{[Hc.nestedDialogOpen]:""}:null}},td=l.forwardRef(function(t,n){const{render:r,className:o,style:s,children:i,...c}=t,a=Ku(),{store:u}=At(),d=u.useState("open"),f=u.useState("nested"),y=u.useState("transitionStatus"),h=u.useState("nestedOpenDialogCount"),v=u.useState("mounted"),p=u.useStateSetter("viewportElement"),g=h>0;return En("div",t,{enabled:a||v,state:{open:d,nested:f,transitionStatus:y,nestedDialogOpen:g},ref:[n,p],stateAttributesMapping:Lv,props:[{role:"presentation",hidden:!v,style:{pointerEvents:d?void 0:"none"},children:i},c]})});process.env.NODE_ENV!=="production"&&(td.displayName="DialogViewport");const nd=l.forwardRef(function(t,n){const{render:r,className:o,style:s,id:i,...c}=t,{store:a}=At(),u=vi(i);return a.useSyncedValueWithCleanup("titleElementId",u),En("h2",t,{ref:n,props:[{id:u},c]})});process.env.NODE_ENV!=="production"&&(nd.displayName="DialogTitle");function Fv(e){const t=l.useRef(""),n=l.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:l.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o?e(o,o.pointerType):e(o,t.current),t.current=""},[e]),onPointerDown:n}}function $v(e,t){const n=_e((s,i)=>{(typeof e=="function"?e():e)||t(i||(Co?"touch":""))}),{onClick:r,onPointerDown:o}=Fv(n);return l.useMemo(()=>({onClick:r,onPointerDown:o}),[r,o])}const rd=l.forwardRef(function(t,n){const{render:r,className:o,style:s,disabled:i=!1,nativeButton:c=!0,id:a,payload:u,handle:d,...f}=t,y=At(!0),h=(d==null?void 0:d.store)??(y==null?void 0:y.store);if(!h)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.":jn(79));const v=vi(a),p=h.useState("floatingRootContext"),g=h.useState("isOpenedByTrigger",v),b=h.useState("triggerPopupId",v),m=l.useRef(null),{registerTrigger:S,isMountedByThisTrigger:x}=Z0(v,m,h,{payload:u}),{getButtonProps:C,buttonRef:R}=gu({disabled:i,native:c}),T=P0(p,{enabled:p!=null}),k=$v(()=>h.select("open"),M=>{h.set("openMethod",M)}),A={disabled:i,open:g},H=h.useState("triggerProps",x);return En("button",t,{state:A,ref:[R,n,S,m],props:[T.reference,H,k,{[Fu]:"",id:v,"aria-haspopup":"dialog","aria-expanded":g,"aria-controls":b},f,C],stateAttributesMapping:Cb})});process.env.NODE_ENV!=="production"&&(rd.displayName="DialogTrigger");var Uc,Gc;function Vv(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:o,onOpenChangeComplete:s,disablePointerDismissal:i=!1,modal:c=!0,actionsRef:a,handle:u,triggerId:d,defaultTriggerId:f=null,swipeDirection:y="down",snapToSequentialPoints:h=!1,snapPoints:v,snapPoint:p,defaultSnapPoint:g,onSnapPointChange:b}=e,m=Po(!0),S=m==null?void 0:m.onNestedSwipeProgressChange,x=m==null?void 0:m.onNestedFrontmostHeightChange,C=m==null?void 0:m.onNestedSwipingChange,R=m==null?void 0:m.onNestedDrawerPresenceChange,[T,k]=l.useState(0),[A,H]=l.useState(0),[M,O]=l.useState(!1),[P,N]=l.useState(!1),[B]=l.useState(Bv),j=g!==void 0?g:(v==null?void 0:v[0])??null,W=p!==void 0,[L,U]=Ev({controlled:p,default:j,name:"Drawer",state:"snapPoint"}),D=l.useRef(!1),le=_e((K,V)=>{const he=V??xt(bu);b==null||b(K,he),!he.isCanceled&&U(K)}),te=l.useMemo(()=>W||!v||v.length===0?L:L===null||!v.some(K=>Object.is(K,L))?j:L,[L,W,j,v]),be=_e(K=>{k(K),!D.current&&K>0&&H(K)}),Se=_e(K=>{if(K>0){D.current=!0,H(K);return}D.current=!1,T>0&&H(T)}),pe=_e(K=>{O(K)}),ge=_e(K=>{B.set(K),S==null||S(K)}),Y=_e(K=>{N(K),C==null||C(K)}),z=_e((K,V)=>{o==null||o(K,V),!V.isCanceled&&!K&&v&&v.length>0&&le(j,xt(V.reason,V.event,V.trigger))}),J=l.useMemo(()=>({swipeDirection:y,snapToSequentialPoints:h,snapPoints:v,activeSnapPoint:te,setActiveSnapPoint:le,frontmostHeight:A,popupHeight:T,hasNestedDrawer:M,nestedSwiping:P,nestedSwipeProgressStore:B,onNestedDrawerPresenceChange:pe,onPopupHeightChange:be,onNestedFrontmostHeightChange:Se,onNestedSwipingChange:Y,onNestedSwipeProgressChange:ge,notifyParentFrontmostHeight:x,notifyParentSwipingChange:C,notifyParentSwipeProgressChange:S,notifyParentHasNestedDrawer:R}),[te,A,M,P,B,R,S,C,x,pe,Se,ge,Y,be,T,le,v,h,y]),re=typeof t=="function"?K=>w.jsxs(l.Fragment,{children:[Uc||(Uc=w.jsx(Yc,{})),t(K)]}):w.jsxs(l.Fragment,{children:[Gc||(Gc=w.jsx(Yc,{})),t]});return w.jsx(Pi.Provider,{value:J,children:w.jsx(wo.Provider,{value:!0,children:w.jsx(jv,{open:n,defaultOpen:r,onOpenChange:z,onOpenChangeComplete:s,disablePointerDismissal:i,modal:c,actionsRef:a,handle:u,triggerId:d,defaultTriggerId:f,children:re})})})}function Bv(){let e=0;const t=new Set;return{getSnapshot:()=>e,set(n){const r=Number.isFinite(n)?n:0;r!==e&&(e=r,t.forEach(o=>{o()}))},subscribe(n){return t.add(n),()=>{t.delete(n)}}}}function Yc(){const e=So(),t=Cu(),{store:n}=At(!1),r=n.useState("open"),o=n.useState("nestedOpenDialogCount"),s=n.useState("popupElement"),i=o===0;return l.useEffect(()=>{if(!(!t||e==null))return()=>{t.removeDrawer(e)}},[e,t]),l.useEffect(()=>{e!=null&&(t==null||t.setDrawerOpen(e,r))},[e,r,t]),l.useEffect(()=>{if(!r||!i||!oo)return;const a=ht(s).CloseWatcher;if(!a)return;function u(y){n.select("open")&&n.setOpen(!1,xt(jb,y))}const d=new a,f=Ke(d,"close",u);return()=>{f(),d.destroy()}},[n,i,r,s]),null}function Ls(e,t,n=!1){const r=Et(e);if(t==="vertical"){const s=r.overflowY;return s!=="auto"&&s!=="scroll"?!1:n?e.clientHeight>0:e.scrollHeight>e.clientHeight}const o=r.overflowX;return o!=="auto"&&o!=="scroll"?!1:n?e.clientWidth>0:e.scrollWidth>e.clientWidth}function Wv(e,t,n){let r=e;for(;it(r)&&r!==t&&!jt(r);){for(const o of n)if(Ls(r,o))return!0;r=Lt(r)}return!1}function Bn(e,t,n="vertical",r=!1){let o=it(e)?e:null;for(;it(o)&&o!==t&&!jt(o);){if(Ls(o,n,r))return o;o=Lt(o)}return Ls(t,n,r)?t:null}function Gr(e,t,n){return typeof(e==null?void 0:e.elementFromPoint)=="function"?e.elementFromPoint(t,n):null}const zv=40,Hv=10,Uv=1,Gv=50,Xc=16,Yv=80,Xv='button,a,input,select,textarea,label,[role="button"]';function es(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function Kv(e){const n=ht(e).getComputedStyle(e).transform;let r=0,o=0,s=1;if(n&&n!=="none"){const i=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(i){const c=i[1].split(", ").map(parseFloat);c.length===6?(r=c[4],o=c[5],s=Math.sqrt(c[0]*c[0]+c[1]*c[1])):c.length===16&&(r=c[12],o=c[13],s=c[0])}}return{x:r,y:o,scale:s}}function Fr(e){return Number.isFinite(e)&&e>0?e:null}function Kc(e,t){return`translate3d(${e.x}px,${e.y}px,0) scale(${t})`}function qv(e){return e%2===1}function ts(e,t,n){const r=e[n];if(typeof r=="function")try{r.call(e,t)}catch(o){if(o&&typeof o=="object"&&"name"in o&&o.name==="NotFoundError")return;throw o}}function Zv(e){const{enabled:t,directions:n,elementRef:r,movementCssVars:o,canStart:s,ignoreSelectorWhenTouch:i=!0,ignoreScrollableAncestors:c=!1,swipeThreshold:a,onDismiss:u,onProgress:d,onCancel:f,onSwipeStart:y,onRelease:h,onSwipingChange:v,trackDrag:p=!0}=e,g=Xv,b=n.length===1?n[0]:void 0,m=Math.max(0,typeof a=="number"?a:zv),S=n.includes("left"),x=n.includes("right"),C=n.includes("up"),R=n.includes("down"),T=S||x,k=C||R,A=l.useMemo(()=>{const _=[];return k&&_.push("vertical"),T&&_.push("horizontal"),_},[T,k]),[H,M]=l.useState(void 0),[O,P]=l.useState(!1),[N,B]=l.useState(!1),j=l.useRef({x:0,y:0}),W=l.useRef({x:0,y:0}),L=l.useRef(null),U=l.useRef({x:0,y:0,scale:1}),D=l.useRef(void 0),le=l.useRef(0),te=l.useRef(!1),be=l.useRef({x:0,y:0}),Se=l.useRef(null),pe=l.useRef(!1),ge=l.useRef(!1),Y=l.useRef(null),z=l.useRef(!1),J=l.useRef(!1),re=l.useRef({width:0,height:0}),K=l.useRef(0),V=l.useRef(m),he=l.useRef(null),Q=l.useRef(null),Ne=l.useRef({x:0,y:0}),De=l.useRef(null),ue=l.useRef(!1),de=l.useRef(null),q=_e(_=>{ue.current!==_&&(ue.current=_,P(_),v==null||v(_))});function Ee(_){if(!_)return;if(typeof a!="function"){V.current=m;return}const G=r.current;if(!G)return;const se=a({element:G,direction:_});V.current=Math.max(0,se)}const ve=_e((_,G)=>{const se=Number.isFinite(_)?St(_,0,1):0,Ae=se!==K.current;let Fe=!1;if(G){const $e=De.current;Fe=!$e||$e.deltaX!==G.deltaX||$e.deltaY!==G.deltaY||$e.direction!==G.direction}!Ae&&!Fe||(K.current=se,G?De.current=G:Ae&&(De.current=null),d==null||d(se,G))}),ye=_e(_=>{const G=r.current;if(!p||!G){_||(de.current=null);return}const se=G.style,Ae=de.current;_?(Ae||(de.current=[se.transition,se.transform]),se.transition="none"):Ae&&([se.transition,se.transform]=Ae,de.current=null);const Fe=W.current,$e=U.current,ze=Fe.x-$e.x,tt=Fe.y-$e.y;_&&(se.transform=Kc(Fe,$e.scale)),se.setProperty(o.x,`${ze}px`),se.setProperty(o.y,`${tt}px`)});function at(_,G){if(G===null)return;const se=Q.current;if(se&&G>se.time){const Ae=Math.max(G-se.time,Xc);Ne.current={x:(_.x-se.x)/Ae,y:(_.y-se.y)/Ae}}Q.current={x:_.x,y:_.y,time:G}}const ae=l.useCallback(()=>{M(void 0),q(!1),B(!1),ve(0),V.current=m,j.current={x:0,y:0},W.current={x:0,y:0},U.current={x:0,y:0,scale:1},D.current=void 0,le.current=0,te.current=!1,be.current={x:0,y:0},Se.current=null,pe.current=!1,L.current=null,ge.current=!1,Y.current=null,z.current=!1,J.current=!1,re.current={width:0,height:0},he.current=null,Q.current=null,Ne.current={x:0,y:0},De.current=null,ye(!1)},[q,m,ye,ve]);l.useEffect(()=>{typeof a!="function"&&(V.current=m)},[m,a]);function me(_){if("touches"in _){const G=_.touches[0];return G?{x:G.clientX,y:G.clientY}:null}return{x:_.clientX,y:_.clientY}}function I(_){return"touches"in _?!0:_.pointerType==="touch"}function $(_,G){const se=Qe(r.current);return Gr(se,_.x,_.y)??Ot(G)}function ne(_,G){return T&&!k?Bn(_,G,"horizontal"):k&&!T?Bn(_,G,"vertical"):Bn(_,G,"vertical")??Bn(_,G,"horizontal")}function oe(_,G,se){z.current=!1;const Ae=I(_),Fe=$(G,_.nativeEvent),ze=Qe(r.current).body,tt=Ae&&ze?ne(Fe,ze):null,Te=(se==null?void 0:se.ignoreScrollableTarget)??!1;if(tt&&!Te||(z.current=!!(tt&&Te),(Fe?Fe.closest(g):!1)&&(!Ae||i)))return!1;const Be=r.current;if(c&&Be&&Fe&&A.length>0&&!((se==null?void 0:se.ignoreScrollableAncestors)??!1)&&Wv(Fe,Be,A))return!1;if(te.current=!1,D.current=void 0,le.current=0,j.current=G,he.current=Fr(_.timeStamp),be.current=G,L.current=G,Be){re.current={width:Be.offsetWidth,height:Be.offsetHeight},Ee(b);const Xe=Kv(Be);U.current=Xe,W.current={x:Xe.x,y:Xe.y},at({x:Xe.x,y:Xe.y},he.current),"touches"in _||ts(Be,_.pointerId,"setPointerCapture")}return y==null||y(_.nativeEvent),q(!0),Se.current=null,pe.current=!0,ve(0),ye(!0),!0}function Pe(){ee(),z.current=!1,L.current=null}function ee(){ge.current=!1,Y.current=null}function we(_){if(Pe(),!ue.current)return;q(!1),Se.current=null;const G=U.current;W.current={x:G.x,y:G.y},M(void 0),J.current=!1,ye(!1);const se=r.current;se&&ts(se,_.pointerId,"releasePointerCapture"),ve(0,{deltaX:0,deltaY:0,direction:void 0}),f==null||f(_.nativeEvent)}function Me(_,G){const se=ze=>ze>=0?ze**.5:-(Math.abs(ze)**.5),Ae=(ze,tt,Te)=>!tt&&ze<0||!Te&&ze>0?se(ze):ze,Fe=T?Ae(_,S,x):se(_),$e=k?Ae(G,C,R):se(G);return{x:Fe,y:$e}}function Ue(_,G,se){const Ae=Math.abs(G),Fe=Math.abs(se);if(k&&se!==0&&(!T||Fe>=Ae)){const tt=Math.max(0,_.scrollHeight-_.clientHeight),Te=_.scrollTop<=0,je=_.scrollTop>=tt,Be=se>0,Xe=se<0;return Be&&Te&&R||Xe&&je&&C}if(T&&G!==0&&(!k||Ae>Fe)){const tt=Math.max(0,_.scrollWidth-_.clientWidth),Te=_.scrollLeft<=0,je=_.scrollLeft>=tt,Be=G>0,Xe=G<0;return Be&&Te&&x||Xe&&je&&S}return null}const ut=_e(_=>{if(!t||_.defaultPrevented||_.nativeEvent.defaultPrevented||!("touches"in _)&&_.button!==0)return;const G=me(_);!G||(ge.current=!0,Y.current=G,z.current=!1,J.current=!1,!(s?s(G,{nativeEvent:_.nativeEvent,direction:b}):!0))||oe(_,G)&&ee()});function nt(_,G,se){if(!t||!ue.current)return;const Ae=Ot(_.nativeEvent);if(I(_)&&!z.current){const He=_.currentTarget;if(ne(Ae,He))return}if("touches"in _||_.preventDefault(),pe.current){j.current=G;const He=Fr(_.timeStamp);He!==null&&(he.current=He),pe.current=!1}const Fe=G.x,$e=G.y,ze=se.x,tt=se.y;(tt<0&&$e>be.current.y||tt>0&&$e<be.current.y)&&(be.current={x:be.current.x,y:$e}),(ze<0&&Fe>be.current.x||ze>0&&Fe<be.current.x)&&(be.current={x:Fe,y:be.current.y});const Te=Fe-j.current.x,je=$e-j.current.y,Be=$e-be.current.y,Xe=Fe-be.current.x;let rt=Se.current;rt===null&&T&&k&&Math.sqrt(Te*Te+je*je)>=Uv&&(rt=Math.abs(Te)>Math.abs(je)?"horizontal":"vertical",Se.current=rt);let Ge;if(!D.current)rt==="vertical"?je>0?Ge="down":je<0&&(Ge="up"):rt==="horizontal"?Te>0?Ge="right":Te<0&&(Ge="left"):Math.abs(Te)>=Math.abs(je)?Ge=Te>0?"right":"left":Ge=je>0?"down":"up",Ge&&(Ge==="left"&&S||Ge==="right"&&x||Ge==="up"&&C||Ge==="down"&&R)&&(D.current=Ge,le.current=es(Ge,Te,je),M(Ge),Ee(Ge));else{const He=D.current,yt=es(He,Xe,Be);yt>V.current?(te.current=!1,M(He)):!(S&&x)&&!(C&&R)&&le.current-yt>=Hv&&(te.current=!0)}const E=Me(Te,je);let F=U.current.x,X=U.current.y;rt==="horizontal"?T&&(F+=E.x):(rt==="vertical"||T&&(F+=E.x),k&&(X+=E.y)),W.current={x:F,y:X},ye(!0),at({x:F,y:X},Fr(_.timeStamp));const fe=F-U.current.x,xe=X-U.current.y,Ce=D.current,Re=b??D.current;if(!Re){ve(0,{deltaX:fe,deltaY:xe,direction:Ce});return}const ke=Re==="left"||Re==="right"?re.current.width:re.current.height,dt=U.current.scale||1;if(ke<=0||dt<=0){ve(0,{deltaX:fe,deltaY:xe,direction:Ce});return}const Je=es(Re,F-U.current.x,X-U.current.y);if(Je<=0){ve(0,{deltaX:fe,deltaY:xe,direction:Ce});return}ve(Je/(ke*dt),{deltaX:fe,deltaY:xe,direction:Ce})}const Ye=_e(_=>{if(!t)return;const G=W.current,se=U.current,Ae=G.x-se.x,Fe=G.y-se.y,$e={deltaX:Ae,deltaY:Fe,direction:D.current};if(!ue.current){Pe(),ve(0,$e);return}q(!1),Se.current=null,Pe(),J.current=!1;const ze=r.current;ze&&("touches"in _||ts(ze,_.pointerId,"releasePointerCapture"));const tt=Ae,Te=Fe,je=he.current,Be=Fr(_.timeStamp),Xe=je!==null&&Be!==null&&Be>je?Be-je:0,rt=Xe>0?Math.max(Xe,Gv):0,Ge=rt>0?tt/rt:0,E=rt>0?Te/rt:0;let F=Ne.current.x,X=Ne.current.y;const fe=Q.current;if(fe&&Be!==null&&Be>=fe.time){const dt=Be-fe.time;if(dt<=Yv){const Je=Math.max(dt,Xc),He=G.x-fe.x,yt=G.y-fe.y,qt=He/Je,Bt=yt/Je;qt!==0&&(F=qt),Bt!==0&&(X=Bt)}else F=0,X=0}const xe=h==null?void 0:h({event:_.nativeEvent,direction:D.current,deltaX:tt,deltaY:Te,velocityX:Ge,velocityY:E,releaseVelocityX:F,releaseVelocityY:X}),Ce=typeof xe=="boolean";if(te.current&&!Ce){W.current={x:se.x,y:se.y},M(void 0),ye(!1),ve(0,$e);return}let Re=!1,ke;if(Ce)Re=xe,ke=D.current??b;else for(const dt of n){switch(dt){case"right":tt>V.current&&(Re=!0,ke="right");break;case"left":tt<-V.current&&(Re=!0,ke="left");break;case"down":Te>V.current&&(Re=!0,ke="down");break;case"up":Te<-V.current&&(Re=!0,ke="up");break}if(Re)break}Re&&ke?(M(ke),B(!0),ye(!1),u==null||u(_.nativeEvent,{direction:ke})):(W.current={x:se.x,y:se.y},M(void 0),ye(!1),ve(0,$e))}),pt=_e(_=>{const G=me(_);if(!G)return;let se=!1;if(!("touches"in _)){const $e=qv(_.buttons);if($e&&(J.current=!0),_.buttons!==0&&!$e){we(_);return}if(_.buttons===0&&J.current){if(!ue.current){Ye(_);return}se=!0}}if(!O&&ge.current){if(!I(_)&&(_.defaultPrevented||_.nativeEvent.defaultPrevented)){Pe();return}if(s?s(G,{nativeEvent:_.nativeEvent,direction:b}):!0){const ze=Y.current;let tt=!1;if(I(_)){const je=r.current;if(ze&&je){const Be=$(G,_.nativeEvent),rt=Qe(je).body,Ge=rt?ne(Be,rt):null;if(Ge&&(Ve(je,Ge)||Ve(Ge,je))){const E=G.x-ze.x,F=G.y-ze.y,X=Ue(Ge,E,F);if(X===!1)return;X===!0&&(tt=!0)}}}oe(_,G,{ignoreScrollableTarget:tt,ignoreScrollableAncestors:tt})&&(ze&&tt?(ee(),j.current=ze,be.current=ze,L.current=ze,pe.current=!1):(ee(),z.current=!1))}}const Ae=L.current,Fe=Ae===null?{x:0,y:0}:{x:G.x-Ae.x,y:G.y-Ae.y};L.current=G,nt(_,G,Fe),se&&!("touches"in _)&&Ye(_)}),kt=_e((_,G)=>{pt({touches:_.touches,currentTarget:G,nativeEvent:_,defaultPrevented:_.defaultPrevented,timeStamp:_.timeStamp})}),lt=l.useCallback(()=>{const _=W.current,G=U.current,se=_.x-G.x,Ae=_.y-G.y;return!O&&se===0&&Ae===0&&!N?{[o.x]:"0px",[o.y]:"0px"}:{transition:O?"none":void 0,transform:O?Kc(_,G.scale):void 0,[o.x]:`${se}px`,[o.y]:`${Ae}px`}},[N,O,o]),Pt=l.useCallback(()=>t?{onPointerDown:ut,onPointerMove:pt,onPointerUp:Ye,onPointerCancel:Ye}:{},[t,Ye,pt,ut]),Vt=l.useCallback(()=>t?{onTouchStart:ut,onTouchMove:pt,onTouchEnd:Ye,onTouchCancel:Ye}:{},[t,Ye,pt,ut]);return{swiping:O,swipeDirection:H,dragDismissed:N,getPointerProps:Pt,getTouchProps:Vt,moveNative:kt,getDragStyles:lt,reset:ae}}const Jv=nd,Qv=rd,od=l.createContext(void 0);process.env.NODE_ENV!=="production"&&(od.displayName="DrawerVirtualKeyboardContext");function ey(){return l.useContext(od)}const Fs=10,qc=.5,Zc=.5,ty=300,Jc=4,Qc=.2,ny=4,ns=80,ea=360,rs=.1,ta=1,ry=`[${$b}]`,sd=l.forwardRef(function(t,n){const{render:r,className:o,style:s,children:i,...c}=t,{store:a}=At(),u=a.context.popupRef,d=a.context.backdropRef,{swipeDirection:f,notifyParentSwipingChange:y,notifyParentSwipeProgressChange:h,frontmostHeight:v,snapToSequentialPoints:p}=Po(),g=Cu(),{snapPoints:b,resolvedSnapPoints:m,activeSnapPoint:S,activeSnapPointOffset:x,setActiveSnapPoint:C,popupHeight:R}=Zu(),T=a.useState("open"),k=a.useState("mounted"),A=a.useState("nested"),H=a.useState("nestedOpenDrawerCount"),M=a.useState("viewportElement"),O=a.useState("popupElement"),P=g==null?void 0:g.visualStateStore,N=H>0,B=f==="left"||f==="right"?"horizontal":"vertical",j=B==="vertical",W=j?"horizontal":"vertical",[L,U]=l.useState(null),D=l.useRef(void 0),le=l.useRef(null),te=Ro(),be=l.useRef(!1),Se=l.useRef(!1),pe=l.useRef(""),ge=l.useRef(!1),Y=l.useRef(!1),z=l.useRef(null),J=ey(),re=l.useMemo(()=>{if(!b||b.length<2||f!=="down"&&f!=="up"||m.length<2)return null;const I=m.map(ee=>ee.offset).filter(ee=>Number.isFinite(ee)).sort((ee,we)=>ee-we);if(I.length<2)return null;const $=I[0],ne=I[1],oe=I[I.length-1];let Pe=ne-$;if(!Number.isFinite(Pe)||Pe<=0){const ee=oe-$;if(!Number.isFinite(ee)||ee<=0)return null;Pe=ee}return{minOffset:$,range:Pe}},[m,b,f]),K=l.useMemo(()=>!re||x===null?null:St((x-re.minOffset)/re.range,0,1),[x,re]),V=l.useMemo(()=>b&&b.length>0&&(f==="down"||f==="up")?f==="down"?["down","up"]:["up","down"]:[f],[b,f]),he=_e(I=>{oy(u.current,d.current,I)}),Q=_e(()=>{var I;he(!1),(I=u.current)==null||I.removeAttribute(An.endingStyle),U(null)}),Ne=_e(()=>{Se.current&&(Se.current=!1,y==null||y(!1))}),De=_e(({resolvedProgress:I,shouldTrackProgress:$,notifyParent:ne})=>{const oe=T&&!A&&$,Pe=oe?I:0,ee=T&&$?I:0;ne&&h&&(h(ee),ee<=0&&Ne()),P==null||P.set({swipeProgress:Pe,frontmostHeight:Pe>0?v:0});const we=d.current;if(we){if(!oe||Pe<=0){we.style.setProperty(nn.swipeProgress,"0"),we.style.removeProperty(bt.height);return}we.style.setProperty(nn.swipeProgress,`${Pe}`),v>0?we.style.setProperty(bt.height,`${v}px`):we.style.removeProperty(bt.height)}});function ue({direction:I,deltaX:$,deltaY:ne,velocityX:oe,velocityY:Pe,releaseVelocityX:ee,releaseVelocityY:we}){if(!I)return null;const Me=a.context.popupRef.current;if(!Me)return null;const Ue=I==="left"||I==="right"?Me.offsetWidth:Me.offsetHeight;if(!Number.isFinite(Ue)||Ue<=0)return null;const ut=I==="left"||I==="right"?$:ne,nt=b&&b.length>0?x??0:0;let Ye=0;I==="down"?Ye=nt:I==="up"&&(Ye=-nt);const pt=Ye+ut,kt=I==="left"||I==="up"?-pt:pt,lt=Math.max(0,Ue-kt);if(!Number.isFinite(lt)||lt<=0)return null;const Pt=I==="left"||I==="right"?ee:we,Vt=I==="left"||I==="right"?oe:Pe,_=Math.abs(Pt)>0&&Number.isFinite(Pt)?Pt:Vt,G=I==="left"||I==="up"?-_:_;if(!Number.isFinite(G)||G<=Qc)return null;const se=St(G,Qc,ny),Ae=St(lt/se,ns,ea);if(!Number.isFinite(Ae))return null;const Fe=(Ae-ns)/(ea-ns),$e=St(rs+Fe*(ta-rs),rs,ta);return!Number.isFinite($e)||$e<=0?null:$e}function de(I){if(Se.current||!I)return;const $=I.direction??f,ne=$==="left"||$==="right"?I.deltaX:I.deltaY;!Number.isFinite(ne)||Math.abs(ne)<Fs||(Se.current=!0,y==null||y(!0))}const q=Zv({enabled:k&&!N,directions:V,elementRef:a.context.popupRef,ignoreSelectorWhenTouch:!1,ignoreScrollableAncestors:!0,movementCssVars:{x:bt.swipeMovementX,y:bt.swipeMovementY},onSwipeStart(I){var we,Me,Ue;if("touches"in I||"pointerType"in I&&I.pointerType==="touch")return;const $=u.current;if(!$)return;const ne=Qe($),oe=(we=ne.getSelection)==null?void 0:we.call(ne);if(!oe||oe.isCollapsed)return;const Pe=ft(oe.anchorNode)?oe.anchorNode:(Me=oe.anchorNode)==null?void 0:Me.parentElement,ee=ft(oe.focusNode)?oe.focusNode:(Ue=oe.focusNode)==null?void 0:Ue.parentElement;!Ve($,Pe)&&!Ve($,ee)||oe.removeAllRanges()},onSwipingChange(I){be.current=I,os(a.context.backdropRef.current,I),!I&&!h&&Ne()},swipeThreshold({element:I,direction:$}){return na(I,$)},canStart(I,$){const ne=a.context.popupRef.current;if(!ne)return!1;const oe=ne.ownerDocument,Pe=Gr(oe,I.x,I.y);if(!Pe||!Ve(ne,Pe))return!1;const ee=$.nativeEvent;return!(("touches"in ee||"pointerType"in ee&&ee.pointerType==="touch")&&oa(oe,ne)||ee.type==="touchstart"&&ss(Pe))},onProgress(I,$){de($);const ne=!!(b&&b.length>0);if(be.current&&f==="down"&&ne&&$&&Number.isFinite($.deltaY)){const Ue=a.context.popupRef.current;Ue&&(Ue.style.removeProperty("transform"),Ue.style.setProperty(bt.swipeMovementY,`${qu(x??0,$.deltaY)}px`))}const oe=($==null?void 0:$.direction)??q.swipeDirection,we=ne&&(f==="down"||f==="up")||!ne||f==="left"||f==="right"||(oe===void 0||oe===f);let Me=I;if(re&&R>0){if($&&Number.isFinite($.deltaY)){const Ue=x??re.minOffset,ut=St(Ue+$.deltaY,0,R);Me=St((ut-re.minOffset)/re.range,0,1)}else if(K!==null)Me=K;else if(oe==="down"||oe==="up"){const Ue=I*R,ut=x??re.minOffset,nt=oe==="down"?ut+Ue:ut-Ue;Me=St((nt-re.minOffset)/re.range,0,1)}}De({resolvedProgress:Me,shouldTrackProgress:we,notifyParent:!0})},onRelease({event:I,deltaX:$,deltaY:ne,direction:oe,velocityX:Pe,velocityY:ee,releaseVelocityX:we,releaseVelocityY:Me}){const Ue={deltaX:$,deltaY:ne,velocityX:Pe,velocityY:ee,releaseVelocityX:we,releaseVelocityY:Me};function ut(Te){const je=a.context.popupRef.current;je&&(Ne(),he(!0),je.style.removeProperty("transition"),je.setAttribute(An.endingStyle,""),Ft.flushSync(()=>{U(ue({direction:Te,...Ue}))}))}if(!b||b.length===0){if(!oe){Q();return}const Te=a.context.popupRef.current;if(!Te){Q();return}const je=na(Te,oe),Be=oe==="left"||oe==="right"?$:ne;if(!Number.isFinite(Be)){Q();return}const Xe=oe==="left"||oe==="up"?-Be:Be;if(Xe<=0)return Q(),!1;const rt=oe==="left"||oe==="right"?Pe:ee;if((oe==="left"||oe==="up"?-rt:rt)>=qc&&Xe>0)return ut(oe),!0;const E=Xe>je;return E?ut(oe):Q(),E}if(f!=="down"&&f!=="up"){Q();return}if(!R||m.length===0){Q();return}const nt=f==="down"?ne:-ne;if(!Number.isFinite(nt)){Q();return}const Ye=Math.sign(nt),pt=f==="down"?Me:-Me,kt=f==="down"?ee:-ee;let lt=Number.isFinite(pt)?pt:kt;if(Ye!==0&&Math.abs(nt)>=Fs&&Number.isFinite(lt)){const Te=Math.sign(lt);Te!==0&&Te!==Ye&&(lt=kt)}const Pt=x??0,Vt=St(Pt+nt,0,R),_=Number.isFinite(lt)&&Math.abs(lt)>=Zc?St(lt,-Jc,Jc)*ty:0,G=p?Vt:St(Vt+_,0,R),se=xt(Ir,I),Ae=()=>(D.current=S,C==null||C(null,se),ut(f),!0);if(p){const Te=[...m].sort((xe,Ce)=>xe.offset-Ce.offset);if(Te.length===0)return Q(),!1;let je=0,Be=Math.abs(Pt-Te[0].offset);for(let xe=1;xe<Te.length;xe+=1){const Ce=Math.abs(Pt-Te[xe].offset);Ce<Be&&(Be=Ce,je=xe)}let Xe=Te[0];Be=Math.abs(G-Xe.offset);for(const xe of Te){const Ce=Math.abs(G-xe.offset);Ce<Be&&(Be=Ce,Xe=xe)}const rt=Math.sign(lt),Ge=Ye!==0&&rt!==0&&rt===Ye&&Math.abs(lt)>=Zc;let E=G;if(Ge){const xe=St(je+Ye,0,Te.length-1);if(xe!==je){const Ce=Te[xe];(Ye>0?G<Ce.offset:G>Ce.offset)&&(Xe=Ce,E=Ce.offset)}else if(Ye>0)return Ae()}const X=Math.abs(E-R),fe=Math.abs(E-Xe.offset);return X<fe?Ae():(C==null||C(Xe.value,se),Q(),!1)}if(lt>=qc&&nt>0)return Ae();let Fe=m[0],$e=Math.abs(G-Fe.offset);for(const Te of m){const je=Math.abs(G-Te.offset);je<$e&&($e=je,Fe=Te)}return Math.abs(G-R)<$e?Ae():(C==null||C(Fe.value,se),Q(),!1)},onDismiss(I){var oe;P==null||P.set({swipeProgress:0,frontmostHeight:0});const $=a.context.backdropRef.current;$&&($.style.setProperty(nn.swipeProgress,"0"),$.style.removeProperty(bt.height));const ne=xt(Ir,I);if(a.setOpen(!1,ne),ne.isCanceled){const Pe=D.current;Pe!==void 0&&(C==null||C(Pe,xt(Ir,I))),D.current=void 0,(oe=le.current)==null||oe.call(le),Q();return}if(a.select("open")){const Pe=I;te.request(()=>{var ee;if(a.select("open")){const we=D.current;we!==void 0&&(C==null||C(we,xt(Ir,Pe))),D.current=void 0,Q(),(ee=le.current)==null||ee.call(le)}else D.current=void 0});return}D.current=void 0,he(!0)}}),Ee=q.getPointerProps(),ve=q.getTouchProps(),{moveNative:ye,reset:at}=q;le.current=at,l.useEffect(()=>{const I=M??O;if(!I)return;const $=I,ne=Qe($),oe=ht(ne);function Pe(ee){if(J==null||J.onTouchMove(ee),Y.current)return;const we=z.current,Me=ee.touches[0];if(!Me||!we)return;const Ue=j?Me.clientY-we.lastY:Me.clientX-we.lastX;if(id(ee,oe)){we.allowSwipe=!1,Tn(we,Me);return}if(ee.touches.length===2){Tn(we,Me);return}if(oa(ne,$)||!T||!k||N){Tn(we,Me);return}if(ly(we,Me,j)){Tn(we,Me);return}const nt=we.scrollTarget;if(!nt||nt===ne.documentElement||nt===ne.body){ee.cancelable&&ee.preventDefault(),ee.stopPropagation(),ye(ee,$),Tn(we,Me);return}if(!uy(nt,B)){ee.cancelable&&ee.preventDefault(),ee.stopPropagation(),Tn(we,Me);return}const pt=Ue;if(pt!==0){const kt=fy(nt,B,f,pt);we.allowSwipe?ee.cancelable&&ee.preventDefault():ee.cancelable&&kt?(we.allowSwipe=!0,ee.preventDefault()):we.allowSwipe=!1}we.allowSwipe===!0&&(ee.stopPropagation(),ye(ee,$)),Tn(we,Me)}return Ke(ne,"touchmove",Pe,{passive:!1,capture:!0})},[k,N,T,O,j,B,f,ye,M,J]),l.useEffect(()=>{if(!re||q.swiping)return;De({resolvedProgress:!T||A?0:K??0,shouldTrackProgress:!0,notifyParent:!1})},[De,v,A,h,T,K,re,q.swiping,a,P]),l.useEffect(()=>{if(h)return T||h(0),()=>{h(0)}},[h,T]),l.useEffect(()=>{T&&(at(),Q())},[Q,T,at]),l.useEffect(()=>{const I=d.current;return()=>{P==null||P.set({swipeProgress:0,frontmostHeight:0}),os(I,!1);const $=d.current;$!==I&&os($,!1),Ne()}},[d,Ne,P]);const ae=l.useMemo(()=>({swiping:q.swiping,getDragStyles:q.getDragStyles,swipeStrength:L??null,setSwipeDismissed:he}),[he,q.getDragStyles,q.swiping,L]);function me(){Y.current=!1,z.current=null,pe.current="",ge.current=!1}return w.jsx(td,{ref:n,className:o,style:s,render:r,...xo(c,{onPointerDown(I){var oe;if(pe.current=I.pointerType,ge.current=I.pointerType==="pen",!T||!k||N)return;const $=Qe(I.currentTarget),ne=Gr($,I.clientX,I.clientY);ss(ne)||sy(ne)||I.pointerType!=="touch"&&((oe=Ee.onPointerDown)==null||oe.call(Ee,I))},onPointerMove(I){var $;I.pointerType!=="touch"&&(($=Ee.onPointerMove)==null||$.call(Ee,I))},onPointerUp(I){var $;pe.current===I.pointerType&&(pe.current=""),I.pointerType!=="touch"&&(($=Ee.onPointerUp)==null||$.call(Ee,I))},onPointerCancel(I){var $;pe.current===I.pointerType&&(pe.current=""),I.pointerType!=="touch"&&(($=Ee.onPointerCancel)==null||$.call(Ee,I))},onTouchStart(I){var Ye;if(pe.current==="pen"&&ge.current){ge.current=!1,Y.current=!1,z.current=null;return}if(!T||!k||N){Y.current=!1,z.current=null;return}const ne=I.touches[0];if(!ne)return;if(ay(I)){Y.current=!1,z.current=null;return}const oe=Qe(I.currentTarget),Pe=Gr(oe,ne.clientX,ne.clientY),ee=M??O,we=Ot(I.nativeEvent),Me=ft(we)?we:null;if(ee&&Me&&!Ve(ee,Me)){Y.current=!0,z.current=null;return}if(J==null||J.onTouchStart(I),Y.current=ss(Pe),Y.current){z.current=null;return}let Ue=null,ut=!1;ee&&Me&&(Ue=Bn(Me,ee,B),ut=Bn(Me,ee,W)!=null);let nt=null;Ue&&(nt=dy(Ue,B,f)?null:!1),z.current={startX:ne.clientX,startY:ne.clientY,lastX:ne.clientX,lastY:ne.clientY,scrollTarget:Ue,hasCrossAxisScrollableContent:ut,allowSwipe:nt,preserveNativeCrossAxisScroll:!1},(Ye=ve.onTouchStart)==null||Ye.call(ve,I)},onTouchEnd(I){var $;J==null||J.onTouchEnd(I),me(),($=ve.onTouchEnd)==null||$.call(ve,I)},onTouchCancel(I){var $;J==null||J.onTouchCancel(),me(),($=ve.onTouchCancel)==null||$.call(ve,I)},"data-nested-dialog-open":void 0}),children:w.jsx(Ti.Provider,{value:ae,children:i})})});process.env.NODE_ENV!=="production"&&(sd.displayName="DrawerViewport");function oy(e,t,n){if(n){e==null||e.setAttribute(_t.swipeDismiss,""),t==null||t.setAttribute(_t.swipeDismiss,"");return}e==null||e.removeAttribute(_t.swipeDismiss),t==null||t.removeAttribute(_t.swipeDismiss)}function os(e,t){if(e){if(t){e.setAttribute(_t.swiping,"");return}e.removeAttribute(_t.swiping)}}function ss(e){return!!(e!=null&&e.closest(v0))}function sy(e){return!!(e!=null&&e.closest(ry))}function na(e,t){const n=t==="left"||t==="right"?e.offsetWidth:e.offsetHeight;return Math.max(n*.5,Fs)}function ra(e,t){return e instanceof t.HTMLInputElement&&e.type==="range"}function iy(e){return ft(e)?e.tagName==="INPUT"||e.tagName==="TEXTAREA":!1}function cy(e,t){var o,s;const n=ft(e.anchorNode)?e.anchorNode:(o=e.anchorNode)==null?void 0:o.parentElement,r=ft(e.focusNode)?e.focusNode:(s=e.focusNode)==null?void 0:s.parentElement;return e.containsNode(t,!0)||Ve(t,n)||Ve(t,r)}function oa(e,t){var s;const n=Ht(e);if(!!(n&&Ve(t,n))&&iy(n)){const{selectionStart:i,selectionEnd:c}=n;if(i!=null&&c!=null&&i<c)return!0}const o=(s=e.getSelection)==null?void 0:s.call(e);return!o||o.isCollapsed?!1:cy(o,t)}function id(e,t){const n=e.composedPath();return n?n.some(r=>ra(r,t)):ra(Ot(e),t)}function ay(e){return id(e.nativeEvent,ht(e.currentTarget))}function Tn(e,t){e.lastX=t.clientX,e.lastY=t.clientY}function ly(e,t,n){if(e.preserveNativeCrossAxisScroll)return!0;if(e.allowSwipe===!0||!e.hasCrossAxisScrollableContent)return!1;const r=n?t.clientY-e.startY:t.clientX-e.startX,o=n?t.clientX-e.startX:t.clientY-e.startY,s=Math.abs(r),i=Math.abs(o);return i<6||i<=s+2?!1:(e.preserveNativeCrossAxisScroll=!0,!0)}function uy(e,t){return t==="vertical"?e.scrollHeight>e.clientHeight:e.scrollWidth>e.clientWidth}function cd(e,t){if(t==="vertical"){const r=Math.max(0,e.scrollHeight-e.clientHeight);return{offset:e.scrollTop,max:r}}const n=Math.max(0,e.scrollWidth-e.clientWidth);return{offset:e.scrollLeft,max:n}}function dy(e,t,n){const{offset:r,max:o}=cd(e,t),s=ad(n,t);return s===null?!1:s?r<=0:r>=o}function fy(e,t,n,r){const{offset:o,max:s}=cd(e,t),i=ad(n,t);return i===null||!(i?r>0:r<0)?!1:i?o<=0:o>=s}function ad(e,t){return t==="vertical"?e==="down"?!0:e==="up"?!1:null:e==="right"?!0:e==="left"?!1:null}/**
|
|
66
|
+
* @license lucide-react v1.21.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/const ld=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
71
|
+
* @license lucide-react v1.21.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const py=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
76
|
+
* @license lucide-react v1.21.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const hy=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
|
|
81
|
+
* @license lucide-react v1.21.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const sa=e=>{const t=hy(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
86
|
+
* @license lucide-react v1.21.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/var is={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"};/**
|
|
91
|
+
* @license lucide-react v1.21.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const my=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},gy=Z.createContext({}),by=()=>Z.useContext(gy),vy=Z.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...c},a)=>{const{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:f=!1,color:y="currentColor",className:h=""}=by()??{},v=r??f?Number(n??d)*24/Number(t??u):n??d;return Z.createElement("svg",{ref:a,...is,width:t??u??is.width,height:t??u??is.height,stroke:e??y,strokeWidth:v,className:ld("lucide",h,o),...!s&&!my(c)&&{"aria-hidden":"true"},...c},[...i.map(([p,g])=>Z.createElement(p,g)),...Array.isArray(s)?s:[s]])});/**
|
|
96
|
+
* @license lucide-react v1.21.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const Ni=(e,t)=>{const n=Z.forwardRef(({className:r,...o},s)=>Z.createElement(vy,{ref:s,iconNode:t,className:ld(`lucide-${py(sa(e))}`,`lucide-${e}`,r),...o}));return n.displayName=sa(e),n};/**
|
|
101
|
+
* @license lucide-react v1.21.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const yy=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Di=Ni("check",yy);/**
|
|
106
|
+
* @license lucide-react v1.21.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const wy=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],xy=Ni("chevron-down",wy);/**
|
|
111
|
+
* @license lucide-react v1.21.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const Sy=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],To=Ni("x",Sy),Ey={top:"up",right:"right",bottom:"down",left:"left"},ud=Vv,dd=Qv,fd=Sv,pd=Fb,hd=Z.forwardRef(function({className:t,...n},r){return w.jsx(hu,{ref:r,className:Oe("fixed inset-0 z-50 bg-black/50 transition-opacity duration-300","data-[ending-style]:opacity-0 data-[starting-style]:opacity-0",t),...n})}),Cy=Sn({slots:{viewport:"fixed inset-0 z-50 flex",popup:"bg-base-800 border-base-700 relative z-50 flex flex-col gap-4 overflow-y-auto border shadow-lg outline-none transition-transform duration-300 ease-out [--bleed:6rem]",close:"text-base-400 hover:text-base-200 hover:bg-base-700 cursor-pointer focus-visible:ring-primary-600 absolute rounded-md p-1 outline-none transition-colors focus-visible:ring-2"},variants:{side:{top:{viewport:"items-start justify-center",popup:"w-full max-h-[calc(85vh+var(--bleed))] -mt-[var(--bleed)] border-b p-6 pt-[calc(1.5rem+var(--bleed))] translate-y-[var(--drawer-swipe-movement-y,0px)] data-[starting-style]:translate-y-[calc(-100%+var(--bleed)-2px)] data-[ending-style]:translate-y-[calc(-100%+var(--bleed)-2px)]",close:"top-[calc(1rem+var(--bleed))] right-4"},right:{viewport:"justify-end",popup:"h-full w-[calc(100%+var(--bleed))] max-w-[calc(24rem+var(--bleed))] mr-[calc(var(--bleed)*-1)] border-l p-6 pr-[calc(1.5rem+var(--bleed))] translate-x-[var(--drawer-swipe-movement-x,0px)] data-[starting-style]:translate-x-[calc(100%-var(--bleed)+2px)] data-[ending-style]:translate-x-[calc(100%-var(--bleed)+2px)]",close:"top-4 right-[calc(1rem+var(--bleed))]"},bottom:{viewport:"items-end justify-center",popup:"w-full max-h-[calc(85vh+var(--bleed))] -mb-[var(--bleed)] rounded-t-xl border-t p-6 pt-3 pb-[calc(1.5rem+var(--bleed))] translate-y-[var(--drawer-swipe-movement-y,0px)] data-[starting-style]:translate-y-[calc(100%-var(--bleed)+2px)] data-[ending-style]:translate-y-[calc(100%-var(--bleed)+2px)]",close:"top-4 right-4"},left:{viewport:"justify-start",popup:"h-full w-[calc(100%+var(--bleed))] max-w-[calc(24rem+var(--bleed))] ml-[calc(var(--bleed)*-1)] border-r p-6 pl-[calc(1.5rem+var(--bleed))] translate-x-[var(--drawer-swipe-movement-x,0px)] data-[starting-style]:translate-x-[calc(-100%+var(--bleed)-2px)] data-[ending-style]:translate-x-[calc(-100%+var(--bleed)-2px)]",close:"top-4 right-4"}}},defaultVariants:{side:"right"}}),md=Z.forwardRef(function({className:t,children:n,side:r,hideClose:o,...s},i){const{viewport:c,popup:a,close:u}=Cy({side:r});return w.jsxs(fd,{children:[w.jsx(hd,{}),w.jsx(sd,{className:c(),children:w.jsxs(Ju,{ref:i,className:Oe(a(),t),...s,children:[r==="bottom"&&w.jsx("div",{className:"bg-base-600 mx-auto -mt-2 mb-1 h-1.5 w-10 shrink-0 rounded-full"}),n,w.jsx(bn,{}),!o&&w.jsxs(pd,{className:u(),children:[w.jsx(To,{className:"size-4"}),w.jsx("span",{className:"sr-only",children:"Close"})]})]})})]})}),$s=Z.forwardRef(function({className:t,...n},r){return w.jsx(Jv,{ref:r,className:Oe("text-base-100 text-lg font-medium",t),...n})}),gd=Z.forwardRef(function({className:t,...n},r){return w.jsx(Bb,{ref:r,className:Oe("text-base-400 text-sm",t),...n})});function Ry({trigger:e,side:t="right",title:n,description:r,children:o,className:s,hideClose:i,...c}){return w.jsxs(ud,{swipeDirection:Ey[t],...c,children:[e&&w.jsx(dd,{render:e}),w.jsxs(md,{side:t,className:s,hideClose:i,children:[!n&&w.jsx($s,{className:"sr-only",children:"Drawer"}),(n||r)&&w.jsxs("div",{className:"flex flex-col gap-1 pr-6",children:[n&&w.jsx($s,{children:n}),r&&w.jsx(gd,{children:r})]}),o]})]})}function hn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o||!o.defaultPrevented)return t==null?void 0:t(o)}}function ky(e,t=[]){let n=[];function r(s,i){const c=l.createContext(i);c.displayName=s+"Context";const a=n.length;n=[...n,i];const u=f=>{var b;const{scope:y,children:h,...v}=f,p=((b=y==null?void 0:y[e])==null?void 0:b[a])||c,g=l.useMemo(()=>v,Object.values(v));return w.jsx(p.Provider,{value:g,children:h})};u.displayName=s+"Provider";function d(f,y,h={}){var b;const{optional:v=!1}=h,p=((b=y==null?void 0:y[e])==null?void 0:b[a])||c,g=l.useContext(p);if(g)return g;if(i!==void 0)return i;if(!v)throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=n.map(i=>l.createContext(i));return function(c){const a=(c==null?void 0:c[e])||s;return l.useMemo(()=>({[`__scope${e}`]:{...c,[e]:a}}),[c,a])}};return o.scopeName=e,[r,Py(o,...t)]}function Py(...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 i=r.reduce((c,{useScope:a,scopeName:u})=>{const f=a(s)[`__scope${u}`];return{...c,...f}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Ty=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],cn=Ty.reduce((e,t)=>{const n=Nn(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,a=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(a,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Oy(e,t){e&&Ft.flushSync(()=>e.dispatchEvent(t))}var Ny="DismissableLayer",Vs="dismissableLayer.update",Dy="dismissableLayer.pointerDownOutside",Ay="dismissableLayer.focusOutside",ia,Ai=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),bd=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:c,onDismiss:a,...u}=e,d=l.useContext(Ai),[f,y]=l.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=l.useState({}),p=Ze(t,y),g=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),m=b?g.indexOf(b):-1,S=f?g.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,C=S>=m,R=l.useRef(!1),T=Ly(M=>{s==null||s(M),c==null||c(M),M.defaultPrevented||a==null||a()},{ownerDocument:h,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:R,dismissableSurfaces:d.dismissableSurfaces,shouldHandlePointerDownOutside:l.useCallback(M=>{if(!(M instanceof Node))return!1;const O=[...d.branches].some(P=>P.contains(M));return C&&!O},[d.branches,C])}),k=Fy(M=>{if(r&&R.current)return;const O=M.target;[...d.branches].some(N=>N.contains(O))||(i==null||i(M),c==null||c(M),M.defaultPrevented||a==null||a())},h),A=f?S===g.length-1:!1,H=Dt(M=>{M.key==="Escape"&&(o==null||o(M),!M.defaultPrevented&&a&&(M.preventDefault(),a()))});return l.useEffect(()=>{if(A)return h.addEventListener("keydown",H,{capture:!0}),()=>h.removeEventListener("keydown",H,{capture:!0})},[h,A,H]),l.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(ia=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),ca(),()=>{n&&(d.layersWithOutsidePointerEventsDisabled.delete(f),d.layersWithOutsidePointerEventsDisabled.size===0&&(h.body.style.pointerEvents=ia))}},[f,h,n,d]),l.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),ca())},[f,d]),l.useEffect(()=>{const M=()=>v({});return document.addEventListener(Vs,M),()=>document.removeEventListener(Vs,M)},[]),w.jsx(cn.div,{...u,ref:p,style:{pointerEvents:x?C?"auto":"none":void 0,...e.style},onFocusCapture:hn(e.onFocusCapture,k.onFocusCapture),onBlurCapture:hn(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:hn(e.onPointerDownCapture,T.onPointerDownCapture)})});bd.displayName=Ny;var Iy="DismissableLayerBranch",_y=l.forwardRef((e,t)=>{const n=l.useContext(Ai),r=l.useRef(null),o=Ze(t,r);return l.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),w.jsx(cn.div,{...e,ref:o})});_y.displayName=Iy;function My(){const e=l.useContext(Ai),[t,n]=l.useState(null);return l.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}var jy=()=>!0;function Ly(e,t){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:s,shouldHandlePointerDownOutside:i=jy}=t,c=Dt(e),a=l.useRef(!1),u=l.useRef(!1),d=l.useRef(new Map),f=l.useRef(()=>{});return l.useEffect(()=>{function y(){u.current=!1,o.current=!1,d.current.clear()}function h(){return Array.from(d.current.values()).some(Boolean)}function v(S){if(!u.current)return;const x=S.target;x instanceof Node&&[...s].some(R=>R.contains(x))||d.current.set(S.type,!0),S.type==="click"&&window.setTimeout(()=>{u.current&&f.current()},0)}function p(S){u.current&&d.current.set(S.type,!1)}const g=S=>{if(S.target&&!a.current){let x=function(){n.removeEventListener("click",f.current);const R=h();y(),R||vd(Dy,c,C,{discrete:!0})};if(!i(S.target)){n.removeEventListener("click",f.current),y(),a.current=!1;return}const C={originalEvent:S};u.current=!0,o.current=r&&S.button===0,d.current.clear(),!r||S.button!==0?x():(n.removeEventListener("click",f.current),f.current=x,n.addEventListener("click",f.current,{once:!0}))}else n.removeEventListener("click",f.current),y();a.current=!1},b=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const S of b)n.addEventListener(S,v,!0),n.addEventListener(S,p);const m=window.setTimeout(()=>{n.addEventListener("pointerdown",g)},0);return()=>{window.clearTimeout(m),n.removeEventListener("pointerdown",g),n.removeEventListener("click",f.current);for(const S of b)n.removeEventListener(S,v,!0),n.removeEventListener(S,p)}},[n,c,r,o,s,i]),{onPointerDownCapture:()=>a.current=!0}}function Fy(e,t=globalThis==null?void 0:globalThis.document){const n=Dt(e),r=l.useRef(!1);return l.useEffect(()=>{const o=s=>{s.target&&!r.current&&vd(Ay,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 ca(){const e=new CustomEvent(Vs);document.dispatchEvent(e)}function vd(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?Oy(o,s):o.dispatchEvent(s)}var cs="focusScope.autoFocusOnMount",as="focusScope.autoFocusOnUnmount",aa={bubbles:!1,cancelable:!0},$y="FocusScope",yd=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[c,a]=l.useState(null),u=Dt(o),d=Dt(s),f=l.useRef(null),y=Ze(t,a),h=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let p=function(S){if(h.paused||!c)return;const x=S.target;c.contains(x)?f.current=x:dn(f.current,{select:!0})},g=function(S){if(h.paused||!c)return;const x=S.relatedTarget;x!==null&&(c.contains(x)||dn(f.current,{select:!0}))},b=function(S){if(document.activeElement===document.body)for(const C of S)C.removedNodes.length>0&&dn(c)};document.addEventListener("focusin",p),document.addEventListener("focusout",g);const m=new MutationObserver(b);return c&&m.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",g),m.disconnect()}}},[r,c,h.paused]),l.useEffect(()=>{if(c){ua.add(h);const p=document.activeElement;if(!c.contains(p)){const b=new CustomEvent(cs,aa);c.addEventListener(cs,u),c.dispatchEvent(b),b.defaultPrevented||(Vy(Uy(wd(c)),{select:!0}),document.activeElement===p&&dn(c))}return()=>{c.removeEventListener(cs,u),setTimeout(()=>{const b=new CustomEvent(as,aa);c.addEventListener(as,d),c.dispatchEvent(b),b.defaultPrevented||dn(p??document.body,{select:!0}),c.removeEventListener(as,d),ua.remove(h)},0)}}},[c,u,d,h]);const v=l.useCallback(p=>{if(!n&&!r||h.paused)return;const g=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,b=document.activeElement;if(g&&b){const m=p.currentTarget,[S,x]=By(m);S&&x?!p.shiftKey&&b===x?(p.preventDefault(),n&&dn(S,{select:!0})):p.shiftKey&&b===S&&(p.preventDefault(),n&&dn(x,{select:!0})):b===m&&p.preventDefault()}},[n,r,h.paused]);return w.jsx(cn.div,{tabIndex:-1,...i,ref:y,onKeyDown:v})});yd.displayName=$y;function Vy(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(dn(r,{select:t}),document.activeElement!==n)return}function By(e){const t=wd(e),n=la(t,e),r=la(t.reverse(),e);return[n,r]}function wd(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 la(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Wy(r,{upTo:t})))return r}function Wy(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 zy(e){return e instanceof HTMLInputElement&&"select"in e}function dn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&zy(e)&&t&&e.select()}}var ua=Hy();function Hy(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=da(e,t),e.unshift(t)},remove(t){var n;e=da(e,t),(n=e[0])==null||n.resume()}}}function da(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Uy(e){return e.filter(t=>t.tagName!=="A")}var Gy="Portal",xd=l.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[o,s]=l.useState(!1);mt(()=>s(!0),[]);const i=n||o&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return i?Ft.createPortal(w.jsx(cn.div,{...r,ref:t}),i):null});xd.displayName=Gy;function Yy(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Oo=e=>{const{present:t,children:n}=e,r=Xy(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),s=Ky(r.ref,qy(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:s}):null};Oo.displayName="Presence";function Xy(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),s=l.useRef("none"),i=l.useRef(void 0),c=e?"mounted":"unmounted",[a,u]=Yy(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{a==="mounted"?(s.current=i.current??lr(r.current),i.current=void 0):s.current="none"},[a]),mt(()=>{const d=r.current,f=o.current;if(f!==e){const h=s.current,v=lr(d);e?(i.current=v,u("MOUNT")):v==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&h!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),mt(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,y=v=>{const g=lr(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&g&&(u("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=v=>{v.target===t&&(s.current=lr(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:l.useCallback(d=>{if(d){const f=getComputedStyle(d);r.current=f,i.current=lr(f)}else r.current=null;n(d)},[])}}function fa(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ky(...e){const t=l.useRef(e);return t.current=e,l.useCallback(n=>{const r=t.current;let o=!1;const s=r.map(i=>{const c=fa(i,n);return!o&&typeof c=="function"&&(o=!0),c});if(o)return()=>{for(let i=0;i<s.length;i++){const c=s[i];typeof c=="function"?c():fa(r[i],null)}}},[])}function lr(e){return(e==null?void 0:e.animationName)||"none"}function qy(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var $r=0,zt=null;function Sd(){l.useEffect(()=>{zt||(zt={start:pa(),end:pa()});const{start:e,end:t}=zt;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),$r++,()=>{$r===1&&(zt==null||zt.start.remove(),zt==null||zt.end.remove(),zt=null),$r=Math.max(0,$r-1)}},[])}function pa(){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 Gt=function(){return Gt=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},Gt.apply(this,arguments)};function Ed(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 Zy(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 Yr="right-scroll-bar-position",Xr="width-before-scroll-bar",Jy="with-scroll-bars-hidden",Qy="--removed-body-scroll-bar-size";function ls(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ew(e,t){var n=Z.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 tw=typeof window<"u"?l.useLayoutEffect:l.useEffect,ha=new WeakMap;function nw(e,t){var n=ew(null,function(r){return e.forEach(function(o){return ls(o,r)})});return tw(function(){var r=ha.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(c){s.has(c)||ls(c,null)}),s.forEach(function(c){o.has(c)||ls(c,i)})}ha.set(n,e)},[e]),n}function rw(e){return e}function ow(e,t){t===void 0&&(t=rw);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 i=t(s,r);return n.push(i),function(){n=n.filter(function(c){return c!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var c=n;n=[],c.forEach(s),i=n}var a=function(){var d=i;i=[],d.forEach(s)},u=function(){return Promise.resolve().then(a)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return o}function sw(e){e===void 0&&(e={});var t=ow(null);return t.options=Gt({async:!0,ssr:!1},e),t}var Cd=function(e){var t=e.sideCar,n=Ed(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 l.createElement(r,Gt({},n))};Cd.isSideCarExport=!0;function iw(e,t){return e.useMedium(t),Cd}var Rd=sw(),us=function(){},No=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:us,onWheelCapture:us,onTouchMoveCapture:us}),o=r[0],s=r[1],i=e.forwardProps,c=e.children,a=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,y=e.sideCar,h=e.noRelative,v=e.noIsolation,p=e.inert,g=e.allowPinchZoom,b=e.as,m=b===void 0?"div":b,S=e.gapMode,x=Ed(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=y,R=nw([n,t]),T=Gt(Gt({},x),o);return l.createElement(l.Fragment,null,d&&l.createElement(C,{sideCar:Rd,removeScrollBar:u,shards:f,noRelative:h,noIsolation:v,inert:p,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:S}),i?l.cloneElement(l.Children.only(c),Gt(Gt({},T),{ref:R})):l.createElement(m,Gt({},T,{className:a,ref:R}),c))});No.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};No.classNames={fullWidth:Xr,zeroRight:Yr};var cw=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function aw(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=cw();return t&&e.setAttribute("nonce",t),e}function lw(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function uw(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var dw=function(){var e=0,t=null;return{add:function(n){e==0&&(t=aw())&&(lw(t,n),uw(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fw=function(){var e=dw();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},kd=function(){var e=fw(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},pw={left:0,top:0,right:0,gap:0},ds=function(e){return parseInt(e||"",10)||0},hw=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[ds(n),ds(r),ds(o)]},mw=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pw;var t=hw(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])}},gw=kd(),Yn="data-scroll-locked",bw=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
116
|
+
.`.concat(Jy,` {
|
|
117
|
+
overflow: hidden `).concat(r,`;
|
|
118
|
+
padding-right: `).concat(c,"px ").concat(r,`;
|
|
119
|
+
}
|
|
120
|
+
body[`).concat(Yn,`] {
|
|
121
|
+
overflow: hidden `).concat(r,`;
|
|
122
|
+
overscroll-behavior: contain;
|
|
123
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
124
|
+
padding-left: `.concat(o,`px;
|
|
125
|
+
padding-top: `).concat(s,`px;
|
|
126
|
+
padding-right: `).concat(i,`px;
|
|
127
|
+
margin-left:0;
|
|
128
|
+
margin-top:0;
|
|
129
|
+
margin-right: `).concat(c,"px ").concat(r,`;
|
|
130
|
+
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.`).concat(Yr,` {
|
|
134
|
+
right: `).concat(c,"px ").concat(r,`;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.`).concat(Xr,` {
|
|
138
|
+
margin-right: `).concat(c,"px ").concat(r,`;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.`).concat(Yr," .").concat(Yr,` {
|
|
142
|
+
right: 0 `).concat(r,`;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.`).concat(Xr," .").concat(Xr,` {
|
|
146
|
+
margin-right: 0 `).concat(r,`;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
body[`).concat(Yn,`] {
|
|
150
|
+
`).concat(Qy,": ").concat(c,`px;
|
|
151
|
+
}
|
|
152
|
+
`)},ma=function(){var e=parseInt(document.body.getAttribute(Yn)||"0",10);return isFinite(e)?e:0},vw=function(){l.useEffect(function(){return document.body.setAttribute(Yn,(ma()+1).toString()),function(){var e=ma()-1;e<=0?document.body.removeAttribute(Yn):document.body.setAttribute(Yn,e.toString())}},[])},yw=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;vw();var s=l.useMemo(function(){return mw(o)},[o]);return l.createElement(gw,{styles:bw(s,!t,o,n?"":"!important")})},Bs=!1;if(typeof window<"u")try{var Vr=Object.defineProperty({},"passive",{get:function(){return Bs=!0,!0}});window.addEventListener("test",Vr,Vr),window.removeEventListener("test",Vr,Vr)}catch{Bs=!1}var Fn=Bs?{passive:!1}:!1,ww=function(e){return e.tagName==="TEXTAREA"},Pd=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ww(e)&&n[t]==="visible")},xw=function(e){return Pd(e,"overflowY")},Sw=function(e){return Pd(e,"overflowX")},ga=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Td(e,r);if(o){var s=Od(e,r),i=s[1],c=s[2];if(i>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ew=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Cw=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Td=function(e,t){return e==="v"?xw(t):Sw(t)},Od=function(e,t){return e==="v"?Ew(t):Cw(t)},Rw=function(e,t){return e==="h"&&t==="rtl"?-1:1},kw=function(e,t,n,r,o){var s=Rw(e,window.getComputedStyle(t).direction),i=s*r,c=n.target,a=t.contains(c),u=!1,d=i>0,f=0,y=0;do{if(!c)break;var h=Od(e,c),v=h[0],p=h[1],g=h[2],b=p-g-s*v;(v||b)&&Td(e,c)&&(f+=b,y+=v);var m=c.parentNode;c=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!a&&c!==document.body||a&&(t.contains(c)||t===c));return(d&&Math.abs(f)<1||!d&&Math.abs(y)<1)&&(u=!0),u},Br=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ba=function(e){return[e.deltaX,e.deltaY]},va=function(e){return e&&"current"in e?e.current:e},Pw=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Tw=function(e){return`
|
|
153
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
154
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
155
|
+
`)},Ow=0,$n=[];function Nw(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(Ow++)[0],s=l.useState(kd)[0],i=l.useRef(e);l.useEffect(function(){i.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=Zy([e.lockRef.current],(e.shards||[]).map(va),!0).filter(Boolean);return p.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=l.useCallback(function(p,g){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!i.current.allowPinchZoom;var b=Br(p),m=n.current,S="deltaX"in p?p.deltaX:m[0]-b[0],x="deltaY"in p?p.deltaY:m[1]-b[1],C,R=p.target,T=Math.abs(S)>Math.abs(x)?"h":"v";if("touches"in p&&T==="h"&&R.type==="range")return!1;var k=window.getSelection(),A=k&&k.anchorNode,H=A?A===R||A.contains(R):!1;if(H)return!1;var M=ga(T,R);if(!M)return!0;if(M?C=T:(C=T==="v"?"h":"v",M=ga(T,R)),!M)return!1;if(!r.current&&"changedTouches"in p&&(S||x)&&(r.current=C),!C)return!0;var O=r.current||C;return kw(O,g,p,O==="h"?S:x)},[]),a=l.useCallback(function(p){var g=p;if(!(!$n.length||$n[$n.length-1]!==s)){var b="deltaY"in g?ba(g):Br(g),m=t.current.filter(function(C){return C.name===g.type&&(C.target===g.target||g.target===C.shadowParent)&&Pw(C.delta,b)})[0];if(m&&m.should){g.cancelable&&g.preventDefault();return}if(!m){var S=(i.current.shards||[]).map(va).filter(Boolean).filter(function(C){return C.contains(g.target)}),x=S.length>0?c(g,S[0]):!i.current.noIsolation;x&&g.cancelable&&g.preventDefault()}}},[]),u=l.useCallback(function(p,g,b,m){var S={name:p,delta:g,target:b,should:m,shadowParent:Dw(b)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(x){return x!==S})},1)},[]),d=l.useCallback(function(p){n.current=Br(p),r.current=void 0},[]),f=l.useCallback(function(p){u(p.type,ba(p),p.target,c(p,e.lockRef.current))},[]),y=l.useCallback(function(p){u(p.type,Br(p),p.target,c(p,e.lockRef.current))},[]);l.useEffect(function(){return $n.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:y}),document.addEventListener("wheel",a,Fn),document.addEventListener("touchmove",a,Fn),document.addEventListener("touchstart",d,Fn),function(){$n=$n.filter(function(p){return p!==s}),document.removeEventListener("wheel",a,Fn),document.removeEventListener("touchmove",a,Fn),document.removeEventListener("touchstart",d,Fn)}},[]);var h=e.removeScrollBar,v=e.inert;return l.createElement(l.Fragment,null,v?l.createElement(s,{styles:Tw(o)}):null,h?l.createElement(yw,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Dw(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Aw=iw(Rd,Nw);var Ii=l.forwardRef(function(e,t){return l.createElement(No,Gt({},e,{ref:t,sideCar:Aw}))});Ii.classNames=No.classNames;var Iw=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Vn=new WeakMap,Wr=new WeakMap,zr={},fs=0,Nd=function(e){return e&&(e.host||Nd(e.parentNode))},_w=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Nd(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})},Mw=function(e,t,n,r){var o=_w(t,Array.isArray(e)?e:[e]);zr[n]||(zr[n]=new WeakMap);var s=zr[n],i=[],c=new Set,a=new Set(o),u=function(f){!f||c.has(f)||(c.add(f),u(f.parentNode))};o.forEach(u);var d=function(f){!f||a.has(f)||Array.prototype.forEach.call(f.children,function(y){if(c.has(y))d(y);else try{var h=y.getAttribute(r),v=h!==null&&h!=="false",p=(Vn.get(y)||0)+1,g=(s.get(y)||0)+1;Vn.set(y,p),s.set(y,g),i.push(y),p===1&&v&&Wr.set(y,!0),g===1&&y.setAttribute(n,"true"),v||y.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",y,b)}})};return d(t),c.clear(),fs++,function(){i.forEach(function(f){var y=Vn.get(f)-1,h=s.get(f)-1;Vn.set(f,y),s.set(f,h),y||(Wr.has(f)||f.removeAttribute(r),Wr.delete(f)),h||f.removeAttribute(n)}),fs--,fs||(Vn=new WeakMap,Vn=new WeakMap,Wr=new WeakMap,zr={})}},Dd=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Iw(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Mw(r,o,n,"aria-hidden")):function(){return null}},Do="Dialog",[Ad,lS]=ky(Do),[jw,$t]=Ad(Do),Id=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,c=l.useRef(null),a=l.useRef(null),[u,d]=mr({prop:r,defaultProp:o??!1,onChange:s,caller:Do});return w.jsx(jw,{scope:t,triggerRef:c,contentRef:a,contentId:On(),titleId:On(),descriptionId:On(),open:u,onOpenChange:d,onOpenToggle:l.useCallback(()=>d(f=>!f),[d]),modal:i,children:n})};Id.displayName=Do;var _d="DialogTrigger",Md=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=$t(_d,n),s=Ze(t,o.triggerRef);return w.jsx(cn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":Mi(o.open),...r,ref:s,onClick:hn(e.onClick,o.onOpenToggle)})});Md.displayName=_d;var _i="DialogPortal",[Lw,jd]=Ad(_i,{forceMount:void 0}),Ld=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=$t(_i,t);return w.jsx(Lw,{scope:t,forceMount:n,children:l.Children.map(r,i=>w.jsx(Oo,{present:n||s.open,children:w.jsx(xd,{asChild:!0,container:o,children:i})}))})};Ld.displayName=_i;var io="DialogOverlay",Fd=l.forwardRef((e,t)=>{const n=jd(io,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=$t(io,e.__scopeDialog);return s.modal?w.jsx(Oo,{present:r||s.open,children:w.jsx($w,{...o,ref:t})}):null});Fd.displayName=io;var Fw=Nn("DialogOverlay.RemoveScroll"),$w=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=$t(io,n),s=My(),i=Ze(t,s);return w.jsx(Ii,{as:Fw,allowPinchZoom:!0,shards:[o.contentRef],children:w.jsx(cn.div,{"data-state":Mi(o.open),...r,ref:i,style:{pointerEvents:"auto",...r.style}})})}),qn="DialogContent",$d=l.forwardRef((e,t)=>{const n=jd(qn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=$t(qn,e.__scopeDialog);return w.jsx(Oo,{present:r||s.open,children:s.modal?w.jsx(Vw,{...o,ref:t}):w.jsx(Bw,{...o,ref:t})})});$d.displayName=qn;var Vw=l.forwardRef((e,t)=>{const n=$t(qn,e.__scopeDialog),r=l.useRef(null),o=Ze(t,n.contentRef,r);return l.useEffect(()=>{const s=r.current;if(s)return Dd(s)},[]),w.jsx(Vd,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:hn(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:hn(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&s.preventDefault()}),onFocusOutside:hn(e.onFocusOutside,s=>s.preventDefault())})}),Bw=l.forwardRef((e,t)=>{const n=$t(qn,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return w.jsx(Vd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,c;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var a,u;(a=e.onInteractOutside)==null||a.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Vd=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,c=$t(qn,n);return Sd(),w.jsx(w.Fragment,{children:w.jsx(yd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:w.jsx(bd,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Mi(c.open),...i,ref:t,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})}),Bd="DialogTitle",Wd=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=$t(Bd,n);return w.jsx(cn.h2,{id:o.titleId,...r,ref:t})});Wd.displayName=Bd;var zd="DialogDescription",Hd=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=$t(zd,n);return w.jsx(cn.p,{id:o.descriptionId,...r,ref:t})});Hd.displayName=zd;var Ud="DialogClose",Gd=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=$t(Ud,n);return w.jsx(cn.button,{type:"button",...r,ref:t,onClick:hn(e.onClick,()=>o.onOpenChange(!1))})});Gd.displayName=Ud;function Mi(e){return e?"open":"closed"}const Yd=Id,Ww=Md,Xd=Ld,Kd=Gd,qd=Z.forwardRef(function({className:t,...n},r){return w.jsx(Fd,{ref:r,className:Oe("fixed inset-0 z-50 bg-black/50 opacity-100 transition-opacity duration-200 starting:opacity-0","data-[state=closed]:opacity-0",t),...n})}),Zd=Z.forwardRef(function({className:t,children:n,hideClose:r,...o},s){return w.jsxs(Xd,{children:[w.jsx(qd,{}),w.jsxs($d,{ref:s,className:Oe("bg-base-800 border-base-700 fixed top-1/2 left-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 overflow-hidden rounded-xl border p-4 opacity-100 shadow-lg outline-none transition-all duration-200 starting:scale-95 starting:opacity-0","data-[state=closed]:scale-95 data-[state=closed]:opacity-0",t),...o,children:[n,w.jsx(bn,{}),!r&&w.jsxs(Kd,{className:"text-base-400 hover:text-base-200 hover:bg-base-700 focus-visible:ring-primary-600 absolute top-4 right-4 z-10 cursor-pointer rounded-md p-1 transition-colors outline-none focus-visible:ring-2",children:[w.jsx(To,{className:"size-4"}),w.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}),Jd=Z.forwardRef(function({className:t,...n},r){return w.jsx("div",{ref:r,className:Oe("flex flex-col gap-1 pr-6 text-left",t),...n})}),Qd=Z.forwardRef(function({className:t,...n},r){return w.jsx("div",{ref:r,className:Oe("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...n})}),ef=Z.forwardRef(function({className:t,...n},r){return w.jsx(Wd,{ref:r,className:Oe("text-base-100 text-lg font-medium",t),...n})}),zw=Z.forwardRef(function({className:t,...n},r){return w.jsx(Hd,{ref:r,className:Oe("text-base-400 text-sm",t),...n})}),Hw=Sn({base:"animate-spin",variants:{size:{small:"w-5 h-5",medium:"w-6 h-6",large:"w-8 h-8"}},defaultVariants:{size:"medium"}});function tf({size:e}){return w.jsx("div",{className:Hw({size:e}),children:w.jsx("svg",{viewBox:"0 0 800 800",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("circle",{cx:"400",cy:"400",fill:"none",r:"200","stroke-width":"50","stroke-dasharray":"269 150",stroke:"currentColor",opacity:.5,"stroke-linecap":"round"})})})}const Uw=Sn({slots:{outer:"group relative z-10 block",chip:"pb-[2px] h-full",inner:"relative shadow-form border overflow-hidden animate-press"},variants:{corners:{sharp:{chip:rn.sharp,inner:Hn.sharp},round:{chip:rn.round,inner:Hn.round},circle:{chip:rn.circle,inner:Hn.circle}},leftCorners:{none:{},sharp:{chip:tn.sharp,inner:Un.sharp},round:{chip:tn.round,inner:Un.round},circle:{chip:tn.circle,inner:Un.circle}},size:{small:{inner:"py-0.5 px-3 text-xs h-5.5"},medium:{inner:"py-0.5 px-3 text-sm h-6.5"},large:{inner:"py-1 px-4 h-8.5"}},colour:{base:{inner:"bg-base-700 border-base-700/70 group-disabled:border-base-700/40 group-active:border-base-700/40 text-base-200",chip:"bg-base-800"},primary:{inner:"bg-primary-700 border-primary-600/60 group-disabled:border-primary-600/40 group-disabled:bg-primary-800/50 group-active:border-primary-600/40 text-primary-text",chip:"bg-primary-900"},negative:{inner:"bg-negative-700 border-negative-500/60 group-disabled:border-negative-600/40 group-active:border-negative-600/40 text-negative-text",chip:"bg-negative-900"},positive:{inner:"bg-positive-700 border-positive-600/70 group-disabled:border-positive-600/40 group-active:border-positive-600/40 text-positive-text",chip:"bg-positive-900"},warning:{inner:"bg-warning-500 border-warning-400/60 group-disabled:border-warning-400/40 group-active:border-warning-400/40 text-warning-text",chip:"bg-warning-800"},invert:{inner:"bg-base-300 border-base-300/70 group-disabled:border-base-300/40 group-active:border-base-300/40 text-base-800",chip:"bg-base-400"}},width:{fit:{},grow:{outer:"w-full",inner:"w-full"}},icon:{true:{},false:{}}},compoundVariants:[{size:"small",icon:!0,class:{inner:"size-5.5 flex items-center justify-center p-0 [&_svg]:size-3"}},{size:"medium",icon:!0,class:{inner:"size-6.5 flex items-center justify-center p-0 [&_svg]:size-3.5"}},{size:"large",icon:!0,class:{inner:"size-8.5 flex items-center justify-center p-0 [&_svg]:size-4"}}],defaultVariants:{size:"large",colour:"base",corners:"round",leftCorners:"none",icon:!1}}),Ws=Object.assign(Z.forwardRef(function(t,n){const{size:r="large",colour:o,width:s,corners:i,leftCorners:c,icon:a,loading:u,children:d,className:f,disabled:y,asChild:h,...v}=t,{outer:p,chip:g,inner:b}=Uw({size:r,colour:o,width:s,corners:i,leftCorners:c,icon:a}),m=u?"cursor-progress":y?"cursor-not-allowed":"cursor-pointer",S=x=>w.jsx("div",{className:g(),children:w.jsxs("div",{className:b(),children:[w.jsx("span",{className:"relative z-10 block text-inherit group-disabled:opacity-50",style:{visibility:u?"hidden":"visible"},children:x}),u&&w.jsx("div",{className:"absolute inset-0 flex h-full w-full items-center justify-center",children:w.jsx(tf,{size:r})}),w.jsx(bn,{})]})});if(h&&Z.isValidElement(d)){const x=d;return w.jsx(vr,{corners:i,leftCorners:c,children:w.jsx(wn,{ref:n,className:p({className:Oe(m,f)}),"aria-busy":u||void 0,...v,children:Z.cloneElement(x,void 0,S(x.props.children))})})}return w.jsx(vr,{corners:i,leftCorners:c,children:w.jsx("button",{ref:n,type:"button",className:p({className:Oe(m,f)}),disabled:y||u,"aria-busy":u,...v,children:S(d)})})}),{_rabbet:!0});function Gw({isActive:e,ok:t,cancel:n,reject:r,title:o,children:s,onConfirm:i,onCancel:c,confirmButtonProps:a,cancelButtonProps:u,...d}){const[f,y]=Z.useState(!1),[h,v]=Z.useState(!1),p=f||h,{children:g="Confirm",...b}=a??{},{children:m="Cancel",...S}=u??{},x=Z.useCallback(async()=>{y(!0);try{if(!i)return;const R=await i();t(R)}catch(R){throw r(R),R}finally{y(!1)}},[i,t,r]),C=Z.useCallback(async()=>{if(c){v(!0);try{await c()}finally{v(!1)}}n()},[c,n]);return w.jsx(Yd,{open:e,onOpenChange:R=>{!R&&!p&&C()},children:w.jsxs(Zd,{...d,className:Oe("gap-0 overflow-hidden p-0",d.className),children:[w.jsx(Jd,{className:"border-base-700 shadow-base-900 border-b p-4 shadow-[inset_0_-1px_6px]",children:o!=null&&o!==""&&w.jsx(ef,{children:o})}),s&&w.jsx("div",{className:"text-base-300 max-h-[50vh] overflow-y-auto px-4 py-5",children:s}),w.jsxs(Qd,{className:"p-4",children:[w.jsx(Ws,{type:"button",colour:"base",...S,disabled:p||S.disabled,loading:h,onClick:async()=>await C(),children:m}),i&&w.jsx(Ws,{type:"button",colour:"primary",...b,disabled:p||b.disabled,loading:f,onClick:async()=>await x(),children:g})]})]})})}const Yw=({children:e,size:t="medium",corners:n="circle",className:r})=>{const o=Z.Children.toArray(e);return w.jsx(qf,{className:Oe("bg-base-900 shadow-base-950/5 w-fit gap-0 shadow-[0_0_5px_3px]",rn[n],"[&>*]:relative [&>*:focus-within]:z-10","[&>[data-rabbet]+[data-rabbet]]:-ms-[1px] [&>[data-rabbet]:not(:first-child)]:border-l-0","[&>[data-rabbet]:has(+[data-rabbet])]:border-r-0","[&>:not([data-rabbet]):not(:first-child)]:-ms-[1px]",r),children:o.map((s,i)=>{const c=o.length===1,a=i===0,u=i===o.length-1,d={size:t,corners:c||u?n:"sharp",leftCorners:c?"none":a?n:"sharp"};return Z.cloneElement(s,d)})})};function Xw(){const e=Z.useRef(null),[t,n]=Z.useState(0);return Z.useLayoutEffect(()=>{const r=e.current;if(!r)return;n(r.getBoundingClientRect().width);const o=new ResizeObserver(([s])=>{n(s.contentRect.width)});return o.observe(r),()=>o.disconnect()},[]),[e,t]}const Kw=36,zs=40,ps=2;function hs(e,t,n){return Math.min(Math.max(e,t),n)}function qw({active:e,disabled:t,ariaLabel:n,offset:r,onClick:o,className:s,children:i}){return w.jsx(vr,{corners:"circle",className:Oe("absolute top-1 left-0 h-7 p-px transition-transform duration-200",t&&"opacity-50",s),style:{width:zs,transform:`translateX(${r}px)`},children:w.jsx("button",{type:"button",disabled:t,"aria-pressed":e,"aria-label":n,onClick:o,className:Oe("flex h-full w-full cursor-pointer items-center justify-center rounded-[inherit] border font-bold transition-colors duration-200 select-none",e?"bg-primary-600 border-primary-500 text-primary-text shadow-inner":"bg-base-800 border-base-700 text-base-500 hover:text-base-300",typeof i=="string"&&i.length>2?"text-[9px]":"text-[11px]"),children:i})})}function Zw({value:e,onChange:t,min:n=0,max:r,increment:o=1,targetBubbleCount:s=5,formatValue:i,palette:c="violet",disabled:a,className:u,bubbleClassName:d,trackClassName:f}){const[y,h]=Xw(),v=n===0&&r===1&&o===1,p=0,g=r!==void 0?Math.floor((r-n)/o):void 0,b=Math.round((e-n)/o),m=g!==void 0?hs(b,p,g):Math.max(b,p),S=h>0?hs(Math.floor(h/zs),1,s):s;let x,C,R;if(v)x=[0,1],C=0,R=1;else{const M=Math.floor((S-1)/2);C=m-M,R=C+S-1,C<p&&(R+=p-C,C=p),g!==void 0&&R>g&&(C-=R-g,R=g,C<p&&(C=p));const O=Math.max(p,C-ps),P=g!==void 0?Math.min(g,R+ps):R+ps;x=[];for(let N=O;N<=P;N++)x.push(N)}const T=(C+R)/2,A=h/(v?2:S),H=R>C?(hs(m,C,R)-C)/(R-C)*100:0;return w.jsx(yo,{primary:c,children:w.jsxs("div",{ref:y,className:Oe("relative",u),style:{height:Kw},children:[w.jsx("div",{className:"bg-base-800 absolute top-1/2 h-1 -translate-y-1/2 overflow-hidden rounded-full",style:{left:A/2,width:h-A},children:w.jsx("div",{className:Oe("bg-primary-700 h-full transition-[width] duration-200",f),style:{width:`${H}%`}})}),w.jsx("div",{className:"relative h-full overflow-hidden",children:x.map(M=>{const O=n+M*o,P=v?M===m:M<=m,N=h/2-zs/2+(M-T)*A;return w.jsx(qw,{active:P,disabled:a,ariaLabel:v?M===1?"Yes":"No":String(O),offset:N,onClick:()=>t(O),className:d,children:v?M===1?w.jsx(Di,{className:"size-3.5"}):w.jsx(To,{className:"size-3.5"}):i?i(O):O},M)})})]})})}function nf(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ao="Checkbox",[Jw,uS]=Cr(Ao),[Qw,ji]=Jw(Ao);function ex(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:c,onCheckedChange:a,required:u,value:d="on",internal_do_not_use_render:f}=e,[y,h]=mr({prop:n,defaultProp:o??!1,onChange:a,caller:Ao}),[v,p]=l.useState(null),[g,b]=l.useState(null),m=l.useRef(!1),S=v?!!i||!!v.closest("form"):!0,x={checked:y,disabled:s,setChecked:h,control:v,setControl:p,name:c,form:i,value:d,hasConsumerStoppedPropagationRef:m,required:u,defaultChecked:mn(o)?!1:o,isFormControl:S,bubbleInput:g,setBubbleInput:b};return w.jsx(Qw,{scope:t,...x,children:tx(f)?f(x):r})}var rf="CheckboxTrigger",of=l.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:i,disabled:c,checked:a,required:u,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:y,isFormControl:h,bubbleInput:v}=ji(rf,e),p=Ze(o,d),g=l.useRef(a);return l.useEffect(()=>{const b=s==null?void 0:s.form;if(b){const m=()=>f(g.current);return b.addEventListener("reset",m),()=>b.removeEventListener("reset",m)}},[s,f]),w.jsx(ct.button,{type:"button",role:"checkbox","aria-checked":mn(a)?"mixed":a,"aria-required":u,"data-state":df(a),"data-disabled":c?"":void 0,disabled:c,value:i,...r,ref:p,onKeyDown:qe(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:qe(n,b=>{f(m=>mn(m)?!0:!m),v&&h&&(y.current=b.isPropagationStopped(),y.current||b.stopPropagation())})})});of.displayName=rf;var sf=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:c,value:a,onCheckedChange:u,form:d,...f}=e;return w.jsx(ex,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:c,required:i,onCheckedChange:u,name:r,form:d,value:a,internal_do_not_use_render:({isFormControl:y})=>w.jsxs(w.Fragment,{children:[w.jsx(of,{...f,ref:t,__scopeCheckbox:n}),y&&w.jsx(uf,{__scopeCheckbox:n})]})})});sf.displayName=Ao;var cf="CheckboxIndicator",af=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=ji(cf,n);return w.jsx(Rr,{present:r||mn(s.checked)||s.checked===!0,children:w.jsx(ct.span,{"data-state":df(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});af.displayName=cf;var lf="CheckboxBubbleInput",uf=l.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:c,disabled:a,name:u,value:d,form:f,bubbleInput:y,setBubbleInput:h}=ji(lf,e),v=Ze(n,h),p=nf(s),g=rl(r);l.useEffect(()=>{const m=y;if(!m)return;const S=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(S,"checked").set,R=!o.current;if(p!==s&&C){const T=new Event("click",{bubbles:R});m.indeterminate=mn(s),C.call(m,mn(s)?!1:s),m.dispatchEvent(T)}},[y,p,s,o]);const b=l.useRef(mn(s)?!1:s);return w.jsx(ct.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??b.current,required:c,disabled:a,name:u,value:d,form:f,...t,tabIndex:-1,ref:v,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});uf.displayName=lf;function tx(e){return typeof e=="function"}function mn(e){return e==="indeterminate"}function df(e){return mn(e)?"indeterminate":e?"checked":"unchecked"}const nx=Sn({slots:{outer:"",input:"w-full h-full border-base-700 bg-base-800 text-primary-text data-[state=checked]:bg-primary-700 data-[state=checked]:border-primary-600 focus-visible:border-primary-600 flex cursor-pointer items-center justify-center border transition-colors outline-none disabled:cursor-not-allowed"},variants:{size:{small:{outer:"size-7",input:"[&_svg]:size-3.5"},medium:{outer:"size-8",input:"[&_svg]:size-4"},large:{outer:"size-9",input:"[&_svg]:size-5"}},corners:{sharp:{input:Hn.sharp},round:{input:Hn.round},circle:{input:Hn.circle}},leftCorners:{none:{},sharp:{input:Un.sharp},round:{input:Un.round},circle:{input:Un.circle}}},defaultVariants:{size:"medium",corners:"round",leftCorners:"none"}}),rx=Object.assign(Z.forwardRef(function({className:t,size:n,corners:r,leftCorners:o,disabled:s,icon:i=w.jsx(Di,{}),...c},a){const u=s?"cursor-not-allowed":"cursor-pointer",{outer:d,input:f}=nx({size:n,corners:r,leftCorners:o});return w.jsx(vr,{corners:r,leftCorners:o,className:Oe(u,s&&"opacity-50",d(),t),children:w.jsx(sf,{ref:a,className:f(),disabled:s,...c,children:w.jsx(af,{className:"flex items-center justify-center",children:i})})})}),{_rabbet:!0}),ox=Sn({slots:{root:"relative w-full",field:"bg-base-800 border-base-700 text-base-200 shadow-base-900 focus-visible:shadow-base-950 placeholder:text-base-500 focus-visible:border-primary-600 w-full border shadow-[inset_0_1px_6px_1px] transition-colors outline-none disabled:cursor-not-allowed disabled:opacity-50",icon:"text-base-400 pointer-events-none absolute top-1/2 flex -translate-y-1/2 items-center justify-center"},variants:{size:{small:{field:"h-7 px-2.5 text-xs",icon:"[&_svg]:size-3.5"},medium:{field:"h-8 px-3 text-sm",icon:"[&_svg]:size-4"},large:{field:"h-9 px-3 text-sm",icon:"[&_svg]:size-4"}},corners:{sharp:{field:rn.sharp},round:{field:rn.round},circle:{field:rn.circle}},leftCorners:{none:{field:tn.none},sharp:{field:tn.sharp},round:{field:tn.round},circle:{field:tn.circle}}},defaultVariants:{size:"large",corners:"round",leftCorners:"none"}}),sx=Z.forwardRef(function({className:t,type:n="text",size:r,corners:o,leftCorners:s,startIcon:i,endIcon:c,clearable:a,value:u,defaultValue:d,onChange:f,...y},h){const v=Z.useRef(null),p=u!==void 0,[g,b]=Z.useState(()=>!!d),m=p?!!u:g,{root:S,field:x,icon:C}=ox({size:r,corners:o,leftCorners:s}),R=!!i,T=!!a||!!c,k=!!a&&m,A=N=>{v.current=N,typeof h=="function"?h(N):h&&(h.current=N)},H=N=>{p||b(N.target.value.length>0),f==null||f(N)},M=()=>{var j;const N=v.current;if(!N)return;const B=(j=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:j.set;B==null||B.call(N,""),N.dispatchEvent(new Event("input",{bubbles:!0})),N.focus()},O=w.jsx("input",{ref:A,type:n,value:u,defaultValue:d,onChange:H,className:Oe(x(),R&&"pl-9",T&&"pr-9",t),...y});if(!R&&!T)return O;const P=k?w.jsx("button",{type:"button","aria-label":"Clear",onMouseDown:N=>N.preventDefault(),onClick:M,className:"text-base-400 hover:text-base-200 flex cursor-pointer items-center transition-colors",children:w.jsx(To,{})}):c;return w.jsxs("div",{className:S(),children:[R&&w.jsx("span",{className:Oe(C(),"left-3"),children:i}),O,P&&w.jsx("span",{className:Oe(C(),"pointer-events-auto right-3"),children:P})]})});function ya(e,[t,n]){return Math.min(n,Math.max(t,e))}function ix(e){const t=e+"CollectionProvider",[n,r]=Cr(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=p=>{const{scope:g,children:b}=p,m=l.useRef(null),S=l.useRef(new Map).current;return w.jsx(o,{scope:g,itemMap:S,collectionRef:m,children:b})};i.displayName=t;const c=e+"CollectionSlot",a=Nn(c),u=l.forwardRef((p,g)=>{const{scope:b,children:m}=p,S=s(c,b),x=Ze(g,S.collectionRef);return w.jsx(a,{ref:x,children:m})});u.displayName=c;const d=e+"CollectionItemSlot",f="data-radix-collection-item",y=Nn(d),h=l.forwardRef((p,g)=>{const{scope:b,children:m,...S}=p,x=l.useRef(null),C=Ze(g,x),R=s(d,b);return l.useEffect(()=>(R.itemMap.set(x,{ref:x,...S}),()=>void R.itemMap.delete(x))),w.jsx(y,{[f]:"",ref:C,children:m})});h.displayName=d;function v(p){const g=s(e+"CollectionConsumer",p);return l.useCallback(()=>{const m=g.collectionRef.current;if(!m)return[];const S=Array.from(m.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((R,T)=>S.indexOf(R.ref.current)-S.indexOf(T.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},v,r]}var cx=l.createContext(void 0);function ax(e){const t=l.useContext(cx);return e||t||"ltr"}var ms="focusScope.autoFocusOnMount",gs="focusScope.autoFocusOnUnmount",wa={bubbles:!1,cancelable:!0},lx="FocusScope",ff=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[c,a]=l.useState(null),u=Dt(o),d=Dt(s),f=l.useRef(null),y=Ze(t,p=>a(p)),h=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let p=function(S){if(h.paused||!c)return;const x=S.target;c.contains(x)?f.current=x:fn(f.current,{select:!0})},g=function(S){if(h.paused||!c)return;const x=S.relatedTarget;x!==null&&(c.contains(x)||fn(f.current,{select:!0}))},b=function(S){if(document.activeElement===document.body)for(const C of S)C.removedNodes.length>0&&fn(c)};document.addEventListener("focusin",p),document.addEventListener("focusout",g);const m=new MutationObserver(b);return c&&m.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",g),m.disconnect()}}},[r,c,h.paused]),l.useEffect(()=>{if(c){Sa.add(h);const p=document.activeElement;if(!c.contains(p)){const b=new CustomEvent(ms,wa);c.addEventListener(ms,u),c.dispatchEvent(b),b.defaultPrevented||(ux(mx(pf(c)),{select:!0}),document.activeElement===p&&fn(c))}return()=>{c.removeEventListener(ms,u),setTimeout(()=>{const b=new CustomEvent(gs,wa);c.addEventListener(gs,d),c.dispatchEvent(b),b.defaultPrevented||fn(p??document.body,{select:!0}),c.removeEventListener(gs,d),Sa.remove(h)},0)}}},[c,u,d,h]);const v=l.useCallback(p=>{if(!n&&!r||h.paused)return;const g=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,b=document.activeElement;if(g&&b){const m=p.currentTarget,[S,x]=dx(m);S&&x?!p.shiftKey&&b===x?(p.preventDefault(),n&&fn(S,{select:!0})):p.shiftKey&&b===S&&(p.preventDefault(),n&&fn(x,{select:!0})):b===m&&p.preventDefault()}},[n,r,h.paused]);return w.jsx(ct.div,{tabIndex:-1,...i,ref:y,onKeyDown:v})});ff.displayName=lx;function ux(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(fn(r,{select:t}),document.activeElement!==n)return}function dx(e){const t=pf(e),n=xa(t,e),r=xa(t.reverse(),e);return[n,r]}function pf(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 xa(e,t){for(const n of e)if(!fx(n,{upTo:t}))return n}function fx(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 px(e){return e instanceof HTMLInputElement&&"select"in e}function fn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&px(e)&&t&&e.select()}}var Sa=hx();function hx(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ea(e,t),e.unshift(t)},remove(t){var n;e=Ea(e,t),(n=e[0])==null||n.resume()}}}function Ea(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function mx(e){return e.filter(t=>t.tagName!=="A")}var gx=[" ","Enter","ArrowUp","ArrowDown"],bx=[" ","Enter"],_n="Select",[Io,_o,vx]=ix(_n),[Ln,dS]=Cr(_n,[vx,po]),Mo=po(),[yx,Cn]=Ln(_n),[wx,xx]=Ln(_n),Sx="SelectProvider";function hf(e){const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:c,onValueChange:a,dir:u,name:d,autoComplete:f,disabled:y,required:h,form:v,internal_do_not_use_render:p}=e,g=Mo(t),[b,m]=l.useState(null),[S,x]=l.useState(null),[C,R]=l.useState(!1),T=ax(u),[k,A]=mr({prop:r,defaultProp:o??!1,onChange:s,caller:_n}),[H,M]=mr({prop:i,defaultProp:c,onChange:a,caller:_n}),O=l.useRef(null),P=b?!!v||!!b.closest("form"):!0,[N,B]=l.useState(new Set),j=On(),W=Array.from(N).map(le=>le.props.value).join(";"),L=l.useCallback(le=>{B(te=>new Set(te).add(le))},[]),U=l.useCallback(le=>{B(te=>{const be=new Set(te);return be.delete(le),be})},[]),D={required:h,trigger:b,onTriggerChange:m,valueNode:S,onValueNodeChange:x,valueNodeHasChildren:C,onValueNodeHasChildrenChange:R,contentId:j,value:H,onValueChange:M,open:k,onOpenChange:A,dir:T,triggerPointerDownPosRef:O,disabled:y,name:d,autoComplete:f,form:v,nativeOptions:N,nativeSelectKey:W,isFormControl:P};return w.jsx(fl,{...g,children:w.jsx(yx,{scope:t,...D,children:w.jsx(Io.Provider,{scope:t,children:w.jsx(wx,{scope:t,onNativeOptionAdd:L,onNativeOptionRemove:U,children:Fx(p)?p(D):n})})})})}hf.displayName=Sx;var mf=e=>{const{__scopeSelect:t,children:n,...r}=e;return w.jsx(hf,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:o})=>w.jsxs(w.Fragment,{children:[n,o?w.jsx(Bf,{__scopeSelect:t}):null]})})};mf.displayName=_n;var gf="SelectTrigger",bf=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Mo(n),i=Cn(gf,n),c=i.disabled||r,a=Ze(t,i.onTriggerChange),u=_o(n),d=l.useRef("touch"),[f,y,h]=Wf(p=>{const g=u().filter(S=>!S.disabled),b=g.find(S=>S.value===i.value),m=zf(g,p,b);m!==void 0&&i.onValueChange(m.value)}),v=p=>{c||(i.onOpenChange(!0),h()),p&&(i.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return w.jsx(pl,{asChild:!0,...s,children:w.jsx(ct.button,{type:"button",role:"combobox","aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":jo(i.value)?"":void 0,...o,ref:a,onClick:qe(o.onClick,p=>{p.currentTarget.focus(),d.current!=="mouse"&&v(p)}),onPointerDown:qe(o.onPointerDown,p=>{d.current=p.pointerType;const g=p.target;g.hasPointerCapture(p.pointerId)&&g.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(v(p),p.preventDefault())}),onKeyDown:qe(o.onKeyDown,p=>{const g=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&y(p.key),!(g&&p.key===" ")&&gx.includes(p.key)&&(v(),p.preventDefault())})})})});bf.displayName=gf;var vf="SelectValue",yf=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...c}=e,a=Cn(vf,n),{onValueNodeHasChildrenChange:u}=a,d=s!==void 0,f=Ze(t,a.onValueNodeChange);mt(()=>{u(d)},[u,d]);const y=jo(a.value);return w.jsx(ct.span,{...c,asChild:y?!1:c.asChild,ref:f,style:{pointerEvents:"none"},children:w.jsx(l.Fragment,{children:y?i:s},y?"placeholder":"value")})});yf.displayName=vf;var Ex="SelectIcon",wf=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return w.jsx(ct.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});wf.displayName=Ex;var xf="SelectPortal",[Cx,Rx]=Ln(xf,{forceMount:void 0}),Li=e=>{const{__scopeSelect:t,forceMount:n,...r}=e;return w.jsx(Cx,{scope:e.__scopeSelect,forceMount:n,children:w.jsx(ci,{asChild:!0,...r})})};Li.displayName=xf;var vn="SelectContent",Sf=l.forwardRef((e,t)=>{const n=Rx(vn,e.__scopeSelect),{forceMount:r=n.forceMount,...o}=e,s=Cn(vn,e.__scopeSelect),[i,c]=l.useState();return mt(()=>{c(new DocumentFragment)},[]),w.jsx(Rr,{present:r||s.open,children:({present:a})=>a?w.jsx(Rf,{...o,ref:t}):w.jsx(Ef,{...o,fragment:i})})});Sf.displayName=vn;var Ef=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,fragment:o}=e;return o?Ft.createPortal(w.jsx(Cf,{scope:n,children:w.jsx(Io.Slot,{scope:n,children:w.jsx("div",{ref:t,children:r})})}),o):null});Ef.displayName="SelectContentFragment";var It=10,[Cf,Rn]=Ln(vn),kx="SelectContentImpl",Px=Nn("SelectContent.RemoveScroll"),Rf=l.forwardRef((e,t)=>{const{__scopeSelect:n}=e,{position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:c,sideOffset:a,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:y,collisionPadding:h,sticky:v,hideWhenDetached:p,avoidCollisions:g,...b}=e,m=Cn(vn,n),[S,x]=l.useState(null),[C,R]=l.useState(null),T=Ze(t,Y=>x(Y)),[k,A]=l.useState(null),[H,M]=l.useState(null),O=_o(n),[P,N]=l.useState(!1),B=l.useRef(!1);l.useEffect(()=>{if(S)return Dd(S)},[S]),Sd();const j=l.useCallback(Y=>{const[z,...J]=O().map(V=>V.ref.current),[re]=J.slice(-1),K=document.activeElement;for(const V of Y)if(V===K||(V==null||V.scrollIntoView({block:"nearest"}),V===z&&C&&(C.scrollTop=0),V===re&&C&&(C.scrollTop=C.scrollHeight),V==null||V.focus(),document.activeElement!==K))return},[O,C]),W=l.useCallback(()=>j([k,S]),[j,k,S]);l.useEffect(()=>{P&&W()},[P,W]);const{onOpenChange:L,triggerPointerDownPosRef:U}=m;l.useEffect(()=>{if(S){let Y={x:0,y:0};const z=re=>{var K,V;Y={x:Math.abs(Math.round(re.pageX)-(((K=U.current)==null?void 0:K.x)??0)),y:Math.abs(Math.round(re.pageY)-(((V=U.current)==null?void 0:V.y)??0))}},J=re=>{Y.x<=10&&Y.y<=10?re.preventDefault():re.composedPath().includes(S)||L(!1),document.removeEventListener("pointermove",z),U.current=null};return U.current!==null&&(document.addEventListener("pointermove",z),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",z),document.removeEventListener("pointerup",J,{capture:!0})}}},[S,L,U]),l.useEffect(()=>{const Y=()=>L(!1);return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[L]);const[D,le]=Wf(Y=>{const z=O().filter(K=>!K.disabled),J=z.find(K=>K.ref.current===document.activeElement),re=zf(z,Y,J);re&&setTimeout(()=>{var K;return(K=re.ref.current)==null?void 0:K.focus()})}),te=l.useCallback((Y,z,J)=>{const re=!B.current&&!J;(m.value!==void 0&&m.value===z||re)&&(A(Y),re&&(B.current=!0))},[m.value]),be=l.useCallback(()=>S==null?void 0:S.focus(),[S]),Se=l.useCallback((Y,z,J)=>{const re=!B.current&&!J;(m.value!==void 0&&m.value===z||re)&&M(Y)},[m.value]),pe=r==="popper"?Hs:kf,ge=pe===Hs?{side:c,sideOffset:a,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:y,collisionPadding:h,sticky:v,hideWhenDetached:p,avoidCollisions:g}:{};return w.jsx(Cf,{scope:n,content:S,viewport:C,onViewportChange:R,itemRefCallback:te,selectedItem:k,onItemLeave:be,itemTextRefCallback:Se,focusSelectedItem:W,selectedItemText:H,position:r,isPositioned:P,searchRef:D,children:w.jsx(Ii,{as:Px,allowPinchZoom:!0,children:w.jsx(ff,{asChild:!0,trapped:m.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:qe(o,Y=>{var z;(z=m.trigger)==null||z.focus({preventScroll:!0}),Y.preventDefault()}),children:w.jsx(qs,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:w.jsx(pe,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:Y=>Y.preventDefault(),...b,...ge,onPlaced:()=>N(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:qe(b.onKeyDown,Y=>{const z=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!z&&Y.key.length===1&&le(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let re=O().filter(K=>!K.disabled).map(K=>K.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(re=re.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const K=Y.target,V=re.indexOf(K);re=re.slice(V+1)}setTimeout(()=>j(re)),Y.preventDefault()}})})})})})})});Rf.displayName=kx;var Tx="SelectItemAlignedPosition",kf=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=Cn(vn,n),i=Rn(vn,n),[c,a]=l.useState(null),[u,d]=l.useState(null),f=Ze(t,T=>d(T)),y=_o(n),h=l.useRef(!1),v=l.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:b,focusSelectedItem:m}=i,S=l.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&u&&p&&g&&b){const T=s.trigger.getBoundingClientRect(),k=u.getBoundingClientRect(),A=s.valueNode.getBoundingClientRect(),H=b.getBoundingClientRect();if(s.dir!=="rtl"){const K=H.left-k.left,V=A.left-K,he=T.left-V,Q=T.width+he,Ne=Math.max(Q,k.width),De=window.innerWidth-It,ue=ya(V,[It,Math.max(It,De-Ne)]);c.style.minWidth=Q+"px",c.style.left=ue+"px"}else{const K=k.right-H.right,V=window.innerWidth-A.right-K,he=window.innerWidth-T.right-V,Q=T.width+he,Ne=Math.max(Q,k.width),De=window.innerWidth-It,ue=ya(V,[It,Math.max(It,De-Ne)]);c.style.minWidth=Q+"px",c.style.right=ue+"px"}const M=y(),O=window.innerHeight-It*2,P=p.scrollHeight,N=window.getComputedStyle(u),B=parseInt(N.borderTopWidth,10),j=parseInt(N.paddingTop,10),W=parseInt(N.borderBottomWidth,10),L=parseInt(N.paddingBottom,10),U=B+j+P+L+W,D=Math.min(g.offsetHeight*5,U),le=window.getComputedStyle(p),te=parseInt(le.paddingTop,10),be=parseInt(le.paddingBottom,10),Se=T.top+T.height/2-It,pe=O-Se,ge=g.offsetHeight/2,Y=g.offsetTop+ge,z=B+j+Y,J=U-z;if(z<=Se){const K=M.length>0&&g===M[M.length-1].ref.current;c.style.bottom="0px";const V=u.clientHeight-p.offsetTop-p.offsetHeight,he=Math.max(pe,ge+(K?be:0)+V+W),Q=z+he;c.style.height=Q+"px"}else{const K=M.length>0&&g===M[0].ref.current;c.style.top="0px";const he=Math.max(Se,B+p.offsetTop+(K?te:0)+ge)+J;c.style.height=he+"px",p.scrollTop=z-Se+p.offsetTop}c.style.margin=`${It}px 0`,c.style.minHeight=D+"px",c.style.maxHeight=O+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[y,s.trigger,s.valueNode,c,u,p,g,b,s.dir,r]);mt(()=>S(),[S]);const[x,C]=l.useState();mt(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const R=l.useCallback(T=>{T&&v.current===!0&&(S(),m==null||m(),v.current=!1)},[S,m]);return w.jsx(Nx,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:h,onScrollButtonChange:R,children:w.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x},children:w.jsx(ct.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});kf.displayName=Tx;var Ox="SelectPopperPosition",Hs=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=It,...s}=e,i=Mo(n);return w.jsx(hl,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Hs.displayName=Ox;var[Nx,Fi]=Ln(vn,{}),Us="SelectViewport",Pf=l.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=Rn(Us,n),i=Fi(Us,n),c=Ze(t,s.onViewportChange),a=l.useRef(0);return w.jsxs(w.Fragment,{children:[w.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),w.jsx(Io.Slot,{scope:n,children:w.jsx(ct.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:qe(o.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:y}=i;if(y!=null&&y.current&&f){const h=Math.abs(a.current-d.scrollTop);if(h>0){const v=window.innerHeight-It*2,p=parseFloat(f.style.minHeight),g=parseFloat(f.style.height),b=Math.max(p,g);if(b<v){const m=b+h,S=Math.min(v,m),x=m-S;f.style.height=S+"px",f.style.bottom==="0px"&&(d.scrollTop=x>0?x:0,f.style.justifyContent="flex-end")}}}a.current=d.scrollTop})})})]})});Pf.displayName=Us;var Tf="SelectGroup",[Dx,Ax]=Ln(Tf),Of=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=On();return w.jsx(Dx,{scope:n,id:o,children:w.jsx(ct.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Of.displayName=Tf;var Nf="SelectLabel",Df=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ax(Nf,n);return w.jsx(ct.div,{id:o.id,...r,ref:t})});Df.displayName=Nf;var co="SelectItem",[Ix,Af]=Ln(co),If=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,c=Cn(co,n),a=Rn(co,n),u=c.value===r,[d,f]=l.useState(s??""),[y,h]=l.useState(!1),v=Ze(t,m=>{var S;return(S=a.itemRefCallback)==null?void 0:S.call(a,m,r,o)}),p=On(),g=l.useRef("touch"),b=()=>{o||(c.onValueChange(r),c.onOpenChange(!1))};return w.jsx(Ix,{scope:n,value:r,disabled:o,textId:p,isSelected:u,onItemTextChange:l.useCallback(m=>{f(S=>S||((m==null?void 0:m.textContent)??"").trim())},[]),children:w.jsx(Io.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:w.jsx(ct.div,{role:"option","aria-labelledby":p,"data-highlighted":y?"":void 0,"aria-selected":u&&y,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:v,onFocus:qe(i.onFocus,()=>h(!0)),onBlur:qe(i.onBlur,()=>h(!1)),onClick:qe(i.onClick,()=>{g.current!=="mouse"&&b()}),onPointerUp:qe(i.onPointerUp,()=>{g.current==="mouse"&&b()}),onPointerDown:qe(i.onPointerDown,m=>{g.current=m.pointerType}),onPointerMove:qe(i.onPointerMove,m=>{var S;g.current=m.pointerType,o?(S=a.onItemLeave)==null||S.call(a):g.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:qe(i.onPointerLeave,m=>{var S;m.currentTarget===document.activeElement&&((S=a.onItemLeave)==null||S.call(a))}),onKeyDown:qe(i.onKeyDown,m=>{var x;((x=a.searchRef)==null?void 0:x.current)!==""&&m.key===" "||(bx.includes(m.key)&&b(),m.key===" "&&m.preventDefault())})})})})});If.displayName=co;var dr="SelectItemText",_f=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=Cn(dr,n),c=Rn(dr,n),a=Af(dr,n),u=xx(dr,n),[d,f]=l.useState(null),y=Ze(t,b=>f(b),a.onItemTextChange,b=>{var m;return(m=c.itemTextRefCallback)==null?void 0:m.call(c,b,a.value,a.disabled)}),h=d==null?void 0:d.textContent,v=l.useMemo(()=>w.jsx("option",{value:a.value,disabled:a.disabled,children:h},a.value),[a.disabled,a.value,h]),{onNativeOptionAdd:p,onNativeOptionRemove:g}=u;return mt(()=>(p(v),()=>g(v)),[p,g,v]),w.jsxs(w.Fragment,{children:[w.jsx(ct.span,{id:a.textId,...s,ref:y}),a.isSelected&&i.valueNode&&!i.valueNodeHasChildren&&!jo(i.value)?Ft.createPortal(s.children,i.valueNode):null]})});_f.displayName=dr;var Mf="SelectItemIndicator",jf=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Af(Mf,n).isSelected?w.jsx(ct.span,{"aria-hidden":!0,...r,ref:t}):null});jf.displayName=Mf;var Gs="SelectScrollUpButton",_x=l.forwardRef((e,t)=>{const n=Rn(Gs,e.__scopeSelect),r=Fi(Gs,e.__scopeSelect),[o,s]=l.useState(!1),i=Ze(t,r.onScrollButtonChange);return mt(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=a.scrollTop>0;s(u)};const a=n.viewport;return c(),a.addEventListener("scroll",c),()=>a.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?w.jsx(Lf,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:a}=n;c&&a&&(c.scrollTop=c.scrollTop-a.offsetHeight)}}):null});_x.displayName=Gs;var Ys="SelectScrollDownButton",Mx=l.forwardRef((e,t)=>{const n=Rn(Ys,e.__scopeSelect),r=Fi(Ys,e.__scopeSelect),[o,s]=l.useState(!1),i=Ze(t,r.onScrollButtonChange);return mt(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=a.scrollHeight-a.clientHeight,d=Math.ceil(a.scrollTop)<u;s(d)};const a=n.viewport;return c(),a.addEventListener("scroll",c),()=>a.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?w.jsx(Lf,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:a}=n;c&&a&&(c.scrollTop=c.scrollTop+a.offsetHeight)}}):null});Mx.displayName=Ys;var Lf=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Rn("SelectScrollButton",n),i=l.useRef(null),c=_o(n),a=l.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return l.useEffect(()=>()=>a(),[a]),mt(()=>{var d;const u=c().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[c]),w.jsx(ct.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:qe(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:qe(o.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:qe(o.onPointerLeave,()=>{a()})})}),jx="SelectSeparator",Ff=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return w.jsx(ct.div,{"aria-hidden":!0,...r,ref:t})});Ff.displayName=jx;var $f="SelectArrow",Lx=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Mo(n);return Rn($f,n).position==="popper"?w.jsx(ml,{...o,...r,ref:t}):null});Lx.displayName=$f;var Vf="SelectBubbleInput",Bf=l.forwardRef(({__scopeSelect:e,...t},n)=>{const r=Cn(Vf,e),{value:o,onValueChange:s,required:i,disabled:c,name:a,autoComplete:u,form:d}=r,{nativeOptions:f,nativeSelectKey:y}=r,h=l.useRef(null),v=Ze(n,h),p=o??"",g=nf(p),b=Array.from(f).some(m=>(m.props.value??"")==="");return l.useEffect(()=>{const m=h.current;if(!m)return;const S=window.HTMLSelectElement.prototype,C=Object.getOwnPropertyDescriptor(S,"value").set;if(g!==p&&C){const R=new Event("change",{bubbles:!0});C.call(m,p),m.dispatchEvent(R)}},[g,p]),w.jsxs(ct.select,{"aria-hidden":!0,required:i,tabIndex:-1,name:a,autoComplete:u,disabled:c,form:d,onChange:m=>s(m.target.value),...t,style:{...gl,...t.style},ref:v,defaultValue:p,children:[jo(o)&&!b?w.jsx("option",{value:""}):null,Array.from(f)]},y)});Bf.displayName=Vf;function Fx(e){return typeof e=="function"}function jo(e){return e===""||e===void 0}function Wf(e){const t=Dt(e),n=l.useRef(""),r=l.useRef(0),o=l.useCallback(i=>{const c=n.current+i;t(c),function a(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>a(""),1e3))}(c)},[t]),s=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function zf(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=$x(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const a=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return a!==n?a:void 0}function $x(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Hf=mf,Vx=Of,Bx=yf,Wx=Li,zx=Sn({base:"group bg-base-800 border-base-700 text-base-200 shadow-form data-[placeholder]:text-base-400 hover:bg-base-700 focus-visible:border-primary-600 inline-flex min-w-40 cursor-pointer items-center justify-between gap-2 overflow-hidden border transition-colors outline-none disabled:cursor-not-allowed disabled:opacity-50",variants:{size:{small:"h-7 px-2.5 text-xs",medium:"h-8 px-3 text-sm",large:"h-9 px-3 text-sm"},corners:rn,leftCorners:tn},defaultVariants:{size:"large",corners:"round",leftCorners:"none"}}),Uf=Z.forwardRef(function({className:t,children:n,size:r,corners:o,leftCorners:s,...i},c){return w.jsxs(bf,{ref:c,className:Oe(zx({size:r,corners:o,leftCorners:s}),t),...i,children:[n,w.jsx(wf,{className:"text-base-400 transition-transform group-data-[state=open]:rotate-180",children:w.jsx(xy,{className:"size-4"})})]})}),Gf=Z.forwardRef(function({className:t,children:n,position:r="popper",...o},s){return w.jsx(Li,{children:w.jsx(Sf,{ref:s,position:r,className:Oe("border-base-700 bg-base-800 text-base-200 relative z-50 max-h-72 min-w-[var(--radix-select-trigger-width)] overflow-hidden rounded-lg border p-1 shadow-lg",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",t),...o,children:w.jsx(Pf,{children:n})})})}),Yf=Z.forwardRef(function({className:t,children:n,...r},o){return w.jsxs(If,{ref:o,className:Oe("text-base-200 data-[highlighted]:bg-base-700 data-[state=checked]:text-primary-text relative flex cursor-pointer items-center gap-2 rounded-md py-1.5 pr-8 pl-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[w.jsx(_f,{children:n}),w.jsx("span",{className:"absolute right-2 flex items-center",children:w.jsx(jf,{children:w.jsx(Di,{className:"size-4"})})})]})}),Hx=Z.forwardRef(function({className:t,...n},r){return w.jsx(Df,{ref:r,className:Oe("text-base-400 px-2 py-1.5 text-xs",t),...n})}),Ux=Z.forwardRef(function({className:t,...n},r){return w.jsx(Ff,{ref:r,className:Oe("bg-base-700 -mx-1 my-1 h-px",t),...n})});function Gx({items:e,value:t,defaultValue:n,onValueChange:r,placeholder:o="Select…",renderItem:s,renderSelected:i,className:c,size:a,corners:u,leftCorners:d,...f}){const[y,h]=Z.useState(n),v=t??y,p=e.find(m=>m.value===v),g=s??(m=>m.label??m.value),b=i??g;return w.jsxs(Hf,{value:t,defaultValue:n,onValueChange:m=>{h(m),r==null||r(m)},...f,children:[w.jsx(Uf,{className:c,size:a,corners:u,leftCorners:d,children:p?b(p):w.jsx("span",{className:"text-base-400",children:o})}),w.jsx(Gf,{children:e.map(m=>w.jsx(Yf,{value:m.value,disabled:m.disabled,children:g(m)},m.value))})]})}function Xf(e){return e<=0?null:e<=.25?900:e<=.5?800:e<=.75?700:e<=.9?600:e<=1?500:e<=1.25?400:e<=1.5?300:e<=2?200:e<=2.5?100:50}const Yx={50:200,100:300,200:400,300:400,400:500,500:600,600:800,700:900,800:950,900:950,950:950};function Xx(e){return Yx[e]??e}function Kr(e,t="primary"){return e===null?void 0:`var(--color-${t}-${e})`}function Kf(e){return e>0?(e-1)*10+100:void 0}const Kx=Sn({base:"relative w-3 aspect-square rounded-sm",variants:{clickable:{true:"cursor-pointer"},inStreak:{true:"ring-1 ring-primary-300"},connectsDown:{true:"after:absolute after:top-full after:h-1 after:w-1.5 after:left-1/2 after:-translate-x-1/2 after:bg-primary-300"}}});function qx({entry:e,goal:t,inStreak:n,connectsDown:r,tooltip:o,onClick:s}){const i=t>0?e.value/t:0,c=Xf(i),a=e.value>0?Math.min(.5+i*.5,1):.6,u=Kf(i),d=c!==null?Xx(c):null;return w.jsxs(go,{delayDuration:0,children:[w.jsx(bo,{asChild:!0,children:w.jsx("div",{onClick:s,className:Kx({inStreak:n,connectsDown:r,clickable:!!s}),style:{backgroundColor:Kr(d)??"var(--color-base-900)",transform:a!==1?`scale(${a})`:void 0},children:w.jsx("div",{className:Oe("absolute inset-x-0 top-0 bottom-[2px] flex items-center justify-center rounded-[inherit]",c===null?"border-base-950 border-t-2":""),style:{backgroundColor:Kr(c)??"var(--color-base-900)",filter:u!==void 0?`brightness(${u}%)`:void 0},children:e.marker&&w.jsx("div",{className:"bg-base-700/75 h-1.5 w-2 rounded-sm",style:{backgroundColor:Kr(d)}})})})}),w.jsx(vo,{children:o})]})}const Zx=["M","T","W","T","F","S","S"];function Jx({entries:e,goal:t=1,palette:n="violet",startDate:r,endDate:o,formatTooltip:s,onEntryClick:i,className:c}){const a=r??new Date(new Date().getFullYear(),0,1),u=o??new Date(new Date().getFullYear(),11,31),d=e.filter(g=>g.date>=a&&g.date<=u),f=(a.getDay()+6)%7,y=Math.ceil((f+d.length)/7),h=new Set;d.forEach((g,b)=>{g.value>=t&&h.add(b)});const v=new Set;d.forEach((g,b)=>{h.has(b)&&(h.has(b-1)||h.has(b+1))&&v.add(b)});const p=new Set;return d.forEach((g,b)=>{v.has(b)&&v.has(b+1)&&g.date.getDay()!==0&&p.add(b)}),w.jsx(yo,{primary:n,children:w.jsx("div",{className:Oe("text-base-500 relative w-full",c),children:w.jsxs("div",{className:"grid w-max grid-flow-col grid-rows-7 gap-1",style:{gridTemplateColumns:`1.125rem repeat(${y}, 0.75rem)`},children:[Zx.map((g,b)=>w.jsx("div",{className:"flex h-3 w-3 items-center justify-center text-[10px]",children:g},b)),Array.from({length:f},(g,b)=>w.jsx("div",{className:"aspect-square w-3"},`blank-${b}`)),d.map((g,b)=>w.jsx(qx,{entry:g,goal:t,inStreak:v.has(b),connectsDown:p.has(b),tooltip:s?s(g):g.date.toLocaleDateString(void 0,{weekday:"long",day:"numeric",month:"long"}),onClick:i?()=>i(g):void 0},g.date.valueOf()))]})})})}function Qx({entry:e,index:t,max:n,height:r,colourByValue:o,hovered:s,onHover:i,onClick:c,barClassName:a,formatTooltip:u,tooltipClassName:d}){const f=n>0?e.value/n:0,y=o?Xf(f):600,h=o?Kf(f):void 0,v=e.value>0?Math.max(f*r,4):0;return w.jsxs(go,{delayDuration:0,children:[w.jsx(bo,{asChild:!0,children:w.jsxs("div",{className:"group relative flex h-full min-w-0 flex-1 flex-col items-center justify-end",onMouseEnter:()=>i(t),onMouseLeave:()=>i(null),onFocus:()=>i(t),onBlur:()=>i(null),onClick:c,tabIndex:0,role:c?"button":void 0,"aria-label":`${e.label}: ${e.value}`,children:[w.jsx("div",{className:Oe("absolute inset-0 rounded-sm transition-opacity",s?"bg-base-700/40":"opacity-0")}),w.jsx("div",{className:Oe("relative z-10 w-full max-w-6 rounded transition-[filter]",c&&"cursor-pointer",a),style:{height:v,backgroundColor:Kr(y)??"var(--color-base-700)",filter:[h!==void 0?`brightness(${h}%)`:null,s?"brightness(1.15)":null].filter(Boolean).join(" ")||void 0}})]})}),w.jsx(vo,{className:Oe("max-w-48",d),children:u(e)})]})}function eS({data:e,max:t,height:n=192,palette:r="violet",thresholds:o=[],colourByValue:s=!0,formatTooltip:i=p=>`${p.label}: ${p.value}`,formatAxisLabel:c=p=>Math.round(p).toLocaleString(),onBarClick:a,title:u,className:d,innerClassName:f,barClassName:y,tooltipClassName:h,titleClassName:v}){const[p,g]=Z.useState(null),b=e.map(x=>x.value),m=o.map(x=>x.value),S=t??(Math.max(...b,...m,0)*1.1||1);return w.jsx(yo,{primary:r,children:w.jsx("div",{className:Oe("text-base-500 relative w-full",d),children:w.jsxs("div",{className:Oe("flex gap-3",f),children:[u&&w.jsx("div",{className:"absolute top-0 bottom-0 left-0 flex w-4 shrink-0 items-center justify-center pr-1",style:{height:n},children:w.jsx("span",{className:Oe("text-base-500 -rotate-90 text-[10px] whitespace-nowrap uppercase",v),children:u})}),w.jsxs("div",{className:"flex shrink-0 flex-col justify-between text-right text-[10px] whitespace-nowrap",style:{height:n},children:[w.jsx("span",{children:c(S)}),w.jsx("span",{children:c(0)})]}),w.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[w.jsxs("div",{className:"relative flex items-end gap-1",style:{height:n},children:[o.map((x,C)=>{const R=S>0?Math.min(100,Math.max(0,x.value/S*100)):0;return w.jsx("div",{className:Oe("border-base-600 pointer-events-none absolute inset-x-0 z-20 border-t border-dashed",x.className),style:{bottom:`${R}%`},children:x.label&&w.jsx("span",{className:"text-base-400 absolute -top-4 right-0 text-[10px] whitespace-nowrap",children:x.label})},C)}),e.map((x,C)=>w.jsx(Qx,{entry:x,index:C,max:S,height:n,colourByValue:s,hovered:p===C,onHover:g,onClick:a?()=>a(x):void 0,barClassName:y,formatTooltip:i,tooltipClassName:h},`${x.label}-${C}`))]}),w.jsx("div",{className:"flex gap-1",children:e.map((x,C)=>w.jsx("span",{className:"text-base-500 max-w-6 min-w-0 flex-1 truncate text-center text-[10px]",children:x.label},`${x.label}-${C}`))})]})]})})})}const qf=Z.forwardRef(function({asChild:t,className:n,...r},o){const s=t?wn:"div";return w.jsx(s,{ref:o,...r,className:Oe("flex items-center gap-2",n)})}),tS=Z.forwardRef(function({asChild:t,className:n,...r},o){const s=t?wn:"div";return w.jsx(s,{ref:o,...r,className:Oe("flex flex-col gap-2",n)})}),nS=Z.forwardRef(function({asChild:t,className:n,...r},o){const s=t?wn:"div";return w.jsx(s,{ref:o,...r,className:Oe("flex size-full items-center justify-center gap-2",n)})}),rS=Z.forwardRef(function({asChild:t,className:n,...r},o){const s=t?wn:"div";return w.jsx(s,{ref:o,...r,className:Oe("flex w-full items-center justify-between gap-2",n)})}),oS=Z.forwardRef(function({asChild:t,className:n,...r},o){const s=t?wn:"div";return w.jsx(s,{ref:o,...r,className:Oe("3xl:grid-cols-3 grid grid-cols-1 gap-4 lg:grid-cols-2",n)})});async function sS(e,t){return e.result!=="ok"?e:t(e.value)}const Ca=()=>{},Ra=()=>{var e,t;return((t=(e=globalThis.crypto)==null?void 0:e.randomUUID)==null?void 0:t.call(e))||`${Math.random()}${Date.now().valueOf()}`},iS=(e,t)=>{const n=Z.useRef(void 0),r=Z.useRef(Ca),o=Z.useRef(Ca),s=Z.useRef(!1),i=Z.useRef(Ra()),[c,a]=Z.useState(!1);Z.useEffect(()=>()=>{r.current({result:"cancelled"}),s.current=!1},[]);const u=Z.useCallback(()=>{i.current=Ra()},[]),d=g=>s.current?(console.warn("An async component was activated when it was already active!"),Promise.reject("This async component is already active.")):(s.current=!0,new Promise((b,m)=>{u(),r.current=b,o.current=m,n.current=g,a(!0)})),f=Z.useCallback(()=>{a(!1),s.current=!1,t!=null&&t.persistState||setTimeout(()=>{u(),n.current=void 0},t==null?void 0:t.exitDelay)},[t,u]),y=Z.useCallback(g=>{r.current({result:"ok",value:g}),f()},[f]),h=Z.useCallback(()=>{r.current({result:"cancelled"}),f()},[f]),v=Z.useCallback(g=>{o.current(g),f()},[f]),p=Z.useMemo(()=>w.jsx(Z.Fragment,{children:e({isActive:c,ok:y,cancel:h,reject:v,...n.current!==void 0&&{input:n.current}})},i.current),[c,y,h,v,e]);return{activate:d,reset:u,element:p,isActive:c,key:i.current,input:n.current}};exports.BarChart=eS;exports.Between=rS;exports.BubbleInput=Zw;exports.Button=Ws;exports.Centre=nS;exports.Checkbox=rx;exports.Column=tS;exports.Dialog=Yd;exports.DialogClose=Kd;exports.DialogContent=Zd;exports.DialogDescription=zw;exports.DialogFooter=Qd;exports.DialogHeader=Jd;exports.DialogOverlay=qd;exports.DialogPortal=Xd;exports.DialogTitle=ef;exports.DialogTrigger=Ww;exports.Drawer=Ry;exports.DrawerBackdrop=hd;exports.DrawerClose=pd;exports.DrawerContent=md;exports.DrawerDescription=gd;exports.DrawerPortal=fd;exports.DrawerRoot=ud;exports.DrawerTitle=$s;exports.DrawerTrigger=dd;exports.Flex=qf;exports.Grid=oS;exports.Heatmap=Jx;exports.Input=sx;exports.InputGroup=Yw;exports.Inset=Xg;exports.LoadingRing=tf;exports.MimasProvider=lg;exports.Modal=Gw;exports.Noise=bn;exports.Palette=yo;exports.Panel=Kg;exports.Rabbet=vr;exports.STEPS=Pl;exports.Select=Gx;exports.SelectContent=Gf;exports.SelectGroup=Vx;exports.SelectItem=Yf;exports.SelectLabel=Hx;exports.SelectPortal=Wx;exports.SelectRoot=Hf;exports.SelectSeparator=Ux;exports.SelectTrigger=Uf;exports.SelectValue=Bx;exports.Tooltip=ag;exports.TooltipContent=vo;exports.TooltipProvider=kl;exports.TooltipRoot=go;exports.TooltipTrigger=bo;exports.amber=Nl;exports.blue=Fl;exports.cyan=jl;exports.emerald=_l;exports.fuchsia=Wl;exports.gray=Gl;exports.green=Il;exports.indigo=$l;exports.lime=Al;exports.neutral=Xl;exports.orange=Ol;exports.palettes=ql;exports.pink=zl;exports.purple=Bl;exports.red=Tl;exports.rose=Hl;exports.sky=Ll;exports.slate=Ul;exports.step=sS;exports.stone=Kl;exports.teal=Ml;exports.useAsyncComponent=iS;exports.violet=Vl;exports.yellow=Dl;exports.zinc=Yl;
|