@sledge-app/react-instant-search 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/components/ProductFilterWidget/ProductFilterWidget.d.ts +15 -0
- package/dist/components/ProductFilterWidget/ProductFilterWidget.d.ts.map +1 -0
- package/dist/components/ProductFilterWidget/ProductFilterWidgetInitSelector.d.ts +2 -0
- package/dist/components/ProductFilterWidget/ProductFilterWidgetInitSelector.d.ts.map +1 -0
- package/dist/components/ProductFilterWidget/index.d.ts +3 -0
- package/dist/components/ProductFilterWidget/index.d.ts.map +1 -0
- package/dist/components/SearchIconWidget/SearchIconWidget.d.ts +10 -0
- package/dist/components/SearchIconWidget/SearchIconWidget.d.ts.map +1 -0
- package/dist/components/SearchIconWidget/SearchIconWidgetInitSelector.d.ts +2 -0
- package/dist/components/SearchIconWidget/SearchIconWidgetInitSelector.d.ts.map +1 -0
- package/dist/components/SearchIconWidget/SearchIconWidgetPopup.d.ts +7 -0
- package/dist/components/SearchIconWidget/SearchIconWidgetPopup.d.ts.map +1 -0
- package/dist/components/SearchIconWidget/SearchIconWidgetPopupInitSelector.d.ts +2 -0
- package/dist/components/SearchIconWidget/SearchIconWidgetPopupInitSelector.d.ts.map +1 -0
- package/dist/components/SearchIconWidget/index.d.ts +5 -0
- package/dist/components/SearchIconWidget/index.d.ts.map +1 -0
- package/dist/components/SearchResultWidget/SearchResultWidget.d.ts +16 -0
- package/dist/components/SearchResultWidget/SearchResultWidget.d.ts.map +1 -0
- package/dist/components/SearchResultWidget/SearchResultWidgetInitSelector.d.ts +2 -0
- package/dist/components/SearchResultWidget/SearchResultWidgetInitSelector.d.ts.map +1 -0
- package/dist/components/SearchResultWidget/index.d.ts +3 -0
- package/dist/components/SearchResultWidget/index.d.ts.map +1 -0
- package/dist/components/SearchWidget/SearchWidget.d.ts +10 -0
- package/dist/components/SearchWidget/SearchWidget.d.ts.map +1 -0
- package/dist/components/SearchWidget/SearchWidgetInitSelector.d.ts +2 -0
- package/dist/components/SearchWidget/SearchWidgetInitSelector.d.ts.map +1 -0
- package/dist/components/SearchWidget/index.d.ts +3 -0
- package/dist/components/SearchWidget/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/sledge-react-instant-search.cjs +2 -0
- package/dist/sledge-react-instant-search.cjs.map +1 -0
- package/dist/sledge-react-instant-search.js +4042 -0
- package/dist/sledge-react-instant-search.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/vendor-024ba8ae.cjs +2 -0
- package/dist/vendor-024ba8ae.cjs.map +1 -0
- package/dist/vendor-90dfd914.js +17140 -0
- package/dist/vendor-90dfd914.js.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("react"),t=require("react-dom");function n(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){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 r=n(e),o=n(t);function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var s,a={exports:{}},l={};var c,u={};"production"===process.env.NODE_ENV?a.exports=function(){if(s)return l;s=1;var t=e,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var s,l={},c=null,u=null;for(s in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)o.call(t,s)&&!a.hasOwnProperty(s)&&(l[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps)void 0===l[s]&&(l[s]=t[s]);return{$$typeof:n,type:e,key:c,ref:u,props:l,_owner:i.current}}return l.Fragment=r,l.jsx=c,l.jsxs=c,l}():a.exports=(c||(c=1,"production"!==process.env.NODE_ENV&&function(){var t=e,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),v=Symbol.iterator,g="@@iterator",y=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];!function(e,t,n){var r=y.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var o=n.map((function(e){return String(e)}));o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}("error",e,n)}var w,x=!1,E=!1,S=!1,P=!1,C=!1;function T(e){return e.displayName||"Context"}function R(e){if(null==e)return null;if("number"==typeof e.tag&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case o:return"Fragment";case r:return"Portal";case s:return"Profiler";case i:return"StrictMode";case d:return"Suspense";case f:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case l:return T(e)+".Consumer";case a:return T(e._context)+".Provider";case c:return function(e,t,n){var r=e.displayName;if(r)return r;var o=t.displayName||t.name||"";return""!==o?n+"("+o+")":n}(e,e.render,"ForwardRef");case p:var t=e.displayName||null;return null!==t?t:R(e.type)||"Memo";case h:var n=e,u=n._payload,m=n._init;try{return R(m(u))}catch(v){return null}}return null}w=Symbol.for("react.module.reference");var A,D,O,k,L,M,_,$=Object.assign,I=0;function V(){}V.__reactDisabledLog=!0;var N,F=y.ReactCurrentDispatcher;function j(e,t,n){if(void 0===N)try{throw Error()}catch(o){var r=o.stack.trim().match(/\n( *(at )?)/);N=r&&r[1]||""}return"\n"+N+e}var B,W=!1,H="function"==typeof WeakMap?WeakMap:Map;function U(e,t){if(!e||W)return"";var n,r=B.get(e);if(void 0!==r)return r;W=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=F.current,F.current=null,function(){if(0===I){A=console.log,D=console.info,O=console.warn,k=console.error,L=console.group,M=console.groupCollapsed,_=console.groupEnd;var e={configurable:!0,enumerable:!0,value:V,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}I++}();try{if(t){var s=function(){throw Error()};if(Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(s,[])}catch(h){n=h}Reflect.construct(e,[],s)}else{try{s.call()}catch(h){n=h}e.call(s.prototype)}}else{try{throw Error()}catch(h){n=h}e()}}catch(m){if(m&&n&&"string"==typeof m.stack){for(var a=m.stack.split("\n"),l=n.stack.split("\n"),c=a.length-1,u=l.length-1;c>=1&&u>=0&&a[c]!==l[u];)u--;for(;c>=1&&u>=0;c--,u--)if(a[c]!==l[u]){if(1!==c||1!==u)do{if(c--,--u<0||a[c]!==l[u]){var d="\n"+a[c].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),"function"==typeof e&&B.set(e,d),d}}while(c>=1&&u>=0);break}}}finally{W=!1,F.current=o,function(){if(0==--I){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},e,{value:A}),info:$({},e,{value:D}),warn:$({},e,{value:O}),error:$({},e,{value:k}),group:$({},e,{value:L}),groupCollapsed:$({},e,{value:M}),groupEnd:$({},e,{value:_})})}I<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var f=e?e.displayName||e.name:"",p=f?j(f):"";return"function"==typeof e&&B.set(e,p),p}function z(e,t,n){if(null==e)return"";if("function"==typeof e)return U(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return j(e);switch(e){case d:return j("Suspense");case f:return j("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return U(e.render,!1);case p:return z(e.type,t,n);case h:var o=e,i=o._payload,s=o._init;try{return z(s(i),t,n)}catch(a){}}return""}B=new H;var Y=Object.prototype.hasOwnProperty,X={},K=y.ReactDebugCurrentFrame;function q(e){if(e){var t=e._owner,n=z(e.type,e._source,t?t.type:null);K.setExtraStackFrame(n)}else K.setExtraStackFrame(null)}var G=Array.isArray;function Z(e){return G(e)}function J(e){return""+e}function Q(e){if(function(e){try{return J(e),!1}catch(t){return!0}}(e))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),J(e)}var ee,te,ne,re=y.ReactCurrentOwner,oe={key:!0,ref:!0,__self:!0,__source:!0};ne={};var ie=function(e,t,r,o,i,s,a){var l={$$typeof:n,type:e,key:t,ref:r,props:a,_owner:s,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function se(e,t,n,r,o){var i,s={},a=null,l=null;for(i in void 0!==n&&(Q(n),a=""+n),function(e){if(Y.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(Q(t.key),a=""+t.key),function(e){if(Y.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(l=t.ref,function(e,t){if("string"==typeof e.ref&&re.current&&t&&re.current.stateNode!==t){var n=R(re.current.type);ne[n]||(b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',R(re.current.type),e.ref),ne[n]=!0)}}(t,o)),t)Y.call(t,i)&&!oe.hasOwnProperty(i)&&(s[i]=t[i]);if(e&&e.defaultProps){var c=e.defaultProps;for(i in c)void 0===s[i]&&(s[i]=c[i])}if(a||l){var u="function"==typeof e?e.displayName||e.name||"Unknown":e;a&&function(e,t){var n=function(){ee||(ee=!0,b("%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)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(s,u),l&&function(e,t){var n=function(){te||(te=!0,b("%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)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(s,u)}return ie(e,a,l,o,r,re.current,s)}var ae,le=y.ReactCurrentOwner,ce=y.ReactDebugCurrentFrame;function ue(e){if(e){var t=e._owner,n=z(e.type,e._source,t?t.type:null);ce.setExtraStackFrame(n)}else ce.setExtraStackFrame(null)}function de(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function fe(){if(le.current){var e=R(le.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ae=!1;var pe={};function he(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=fe();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!pe[n]){pe[n]=!0;var r="";e&&e._owner&&e._owner!==le.current&&(r=" It was passed a child from "+R(e._owner.type)+"."),ue(e),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),ue(null)}}}function me(e,t){if("object"==typeof e)if(Z(e))for(var n=0;n<e.length;n++){var r=e[n];de(r)&&he(r,t)}else if(de(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=v&&e[v]||e[g];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,s=o.call(e);!(i=s.next()).done;)de(i.value)&&he(i.value,t)}}function ve(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==c&&n.$$typeof!==p)return;t=n.propTypes}if(t){var r=R(n);!function(e,t,n,r,o){var i=Function.call.bind(Y);for(var s in e)if(i(e,s)){var a=void 0;try{if("function"!=typeof e[s]){var l=Error((r||"React class")+": "+n+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}a=e[s](t,s,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(c){a=c}!a||a instanceof Error||(q(o),b("%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).",r||"React class",n,s,typeof a),q(null)),a instanceof Error&&!(a.message in X)&&(X[a.message]=!0,q(o),b("Failed %s type: %s",n,a.message),q(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||ae||(ae=!0,b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",R(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ge(e,t,r,u,v,g){var y=function(e){return"string"==typeof e||"function"==typeof e||!!(e===o||e===s||C||e===i||e===d||e===f||P||e===m||x||E||S)||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===a||e.$$typeof===l||e.$$typeof===c||e.$$typeof===w||void 0!==e.getModuleId)}(e);if(!y){var T="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(T+=" 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 A,D=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(v);T+=D||fe(),null===e?A="null":Z(e)?A="array":void 0!==e&&e.$$typeof===n?(A="<"+(R(e.type)||"Unknown")+" />",T=" Did you accidentally export a JSX literal instead of a component?"):A=typeof e,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",A,T)}var O=se(e,t,r,v,g);if(null==O)return O;if(y){var k=t.children;if(void 0!==k)if(u)if(Z(k)){for(var L=0;L<k.length;L++)me(k[L],e);Object.freeze&&Object.freeze(k)}else b("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 me(k,e)}return e===o?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){ue(e),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),ue(null);break}}null!==e.ref&&(ue(e),b("Invalid attribute `ref` supplied to `React.Fragment`."),ue(null))}(O):ve(O),O}var ye=function(e,t,n){return ge(e,t,n,!1)},be=function(e,t,n){return ge(e,t,n,!0)};u.Fragment=o,u.jsx=ye,u.jsxs=be}()),u);var d=a.exports,f=t;function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}function h(t,n=[]){let r=[];const o=()=>{const n=r.map((t=>e.createContext(t)));return function(r){const o=(null==r?void 0:r[t])||n;return e.useMemo((()=>({[`__scope${t}`]:{...r,[t]:o}})),[r,o])}};return o.scopeName=t,[function(n,o){const i=e.createContext(o),s=r.length;function a(n){const{scope:r,children:o,...a}=n,l=(null==r?void 0:r[t][s])||i,c=e.useMemo((()=>a),Object.values(a));return e.createElement(l.Provider,{value:c},o)}return r=[...r,o],a.displayName=n+"Provider",[a,function(r,a){const l=(null==a?void 0:a[t][s])||i,c=e.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},m(o,...n)]}function m(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=r.reduce(((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]})),{});return e.useMemo((()=>({[`__scope${n.scopeName}`]:o})),[o])}};return r.scopeName=n.scopeName,r}function v(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function g(...t){return e.useCallback(v(...t),t)}function y(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}"production"===process.env.NODE_ENV?(f.createRoot,f.hydrateRoot):f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;const b=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?e.useLayoutEffect:()=>{},w=r["useId".toString()]||(()=>{});let x=0;function E(e){const[t,n]=r.useState(w());return b((()=>{e||n((e=>null!=e?e:String(x++)))}),[e]),e||(t?`radix-${t}`:"")}function S(t){const n=e.useRef(t);return e.useEffect((()=>{n.current=t})),e.useMemo((()=>(...e)=>{var t;return null===(t=n.current)||void 0===t?void 0:t.call(n,...e)}),[])}function P({prop:t,defaultProp:n,onChange:r=(()=>{})}){const[o,i]=function({defaultProp:t,onChange:n}){const r=e.useState(t),[o]=r,i=e.useRef(o),s=S(n);return e.useEffect((()=>{i.current!==o&&(s(o),i.current=o)}),[o,i,s]),r}({defaultProp:n,onChange:r}),s=void 0!==t,a=s?t:o,l=S(r);return[a,e.useCallback((e=>{if(s){const n="function"==typeof e?e(t):e;n!==t&&l(n)}else i(e)}),[s,t,i,l])]}const C=e.forwardRef(((t,n)=>{const{children:r,...o}=t,i=e.Children.toArray(r),s=i.find(A);if(s){const t=s.props.children,r=i.map((n=>n===s?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n));return e.createElement(T,p({},o,{ref:n}),e.isValidElement(t)?e.cloneElement(t,void 0,r):null)}return e.createElement(T,p({},o,{ref:n}),r)}));C.displayName="Slot";const T=e.forwardRef(((t,n)=>{const{children:r,...o}=t;return e.isValidElement(r)?e.cloneElement(r,{...D(o,r.props),ref:v(n,r.ref)}):e.Children.count(r)>1?e.Children.only(null):null}));T.displayName="SlotClone";const R=({children:t})=>e.createElement(e.Fragment,null,t);function A(t){return e.isValidElement(t)&&t.type===R}function D(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const O=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,n)=>{const r=e.forwardRef(((t,r)=>{const{asChild:o,...i}=t,s=o?C:n;return e.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),e.createElement(s,p({},i,{ref:r}))}));return r.displayName=`Primitive.${n}`,{...t,[n]:r}}),{});const k="dismissableLayer.update",L="dismissableLayer.pointerDownOutside",M="dismissableLayer.focusOutside";let _;const $=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),I=e.forwardRef(((t,n)=>{var r;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:l,onDismiss:c,...u}=t,d=e.useContext($),[f,h]=e.useState(null),m=null!==(r=null==f?void 0:f.ownerDocument)&&void 0!==r?r:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,v]=e.useState({}),b=g(n,(e=>h(e))),w=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),E=w.indexOf(x),P=f?w.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,T=P>=E,R=function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=S(t),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){N(L,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",i.current),i.current=t,n.addEventListener("click",i.current,{once:!0})):t()}o.current=!1},t=window.setTimeout((()=>{n.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",i.current)}}),[n,r]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));T&&!n&&(null==s||s(e),null==l||l(e),e.defaultPrevented||null==c||c())}),m),A=function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=S(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){N(M,r,{originalEvent:e},{discrete:!1})}};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)}),[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==c||c())}),m);return function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=S(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e),()=>n.removeEventListener("keydown",e)}),[r,n])}((e=>{P===d.layers.size-1&&(null==i||i(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),m),e.useEffect((()=>{if(f)return o&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(_=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),V(),()=>{o&&1===d.layersWithOutsidePointerEventsDisabled.size&&(m.body.style.pointerEvents=_)}}),[f,m,o,d]),e.useEffect((()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),V())}),[f,d]),e.useEffect((()=>{const e=()=>v({});return document.addEventListener(k,e),()=>document.removeEventListener(k,e)}),[]),e.createElement(O.div,p({},u,{ref:b,style:{pointerEvents:C?T?"auto":"none":void 0,...t.style},onFocusCapture:y(t.onFocusCapture,A.onFocusCapture),onBlurCapture:y(t.onBlurCapture,A.onBlurCapture),onPointerDownCapture:y(t.onPointerDownCapture,R.onPointerDownCapture)}))}));function V(){const e=new CustomEvent(k);document.dispatchEvent(e)}function N(e,n,r,{discrete:o}){const i=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});n&&i.addEventListener(e,n,{once:!0}),o?function(e,n){e&&t.flushSync((()=>e.dispatchEvent(n)))}(i,s):i.dispatchEvent(s)}const F="focusScope.autoFocusOnMount",j="focusScope.autoFocusOnUnmount",B={bubbles:!1,cancelable:!0},W=e.forwardRef(((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=t,[l,c]=e.useState(null),u=S(i),d=S(s),f=e.useRef(null),h=g(n,(e=>c(e))),m=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){let e=function(e){if(m.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:Y(f.current,{select:!0})},t=function(e){!m.paused&&l&&(l.contains(e.relatedTarget)||Y(f.current,{select:!0}))};return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[o,l,m.paused]),e.useEffect((()=>{if(l){X.add(m);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(F,B);l.addEventListener(F,u),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Y(r,{select:t}),document.activeElement!==n)return}((e=H(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Y(l))}return()=>{l.removeEventListener(F,u),setTimeout((()=>{const e=new CustomEvent(j,B);l.addEventListener(j,d),l.dispatchEvent(e),e.defaultPrevented||Y(null!=t?t:document.body,{select:!0}),l.removeEventListener(j,d),X.remove(m)}),0)}}var e}),[l,u,d,m]);const v=e.useCallback((e=>{if(!r&&!o)return;if(m.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,i]=function(e){const t=H(e),n=U(t,e),r=U(t.reverse(),e);return[n,r]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&Y(i,{select:!0})):(e.preventDefault(),r&&Y(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,m.paused]);return e.createElement(O.div,p({tabIndex:-1},a,{ref:h,onKeyDown:v}))}));function H(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function U(e,t){for(const n of e)if(!z(n,{upTo:t}))return n}function z(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Y(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const X=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=K(e,t),e.unshift(t)},remove(t){var n;e=K(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function K(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}const q=e.forwardRef(((n,r)=>{var o;const{container:i=(null===globalThis||void 0===globalThis||null===(o=globalThis.document)||void 0===o?void 0:o.body),...s}=n;return i?t.createPortal(e.createElement(O.div,p({},s,{ref:r})),i):null}));const G=n=>{const{present:r,children:o}=n,i=function(n){const[r,o]=e.useState(),i=e.useRef({}),s=e.useRef(n),a=e.useRef("none"),l=n?"mounted":"unmounted",[c,u]=function(t,n){return e.useReducer(((e,t)=>{const r=n[e][t];return null!=r?r:e}),t)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=Z(i.current);a.current="mounted"===c?e:"none"}),[c]),b((()=>{const e=i.current,t=s.current;if(t!==n){const r=a.current,o=Z(e);if(n)u("MOUNT");else if("none"===o||"none"===(null==e?void 0:e.display))u("UNMOUNT");else{u(t&&r!==o?"ANIMATION_OUT":"UNMOUNT")}s.current=n}}),[n,u]),b((()=>{if(r){const e=e=>{const n=Z(i.current).includes(e.animationName);e.target===r&&n&&t.flushSync((()=>u("ANIMATION_END")))},n=e=>{e.target===r&&(a.current=Z(i.current))};return r.addEventListener("animationstart",n),r.addEventListener("animationcancel",e),r.addEventListener("animationend",e),()=>{r.removeEventListener("animationstart",n),r.removeEventListener("animationcancel",e),r.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[r,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:e.useCallback((e=>{e&&(i.current=getComputedStyle(e)),o(e)}),[])}}(r),s="function"==typeof o?o({present:i.isPresent}):e.Children.only(o),a=g(i.ref,s.ref);return"function"==typeof o||i.isPresent?e.cloneElement(s,{ref:a}):null};function Z(e){return(null==e?void 0:e.animationName)||"none"}G.displayName="Presence";let J=0;function Q(){e.useEffect((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:ee()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:ee()),J++,()=>{1===J&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),J--}}),[])}function ee(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var te=function(){return te=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},te.apply(this,arguments)};function ne(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(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"==typeof SuppressedError&&SuppressedError;var re="right-scroll-bar-position",oe="width-before-scroll-bar";function ie(t,n){return r=n||null,o=function(e){return t.forEach((function(t){return function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}(t,e)}))},(i=e.useState((function(){return{value:r,callback:o,facade:{get current(){return i.value},set current(e){var t=i.value;t!==e&&(i.value=e,i.callback(e,t))}}}}))[0]).callback=o,i.facade;var r,o,i}function se(e){return e}var ae=function(e){var t=e.sideCar,n=ne(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return r.createElement(o,te({},n))};ae.isSideCarExport=!0;var le=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=se);var n=[],r=!1;return{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(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},s=function(){return Promise.resolve().then(i)};s(),n={push:function(e){t.push(e),s()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=te({async:!0,ssr:!1},e),t}(),ce=function(){},ue=r.forwardRef((function(e,t){var n=r.useRef(null),o=r.useState({onScrollCapture:ce,onWheelCapture:ce,onTouchMoveCapture:ce}),i=o[0],s=o[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noIsolation,m=e.inert,v=e.allowPinchZoom,g=e.as,y=void 0===g?"div":g,b=ne(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=p,x=ie([n,t]),E=te(te({},b),i);return r.createElement(r.Fragment,null,d&&r.createElement(w,{sideCar:le,removeScrollBar:u,shards:f,noIsolation:h,inert:m,setCallbacks:s,allowPinchZoom:!!v,lockRef:n}),a?r.cloneElement(r.Children.only(l),te(te({},E),{ref:x})):r.createElement(y,te({},E,{className:c,ref:x}),l))}));ue.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ue.classNames={fullWidth:oe,zeroRight:re};function de(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var fe=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=de())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){!--e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},pe=function(){var e,t=(e=fe(),function(t,n){r.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},he={left:0,top:0,right:0,gap:0},me=function(e){return parseInt(e||"",10)||0},ve=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return he;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[me(n),me(r),me(o)]}(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])}},ge=pe(),ye=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(a,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(s,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(a,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(re," {\n right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(oe," {\n margin-right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(re," .").concat(re," {\n right: 0 ").concat(r,";\n }\n \n .").concat(oe," .").concat(oe," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n }\n")},be=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,i=void 0===o?"margin":o,s=r.useMemo((function(){return ve(i)}),[i]);return r.createElement(ge,{styles:ye(s,!t,i,n?"":"!important")})},we=!1;if("undefined"!=typeof window)try{var xe=Object.defineProperty({},"passive",{get:function(){return we=!0,!0}});window.addEventListener("test",xe,xe),window.removeEventListener("test",xe,xe)}catch(wg){we=!1}var Ee=!!we&&{passive:!1},Se=function(e,t){var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},Pe=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Ce(e,n)){var r=Te(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Ce=function(e,t){return"v"===e?function(e){return Se(e,"overflowY")}(t):function(e){return Se(e,"overflowX")}(t)},Te=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Re=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ae=function(e){return[e.deltaX,e.deltaY]},De=function(e){return e&&"current"in e?e.current:e},Oe=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ke=0,Le=[];const Me=(_e=function(e){var t=r.useRef([]),n=r.useRef([0,0]),o=r.useRef(),i=r.useState(ke++)[0],s=r.useState((function(){return pe()}))[0],a=r.useRef(e);r.useEffect((function(){a.current=e}),[e]),r.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(De),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=r.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!a.current.allowPinchZoom;var r,i=Re(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-i[0],c="deltaY"in e?e.deltaY:s[1]-i[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=Pe(d,u);if(!f)return!0;if(f?r=d:(r="v"===d?"h":"v",f=Pe(d,u)),!f)return!1;if(!o.current&&"changedTouches"in e&&(l||c)&&(o.current=r),!r)return!0;var p=o.current||r;return function(e,t,n,r,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),c=!1,u=s>0,d=0,f=0;do{var p=Te(e,a),h=p[0],m=p[1]-p[2]-i*h;(h||m)&&Ce(e,a)&&(d+=m,f+=h),a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&(o&&0===d||!o&&s>d)||!u&&(o&&0===f||!o&&-s>f))&&(c=!0),c}(p,t,e,"h"===p?l:c,!0)}),[]),c=r.useCallback((function(e){var n=e;if(Le.length&&Le[Le.length-1]===s){var r="deltaY"in n?Ae(n):Re(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var i=(a.current.shards||[]).map(De).filter(Boolean).filter((function(e){return e.contains(n.target)}));(i.length>0?l(n,i[0]):!a.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=r.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=r.useCallback((function(e){n.current=Re(e),o.current=void 0}),[]),f=r.useCallback((function(t){u(t.type,Ae(t),t.target,l(t,e.lockRef.current))}),[]),p=r.useCallback((function(t){u(t.type,Re(t),t.target,l(t,e.lockRef.current))}),[]);r.useEffect((function(){return Le.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Ee),document.addEventListener("touchmove",c,Ee),document.addEventListener("touchstart",d,Ee),function(){Le=Le.filter((function(e){return e!==s})),document.removeEventListener("wheel",c,Ee),document.removeEventListener("touchmove",c,Ee),document.removeEventListener("touchstart",d,Ee)}}),[]);var h=e.removeScrollBar,m=e.inert;return r.createElement(r.Fragment,null,m?r.createElement(s,{styles:Oe(i)}):null,h?r.createElement(be,{gapMode:"margin"}):null)},le.useMedium(_e),ae);var _e,$e=r.forwardRef((function(e,t){return r.createElement(ue,te({},e,{ref:t,sideCar:Me}))}));$e.classNames=ue.classNames;const Ie=$e;var Ve=new WeakMap,Ne=new WeakMap,Fe={},je=0,Be=function(e){return e&&(e.host||Be(e.parentNode))},We=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=Be(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);Fe[n]||(Fe[n]=new WeakMap);var i=Fe[n],s=[],a=new Set,l=new Set(o),c=function(e){e&&!a.has(e)&&(a.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(a.has(e))u(e);else{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(Ve.get(e)||0)+1,c=(i.get(e)||0)+1;Ve.set(e,l),i.set(e,c),s.push(e),1===l&&o&&Ne.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}}))};return u(t),a.clear(),je++,function(){s.forEach((function(e){var t=Ve.get(e)-1,o=i.get(e)-1;Ve.set(e,t),i.set(e,o),t||(Ne.has(e)||e.removeAttribute(r),Ne.delete(e)),o||e.removeAttribute(n)})),--je||(Ve=new WeakMap,Ve=new WeakMap,Ne=new WeakMap,Fe={})}},He=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),We(r,o,n,"aria-hidden")):function(){return null}};const Ue="Dialog",[ze,Ye]=h(Ue),[Xe,Ke]=ze(Ue),qe="DialogPortal",[Ge,Ze]=ze(qe,{forceMount:void 0}),Je="DialogOverlay",Qe=e.forwardRef(((t,n)=>{const r=Ze(Je,t.__scopeDialog),{forceMount:o=r.forceMount,...i}=t,s=Ke(Je,t.__scopeDialog);return s.modal?e.createElement(G,{present:o||s.open},e.createElement(et,p({},i,{ref:n}))):null})),et=e.forwardRef(((t,n)=>{const{__scopeDialog:r,...o}=t,i=Ke(Je,r);return e.createElement(Ie,{as:C,allowPinchZoom:!0,shards:[i.contentRef]},e.createElement(O.div,p({"data-state":st(i.open)},o,{ref:n,style:{pointerEvents:"auto",...o.style}})))})),tt="DialogContent",nt=e.forwardRef(((t,n)=>{const r=Ze(tt,t.__scopeDialog),{forceMount:o=r.forceMount,...i}=t,s=Ke(tt,t.__scopeDialog);return e.createElement(G,{present:o||s.open},s.modal?e.createElement(rt,p({},i,{ref:n})):e.createElement(ot,p({},i,{ref:n})))})),rt=e.forwardRef(((t,n)=>{const r=Ke(tt,t.__scopeDialog),o=e.useRef(null),i=g(n,r.contentRef,o);return e.useEffect((()=>{const e=o.current;if(e)return He(e)}),[]),e.createElement(it,p({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:y(t.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=r.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:y(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:y(t.onFocusOutside,(e=>e.preventDefault()))}))})),ot=e.forwardRef(((t,n)=>{const r=Ke(tt,t.__scopeDialog),o=e.useRef(!1);return e.createElement(it,p({},t,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{var n,i;(null===(n=t.onCloseAutoFocus)||void 0===n||n.call(t,e),e.defaultPrevented)||(o.current||null===(i=r.triggerRef.current)||void 0===i||i.focus(),e.preventDefault());o.current=!1},onInteractOutside:e=>{var n,i;null===(n=t.onInteractOutside)||void 0===n||n.call(t,e),e.defaultPrevented||(o.current=!0);const s=e.target;(null===(i=r.triggerRef.current)||void 0===i?void 0:i.contains(s))&&e.preventDefault()}}))})),it=e.forwardRef(((t,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,...a}=t,l=Ke(tt,r),c=g(n,e.useRef(null));return Q(),e.createElement(e.Fragment,null,e.createElement(W,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:s},e.createElement(I,p({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":st(l.open)},a,{ref:c,onDismiss:()=>l.onOpenChange(!1)}))),!1)}));function st(e){return e?"open":"closed"}const at=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:i,onOpenChange:s,modal:a=!0}=t,l=e.useRef(null),c=e.useRef(null),[u=!1,d]=P({prop:o,defaultProp:i,onChange:s});return e.createElement(Xe,{scope:n,triggerRef:l,contentRef:c,contentId:E(),titleId:E(),descriptionId:E(),open:u,onOpenChange:d,onOpenToggle:e.useCallback((()=>d((e=>!e))),[d]),modal:a},r)},lt=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:i}=t,s=Ke(qe,n);return e.createElement(Ge,{scope:n,forceMount:r},e.Children.map(o,(t=>e.createElement(G,{present:r||s.open},e.createElement(q,{asChild:!0,container:i},t)))))},ct=Qe,ut=nt;function dt(e){return e.split("-")[0]}function ft(e){return e.split("-")[1]}function pt(e){return["top","bottom"].includes(dt(e))?"x":"y"}function ht(e){return"y"===e?"height":"width"}function mt(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,s=r.y+r.height/2-o.height/2,a=pt(t),l=ht(a),c=r[l]/2-o[l]/2,u="x"===a;let d;switch(dt(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:s};break;case"left":d={x:r.x-o.width,y:s};break;default:d={x:r.x,y:r.y}}switch(ft(t)){case"start":d[a]-=c*(n&&u?-1:1);break;case"end":d[a]+=c*(n&&u?-1:1)}return d}function vt(e){return"number"!=typeof e?(t=e,{top:0,right:0,bottom:0,left:0,...t}):{top:e,right:e,bottom:e,left:e};var t}function gt(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function yt(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=t,h=vt(p),m=a[f?"floating"===d?"reference":"floating":d],v=gt(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),g=gt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...s.floating,x:r,y:o}:s.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),strategy:l}):s[d]);return{top:v.top-g.top+h.top,bottom:g.bottom-v.bottom+h.bottom,left:v.left-g.left+h.left,right:g.right-v.right+h.right}}const bt=Math.min,wt=Math.max;function xt(e,t,n){return wt(e,bt(t,n))}const Et=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=null!=e?e:{},{x:o,y:i,placement:s,rects:a,platform:l}=t;if(null==n)return{};const c=vt(r),u={x:o,y:i},d=pt(s),f=ft(s),p=ht(d),h=await l.getDimensions(n),m="y"===d?"top":"left",v="y"===d?"bottom":"right",g=a.reference[p]+a.reference[d]-u[d]-a.floating[p],y=u[d]-a.reference[d],b=await(null==l.getOffsetParent?void 0:l.getOffsetParent(n));let w=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===w&&(w=a.floating[p]);const x=g/2-y/2,E=c[m],S=w-h[p]-c[v],P=w/2-h[p]/2+x,C=xt(E,P,S),T=("start"===f?c[m]:c[v])>0&&P!==C&&a.reference[p]<=a.floating[p];return{[d]:u[d]-(T?P<E?E-P:S-P:0),data:{[d]:C,centerOffset:P-C}}}}),St={left:"right",right:"left",bottom:"top",top:"bottom"};function Pt(e){return e.replace(/left|right|bottom|top/g,(e=>St[e]))}const Ct={start:"end",end:"start"};function Tt(e){return e.replace(/start|end/g,(e=>Ct[e]))}const Rt=["top","right","bottom","left"];Rt.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const At=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:s,platform:a,elements:l}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",flipAlignment:p=!0,...h}=e,m=dt(r),v=[s,...d||(m!==s&&p?function(e){const t=Pt(e);return[Tt(e),t,Tt(t)]}(s):[Pt(s)])],g=await yt(t,h),y=[];let b=(null==(n=o.flip)?void 0:n.overflows)||[];if(c&&y.push(g[m]),u){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=ft(e),o=pt(e),i=ht(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Pt(s)),{main:s,cross:Pt(s)}}(r,i,await(null==a.isRTL?void 0:a.isRTL(l.floating)));y.push(g[e],g[t])}if(b=[...b,{placement:r,overflows:y}],!y.every((e=>e<=0))){var w,x;const e=(null!=(w=null==(x=o.flip)?void 0:x.index)?w:0)+1,t=v[e];if(t)return{data:{index:e,overflows:b},reset:{placement:t}};let n="bottom";switch(f){case"bestFit":{var E;const e=null==(E=b.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:E[0].placement;e&&(n=e);break}case"initialPlacement":n=s}if(r!==n)return{reset:{placement:n}}}return{}}}};function Dt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ot(e){return Rt.some((t=>e[t]>=0))}const kt=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){const{rects:r}=e;switch(t){case"referenceHidden":{const t=Dt(await yt(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:Ot(t)}}}case"escaped":{const t=Dt(await yt(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:Ot(t)}}}default:return{}}}}};function Lt(e){return"x"===e?"y":"x"}const Mt=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=e,c={x:n,y:r},u=await yt(t,l),d=pt(dt(o)),f=Lt(d);let p=c[d],h=c[f];if(i){const e="y"===d?"bottom":"right";p=xt(p+u["y"===d?"top":"left"],p,p-u[e])}if(s){const e="y"===f?"bottom":"right";h=xt(h+u["y"===f?"top":"left"],h,h-u[e])}const m=a.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}};function _t(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function $t(e){if(null==e)return window;if(!_t(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function It(e){return $t(e).getComputedStyle(e)}function Vt(e){return _t(e)?"":e?(e.nodeName||"").toLowerCase():""}function Nt(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function Ft(e){return e instanceof $t(e).HTMLElement}function jt(e){return e instanceof $t(e).Element}function Bt(e){return"undefined"!=typeof ShadowRoot&&(e instanceof $t(e).ShadowRoot||e instanceof ShadowRoot)}function Wt(e){const{overflow:t,overflowX:n,overflowY:r}=It(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Ht(e){return["table","td","th"].includes(Vt(e))}function Ut(e){const t=/firefox/i.test(Nt()),n=It(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function zt(){return!/^((?!chrome|android).)*safari/i.test(Nt())}const Yt=Math.min,Xt=Math.max,Kt=Math.round;function qt(e,t,n){var r,o,i,s;void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect();let l=1,c=1;t&&Ft(e)&&(l=e.offsetWidth>0&&Kt(a.width)/e.offsetWidth||1,c=e.offsetHeight>0&&Kt(a.height)/e.offsetHeight||1);const u=jt(e)?$t(e):window,d=!zt()&&n,f=(a.left+(d&&null!=(r=null==(o=u.visualViewport)?void 0:o.offsetLeft)?r:0))/l,p=(a.top+(d&&null!=(i=null==(s=u.visualViewport)?void 0:s.offsetTop)?i:0))/c,h=a.width/l,m=a.height/c;return{width:h,height:m,top:p,right:f+h,bottom:p+m,left:f,x:f,y:p}}function Gt(e){return(t=e,(t instanceof $t(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function Zt(e){return jt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Jt(e){return qt(Gt(e)).left+Zt(e).scrollLeft}function Qt(e,t,n){const r=Ft(t),o=Gt(t),i=qt(e,r&&function(e){const t=qt(e);return Kt(t.width)!==e.offsetWidth||Kt(t.height)!==e.offsetHeight}(t),"fixed"===n);let s={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==Vt(t)||Wt(o))&&(s=Zt(t)),Ft(t)){const e=qt(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=Jt(o));return{x:i.left+s.scrollLeft-a.x,y:i.top+s.scrollTop-a.y,width:i.width,height:i.height}}function en(e){return"html"===Vt(e)?e:e.assignedSlot||e.parentNode||(Bt(e)?e.host:null)||Gt(e)}function tn(e){return Ft(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function nn(e){const t=$t(e);let n=tn(e);for(;n&&Ht(n)&&"static"===getComputedStyle(n).position;)n=tn(n);return n&&("html"===Vt(n)||"body"===Vt(n)&&"static"===getComputedStyle(n).position&&!Ut(n))?t:n||function(e){let t=en(e);for(Bt(t)&&(t=t.host);Ft(t)&&!["html","body"].includes(Vt(t));){if(Ut(t))return t;t=t.parentNode}return null}(e)||t}function rn(e){if(Ft(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=qt(e);return{width:t.width,height:t.height}}function on(e){const t=en(e);return["html","body","#document"].includes(Vt(t))?e.ownerDocument.body:Ft(t)&&Wt(t)?t:on(t)}function sn(e,t){var n;void 0===t&&(t=[]);const r=on(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=$t(r),s=o?[i].concat(i.visualViewport||[],Wt(r)?r:[]):r,a=t.concat(s);return o?a:a.concat(sn(s))}function an(e,t,n){return"viewport"===t?gt(function(e,t){const n=$t(e),r=Gt(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=zt();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n)):jt(t)?function(e,t){const n=qt(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):gt(function(e){var t;const n=Gt(e),r=Zt(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=Xt(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=Xt(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let a=-r.scrollLeft+Jt(e);const l=-r.scrollTop;return"rtl"===It(o||n).direction&&(a+=Xt(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}(Gt(e)))}function ln(e){const t=sn(e),n=["absolute","fixed"].includes(It(e).position)&&Ft(e)?nn(e):e;return jt(n)?t.filter((e=>jt(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Bt(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==Vt(e))):[]}const cn={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?ln(t):[].concat(n),r],s=i[0],a=i.reduce(((e,n)=>{const r=an(t,n,o);return e.top=Xt(r.top,e.top),e.right=Yt(r.right,e.right),e.bottom=Yt(r.bottom,e.bottom),e.left=Xt(r.left,e.left),e}),an(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Ft(n),i=Gt(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==Vt(n)||Wt(i))&&(s=Zt(n)),Ft(n))){const e=qt(n,!0);a.x=e.x+n.clientLeft,a.y=e.y+n.clientTop}return{...t,x:t.x-s.scrollLeft+a.x,y:t.y-s.scrollTop+a.y}},isElement:jt,getDimensions:rn,getOffsetParent:nn,getDocumentElement:Gt,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Qt(t,nn(n),r),floating:{...rn(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===It(e).direction};function un(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=!0,animationFrame:a=!1}=r,l=o&&!a,c=i&&!a,u=l||c?[...jt(e)?sn(e):[],...sn(t)]:[];u.forEach((e=>{l&&e.addEventListener("scroll",n,{passive:!0}),c&&e.addEventListener("resize",n)}));let d,f=null;if(s){let r=!0;f=new ResizeObserver((()=>{r||n(),r=!1})),jt(e)&&!a&&f.observe(e),f.observe(t)}let p=a?qt(e):null;return a&&function t(){const r=qt(e);!p||r.x===p.x&&r.y===p.y&&r.width===p.width&&r.height===p.height||n(),p=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{l&&e.removeEventListener("scroll",n),c&&e.removeEventListener("resize",n)})),null==(e=f)||e.disconnect(),f=null,a&&cancelAnimationFrame(d)}}const dn=(e,t,n)=>(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=await(null==s.isRTL?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:u}=mt(l,r,a),d=r,f={},p=0;for(let h=0;h<i.length;h++){const{name:n,fn:m}=i[h],{x:v,y:g,data:y,reset:b}=await m({x:c,y:u,initialPlacement:r,placement:d,strategy:o,middlewareData:f,rects:l,platform:s,elements:{reference:e,floating:t}});c=null!=v?v:c,u=null!=g?g:u,f={...f,[n]:{...f[n],...y}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(l=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:c,y:u}=mt(l,d,a))),h=-1)}return{x:c,y:u,placement:d,strategy:o,middlewareData:f}})(e,t,{platform:cn,...n});var fn="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function pn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!pn(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;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!pn(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function hn(e){let{middleware:t,placement:n="bottom",strategy:i="absolute",whileElementsMounted:s}=void 0===e?{}:e;const a=r.useRef(null),l=r.useRef(null),c=function(e){const t=r.useRef(e);return fn((()=>{t.current=e})),t}(s),u=r.useRef(null),[d,f]=r.useState({x:null,y:null,strategy:i,placement:n,middlewareData:{}}),[p,h]=r.useState(t);pn(null==p?void 0:p.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||h(t);const m=r.useCallback((()=>{a.current&&l.current&&dn(a.current,l.current,{middleware:p,placement:n,strategy:i}).then((e=>{v.current&&o.flushSync((()=>{f(e)}))}))}),[p,n,i]);fn((()=>{v.current&&m()}),[m]);const v=r.useRef(!1);fn((()=>(v.current=!0,()=>{v.current=!1})),[]);const g=r.useCallback((()=>{if("function"==typeof u.current&&(u.current(),u.current=null),a.current&&l.current)if(c.current){const e=c.current(a.current,l.current,m);u.current=e}else m()}),[m,c]),y=r.useCallback((e=>{a.current=e,g()}),[g]),b=r.useCallback((e=>{l.current=e,g()}),[g]),w=r.useMemo((()=>({reference:a,floating:l})),[]);return r.useMemo((()=>({...d,update:m,refs:w,reference:y,floating:b})),[d,m,w,y,b])}const mn=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn(e){return r=t,Object.prototype.hasOwnProperty.call(r,"current")?null!=t.current?Et({element:t.current,padding:n}).fn(e):{}:t?Et({element:t,padding:n}).fn(e):{};var r}}},vn=e.forwardRef(((t,n)=>{const{children:r,width:o=10,height:i=5,...s}=t;return e.createElement(O.svg,p({},s,{ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),t.asChild?r:e.createElement("polygon",{points:"0,0 30,0 15,10"}))}));function gn(t){const[n,r]=e.useState(void 0);return b((()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const n=e[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=t.offsetWidth,i=t.offsetHeight;r({width:o,height:i})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}r(void 0)}),[t]),n}const yn="Popper",[bn,wn]=h(yn),[xn,En]=bn(yn),Sn=e.forwardRef(((t,n)=>{const{__scopePopper:r,virtualRef:o,...i}=t,s=En("PopperAnchor",r),a=e.useRef(null),l=g(n,a);return e.useEffect((()=>{s.onAnchorChange((null==o?void 0:o.current)||a.current)})),o?null:e.createElement(O.div,p({},i,{ref:l}))})),Pn="PopperContent",[Cn,Tn]=bn(Pn),[Rn,An]=bn(Pn,{hasParent:!1,positionUpdateFns:new Set}),Dn=e.forwardRef(((t,n)=>{var r,o,i,s,a,l,c,u;const{__scopePopper:d,side:f="bottom",sideOffset:p=0,align:h="center",alignOffset:m=0,arrowPadding:v=0,collisionBoundary:y=[],collisionPadding:w=0,sticky:x="partial",hideWhenDetached:E=!1,avoidCollisions:P=!0,onPlaced:C,...T}=t,R=En(Pn,d),[A,D]=e.useState(null),k=g(n,(e=>D(e))),[L,M]=e.useState(null),_=gn(L),$=null!==(r=null==_?void 0:_.width)&&void 0!==r?r:0,I=null!==(o=null==_?void 0:_.height)&&void 0!==o?o:0,V=f+("center"!==h?"-"+h:""),N="number"==typeof w?w:{top:0,right:0,bottom:0,left:0,...w},F=Array.isArray(y)?y:[y],j=F.length>0,B={padding:N,boundary:F.filter(Ln),altBoundary:j},{reference:W,floating:H,strategy:U,x:z,y:Y,placement:X,middlewareData:K,update:q}=hn({strategy:"fixed",placement:V,whileElementsMounted:un,middleware:[Mn(),(J={mainAxis:p+I,alignmentAxis:m},void 0===J&&(J=0),{name:"offset",options:J,async fn(e){const{x:t,y:n}=e,r=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=dt(n),a=ft(n),l="x"===pt(n),c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(e,J);return{x:t+r.x,y:n+r.y,data:r}}}),P?Mt({mainAxis:!0,crossAxis:!1,limiter:"partial"===x?(void 0===Z&&(Z={}),{options:Z,fn(e){const{x:t,y:n,placement:r,rects:o,middlewareData:i}=e,{offset:s=0,mainAxis:a=!0,crossAxis:l=!0}=Z,c={x:t,y:n},u=pt(r),d=Lt(u);let f=c[u],p=c[d];const h="function"==typeof s?s({...o,placement:r}):s,m="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(a){const e="y"===u?"height":"width",t=o.reference[u]-o.floating[e]+m.mainAxis,n=o.reference[u]+o.reference[e]-m.mainAxis;f<t?f=t:f>n&&(f=n)}if(l){var v,g,y,b;const e="y"===u?"width":"height",t=["top","left"].includes(dt(r)),n=o.reference[d]-o.floating[e]+(t&&null!=(v=null==(g=i.offset)?void 0:g[d])?v:0)+(t?0:m.crossAxis),s=o.reference[d]+o.reference[e]+(t?0:null!=(y=null==(b=i.offset)?void 0:b[d])?y:0)-(t?m.crossAxis:0);p<n?p=n:p>s&&(p=s)}return{[u]:f,[d]:p}}}):void 0,...B}):void 0,L?mn({element:L,padding:v}):void 0,P?At({...B}):void 0,(G={...B,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}},void 0===G&&(G={}),{name:"size",options:G,async fn(e){const{placement:t,rects:n,platform:r,elements:o}=e,{apply:i,...s}=G,a=await yt(e,s),l=dt(t),c=ft(t);let u,d;"top"===l||"bottom"===l?(u=l,d=c===(await(null==r.isRTL?void 0:r.isRTL(o.floating))?"start":"end")?"left":"right"):(d=l,u="end"===c?"top":"bottom");const f=wt(a.left,0),p=wt(a.right,0),h=wt(a.top,0),m=wt(a.bottom,0),v={availableHeight:n.floating.height-(["left","right"].includes(t)?2*(0!==h||0!==m?h+m:wt(a.top,a.bottom)):a[u]),availableWidth:n.floating.width-(["top","bottom"].includes(t)?2*(0!==f||0!==p?f+p:wt(a.left,a.right)):a[d])},g=await r.getDimensions(o.floating);null==i||i({...e,...v});const y=await r.getDimensions(o.floating);return g.width!==y.width||g.height!==y.height?{reset:{rects:!0}}:{}}}),_n({arrowWidth:$,arrowHeight:I}),E?kt({strategy:"referenceHidden"}):void 0].filter(kn)});var G,Z,J;b((()=>{W(R.anchor)}),[W,R.anchor]);const Q=null!==z&&null!==Y,[ee,te]=$n(X),ne=S(C);b((()=>{Q&&(null==ne||ne())}),[Q,ne]);const re=null===(i=K.arrow)||void 0===i?void 0:i.x,oe=null===(s=K.arrow)||void 0===s?void 0:s.y,ie=0!==(null===(a=K.arrow)||void 0===a?void 0:a.centerOffset),[se,ae]=e.useState();b((()=>{A&&ae(window.getComputedStyle(A).zIndex)}),[A]);const{hasParent:le,positionUpdateFns:ce}=An(Pn,d),ue=!le;e.useLayoutEffect((()=>{if(!ue)return ce.add(q),()=>{ce.delete(q)}}),[ue,ce,q]),b((()=>{ue&&Q&&Array.from(ce).reverse().forEach((e=>requestAnimationFrame(e)))}),[ue,Q,ce]);const de={"data-side":ee,"data-align":te,...T,ref:k,style:{...T.style,animation:Q?void 0:"none",opacity:null!==(l=K.hide)&&void 0!==l&&l.referenceHidden?0:void 0}};return e.createElement("div",{ref:H,"data-radix-popper-content-wrapper":"",style:{position:U,left:0,top:0,transform:Q?`translate3d(${Math.round(z)}px, ${Math.round(Y)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[null===(c=K.transformOrigin)||void 0===c?void 0:c.x,null===(u=K.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:t.dir},e.createElement(Cn,{scope:d,placedSide:ee,onArrowChange:M,arrowX:re,arrowY:oe,shouldHideArrow:ie},ue?e.createElement(Rn,{scope:d,hasParent:!0,positionUpdateFns:ce},e.createElement(O.div,de)):e.createElement(O.div,de)))})),On={top:"bottom",right:"left",bottom:"top",left:"right"};function kn(e){return void 0!==e}function Ln(e){return null!==e}const Mn=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:n}=e,{width:r,height:o}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${o}px`),{}}}),_n=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,s;const{placement:a,rects:l,middlewareData:c}=t,u=0!==(null===(n=c.arrow)||void 0===n?void 0:n.centerOffset),d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[p,h]=$n(a),m={start:"0%",center:"50%",end:"100%"}[h],v=(null!==(r=null===(o=c.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(i=null===(s=c.arrow)||void 0===s?void 0:s.y)&&void 0!==i?i:0)+f/2;let y="",b="";return"bottom"===p?(y=u?m:`${v}px`,b=-f+"px"):"top"===p?(y=u?m:`${v}px`,b=`${l.floating.height+f}px`):"right"===p?(y=-f+"px",b=u?m:`${g}px`):"left"===p&&(y=`${l.floating.width+f}px`,b=u?m:`${g}px`),{data:{x:y,y:b}}}});function $n(e){const[t,n="center"]=e.split("-");return[t,n]}const In=t=>{const{__scopePopper:n,children:r}=t,[o,i]=e.useState(null);return e.createElement(xn,{scope:n,anchor:o,onAnchorChange:i},r)},Vn=Sn,Nn=Dn,Fn=e.forwardRef((function(t,n){const{__scopePopper:r,...o}=t,i=Tn("PopperArrow",r),s=On[i.placedSide];return e.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},e.createElement(vn,p({},o,{ref:n,style:{...o.style,display:"block"}})))})),jn="Popover",[Bn,Wn]=h(jn,[wn]),Hn=wn(),[Un,zn]=Bn(jn),Yn=e.forwardRef(((t,n)=>{const{__scopePopover:r,...o}=t,i=zn("PopoverTrigger",r),s=Hn(r),a=g(n,i.triggerRef),l=e.createElement(O.button,p({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":tr(i.open)},o,{ref:a,onClick:y(t.onClick,i.onOpenToggle)}));return i.hasCustomAnchor?l:e.createElement(Vn,p({asChild:!0},s),l)})),Xn="PopoverPortal",[Kn,qn]=Bn(Xn,{forceMount:void 0}),Gn="PopoverContent",Zn=e.forwardRef(((t,n)=>{const r=qn(Gn,t.__scopePopover),{forceMount:o=r.forceMount,...i}=t,s=zn(Gn,t.__scopePopover);return e.createElement(G,{present:o||s.open},s.modal?e.createElement(Jn,p({},i,{ref:n})):e.createElement(Qn,p({},i,{ref:n})))})),Jn=e.forwardRef(((t,n)=>{const r=zn(Gn,t.__scopePopover),o=e.useRef(null),i=g(n,o),s=e.useRef(!1);return e.useEffect((()=>{const e=o.current;if(e)return He(e)}),[]),e.createElement(Ie,{as:C,allowPinchZoom:!0},e.createElement(er,p({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:y(t.onCloseAutoFocus,(e=>{var t;e.preventDefault(),s.current||null===(t=r.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:y(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;s.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:y(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})))})),Qn=e.forwardRef(((t,n)=>{const r=zn(Gn,t.__scopePopover),o=e.useRef(!1);return e.createElement(er,p({},t,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{var n,i;(null===(n=t.onCloseAutoFocus)||void 0===n||n.call(t,e),e.defaultPrevented)||(o.current||null===(i=r.triggerRef.current)||void 0===i||i.focus(),e.preventDefault());o.current=!1},onInteractOutside:e=>{var n,i;null===(n=t.onInteractOutside)||void 0===n||n.call(t,e),e.defaultPrevented||(o.current=!0);const s=e.target;(null===(i=r.triggerRef.current)||void 0===i?void 0:i.contains(s))&&e.preventDefault()}}))})),er=e.forwardRef(((t,n)=>{const{__scopePopover:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...f}=t,h=zn(Gn,r),m=Hn(r);return Q(),e.createElement(W,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:s},e.createElement(I,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1)},e.createElement(Nn,p({"data-state":tr(h.open),role:"dialog",id:h.contentId},m,f,{ref:n,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))}));function tr(e){return e?"open":"closed"}const nr=t=>{const{__scopePopover:n,children:r,open:o,defaultOpen:i,onOpenChange:s,modal:a=!1}=t,l=Hn(n),c=e.useRef(null),[u,d]=e.useState(!1),[f=!1,p]=P({prop:o,defaultProp:i,onChange:s});return e.createElement(In,l,e.createElement(Un,{scope:n,contentId:E(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:e.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:u,onCustomAnchorAdd:e.useCallback((()=>d(!0)),[]),onCustomAnchorRemove:e.useCallback((()=>d(!1)),[]),modal:a},r))},rr=Yn,or=t=>{const{__scopePopover:n,forceMount:r,children:o,container:i}=t,s=zn(Xn,n);return e.createElement(Kn,{scope:n,forceMount:r},e.createElement(G,{present:r||s.open},e.createElement(q,{asChild:!0,container:i},o)))},ir=Zn,sr=e.forwardRef(((t,n)=>{const{__scopePopover:r,...o}=t,i=zn("PopoverClose",r);return e.createElement(O.button,p({type:"button"},o,{ref:n,onClick:y(t.onClick,(()=>i.onOpenChange(!1)))}))})),ar=e.forwardRef(((t,n)=>{const{__scopePopover:r,...o}=t,i=Hn(r);return e.createElement(Fn,p({},i,o,{ref:n}))})),lr="Progress",cr=100,[ur,dr]=h(lr),[fr,pr]=ur(lr),hr=e.forwardRef(((t,n)=>{const{__scopeProgress:r,value:o,max:i,getValueLabel:s=mr,...a}=t,l=yr(i)?i:cr,c=br(o,l)?o:null,u=gr(c)?s(c,l):void 0;return e.createElement(fr,{scope:r,value:c,max:l},e.createElement(O.div,p({"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":gr(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":vr(c,l),"data-value":null!=c?c:void 0,"data-max":l},a,{ref:n})))}));hr.propTypes={max(e,t,n){const r=e[t],o=String(r);return r&&!yr(r)?new Error(function(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`}(o,n)):null},value(e,t,n){const r=e[t],o=String(r),i=yr(e.max)?e.max:cr;return null==r||br(r,i)?null:new Error(function(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:\n - a positive number\n - less than the value passed to \`max\` (or 100 if no \`max\` prop is set)\n - \`null\` if the progress is indeterminate.\n\nDefaulting to \`null\`.`}(o,n))}};function mr(e,t){return`${Math.round(e/t*100)}%`}function vr(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function gr(e){return"number"==typeof e}function yr(e){return gr(e)&&!isNaN(e)&&e>0}function br(e,t){return gr(e)&&!isNaN(e)&&e<=t&&e>=0}const wr=hr,xr=e.forwardRef(((t,n)=>{var r;const{__scopeProgress:o,...i}=t,s=pr("ProgressIndicator",o);return e.createElement(O.div,p({"data-state":vr(s.value,s.max),"data-value":null!==(r=s.value)&&void 0!==r?r:void 0,"data-max":s.max},i,{ref:n}))}));function Er(t){const n=e.useRef({value:t,previous:t});return e.useMemo((()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous)),[t])}const Sr="Checkbox",[Pr,Cr]=h(Sr),[Tr,Rr]=Pr(Sr),Ar=e.forwardRef(((t,n)=>{const{__scopeCheckbox:r,name:o,checked:i,defaultChecked:s,required:a,disabled:l,value:c="on",onCheckedChange:u,...d}=t,[f,h]=e.useState(null),m=g(n,(e=>h(e))),v=e.useRef(!1),b=!f||Boolean(f.closest("form")),[w=!1,x]=P({prop:i,defaultProp:s,onChange:u}),E=e.useRef(w);return e.useEffect((()=>{const e=null==f?void 0:f.form;if(e){const t=()=>x(E.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[f,x]),e.createElement(Tr,{scope:r,state:w,disabled:l},e.createElement(O.button,p({type:"button",role:"checkbox","aria-checked":Or(w)?"mixed":w,"aria-required":a,"data-state":kr(w),"data-disabled":l?"":void 0,disabled:l,value:c},d,{ref:m,onKeyDown:y(t.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:y(t.onClick,(e=>{x((e=>!!Or(e)||!e)),b&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())}))})),b&&e.createElement(Dr,{control:f,bubbles:!v.current,name:o,value:c,checked:w,required:a,disabled:l,style:{transform:"translateX(-100%)"}}))})),Dr=t=>{const{control:n,checked:r,bubbles:o=!0,...i}=t,s=e.useRef(null),a=Er(r),l=gn(n);return e.useEffect((()=>{const e=s.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(a!==r&&n){const t=new Event("click",{bubbles:o});e.indeterminate=Or(r),n.call(e,!Or(r)&&r),e.dispatchEvent(t)}}),[a,r,o]),e.createElement("input",p({type:"checkbox","aria-hidden":!0,defaultChecked:!Or(r)&&r},i,{tabIndex:-1,ref:s,style:{...t.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Or(e){return"indeterminate"===e}function kr(e){return Or(e)?"indeterminate":e?"checked":"unchecked"}const Lr=Ar,Mr=e.forwardRef(((t,n)=>{const{__scopeCheckbox:r,forceMount:o,...i}=t,s=Rr("CheckboxIndicator",r);return e.createElement(G,{present:o||Or(s.state)||!0===s.state},e.createElement(O.span,p({"data-state":kr(s.state),"data-disabled":s.disabled?"":void 0},i,{ref:n,style:{pointerEvents:"none",...t.style}})))}));function _r(e,[t,n]){return Math.min(n,Math.max(t,e))}const $r=e.createContext(void 0);function Ir(t){const n=e.useContext($r);return t||n||"ltr"}const Vr=["PageUp","PageDown"],Nr=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Fr={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},jr="Slider",[Br,Wr,Hr]=function(t){const n=t+"CollectionProvider",[r,o]=h(n),[i,s]=r(n,{collectionRef:{current:null},itemMap:new Map}),a=t+"CollectionSlot",l=t+"CollectionItemSlot",c="data-radix-collection-item";return[{Provider:t=>{const{scope:n,children:r}=t,o=e.useRef(null),s=e.useRef(new Map).current;return e.createElement(i,{scope:n,itemMap:s,collectionRef:o},r)},Slot:e.forwardRef(((t,n)=>{const{scope:r,children:o}=t,i=g(n,s(a,r).collectionRef);return e.createElement(C,{ref:i},o)})),ItemSlot:e.forwardRef(((t,n)=>{const{scope:r,children:o,...i}=t,a=e.useRef(null),u=g(n,a),d=s(l,r);return e.useEffect((()=>(d.itemMap.set(a,{ref:a,...i}),()=>{d.itemMap.delete(a)}))),e.createElement(C,{[c]:"",ref:u},o)}))},function(n){const r=s(t+"CollectionConsumer",n);return e.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${c}]`));return Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[r.collectionRef,r.itemMap])},o]}(jr),[Ur,zr]=h(jr,[Hr]),[Yr,Xr]=Ur(jr),Kr=e.forwardRef(((t,n)=>{const{name:r,min:o=0,max:i=100,step:s=1,orientation:a="horizontal",disabled:l=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[o],value:d,onValueChange:f=(()=>{}),onValueCommit:h=(()=>{}),inverted:m=!1,...v}=t,[b,w]=e.useState(null),x=g(n,(e=>w(e))),E=e.useRef(new Set),S=e.useRef(0),C="horizontal"===a,T=!b||Boolean(b.closest("form")),R=C?Zr:Jr,[A=[],D]=P({prop:d,defaultProp:u,onChange:e=>{var t;null===(t=[...E.current][S.current])||void 0===t||t.focus(),f(e)}}),O=e.useRef(A);function k(e,t,{commit:n}={commit:!1}){const r=function(e){return(String(e).split(".")[1]||"").length}(s),a=function(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}(Math.round((e-o)/s)*s+o,r),l=_r(a,[o,i]);D(((e=[])=>{const r=function(e=[],t,n){const r=[...e];return r[n]=t,r.sort(((e,t)=>e-t))}(e,l,t);if(function(e,t){if(t>0){const n=function(e){return e.slice(0,-1).map(((t,n)=>e[n+1]-t))}(e);return Math.min(...n)>=t}return!0}(r,c*s)){S.current=r.indexOf(l);const t=String(r)!==String(e);return t&&n&&h(r),t?r:e}return e}))}return e.createElement(Yr,{scope:t.__scopeSlider,disabled:l,min:o,max:i,valueIndexToChangeRef:S,thumbs:E.current,values:A,orientation:a},e.createElement(Br.Provider,{scope:t.__scopeSlider},e.createElement(Br.Slot,{scope:t.__scopeSlider},e.createElement(R,p({"aria-disabled":l,"data-disabled":l?"":void 0},v,{ref:x,onPointerDown:y(v.onPointerDown,(()=>{l||(O.current=A)})),min:o,max:i,inverted:m,onSlideStart:l?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const n=e.map((e=>Math.abs(e-t))),r=Math.min(...n);return n.indexOf(r)}(A,e);k(e,t)},onSlideMove:l?void 0:function(e){k(e,S.current)},onSlideEnd:l?void 0:function(){const e=O.current[S.current];A[S.current]!==e&&h(A)},onHomeKeyDown:()=>!l&&k(o,0,{commit:!0}),onEndKeyDown:()=>!l&&k(i,A.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!l){const n=Vr.includes(e.key)||e.shiftKey&&Nr.includes(e.key)?10:1,r=S.current;k(A[r]+s*n*t,r,{commit:!0})}}})))),T&&A.map(((t,n)=>e.createElement(so,{key:n,name:r?r+(A.length>1?"[]":""):void 0,value:t}))))})),[qr,Gr]=Ur(jr,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Zr=e.forwardRef(((t,n)=>{const{min:r,max:o,dir:i,inverted:s,onSlideStart:a,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...d}=t,[f,h]=e.useState(null),m=g(n,(e=>h(e))),v=e.useRef(),y=Ir(i),b="ltr"===y,w=b&&!s||!b&&s;function x(e){const t=v.current||f.getBoundingClientRect(),n=lo([0,t.width],w?[r,o]:[o,r]);return v.current=t,n(e-t.left)}return e.createElement(qr,{scope:t.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width"},e.createElement(Qr,p({dir:y,"data-orientation":"horizontal"},d,{ref:m,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=x(e.clientX);null==a||a(t)},onSlideMove:e=>{const t=x(e.clientX);null==l||l(t)},onSlideEnd:()=>{v.current=void 0,null==c||c()},onStepKeyDown:e=>{const t=Fr[w?"from-left":"from-right"].includes(e.key);null==u||u({event:e,direction:t?-1:1})}})))})),Jr=e.forwardRef(((t,n)=>{const{min:r,max:o,inverted:i,onSlideStart:s,onSlideMove:a,onSlideEnd:l,onStepKeyDown:c,...u}=t,d=e.useRef(null),f=g(n,d),h=e.useRef(),m=!i;function v(e){const t=h.current||d.current.getBoundingClientRect(),n=lo([0,t.height],m?[o,r]:[r,o]);return h.current=t,n(e-t.top)}return e.createElement(qr,{scope:t.__scopeSlider,startEdge:m?"bottom":"top",endEdge:m?"top":"bottom",size:"height",direction:m?1:-1},e.createElement(Qr,p({"data-orientation":"vertical"},u,{ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=v(e.clientY);null==s||s(t)},onSlideMove:e=>{const t=v(e.clientY);null==a||a(t)},onSlideEnd:()=>{h.current=void 0,null==l||l()},onStepKeyDown:e=>{const t=Fr[m?"from-bottom":"from-top"].includes(e.key);null==c||c({event:e,direction:t?-1:1})}})))})),Qr=e.forwardRef(((t,n)=>{const{__scopeSlider:r,onSlideStart:o,onSlideMove:i,onSlideEnd:s,onHomeKeyDown:a,onEndKeyDown:l,onStepKeyDown:c,...u}=t,d=Xr(jr,r);return e.createElement(O.span,p({},u,{ref:n,onKeyDown:y(t.onKeyDown,(e=>{"Home"===e.key?(a(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):Vr.concat(Nr).includes(e.key)&&(c(e),e.preventDefault())})),onPointerDown:y(t.onPointerDown,(e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),d.thumbs.has(t)?t.focus():o(e)})),onPointerMove:y(t.onPointerMove,(e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)})),onPointerUp:y(t.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),s(e))}))}))})),eo=e.forwardRef(((t,n)=>{const{__scopeSlider:r,...o}=t,i=Xr("SliderTrack",r);return e.createElement(O.span,p({"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation},o,{ref:n}))})),to="SliderRange",no=e.forwardRef(((t,n)=>{const{__scopeSlider:r,...o}=t,i=Xr(to,r),s=Gr(to,r),a=g(n,e.useRef(null)),l=i.values.length,c=i.values.map((e=>ao(e,i.min,i.max))),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return e.createElement(O.span,p({"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0},o,{ref:a,style:{...t.style,[s.startEdge]:u+"%",[s.endEdge]:d+"%"}}))})),ro="SliderThumb",oo=e.forwardRef(((t,n)=>{const r=Wr(t.__scopeSlider),[o,i]=e.useState(null),s=g(n,(e=>i(e))),a=e.useMemo((()=>o?r().findIndex((e=>e.ref.current===o)):-1),[r,o]);return e.createElement(io,p({},t,{ref:s,index:a}))})),io=e.forwardRef(((t,n)=>{const{__scopeSlider:r,index:o,...i}=t,s=Xr(ro,r),a=Gr(ro,r),[l,c]=e.useState(null),u=g(n,(e=>c(e))),d=gn(l),f=s.values[o],h=void 0===f?0:ao(f,s.min,s.max),m=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(o,s.values.length),v=null==d?void 0:d[a.size],b=v?function(e,t,n){const r=e/2,o=lo([0,50],[0,r]);return(r-o(t)*n)*n}(v,h,a.direction):0;return e.useEffect((()=>{if(l)return s.thumbs.add(l),()=>{s.thumbs.delete(l)}}),[l,s.thumbs]),e.createElement("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${h}% + ${b}px)`}},e.createElement(Br.ItemSlot,{scope:t.__scopeSlider},e.createElement(O.span,p({role:"slider","aria-label":t["aria-label"]||m,"aria-valuemin":s.min,"aria-valuenow":f,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0},i,{ref:u,style:void 0===f?{display:"none"}:t.style,onFocus:y(t.onFocus,(()=>{s.valueIndexToChangeRef.current=o}))}))))})),so=t=>{const{value:n,...r}=t,o=e.useRef(null),i=Er(n);return e.useEffect((()=>{const e=o.current,t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&r){const t=new Event("input",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[i,n]),e.createElement("input",p({style:{display:"none"}},r,{ref:o,defaultValue:n}))};function ao(e,t,n){return 100/(n-t)*(e-t)}function lo(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}const co=Kr,uo=eo,fo=no,po=oo;function ho(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function mo(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function vo(...t){return e.useCallback(mo(...t),t)}function go(t,n=[]){let r=[];const o=()=>{const n=r.map((t=>e.createContext(t)));return function(r){const o=(null==r?void 0:r[t])||n;return e.useMemo((()=>({[`__scope${t}`]:{...r,[t]:o}})),[r,o])}};return o.scopeName=t,[function(n,o){const i=e.createContext(o),s=r.length;function a(n){const{scope:r,children:o,...a}=n,l=(null==r?void 0:r[t][s])||i,c=e.useMemo((()=>a),Object.values(a));return e.createElement(l.Provider,{value:c},o)}return r=[...r,o],a.displayName=n+"Provider",[a,function(r,a){const l=(null==a?void 0:a[t][s])||i,c=e.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},yo(o,...n)]}function yo(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=r.reduce(((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]})),{});return e.useMemo((()=>({[`__scope${n.scopeName}`]:o})),[o])}};return r.scopeName=n.scopeName,r}const bo=e.forwardRef(((t,n)=>{const{children:r,...o}=t,i=e.Children.toArray(r),s=i.find(Eo);if(s){const t=s.props.children,r=i.map((n=>n===s?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n));return e.createElement(wo,p({},o,{ref:n}),e.isValidElement(t)?e.cloneElement(t,void 0,r):null)}return e.createElement(wo,p({},o,{ref:n}),r)}));bo.displayName="Slot";const wo=e.forwardRef(((t,n)=>{const{children:r,...o}=t;return e.isValidElement(r)?e.cloneElement(r,{...So(o,r.props),ref:n?mo(n,r.ref):r.ref}):e.Children.count(r)>1?e.Children.only(null):null}));wo.displayName="SlotClone";const xo=({children:t})=>e.createElement(e.Fragment,null,t);function Eo(t){return e.isValidElement(t)&&t.type===xo}function So(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const Po=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,n)=>{const r=e.forwardRef(((t,r)=>{const{asChild:o,...i}=t,s=o?bo:n;return e.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),e.createElement(s,p({},i,{ref:r}))}));return r.displayName=`Primitive.${n}`,{...t,[n]:r}}),{});function Co(t){const n=t+"CollectionProvider",[r,o]=go(n),[i,s]=r(n,{collectionRef:{current:null},itemMap:new Map}),a=t+"CollectionSlot",l=t+"CollectionItemSlot",c="data-radix-collection-item";return[{Provider:t=>{const{scope:n,children:r}=t,o=e.useRef(null),s=e.useRef(new Map).current;return e.createElement(i,{scope:n,itemMap:s,collectionRef:o},r)},Slot:e.forwardRef(((t,n)=>{const{scope:r,children:o}=t,i=vo(n,s(a,r).collectionRef);return e.createElement(bo,{ref:i},o)})),ItemSlot:e.forwardRef(((t,n)=>{const{scope:r,children:o,...i}=t,a=e.useRef(null),u=vo(n,a),d=s(l,r);return e.useEffect((()=>(d.itemMap.set(a,{ref:a,...i}),()=>{d.itemMap.delete(a)}))),e.createElement(bo,{[c]:"",ref:u},o)}))},function(n){const r=s(t+"CollectionConsumer",n);return e.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${c}]`));return Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[r.collectionRef,r.itemMap])},o]}const To=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?e.useLayoutEffect:()=>{},Ro=r["useId".toString()]||(()=>{});let Ao=0;function Do(e){const[t,n]=r.useState(Ro());return To((()=>{e||n((e=>null!=e?e:String(Ao++)))}),[e]),e||(t?`radix-${t}`:"")}function Oo(t){const n=e.useRef(t);return e.useEffect((()=>{n.current=t})),e.useMemo((()=>(...e)=>{var t;return null===(t=n.current)||void 0===t?void 0:t.call(n,...e)}),[])}function ko({prop:t,defaultProp:n,onChange:r=(()=>{})}){const[o,i]=function({defaultProp:t,onChange:n}){const r=e.useState(t),[o]=r,i=e.useRef(o),s=Oo(n);return e.useEffect((()=>{i.current!==o&&(s(o),i.current=o)}),[o,i,s]),r}({defaultProp:n,onChange:r}),s=void 0!==t,a=s?t:o,l=Oo(r);return[a,e.useCallback((e=>{if(s){const n="function"==typeof e?e(t):e;n!==t&&l(n)}else i(e)}),[s,t,i,l])]}const Lo=e.createContext(void 0);function Mo(t){const n=e.useContext(Lo);return t||n||"ltr"}const _o="rovingFocusGroup.onEntryFocus",$o={bubbles:!1,cancelable:!0},Io="RovingFocusGroup",[Vo,No,Fo]=Co(Io),[jo,Bo]=go(Io,[Fo]),[Wo,Ho]=jo(Io),Uo=e.forwardRef(((t,n)=>e.createElement(Vo.Provider,{scope:t.__scopeRovingFocusGroup},e.createElement(Vo.Slot,{scope:t.__scopeRovingFocusGroup},e.createElement(zo,p({},t,{ref:n})))))),zo=e.forwardRef(((t,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:i=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,...d}=t,f=e.useRef(null),h=vo(n,f),m=Mo(s),[v=null,g]=ko({prop:a,defaultProp:l,onChange:c}),[y,b]=e.useState(!1),w=Oo(u),x=No(r),E=e.useRef(!1),[S,P]=e.useState(0);return e.useEffect((()=>{const e=f.current;if(e)return e.addEventListener(_o,w),()=>e.removeEventListener(_o,w)}),[w]),e.createElement(Wo,{scope:r,orientation:o,dir:m,loop:i,currentTabStopId:v,onItemFocus:e.useCallback((e=>g(e)),[g]),onItemShiftTab:e.useCallback((()=>b(!0)),[]),onFocusableItemAdd:e.useCallback((()=>P((e=>e+1))),[]),onFocusableItemRemove:e.useCallback((()=>P((e=>e-1))),[])},e.createElement(Po.div,p({tabIndex:y||0===S?-1:0,"data-orientation":o},d,{ref:h,style:{outline:"none",...t.style},onMouseDown:ho(t.onMouseDown,(()=>{E.current=!0})),onFocus:ho(t.onFocus,(e=>{const t=!E.current;if(e.target===e.currentTarget&&t&&!y){const t=new CustomEvent(_o,$o);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=x().filter((e=>e.focusable));Ko([e.find((e=>e.active)),e.find((e=>e.id===v)),...e].filter(Boolean).map((e=>e.ref.current)))}}E.current=!1})),onBlur:ho(t.onBlur,(()=>b(!1)))})))})),Yo=e.forwardRef(((t,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:i=!1,tabStopId:s,...a}=t,l=Do(),c=s||l,u=Ho("RovingFocusGroupItem",r),d=u.currentTabStopId===c,f=No(r),{onFocusableItemAdd:h,onFocusableItemRemove:m}=u;return e.useEffect((()=>{if(o)return h(),()=>m()}),[o,h,m]),e.createElement(Vo.ItemSlot,{scope:r,id:c,focusable:o,active:i},e.createElement(Po.span,p({tabIndex:d?0:-1,"data-orientation":u.orientation},a,{ref:n,onMouseDown:ho(t.onMouseDown,(e=>{o?u.onItemFocus(c):e.preventDefault()})),onFocus:ho(t.onFocus,(()=>u.onItemFocus(c))),onKeyDown:ho(t.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Xo[r]}(e,u.orientation,u.dir);if(void 0!==t){e.preventDefault();let o=f().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=u.loop?(r=i+1,(n=o).map(((e,t)=>n[(r+t)%n.length]))):o.slice(i+1)}setTimeout((()=>Ko(o)))}var n,r}))})))})),Xo={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ko(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const qo=Uo,Go=Yo;function Zo(t){const[n,r]=e.useState(void 0);return To((()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const n=e[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=t.offsetWidth,i=t.offsetHeight;r({width:o,height:i})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}r(void 0)}),[t]),n}function Jo(t){const n=e.useRef({value:t,previous:t});return e.useMemo((()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous)),[t])}const Qo=n=>{const{present:r,children:o}=n,i=function(n){const[r,o]=e.useState(),i=e.useRef({}),s=e.useRef(n),a=e.useRef("none"),l=n?"mounted":"unmounted",[c,u]=function(t,n){return e.useReducer(((e,t)=>{const r=n[e][t];return null!=r?r:e}),t)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=ei(i.current);a.current="mounted"===c?e:"none"}),[c]),To((()=>{const e=i.current,t=s.current;if(t!==n){const r=a.current,o=ei(e);if(n)u("MOUNT");else if("none"===o||"none"===(null==e?void 0:e.display))u("UNMOUNT");else{u(t&&r!==o?"ANIMATION_OUT":"UNMOUNT")}s.current=n}}),[n,u]),To((()=>{if(r){const e=e=>{const n=ei(i.current).includes(e.animationName);e.target===r&&n&&t.flushSync((()=>u("ANIMATION_END")))},n=e=>{e.target===r&&(a.current=ei(i.current))};return r.addEventListener("animationstart",n),r.addEventListener("animationcancel",e),r.addEventListener("animationend",e),()=>{r.removeEventListener("animationstart",n),r.removeEventListener("animationcancel",e),r.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[r,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:e.useCallback((e=>{e&&(i.current=getComputedStyle(e)),o(e)}),[])}}(r),s="function"==typeof o?o({present:i.isPresent}):e.Children.only(o),a=vo(i.ref,s.ref);return"function"==typeof o||i.isPresent?e.cloneElement(s,{ref:a}):null};function ei(e){return(null==e?void 0:e.animationName)||"none"}Qo.displayName="Presence";const ti="Radio",[ni,ri]=go(ti),[oi,ii]=ni(ti),si=e.forwardRef(((t,n)=>{const{__scopeRadio:r,name:o,checked:i=!1,required:s,disabled:a,value:l="on",onCheck:c,...u}=t,[d,f]=e.useState(null),h=vo(n,(e=>f(e))),m=e.useRef(!1),v=!d||Boolean(d.closest("form"));return e.createElement(oi,{scope:r,checked:i,disabled:a},e.createElement(Po.button,p({type:"button",role:"radio","aria-checked":i,"data-state":ci(i),"data-disabled":a?"":void 0,disabled:a,value:l},u,{ref:h,onClick:ho(t.onClick,(e=>{i||null==c||c(),v&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))})),v&&e.createElement(li,{control:d,bubbles:!m.current,name:o,value:l,checked:i,required:s,disabled:a,style:{transform:"translateX(-100%)"}}))})),ai=e.forwardRef(((t,n)=>{const{__scopeRadio:r,forceMount:o,...i}=t,s=ii("RadioIndicator",r);return e.createElement(Qo,{present:o||s.checked},e.createElement(Po.span,p({"data-state":ci(s.checked),"data-disabled":s.disabled?"":void 0},i,{ref:n})))})),li=t=>{const{control:n,checked:r,bubbles:o=!0,...i}=t,s=e.useRef(null),a=Jo(r),l=Zo(n);return e.useEffect((()=>{const e=s.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(a!==r&&n){const t=new Event("click",{bubbles:o});n.call(e,r),e.dispatchEvent(t)}}),[a,r,o]),e.createElement("input",p({type:"radio","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:s,style:{...t.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function ci(e){return e?"checked":"unchecked"}const ui=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],di="RadioGroup",[fi,pi]=go(di,[Bo,ri]),hi=Bo(),mi=ri(),[vi,gi]=fi(di),yi=e.forwardRef(((t,n)=>{const{__scopeRadioGroup:r,name:o,defaultValue:i,value:s,required:a=!1,disabled:l=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...h}=t,m=hi(r),v=Mo(u),[g,y]=ko({prop:s,defaultProp:i,onChange:f});return e.createElement(vi,{scope:r,name:o,required:a,disabled:l,value:g,onValueChange:y},e.createElement(qo,p({asChild:!0},m,{orientation:c,dir:v,loop:d}),e.createElement(Po.div,p({role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":l?"":void 0,dir:v},h,{ref:n}))))})),bi=e.forwardRef(((t,n)=>{const{__scopeRadioGroup:r,disabled:o,...i}=t,s=gi("RadioGroupItem",r),a=s.disabled||o,l=hi(r),c=mi(r),u=e.useRef(null),d=vo(n,u),f=s.value===i.value,h=e.useRef(!1);return e.useEffect((()=>{const e=e=>{ui.includes(e.key)&&(h.current=!0)},t=()=>h.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),e.createElement(Go,p({asChild:!0},l,{focusable:!a,active:f}),e.createElement(si,p({disabled:a,required:s.required,checked:f},c,i,{name:s.name,ref:d,onCheck:()=>s.onValueChange(i.value),onKeyDown:ho((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:ho(i.onFocus,(()=>{var e;h.current&&(null===(e=u.current)||void 0===e||e.click())}))})))})),wi=e.forwardRef(((t,n)=>{const{__scopeRadioGroup:r,...o}=t,i=mi(r);return e.createElement(ai,p({},i,o,{ref:n}))}));function xi(e,[t,n]){return Math.min(n,Math.max(t,e))}const Ei="dismissableLayer.update",Si="dismissableLayer.pointerDownOutside",Pi="dismissableLayer.focusOutside";let Ci;const Ti=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ri=e.forwardRef(((t,n)=>{var r;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:l,onDismiss:c,...u}=t,d=e.useContext(Ti),[f,h]=e.useState(null),m=null!==(r=null==f?void 0:f.ownerDocument)&&void 0!==r?r:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,v]=e.useState({}),g=vo(n,(e=>h(e))),y=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=y.indexOf(b),x=f?y.indexOf(f):-1,E=d.layersWithOutsidePointerEventsDisabled.size>0,S=x>=w,P=function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Oo(t),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){Di(Si,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",i.current),i.current=t,n.addEventListener("click",i.current,{once:!0})):t()}o.current=!1},t=window.setTimeout((()=>{n.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",i.current)}}),[n,r]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));S&&!n&&(null==s||s(e),null==l||l(e),e.defaultPrevented||null==c||c())}),m),C=function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Oo(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){Di(Pi,r,{originalEvent:e},{discrete:!1})}};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)}),[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==c||c())}),m);return function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Oo(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e),()=>n.removeEventListener("keydown",e)}),[r,n])}((e=>{x===d.layers.size-1&&(null==i||i(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),m),e.useEffect((()=>{if(f)return o&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(Ci=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Ai(),()=>{o&&1===d.layersWithOutsidePointerEventsDisabled.size&&(m.body.style.pointerEvents=Ci)}}),[f,m,o,d]),e.useEffect((()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Ai())}),[f,d]),e.useEffect((()=>{const e=()=>v({});return document.addEventListener(Ei,e),()=>document.removeEventListener(Ei,e)}),[]),e.createElement(Po.div,p({},u,{ref:g,style:{pointerEvents:E?S?"auto":"none":void 0,...t.style},onFocusCapture:ho(t.onFocusCapture,C.onFocusCapture),onBlurCapture:ho(t.onBlurCapture,C.onBlurCapture),onPointerDownCapture:ho(t.onPointerDownCapture,P.onPointerDownCapture)}))}));function Ai(){const e=new CustomEvent(Ei);document.dispatchEvent(e)}function Di(e,n,r,{discrete:o}){const i=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});n&&i.addEventListener(e,n,{once:!0}),o?function(e,n){e&&t.flushSync((()=>e.dispatchEvent(n)))}(i,s):i.dispatchEvent(s)}let Oi=0;function ki(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const Li="focusScope.autoFocusOnMount",Mi="focusScope.autoFocusOnUnmount",_i={bubbles:!1,cancelable:!0},$i=e.forwardRef(((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=t,[l,c]=e.useState(null),u=Oo(i),d=Oo(s),f=e.useRef(null),h=vo(n,(e=>c(e))),m=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){let e=function(e){if(m.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:Fi(f.current,{select:!0})},t=function(e){if(m.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||Fi(f.current,{select:!0}))},n=function(e){const t=document.activeElement;for(const n of e)n.removedNodes.length>0&&(null!=l&&l.contains(t)||Fi(l))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[o,l,m.paused]),e.useEffect((()=>{if(l){ji.add(m);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(Li,_i);l.addEventListener(Li,u),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Fi(r,{select:t}),document.activeElement!==n)return}((e=Ii(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Fi(l))}return()=>{l.removeEventListener(Li,u),setTimeout((()=>{const e=new CustomEvent(Mi,_i);l.addEventListener(Mi,d),l.dispatchEvent(e),e.defaultPrevented||Fi(null!=t?t:document.body,{select:!0}),l.removeEventListener(Mi,d),ji.remove(m)}),0)}}var e}),[l,u,d,m]);const v=e.useCallback((e=>{if(!r&&!o)return;if(m.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,i]=function(e){const t=Ii(e),n=Vi(t,e),r=Vi(t.reverse(),e);return[n,r]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&Fi(i,{select:!0})):(e.preventDefault(),r&&Fi(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,m.paused]);return e.createElement(Po.div,p({tabIndex:-1},a,{ref:h,onKeyDown:v}))}));function Ii(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Vi(e,t){for(const n of e)if(!Ni(n,{upTo:t}))return n}function Ni(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Fi(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const ji=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=Bi(e,t),e.unshift(t)},remove(t){var n;e=Bi(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function Bi(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function Wi(e){return e.split("-")[1]}function Hi(e){return"y"===e?"height":"width"}function Ui(e){return e.split("-")[0]}function zi(e){return["top","bottom"].includes(Ui(e))?"x":"y"}function Yi(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,s=r.y+r.height/2-o.height/2,a=zi(t),l=Hi(a),c=r[l]/2-o[l]/2,u="x"===a;let d;switch(Ui(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:s};break;case"left":d={x:r.x-o.width,y:s};break;default:d={x:r.x,y:r.y}}switch(Wi(t)){case"start":d[a]-=c*(n&&u?-1:1);break;case"end":d[a]+=c*(n&&u?-1:1)}return d}function Xi(e,t){return"function"==typeof e?e(t):e}function Ki(e){return"number"!=typeof e?(t=e,{top:0,right:0,bottom:0,left:0,...t}):{top:e,right:e,bottom:e,left:e};var t}function qi(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Gi(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Xi(t,e),h=Ki(p),m=a[f?"floating"===d?"reference":"floating":d],v=qi(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),g="floating"===d?{...s.floating,x:r,y:o}:s.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=qi(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:g,offsetParent:y,strategy:l}):g);return{top:(v.top-w.top+h.top)/b.y,bottom:(w.bottom-v.bottom+h.bottom)/b.y,left:(v.left-w.left+h.left)/b.x,right:(w.right-v.right+h.right)/b.x}}const Zi=Math.min,Ji=Math.max;function Qi(e,t,n){return Ji(e,Zi(t,n))}const es=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a}=t,{element:l,padding:c=0}=Xi(e,t)||{};if(null==l)return{};const u=Ki(c),d={x:n,y:r},f=zi(o),p=Hi(f),h=await s.getDimensions(l),m="y"===f,v=m?"top":"left",g=m?"bottom":"right",y=m?"clientHeight":"clientWidth",b=i.reference[p]+i.reference[f]-d[f]-i.floating[p],w=d[f]-i.reference[f],x=await(null==s.getOffsetParent?void 0:s.getOffsetParent(l));let E=x?x[y]:0;E&&await(null==s.isElement?void 0:s.isElement(x))||(E=a.floating[y]||i.floating[p]);const S=b/2-w/2,P=E/2-h[p]/2-1,C=Zi(u[v],P),T=Zi(u[g],P),R=C,A=E-h[p]-T,D=E/2-h[p]/2+S,O=Qi(R,D,A),k=null!=Wi(o)&&D!=O&&i.reference[p]/2-(D<R?C:T)-h[p]/2<0?D<R?R-D:A-D:0;return{[f]:d[f]-k,data:{[f]:O,centerOffset:D-O+k}}}}),ts=["top","right","bottom","left"];ts.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const ns={left:"right",right:"left",bottom:"top",top:"bottom"};function rs(e){return e.replace(/left|right|bottom|top/g,(e=>ns[e]))}const os={start:"end",end:"start"};function is(e){return e.replace(/start|end/g,(e=>os[e]))}const ss=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:s,platform:a,elements:l}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...m}=Xi(e,t),v=Ui(r),g=Ui(s)===s,y=await(null==a.isRTL?void 0:a.isRTL(l.floating)),b=d||(g||!h?[rs(s)]:function(e){const t=rs(e);return[is(e),t,is(t)]}(s));d||"none"===p||b.push(...function(e,t,n,r){const o=Wi(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}(Ui(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(is)))),i}(s,h,p,y));const w=[s,...b],x=await Gi(t,m),E=[];let S=(null==(n=o.flip)?void 0:n.overflows)||[];if(c&&E.push(x[v]),u){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=Wi(e),o=zi(e),i=Hi(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=rs(s)),{main:s,cross:rs(s)}}(r,i,y);E.push(x[e],x[t])}if(S=[...S,{placement:r,overflows:E}],!E.every((e=>e<=0))){var P,C;const e=((null==(P=o.flip)?void 0:P.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let n=null==(C=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:C.placement;if(!n)switch(f){case"bestFit":{var T;const e=null==(T=S.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:T[0];e&&(n=e);break}case"initialPlacement":n=s}if(r!==n)return{reset:{placement:n}}}return{}}}};function as(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ls(e){return ts.some((t=>e[t]>=0))}const cs=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Xi(e,t);switch(r){case"referenceHidden":{const e=as(await Gi(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ls(e)}}}case"escaped":{const e=as(await Gi(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:ls(e)}}}default:return{}}}}};function us(e){return"x"===e?"y":"x"}const ds=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Xi(e,t),c={x:n,y:r},u=await Gi(t,l),d=zi(Ui(o)),f=us(d);let p=c[d],h=c[f];if(i){const e="y"===d?"bottom":"right";p=Qi(p+u["y"===d?"top":"left"],p,p-u[e])}if(s){const e="y"===f?"bottom":"right";h=Qi(h+u["y"===f?"top":"left"],h,h-u[e])}const m=a.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},fs=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=(()=>{}),...a}=Xi(e,t),l=await Gi(t,a),c=Ui(n),u=Wi(n),d="x"===zi(n),{width:f,height:p}=r.floating;let h,m;"top"===c||"bottom"===c?(h=c,m=u===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=c,h="end"===u?"top":"bottom");const v=p-l[h],g=f-l[m],y=!t.middlewareData.shift;let b=v,w=g;if(d){const e=f-l.left-l.right;w=u||y?Zi(g,e):e}else{const e=p-l.top-l.bottom;b=u||y?Zi(v,e):e}if(y&&!u){const e=Ji(l.left,0),t=Ji(l.right,0),n=Ji(l.top,0),r=Ji(l.bottom,0);d?w=f-2*(0!==e||0!==t?e+t:Ji(l.left,l.right)):b=p-2*(0!==n||0!==r?n+r:Ji(l.top,l.bottom))}await s({...t,availableWidth:w,availableHeight:b});const x=await o.getDimensions(i.floating);return f!==x.width||p!==x.height?{reset:{rects:!0}}:{}}}};function ps(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function hs(e){return ps(e).getComputedStyle(e)}function ms(e){return e instanceof ps(e).Node}function vs(e){return ms(e)?(e.nodeName||"").toLowerCase():"#document"}function gs(e){return e instanceof HTMLElement||e instanceof ps(e).HTMLElement}function ys(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ps(e).ShadowRoot||e instanceof ShadowRoot)}function bs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=hs(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ws(e){return["table","td","th"].includes(vs(e))}function xs(e){const t=Es(),n=hs(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Es(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ss(e){return["html","body","#document"].includes(vs(e))}const Ps=Math.min,Cs=Math.max,Ts=Math.round,Rs=Math.floor,As=e=>({x:e,y:e});function Ds(e){const t=hs(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=gs(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Ts(n)!==i||Ts(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Os(e){return e instanceof Element||e instanceof ps(e).Element}function ks(e){return Os(e)?e:e.contextElement}function Ls(e){const t=ks(e);if(!gs(t))return As(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ds(t);let s=(i?Ts(n.width):n.width)/r,a=(i?Ts(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Ms=As(0);function _s(e){const t=ps(e);return Es()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ms}function $s(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=ks(e);let s=As(1);t&&(r?Os(r)&&(s=Ls(r)):s=Ls(e));const a=(l=i,void 0===(c=n)&&(c=!1),!(u=r)||c&&u!==ps(l)||!c?As(0):_s(i));var l,c,u;let d=(o.left+a.x)/s.x,f=(o.top+a.y)/s.y,p=o.width/s.x,h=o.height/s.y;if(i){const e=ps(i),t=r&&Os(r)?ps(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=Ls(n),t=n.getBoundingClientRect(),r=getComputedStyle(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;d*=e.x,f*=e.y,p*=e.x,h*=e.y,d+=o,f+=i,n=ps(n).frameElement}}return qi({width:p,height:h,x:d,y:f})}function Is(e){return Os(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Vs(e){var t;return null==(t=(ms(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Ns(e){return $s(Vs(e)).left+Is(e).scrollLeft}function Fs(e){if("html"===vs(e))return e;const t=e.assignedSlot||e.parentNode||ys(e)&&e.host||Vs(e);return ys(t)?t.host:t}function js(e){const t=Fs(e);return Ss(t)?e.ownerDocument?e.ownerDocument.body:e.body:gs(t)&&bs(t)?t:js(t)}function Bs(e,t){var n;void 0===t&&(t=[]);const r=js(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=ps(r);return o?t.concat(i,i.visualViewport||[],bs(r)?r:[]):t.concat(r,Bs(r))}function Ws(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=ps(e),r=Vs(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=Es();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=Vs(e),n=Is(e),r=e.ownerDocument.body,o=Cs(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Cs(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Ns(e);const a=-n.scrollTop;return"rtl"===hs(r).direction&&(s+=Cs(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(Vs(e));else if(Os(t))r=function(e,t){const n=$s(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=gs(e)?Ls(e):As(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=_s(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return qi(r)}function Hs(e,t){const n=Fs(e);return!(n===t||!Os(n)||Ss(n))&&("fixed"===hs(n).position||Hs(n,t))}function Us(e,t,n){const r=gs(t),o=Vs(t),i="fixed"===n,s=$s(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=As(0);if(r||!r&&!i)if(("body"!==vs(t)||bs(o))&&(a=Is(t)),gs(t)){const e=$s(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=Ns(o));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function zs(e,t){return gs(e)&&"fixed"!==hs(e).position?t?t(e):e.offsetParent:null}function Ys(e,t){const n=ps(e);if(!gs(e))return n;let r=zs(e,t);for(;r&&ws(r)&&"static"===hs(r).position;)r=zs(r,t);return r&&("html"===vs(r)||"body"===vs(r)&&"static"===hs(r).position&&!xs(r))?n:r||function(e){let t=Fs(e);for(;gs(t)&&!Ss(t);){if(xs(t))return t;t=Fs(t)}return null}(e)||n}const Xs={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=gs(n),i=Vs(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a=As(1);const l=As(0);if((o||!o&&"fixed"!==r)&&(("body"!==vs(n)||bs(i))&&(s=Is(n)),gs(n))){const e=$s(n);a=Ls(n),l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+l.x,y:t.y*a.y-s.scrollTop*a.y+l.y}},getDocumentElement:Vs,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=Bs(e).filter((e=>Os(e)&&"body"!==vs(e))),o=null;const i="fixed"===hs(e).position;let s=i?Fs(e):e;for(;Os(s)&&!Ss(s);){const t=hs(s),n=xs(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||bs(s)&&!n&&Hs(e,s))?r=r.filter((e=>e!==s)):o=t,s=Fs(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],a=i.reduce(((e,n)=>{const r=Ws(t,n,o);return e.top=Cs(r.top,e.top),e.right=Ps(r.right,e.right),e.bottom=Ps(r.bottom,e.bottom),e.left=Cs(r.left,e.left),e}),Ws(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Ys,getElementRects:async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||Ys,i=this.getDimensions;return{reference:Us(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return Ds(e)},getScale:Ls,isElement:Os,isRTL:function(e){return"rtl"===getComputedStyle(e).direction}};function Ks(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=ks(e),u=o||i?[...c?Bs(c):[],...Bs(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&a?function(e,t){let n,r=null;const o=Vs(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const p={rootMargin:-Rs(u)+"px "+-Rs(o.clientWidth-(c+d))+"px "+-Rs(o.clientHeight-(u+f))+"px "+-Rs(c)+"px",threshold:Cs(0,Ps(1,l))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),100)}h=!1}try{r=new IntersectionObserver(m,{...p,root:o.ownerDocument})}catch(v){r=new IntersectionObserver(m,p)}r.observe(e)}(!0),i}(c,n):null;let f,p=-1,h=null;s&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{h&&h.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let m=l?$s(e):null;return l&&function t(){const r=$s(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n(),m=r,f=requestAnimationFrame(t)}(),n(),()=>{u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),d&&d(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const qs=(e,t,n)=>{const r=new Map,o={platform:Xs,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Yi(c,r,l),f=r,p={},h=0;for(let m=0;m<a.length;m++){const{name:n,fn:i}=a[m],{x:v,y:g,data:y,reset:b}=await i({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=g?g:d,p={...p,[n]:{...p[n],...y}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=Yi(c,f,l))),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})},Gs=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?es({element:n.current,padding:r}).fn(t):{}:n?es({element:n,padding:r}).fn(t):{};var o}});var Zs="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function Js(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!Js(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;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Js(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Qs(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ea(e,t){const n=Qs(e);return Math.round(t*n)/n}function ta(e){const t=r.useRef(e);return Zs((()=>{t.current=e})),t}const na=e.forwardRef(((t,n)=>{const{children:r,width:o=10,height:i=5,...s}=t;return e.createElement(Po.svg,p({},s,{ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),t.asChild?r:e.createElement("polygon",{points:"0,0 30,0 15,10"}))})),ra="Popper",[oa,ia]=go(ra),[sa,aa]=oa(ra),la=e.forwardRef(((t,n)=>{const{__scopePopper:r,virtualRef:o,...i}=t,s=aa("PopperAnchor",r),a=e.useRef(null),l=vo(n,a);return e.useEffect((()=>{s.onAnchorChange((null==o?void 0:o.current)||a.current)})),o?null:e.createElement(Po.div,p({},i,{ref:l}))})),ca="PopperContent",[ua,da]=oa(ca),fa=e.forwardRef(((t,n)=>{var i,s,a,l,c,u,d,f;const{__scopePopper:h,side:m="bottom",sideOffset:v=0,align:g="center",alignOffset:y=0,arrowPadding:b=0,collisionBoundary:w=[],collisionPadding:x=0,sticky:E="partial",hideWhenDetached:S=!1,avoidCollisions:P=!0,onPlaced:C,...T}=t,R=aa(ca,h),[A,D]=e.useState(null),O=vo(n,(e=>D(e))),[k,L]=e.useState(null),M=Zo(k),_=null!==(i=null==M?void 0:M.width)&&void 0!==i?i:0,$=null!==(s=null==M?void 0:M.height)&&void 0!==s?s:0,I=m+("center"!==g?"-"+g:""),V="number"==typeof x?x:{top:0,right:0,bottom:0,left:0,...x},N=Array.isArray(w)?w:[w],F=N.length>0,j={padding:V,boundary:N.filter(ha),altBoundary:F},{refs:B,floatingStyles:W,placement:H,isPositioned:U,middlewareData:z}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:s,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[f,p]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=r.useState(i);Js(h,i)||m(i);const[v,g]=r.useState(null),[y,b]=r.useState(null),w=r.useCallback((e=>{e!=P.current&&(P.current=e,g(e))}),[g]),x=r.useCallback((e=>{e!==C.current&&(C.current=e,b(e))}),[b]),E=a||v,S=l||y,P=r.useRef(null),C=r.useRef(null),T=r.useRef(f),R=ta(u),A=ta(s),D=r.useCallback((()=>{if(!P.current||!C.current)return;const e={placement:t,strategy:n,middleware:h};A.current&&(e.platform=A.current),qs(P.current,C.current,e).then((e=>{const t={...e,isPositioned:!0};O.current&&!Js(T.current,t)&&(T.current=t,o.flushSync((()=>{p(t)})))}))}),[h,t,n,A]);Zs((()=>{!1===d&&T.current.isPositioned&&(T.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[d]);const O=r.useRef(!1);Zs((()=>(O.current=!0,()=>{O.current=!1})),[]),Zs((()=>{if(E&&(P.current=E),S&&(C.current=S),E&&S){if(R.current)return R.current(E,S,D);D()}}),[E,S,D,R]);const k=r.useMemo((()=>({reference:P,floating:C,setReference:w,setFloating:x})),[w,x]),L=r.useMemo((()=>({reference:E,floating:S})),[E,S]),M=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!L.floating)return e;const t=ea(L.floating,f.x),r=ea(L.floating,f.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...Qs(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,c,L.floating,f.x,f.y]);return r.useMemo((()=>({...f,update:D,refs:k,elements:L,floatingStyles:M})),[f,D,k,L,M])}({strategy:"fixed",placement:I,whileElementsMounted:Ks,elements:{reference:R.anchor},middleware:[(X={mainAxis:v+$,alignmentAxis:y},void 0===X&&(X=0),{name:"offset",options:X,async fn(e){const{x:t,y:n}=e,r=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=Ui(n),a=Wi(n),l="x"===zi(n),c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=Xi(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(e,X);return{x:t+r.x,y:n+r.y,data:r}}}),P&&ds({mainAxis:!0,crossAxis:!1,limiter:"partial"===E?(void 0===Y&&(Y={}),{options:Y,fn(e){const{x:t,y:n,placement:r,rects:o,middlewareData:i}=e,{offset:s=0,mainAxis:a=!0,crossAxis:l=!0}=Xi(Y,e),c={x:t,y:n},u=zi(r),d=us(u);let f=c[u],p=c[d];const h=Xi(s,e),m="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(a){const e="y"===u?"height":"width",t=o.reference[u]-o.floating[e]+m.mainAxis,n=o.reference[u]+o.reference[e]-m.mainAxis;f<t?f=t:f>n&&(f=n)}if(l){var v,g;const e="y"===u?"width":"height",t=["top","left"].includes(Ui(r)),n=o.reference[d]-o.floating[e]+(t&&(null==(v=i.offset)?void 0:v[d])||0)+(t?0:m.crossAxis),s=o.reference[d]+o.reference[e]+(t?0:(null==(g=i.offset)?void 0:g[d])||0)-(t?m.crossAxis:0);p<n?p=n:p>s&&(p=s)}return{[u]:f,[d]:p}}}):void 0,...j}),P&&ss({...j}),fs({...j,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,s=e.floating.style;s.setProperty("--radix-popper-available-width",`${n}px`),s.setProperty("--radix-popper-available-height",`${r}px`),s.setProperty("--radix-popper-anchor-width",`${o}px`),s.setProperty("--radix-popper-anchor-height",`${i}px`)}}),k&&Gs({element:k,padding:b}),ma({arrowWidth:_,arrowHeight:$}),S&&cs({strategy:"referenceHidden"})]});var Y,X;const[K,q]=va(H),G=Oo(C);To((()=>{U&&(null==G||G())}),[U,G]);const Z=null===(a=z.arrow)||void 0===a?void 0:a.x,J=null===(l=z.arrow)||void 0===l?void 0:l.y,Q=0!==(null===(c=z.arrow)||void 0===c?void 0:c.centerOffset),[ee,te]=e.useState();return To((()=>{A&&te(window.getComputedStyle(A).zIndex)}),[A]),e.createElement("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:U?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[null===(u=z.transformOrigin)||void 0===u?void 0:u.x,null===(d=z.transformOrigin)||void 0===d?void 0:d.y].join(" ")},dir:t.dir},e.createElement(ua,{scope:h,placedSide:K,onArrowChange:L,arrowX:Z,arrowY:J,shouldHideArrow:Q},e.createElement(Po.div,p({"data-side":K,"data-align":q},T,{ref:O,style:{...T.style,animation:U?void 0:"none",opacity:null!==(f=z.hide)&&void 0!==f&&f.referenceHidden?0:void 0}}))))})),pa={top:"bottom",right:"left",bottom:"top",left:"right"};function ha(e){return null!==e}const ma=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,s;const{placement:a,rects:l,middlewareData:c}=t,u=0!==(null===(n=c.arrow)||void 0===n?void 0:n.centerOffset),d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[p,h]=va(a),m={start:"0%",center:"50%",end:"100%"}[h],v=(null!==(r=null===(o=c.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(i=null===(s=c.arrow)||void 0===s?void 0:s.y)&&void 0!==i?i:0)+f/2;let y="",b="";return"bottom"===p?(y=u?m:`${v}px`,b=-f+"px"):"top"===p?(y=u?m:`${v}px`,b=`${l.floating.height+f}px`):"right"===p?(y=-f+"px",b=u?m:`${g}px`):"left"===p&&(y=`${l.floating.width+f}px`,b=u?m:`${g}px`),{data:{x:y,y:b}}}});function va(e){const[t,n="center"]=e.split("-");return[t,n]}const ga=t=>{const{__scopePopper:n,children:r}=t,[o,i]=e.useState(null);return e.createElement(sa,{scope:n,anchor:o,onAnchorChange:i},r)},ya=la,ba=fa,wa=e.forwardRef((function(t,n){const{__scopePopper:r,...o}=t,i=da("PopperArrow",r),s=pa[i.placedSide];return e.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},e.createElement(na,p({},o,{ref:n,style:{...o.style,display:"block"}})))})),xa=e.forwardRef(((n,r)=>{var o;const{container:i=(null===globalThis||void 0===globalThis||null===(o=globalThis.document)||void 0===o?void 0:o.body),...s}=n;return i?t.createPortal(e.createElement(Po.div,p({},s,{ref:r})),i):null})),Ea=e.forwardRef(((t,n)=>e.createElement(Po.span,p({},t,{ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}})))),Sa=Ea,Pa=[" ","Enter","ArrowUp","ArrowDown"],Ca=[" ","Enter"],Ta="Select",[Ra,Aa,Da]=Co(Ta),[Oa,ka]=go(Ta,[Da,ia]),La=ia(),[Ma,_a]=Oa(Ta),[$a,Ia]=Oa(Ta),Va=e.forwardRef(((t,n)=>{const{__scopeSelect:r,disabled:o=!1,...i}=t,s=La(r),a=_a("SelectTrigger",r),l=a.disabled||o,c=vo(n,a.onTriggerChange),u=Aa(r),[d,f,h]=dl((e=>{const t=u().filter((e=>!e.disabled)),n=t.find((e=>e.value===a.value)),r=fl(t,e,n);void 0!==r&&a.onValueChange(r.value)})),m=()=>{l||(a.onOpenChange(!0),h())};return e.createElement(ya,p({asChild:!0},s),e.createElement(Po.button,p({type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":void 0===a.value?"":void 0},i,{ref:c,onClick:ho(i.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:ho(i.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(m(),a.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:ho(i.onKeyDown,(e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||f(e.key),t&&" "===e.key||Pa.includes(e.key)&&(m(),e.preventDefault())}))})))})),Na=e.forwardRef(((t,n)=>{const{__scopeSelect:r,className:o,style:i,children:s,placeholder:a,...l}=t,c=_a("SelectValue",r),{onValueNodeHasChildrenChange:u}=c,d=void 0!==s,f=vo(n,c.onValueNodeChange);return To((()=>{u(d)}),[u,d]),e.createElement(Po.span,p({},l,{ref:f,style:{pointerEvents:"none"}}),void 0===c.value&&void 0!==a?a:s)})),Fa=e.forwardRef(((t,n)=>{const{__scopeSelect:r,children:o,...i}=t;return e.createElement(Po.span,p({"aria-hidden":!0},i,{ref:n}),o||"▼")})),ja="SelectContent",Ba=e.forwardRef(((n,r)=>{const o=_a(ja,n.__scopeSelect),[i,s]=e.useState();if(To((()=>{s(new DocumentFragment)}),[]),!o.open){const r=i;return r?t.createPortal(e.createElement(Ha,{scope:n.__scopeSelect},e.createElement(Ra.Slot,{scope:n.__scopeSelect},e.createElement("div",null,n.children))),r):null}return e.createElement(za,p({},n,{ref:r}))})),Wa=10,[Ha,Ua]=Oa(ja),za=e.forwardRef(((t,n)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:a,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:v,hideWhenDetached:g,avoidCollisions:y,...b}=t,w=_a(ja,r),[x,E]=e.useState(null),[S,P]=e.useState(null),C=vo(n,(e=>E(e))),[T,R]=e.useState(null),[A,D]=e.useState(null),O=Aa(r),[k,L]=e.useState(!1),M=e.useRef(!1);e.useEffect((()=>{if(x)return He(x)}),[x]),e.useEffect((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:ki()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:ki()),Oi++,()=>{1===Oi&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Oi--}}),[]);const _=e.useCallback((e=>{const[t,...n]=O().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const i of e){if(i===o)return;if(null==i||i.scrollIntoView({block:"nearest"}),i===t&&S&&(S.scrollTop=0),i===r&&S&&(S.scrollTop=S.scrollHeight),null==i||i.focus(),document.activeElement!==o)return}}),[O,S]),$=e.useCallback((()=>_([T,x])),[_,T,x]);e.useEffect((()=>{k&&$()}),[k,$]);const{onOpenChange:I,triggerPointerDownPosRef:V}=w;e.useEffect((()=>{if(x){let e={x:0,y:0};const t=t=>{var n,r,o,i;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=V.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(i=V.current)||void 0===i?void 0:i.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():x.contains(n.target)||I(!1),document.removeEventListener("pointermove",t),V.current=null};return null!==V.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[x,I,V]),e.useEffect((()=>{const e=()=>I(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[I]);const[N,F]=dl((e=>{const t=O().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=fl(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),j=e.useCallback(((e,t,n)=>{const r=!M.current&&!n;(void 0!==w.value&&w.value===t||r)&&(R(e),r&&(M.current=!0))}),[w.value]),B=e.useCallback((()=>null==x?void 0:x.focus()),[x]),W=e.useCallback(((e,t,n)=>{const r=!M.current&&!n;(void 0!==w.value&&w.value===t||r)&&D(e)}),[w.value]),H="popper"===o?Xa:Ya,U=H===Xa?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:v,hideWhenDetached:g,avoidCollisions:y}:{};return e.createElement(Ha,{scope:r,content:x,viewport:S,onViewportChange:P,itemRefCallback:j,selectedItem:T,onItemLeave:B,itemTextRefCallback:W,focusSelectedItem:$,selectedItemText:A,position:o,isPositioned:k,searchRef:N},e.createElement(Ie,{as:bo,allowPinchZoom:!0},e.createElement($i,{asChild:!0,trapped:w.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:ho(i,(e=>{var t;null===(t=w.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},e.createElement(Ri,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>w.onOpenChange(!1)},e.createElement(H,p({role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:e=>e.preventDefault()},b,U,{onPlaced:()=>L(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:ho(b.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||F(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=O().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>_(t))),e.preventDefault()}}))}))))))})),Ya=e.forwardRef(((t,n)=>{const{__scopeSelect:r,onPlaced:o,...i}=t,s=_a(ja,r),a=Ua(ja,r),[l,c]=e.useState(null),[u,d]=e.useState(null),f=vo(n,(e=>d(e))),h=Aa(r),m=e.useRef(!1),v=e.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:b,focusSelectedItem:w}=a,x=e.useCallback((()=>{if(s.trigger&&s.valueNode&&l&&u&&g&&y&&b){const e=s.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=s.valueNode.getBoundingClientRect(),r=b.getBoundingClientRect();if("rtl"!==s.dir){const o=r.left-t.left,i=n.left-o,s=e.left-i,a=e.width+s,c=Math.max(a,t.width),u=window.innerWidth-Wa,d=xi(i,[Wa,u-c]);l.style.minWidth=a+"px",l.style.left=d+"px"}else{const o=t.right-r.right,i=window.innerWidth-n.right-o,s=window.innerWidth-e.right-i,a=e.width+s,c=Math.max(a,t.width),u=window.innerWidth-Wa,d=xi(i,[Wa,u-c]);l.style.minWidth=a+"px",l.style.right=d+"px"}const i=h(),a=window.innerHeight-2*Wa,c=g.scrollHeight,d=window.getComputedStyle(u),f=parseInt(d.borderTopWidth,10),p=parseInt(d.paddingTop,10),v=parseInt(d.borderBottomWidth,10),w=f+p+c+parseInt(d.paddingBottom,10)+v,x=Math.min(5*y.offsetHeight,w),E=window.getComputedStyle(g),S=parseInt(E.paddingTop,10),P=parseInt(E.paddingBottom,10),C=e.top+e.height/2-Wa,T=a-C,R=y.offsetHeight/2,A=f+p+(y.offsetTop+R),D=w-A;if(A<=C){const e=y===i[i.length-1].ref.current;l.style.bottom="0px";const t=u.clientHeight-g.offsetTop-g.offsetHeight,n=A+Math.max(T,R+(e?P:0)+t+v);l.style.height=n+"px"}else{const e=y===i[0].ref.current;l.style.top="0px";const t=Math.max(C,f+g.offsetTop+(e?S:0)+R)+D;l.style.height=t+"px",g.scrollTop=A-C+g.offsetTop}l.style.margin=`${Wa}px 0`,l.style.minHeight=x+"px",l.style.maxHeight=a+"px",null==o||o(),requestAnimationFrame((()=>m.current=!0))}}),[h,s.trigger,s.valueNode,l,u,g,y,b,s.dir,o]);To((()=>x()),[x]);const[E,S]=e.useState();To((()=>{u&&S(window.getComputedStyle(u).zIndex)}),[u]);const P=e.useCallback((e=>{e&&!0===v.current&&(x(),null==w||w(),v.current=!1)}),[x,w]);return e.createElement(Ka,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:P},e.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E}},e.createElement(Po.div,p({},i,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))})),Xa=e.forwardRef(((t,n)=>{const{__scopeSelect:r,align:o="start",collisionPadding:i=Wa,...s}=t,a=La(r);return e.createElement(ba,p({},a,s,{ref:n,align:o,collisionPadding:i,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)"}}))})),[Ka,qa]=Oa(ja,{}),Ga="SelectViewport",Za=e.forwardRef(((t,n)=>{const{__scopeSelect:r,...o}=t,i=Ua(Ga,r),s=qa(Ga,r),a=vo(n,i.onViewportChange),l=e.useRef(0);return e.createElement(e.Fragment,null,e.createElement("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}"}}),e.createElement(Ra.Slot,{scope:r},e.createElement(Po.div,p({"data-radix-select-viewport":"",role:"presentation"},o,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...o.style},onScroll:ho(o.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(null!=r&&r.current&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*Wa,o=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),s=Math.max(o,i);if(s<r){const o=s+e,i=Math.min(r,o),a=o-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=a>0?a:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop}))}))))}));Oa("SelectGroup");const Ja="SelectItem",[Qa,el]=Oa(Ja),tl=e.forwardRef(((t,n)=>{const{__scopeSelect:r,value:o,disabled:i=!1,textValue:s,...a}=t,l=_a(Ja,r),c=Ua(Ja,r),u=l.value===o,[d,f]=e.useState(null!=s?s:""),[h,m]=e.useState(!1),v=vo(n,(e=>{var t;return null===(t=c.itemRefCallback)||void 0===t?void 0:t.call(c,e,o,i)})),g=Do(),y=()=>{i||(l.onValueChange(o),l.onOpenChange(!1))};return e.createElement(Qa,{scope:r,value:o,disabled:i,textId:g,isSelected:u,onItemTextChange:e.useCallback((e=>{f((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},e.createElement(Ra.ItemSlot,{scope:r,value:o,disabled:i,textValue:d},e.createElement(Po.div,p({role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},a,{ref:v,onFocus:ho(a.onFocus,(()=>m(!0))),onBlur:ho(a.onBlur,(()=>m(!1))),onPointerUp:ho(a.onPointerUp,y),onPointerMove:ho(a.onPointerMove,(e=>{var t;i?null===(t=c.onItemLeave)||void 0===t||t.call(c):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:ho(a.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=c.onItemLeave)||void 0===t||t.call(c))})),onKeyDown:ho(a.onKeyDown,(e=>{var t;""!==(null===(t=c.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(Ca.includes(e.key)&&y()," "===e.key&&e.preventDefault())}))}))))})),nl="SelectItemText",rl=e.forwardRef(((n,r)=>{const{__scopeSelect:o,className:i,style:s,...a}=n,l=_a(nl,o),c=Ua(nl,o),u=el(nl,o),d=Ia(nl,o),[f,h]=e.useState(null),m=vo(r,(e=>h(e)),u.onItemTextChange,(e=>{var t;return null===(t=c.itemTextRefCallback)||void 0===t?void 0:t.call(c,e,u.value,u.disabled)})),v=null==f?void 0:f.textContent,g=e.useMemo((()=>e.createElement("option",{key:u.value,value:u.value,disabled:u.disabled},v)),[u.disabled,u.value,v]),{onNativeOptionAdd:y,onNativeOptionRemove:b}=d;return To((()=>(y(g),()=>b(g))),[y,b,g]),e.createElement(e.Fragment,null,e.createElement(Po.span,p({id:u.textId},a,{ref:m})),u.isSelected&&l.valueNode&&!l.valueNodeHasChildren?t.createPortal(a.children,l.valueNode):null)})),ol=e.forwardRef(((t,n)=>{const{__scopeSelect:r,...o}=t;return el("SelectItemIndicator",r).isSelected?e.createElement(Po.span,p({"aria-hidden":!0},o,{ref:n})):null})),il="SelectScrollUpButton",sl=e.forwardRef(((t,n)=>{const r=Ua(il,t.__scopeSelect),o=qa(il,t.__scopeSelect),[i,s]=e.useState(!1),a=vo(n,o.onScrollButtonChange);return To((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollTop>0;s(e)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),i?e.createElement(cl,p({},t,{ref:a,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),al="SelectScrollDownButton",ll=e.forwardRef(((t,n)=>{const r=Ua(al,t.__scopeSelect),o=qa(al,t.__scopeSelect),[i,s]=e.useState(!1),a=vo(n,o.onScrollButtonChange);return To((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;s(n)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),i?e.createElement(cl,p({},t,{ref:a,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),cl=e.forwardRef(((t,n)=>{const{__scopeSelect:r,onAutoScroll:o,...i}=t,s=Ua("SelectScrollButton",r),a=e.useRef(null),l=Aa(r),c=e.useCallback((()=>{null!==a.current&&(window.clearInterval(a.current),a.current=null)}),[]);return e.useEffect((()=>()=>c()),[c]),To((()=>{var e;const t=l().find((e=>e.ref.current===document.activeElement));null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})}),[l]),e.createElement(Po.div,p({"aria-hidden":!0},i,{ref:n,style:{flexShrink:0,...i.style},onPointerDown:ho(i.onPointerDown,(()=>{null===a.current&&(a.current=window.setInterval(o,50))})),onPointerMove:ho(i.onPointerMove,(()=>{var e;null===(e=s.onItemLeave)||void 0===e||e.call(s),null===a.current&&(a.current=window.setInterval(o,50))})),onPointerLeave:ho(i.onPointerLeave,(()=>{c()}))}))})),ul=e.forwardRef(((t,n)=>{const{value:r,...o}=t,i=e.useRef(null),s=vo(n,i),a=Jo(r);return e.useEffect((()=>{const e=i.current,t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(a!==r&&n){const t=new Event("change",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}}),[a,r]),e.createElement(Ea,{asChild:!0},e.createElement("select",p({},o,{ref:s,defaultValue:r})))}));function dl(t){const n=Oo(t),r=e.useRef(""),o=e.useRef(0),i=e.useCallback((e=>{const t=r.current+e;n(t),function e(t){r.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout((()=>e("")),1e3))}(t)}),[n]),s=e.useCallback((()=>{r.current="",window.clearTimeout(o.current)}),[]);return e.useEffect((()=>()=>window.clearTimeout(o.current)),[]),[r,i,s]}function fl(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=(s=e,a=Math.max(o,0),s.map(((e,t)=>s[(a+t)%s.length])));var s,a;1===r.length&&(i=i.filter((e=>e!==n)));const l=i.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}ul.displayName="BubbleSelect";const pl=t=>{const{__scopeSelect:n,children:r,open:o,defaultOpen:i,onOpenChange:s,value:a,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:p,required:h}=t,m=La(n),[v,g]=e.useState(null),[y,b]=e.useState(null),[w,x]=e.useState(!1),E=Mo(u),[S=!1,P]=ko({prop:o,defaultProp:i,onChange:s}),[C,T]=ko({prop:a,defaultProp:l,onChange:c}),R=e.useRef(null),A=!v||Boolean(v.closest("form")),[D,O]=e.useState(new Set),k=Array.from(D).map((e=>e.props.value)).join(";");return e.createElement(ga,m,e.createElement(Ma,{required:h,scope:n,trigger:v,onTriggerChange:g,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:w,onValueNodeHasChildrenChange:x,contentId:Do(),value:C,onValueChange:T,open:S,onOpenChange:P,dir:E,triggerPointerDownPosRef:R,disabled:p},e.createElement(Ra.Provider,{scope:n},e.createElement($a,{scope:t.__scopeSelect,onNativeOptionAdd:e.useCallback((e=>{O((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:e.useCallback((e=>{O((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},r)),A?e.createElement(ul,{key:k,"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:f,value:C,onChange:e=>T(e.target.value),disabled:p},void 0===C?e.createElement("option",{value:""}):null,Array.from(D)):null))},hl=Va,ml=Na,vl=Fa,gl=t=>e.createElement(xa,p({asChild:!0},t)),yl=Ba,bl=Za,wl=tl,xl=rl,El=ol,Sl=sl,Pl=ll,Cl=e.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Tl=e.createContext({}),Rl=e.createContext(null),Al="undefined"!=typeof document,Dl=Al?e.useLayoutEffect:e.useEffect,Ol=e.createContext({strict:!1});function kl(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Ll(e){return"string"==typeof e||Array.isArray(e)}function Ml(e){return"object"==typeof e&&"function"==typeof e.start}const _l=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$l=["initial",..._l];function Il(e){return Ml(e.animate)||$l.some((t=>Ll(e[t])))}function Vl(e){return Boolean(Il(e)||e.variants)}function Nl(t){const{initial:n,animate:r}=function(e,t){if(Il(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Ll(t)?t:void 0,animate:Ll(n)?n:void 0}}return!1!==e.inherit?t:{}}(t,e.useContext(Tl));return e.useMemo((()=>({initial:n,animate:r})),[Fl(n),Fl(r)])}function Fl(e){return Array.isArray(e)?e.join(" "):e}const jl={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Bl={};for(const Eg in jl)Bl[Eg]={isEnabled:e=>jl[Eg].some((t=>!!e[t]))};function Wl(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const Hl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Ul=1;const zl=e.createContext({}),Yl=e.createContext({}),Xl=Symbol.for("motionComponentSymbol");function Kl({preloadedFeatures:t,createVisualElement:n,useRender:o,useVisualState:i,Component:s}){t&&function(e){for(const t in e)Bl[t]={...Bl[t],...e[t]}}(t);const a=e.forwardRef((function(a,l){let c;const u={...e.useContext(Cl),...a,layoutId:ql(a)},{isStatic:d}=u,f=Nl(a),p=d?void 0:Wl((()=>{if(Hl.hasEverUpdated)return Ul++})),h=i(a,d);if(!d&&Al){f.visualElement=function(t,n,r,o){const{visualElement:i}=e.useContext(Tl),s=e.useContext(Ol),a=e.useContext(Rl),l=e.useContext(Cl).reducedMotion,c=e.useRef();o=o||s.renderer,!c.current&&o&&(c.current=o(t,{visualState:n,parent:i,props:r,presenceContext:a,blockInitialAnimation:!!a&&!1===a.initial,reducedMotionConfig:l}));const u=c.current;return e.useInsertionEffect((()=>{u&&u.update(r,a)})),Dl((()=>{u&&u.render()})),e.useEffect((()=>{u&&u.updateFeatures()})),(window.HandoffAppearAnimations?Dl:e.useEffect)((()=>{u&&u.animationState&&u.animationState.animateChanges()})),u}(s,h,u,n);const r=e.useContext(Yl),o=e.useContext(Ol).strict;f.visualElement&&(c=f.visualElement.loadFeatures(u,o,t,p,r))}return r.createElement(Tl.Provider,{value:f},c&&f.visualElement?r.createElement(c,{visualElement:f.visualElement,...u}):null,o(s,a,p,function(t,n,r){return e.useCallback((e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),r&&("function"==typeof r?r(e):kl(r)&&(r.current=e))}),[n])}(h,f.visualElement,l),h,d,f.visualElement))}));return a[Xl]=s,a}function ql({layoutId:t}){const n=e.useContext(zl).id;return n&&void 0!==t?n+"-"+t:t}function Gl(e){function t(t,n={}){return Kl(e(t,n))}if("undefined"==typeof Proxy)return t;const n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}const Zl=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Jl(e){return"string"==typeof e&&!e.includes("-")&&!!(Zl.indexOf(e)>-1||/[A-Z]/.test(e))}const Ql={};const ec=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],tc=new Set(ec);function nc(e,{layout:t,layoutId:n}){return tc.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Ql[e]||"opacity"===e)}const rc=e=>Boolean(e&&e.getVelocity),oc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ic=ec.length;const sc=e=>t=>"string"==typeof t&&t.startsWith(e),ac=sc("--"),lc=sc("var(--"),cc=(e,t)=>t&&"number"==typeof e?t.transform(e):e,uc=(e,t,n)=>Math.min(Math.max(n,e),t),dc={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},fc={...dc,transform:e=>uc(0,1,e)},pc={...dc,default:1},hc=e=>Math.round(1e5*e)/1e5,mc=/(-)?([\d]*\.?[\d])+/g,vc=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,gc=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function yc(e){return"string"==typeof e}const bc=e=>({test:t=>yc(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),wc=bc("deg"),xc=bc("%"),Ec=bc("px"),Sc=bc("vh"),Pc=bc("vw"),Cc={...xc,parse:e=>xc.parse(e)/100,transform:e=>xc.transform(100*e)},Tc={...dc,transform:Math.round},Rc={borderWidth:Ec,borderTopWidth:Ec,borderRightWidth:Ec,borderBottomWidth:Ec,borderLeftWidth:Ec,borderRadius:Ec,radius:Ec,borderTopLeftRadius:Ec,borderTopRightRadius:Ec,borderBottomRightRadius:Ec,borderBottomLeftRadius:Ec,width:Ec,maxWidth:Ec,height:Ec,maxHeight:Ec,size:Ec,top:Ec,right:Ec,bottom:Ec,left:Ec,padding:Ec,paddingTop:Ec,paddingRight:Ec,paddingBottom:Ec,paddingLeft:Ec,margin:Ec,marginTop:Ec,marginRight:Ec,marginBottom:Ec,marginLeft:Ec,rotate:wc,rotateX:wc,rotateY:wc,rotateZ:wc,scale:pc,scaleX:pc,scaleY:pc,scaleZ:pc,skew:wc,skewX:wc,skewY:wc,distance:Ec,translateX:Ec,translateY:Ec,translateZ:Ec,x:Ec,y:Ec,z:Ec,perspective:Ec,transformPerspective:Ec,opacity:fc,originX:Cc,originY:Cc,originZ:Ec,zIndex:Tc,fillOpacity:fc,strokeOpacity:fc,numOctaves:Tc};function Ac(e,t,n,r){const{style:o,vars:i,transform:s,transformOrigin:a}=e;let l=!1,c=!1,u=!0;for(const d in t){const e=t[d];if(ac(d)){i[d]=e;continue}const n=Rc[d],r=cc(e,n);if(tc.has(d)){if(l=!0,s[d]=r,!u)continue;e!==(n.default||0)&&(u=!1)}else d.startsWith("origin")?(c=!0,a[d]=r):o[d]=r}if(t.transform||(l||r?o.transform=function(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let i="";for(let s=0;s<ic;s++){const t=ec[s];void 0!==e[t]&&(i+=`${oc[t]||t}(${e[t]}) `)}return t&&!e.z&&(i+="translateZ(0)"),i=i.trim(),o?i=o(e,r?"":i):n&&r&&(i="none"),i}(e.transform,n,u,r):o.transform&&(o.transform="none")),c){const{originX:e="50%",originY:t="50%",originZ:n=0}=a;o.transformOrigin=`${e} ${t} ${n}`}}const Dc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Oc(e,t,n){for(const r in t)rc(t[r])||nc(r,n)||(e[r]=t[r])}function kc(t,n,r){const o={};return Oc(o,t.style||{},t),Object.assign(o,function({transformTemplate:t},n,r){return e.useMemo((()=>{const e=Dc();return Ac(e,n,{enableHardwareAcceleration:!r},t),Object.assign({},e.vars,e.style)}),[n])}(t,n,r)),t.transformValues?t.transformValues(o):o}function Lc(e,t,n){const r={},o=kc(e,t,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const Mc=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function _c(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||Mc.has(e)}let $c=e=>!_c(e);try{(Ic=require("@emotion/is-prop-valid").default)&&($c=e=>e.startsWith("on")?!_c(e):Ic(e))}catch(xg){}var Ic;function Vc(e,t,n){return"string"==typeof e?e:Ec.transform(t+n*e)}const Nc={offset:"stroke-dashoffset",array:"stroke-dasharray"},Fc={offset:"strokeDashoffset",array:"strokeDasharray"};function jc(e,{attrX:t,attrY:n,originX:r,originY:o,pathLength:i,pathSpacing:s=1,pathOffset:a=0,...l},c,u,d){if(Ac(e,l,c,d),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:h}=e;f.transform&&(h&&(p.transform=f.transform),delete f.transform),h&&(void 0!==r||void 0!==o||p.transform)&&(p.transformOrigin=function(e,t,n){return`${Vc(t,e.x,e.width)} ${Vc(n,e.y,e.height)}`}(h,void 0!==r?r:.5,void 0!==o?o:.5)),void 0!==t&&(f.x=t),void 0!==n&&(f.y=n),void 0!==i&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Nc:Fc;e[i.offset]=Ec.transform(-r);const s=Ec.transform(t),a=Ec.transform(n);e[i.array]=`${s} ${a}`}(f,i,s,a,!1)}const Bc=()=>({...Dc(),attrs:{}}),Wc=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Hc(t,n,r,o){const i=e.useMemo((()=>{const e=Bc();return jc(e,n,{enableHardwareAcceleration:!1},Wc(o),t.transformTemplate),{...e.attrs,style:{...e.style}}}),[n]);if(t.style){const e={};Oc(e,t.style,t),i.style={...e,...i.style}}return i}function Uc(t=!1){return(n,r,o,i,{latestValues:s},a)=>{const l=(Jl(n)?Hc:Lc)(r,s,a,n),c=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||($c(o)||!0===n&&_c(o)||!t&&!_c(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(r,"string"==typeof n,t),u={...c,...l,ref:i},{children:d}=r,f=e.useMemo((()=>rc(d)?d.get():d),[d]);return o&&(u["data-projection-id"]=o),e.createElement(n,{...u,children:f})}}const zc=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Yc(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Xc=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Kc(e,t,n,r){Yc(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Xc.has(o)?o:zc(o),t.attrs[o])}function qc(e,t){const{style:n}=e,r={};for(const o in n)(rc(n[o])||t.style&&rc(t.style[o])||nc(o,e))&&(r[o]=n[o]);return r}function Gc(e,t){const n=qc(e,t);for(const r in e)if(rc(e[r])||rc(t[r])){n["x"===r||"y"===r?"attr"+r.toUpperCase():r]=e[r]}return n}function Zc(e,t,n,r={},o={}){return"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),"string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),t}const Jc=e=>Array.isArray(e),Qc=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),eu=e=>Jc(e)?e[e.length-1]||0:e;function tu(e){const t=rc(e)?e.get():e;return Qc(t)?t.toValue():t}const nu=t=>(n,r)=>{const o=e.useContext(Tl),i=e.useContext(Rl),s=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const s={latestValues:ru(r,o,i,e),renderState:t()};return n&&(s.mount=e=>n(r,e,s)),s}(t,n,o,i);return r?s():Wl(s)};function ru(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=tu(i[f]);let{initial:s,animate:a}=e;const l=Il(e),c=Vl(e);t&&c&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let u=!!n&&!1===n.initial;u=u||!1===s;const d=u?a:s;if(d&&"boolean"!=typeof d&&!Ml(d)){(Array.isArray(d)?d:[d]).forEach((t=>{const n=Zc(e,t);if(!n)return;const{transitionEnd:r,transition:i,...s}=n;for(const e in s){let t=s[e];if(Array.isArray(t)){t=t[u?t.length-1:0]}null!==t&&(o[e]=t)}for(const e in r)o[e]=r[e]}))}return o}const ou={useVisualState:nu({scrapeMotionValuesFromProps:Gc,createRenderState:Bc,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(o){n.dimensions={x:0,y:0,width:0,height:0}}jc(n,r,{enableHardwareAcceleration:!1},Wc(t.tagName),e.transformTemplate),Kc(t,n)}})},iu={useVisualState:nu({scrapeMotionValuesFromProps:qc,createRenderState:Dc})};function su(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const au=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function lu(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const cu=e=>t=>au(t)&&e(t,lu(t));function uu(e,t,n,r){return su(e,t,cu(n),r)}const du=(e,t)=>n=>t(e(n)),fu=(...e)=>e.reduce(du);function pu(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}const hu=pu("dragHorizontal"),mu=pu("dragVertical");function vu(e){let t=!1;if("y"===e)t=mu();else if("x"===e)t=hu();else{const e=hu(),n=mu();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function gu(){const e=vu(!0);return!e||(e(),!1)}class yu{constructor(e){this.isMounted=!1,this.node=e}update(){}}const bu={delta:0,timestamp:0,isProcessing:!1};let wu=!0,xu=!1;const Eu=["read","update","preRender","render","postRender"],Su=Eu.reduce(((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,o=!1,i=!1;const s=new WeakSet,a={schedule:(e,i=!1,a=!1)=>{const l=a&&o,c=l?t:n;return i&&s.add(e),-1===c.indexOf(e)&&(c.push(e),l&&o&&(r=t.length)),e},cancel:e=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1),s.delete(e)},process:l=>{if(o)i=!0;else{if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let n=0;n<r;n++){const r=t[n];r(l),s.has(r)&&(a.schedule(r),e())}o=!1,i&&(i=!1,a.process(l))}}};return a}((()=>xu=!0)),e)),{}),Pu=Eu.reduce(((e,t)=>{const n=Su[t];return e[t]=(e,t=!1,r=!1)=>(xu||Du(),n.schedule(e,t,r)),e}),{}),Cu=Eu.reduce(((e,t)=>(e[t]=Su[t].cancel,e)),{}),Tu=Eu.reduce(((e,t)=>(e[t]=()=>Su[t].process(bu),e)),{}),Ru=e=>Su[e].process(bu),Au=e=>{xu=!1,bu.delta=wu?1e3/60:Math.max(Math.min(e-bu.timestamp,40),1),bu.timestamp=e,bu.isProcessing=!0,Eu.forEach(Ru),bu.isProcessing=!1,xu&&(wu=!1,requestAnimationFrame(Au))},Du=()=>{xu=!0,wu=!0,bu.isProcessing||requestAnimationFrame(Au)};function Ou(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End");return uu(e.current,n,((n,o)=>{if("touch"===n.type||gu())return;const i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t),i[r]&&Pu.update((()=>i[r](n,o)))}),{passive:!e.getProps()[r]})}const ku=(e,t)=>!!t&&(e===t||ku(e,t.parentElement)),Lu=e=>e;function Mu(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,lu(n))}const _u=new WeakMap,$u=new WeakMap,Iu=e=>{const t=_u.get(e.target);t&&t(e)},Vu=e=>{e.forEach(Iu)};function Nu(e,t,n){const r=function({root:e,...t}){const n=e||document;$u.has(n)||$u.set(n,{});const r=$u.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Vu,{root:e,...t})),r[o]}(t);return _u.set(e,n),r.observe(e),()=>{_u.delete(e),r.unobserve(e)}}const Fu={some:0,all:1};const ju={inView:{Feature:class extends yu{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:Fu[r]};return Nu(this.node.current,i,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends yu{constructor(){super(...arguments),this.removeStartListeners=Lu,this.removeEndListeners=Lu,this.removeAccessibleListeners=Lu,this.startPointerPress=(e,t)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),r=uu(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r}=this.node.getProps();Pu.update((()=>{ku(this.node.current,e.target)?n&&n(e,t):r&&r(e,t)}))}),{passive:!(n.onTap||n.onPointerUp)}),o=uu(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=fu(r,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=su(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=su(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&Mu("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&Pu.update((()=>n(e,t)))}))})),Mu("down",((e,t)=>{this.startPress(e,t)}))})),t=su(this.node.current,"blur",(()=>{this.isPressing&&Mu("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=fu(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Pu.update((()=>n(e,t)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!gu()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Pu.update((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=uu(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=su(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=fu(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends yu{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=fu(su(this.node.current,"focus",(()=>this.onFocus())),su(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends yu{mount(){this.unmount=fu(Ou(this.node,!0),Ou(this.node,!1))}unmount(){}}}};function Bu(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Wu(e,t,n){const r=e.getProps();return Zc(r,t,void 0!==n?n:r.custom,function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.get())),t}(e),function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.getVelocity())),t}(e))}const Hu="data-"+zc("framerAppearId");let Uu=Lu,zu=Lu;"production"!==process.env.NODE_ENV&&(Uu=(e,t)=>{e||"undefined"==typeof console||console.warn(t)},zu=(e,t)=>{if(!e)throw new Error(t)});const Yu=e=>1e3*e,Xu=e=>e/1e3,Ku=!1,qu=e=>Array.isArray(e)&&"number"==typeof e[0];function Gu(e){return Boolean(!e||"string"==typeof e&&Ju[e]||qu(e)||Array.isArray(e)&&e.every(Gu))}const Zu=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ju={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Zu([0,.65,.55,1]),circOut:Zu([.55,0,1,.45]),backIn:Zu([.31,.01,.66,-.59]),backOut:Zu([.33,1.53,.69,.99])};function Qu(e){if(e)return qu(e)?Zu(e):Array.isArray(e)?e.map(Qu):Ju[e]}const ed={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},td={},nd={};for(const Eg in ed)nd[Eg]=()=>(void 0===td[Eg]&&(td[Eg]=ed[Eg]()),td[Eg]);const rd=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,od=1e-7,id=12;function sd(e,t,n,r){if(e===t&&n===r)return Lu;const o=t=>function(e,t,n,r,o){let i,s,a=0;do{s=t+(n-t)/2,i=rd(s,r,o)-e,i>0?n=s:t=s}while(Math.abs(i)>od&&++a<id);return s}(t,0,1,e,n);return e=>0===e||1===e?e:rd(o(e),t,r)}const ad=sd(.42,0,1,1),ld=sd(0,0,.58,1),cd=sd(.42,0,.58,1),ud=e=>Array.isArray(e)&&"number"!=typeof e[0],dd=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,fd=e=>t=>1-e(1-t),pd=e=>1-Math.sin(Math.acos(e)),hd=fd(pd),md=dd(hd),vd=sd(.33,1.53,.69,.99),gd=fd(vd),yd=dd(gd),bd={linear:Lu,easeIn:ad,easeInOut:cd,easeOut:ld,circIn:pd,circInOut:md,circOut:hd,backIn:gd,backInOut:yd,backOut:vd,anticipate:e=>(e*=2)<1?.5*gd(e):.5*(2-Math.pow(2,-10*(e-1)))},wd=e=>{if(Array.isArray(e)){zu(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return sd(t,n,r,o)}return"string"==typeof e?(zu(void 0!==bd[e],`Invalid easing type '${e}'`),bd[e]):e},xd=(e,t)=>n=>Boolean(yc(n)&&gc.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Ed=(e,t,n)=>r=>{if(!yc(r))return r;const[o,i,s,a]=r.match(mc);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},Sd={...dc,transform:e=>Math.round((e=>uc(0,255,e))(e))},Pd={test:xd("rgb","red"),parse:Ed("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Sd.transform(e)+", "+Sd.transform(t)+", "+Sd.transform(n)+", "+hc(fc.transform(r))+")"};const Cd={test:xd("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:Pd.transform},Td={test:xd("hsl","hue"),parse:Ed("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+xc.transform(hc(t))+", "+xc.transform(hc(n))+", "+hc(fc.transform(r))+")"},Rd={test:e=>Pd.test(e)||Cd.test(e)||Td.test(e),parse:e=>Pd.test(e)?Pd.parse(e):Td.test(e)?Td.parse(e):Cd.parse(e),transform:e=>yc(e)?e:e.hasOwnProperty("red")?Pd.transform(e):Td.transform(e)},Ad=(e,t,n)=>-n*e+n*t+e;function Dd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}const Od=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},kd=[Cd,Pd,Td];function Ld(e){const t=(n=e,kd.find((e=>e.test(n))));var n;zu(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`);let r=t.parse(e);return t===Td&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,s=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;o=Dd(a,r,e+1/3),i=Dd(a,r,e),s=Dd(a,r,e-1/3)}else o=i=s=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*s),alpha:r}}(r)),r}const Md=(e,t)=>{const n=Ld(e),r=Ld(t),o={...n};return e=>(o.red=Od(n.red,r.red,e),o.green=Od(n.green,r.green,e),o.blue=Od(n.blue,r.blue,e),o.alpha=Ad(n.alpha,r.alpha,e),Pd.transform(o))},_d="${c}",$d="${n}";function Id(e){"number"==typeof e&&(e=`${e}`);const t=[];let n=0,r=0;const o=e.match(vc);o&&(n=o.length,e=e.replace(vc,_d),t.push(...o.map(Rd.parse)));const i=e.match(mc);return i&&(r=i.length,e=e.replace(mc,$d),t.push(...i.map(dc.parse))),{values:t,numColors:n,numNumbers:r,tokenised:e}}function Vd(e){return Id(e).values}function Nd(e){const{values:t,numColors:n,tokenised:r}=Id(e),o=t.length;return e=>{let t=r;for(let r=0;r<o;r++)t=t.replace(r<n?_d:$d,r<n?Rd.transform(e[r]):hc(e[r]));return t}}const Fd=e=>"number"==typeof e?0:e;const jd={test:function(e){var t,n;return isNaN(e)&&yc(e)&&((null===(t=e.match(mc))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(vc))||void 0===n?void 0:n.length)||0)>0},parse:Vd,createTransformer:Nd,getAnimatableNone:function(e){const t=Vd(e);return Nd(e)(t.map(Fd))}};function Bd(e,t){return"number"==typeof e?n=>Ad(e,t,n):Rd.test(e)?Md(e,t):Ud(e,t)}const Wd=(e,t)=>{const n=[...e],r=n.length,o=e.map(((e,n)=>Bd(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}},Hd=(e,t)=>{const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=Bd(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}},Ud=(e,t)=>{const n=jd.createTransformer(t),r=Id(e),o=Id(t);return r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?fu(Wd(r.values,o.values),n):(Uu(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),n=>`${n>0?t:e}`)},zd=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Yd=(e,t)=>n=>Ad(e,t,n);function Xd(e,t,n){const r=[],o=n||("number"==typeof(i=e[0])?Yd:"string"==typeof i?Rd.test(i)?Md:Ud:Array.isArray(i)?Wd:"object"==typeof i?Hd:Yd);var i;const s=e.length-1;for(let a=0;a<s;a++){let n=o(e[a],e[a+1]);if(t){const e=Array.isArray(t)?t[a]||Lu:t;n=fu(e,n)}r.push(n)}return r}function Kd(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(zu(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=Xd(t,r,o),a=s.length,l=t=>{let n=0;if(a>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=zd(e[n],e[n+1],t);return s[n](r)};return n?t=>l(uc(e[0],e[i-1],t)):l}function qd(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=zd(0,t,r);e.push(Ad(n,1,o))}}(t,e.length-1),t}function Gd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=ud(r)?r.map(wd):wd(r),i={done:!1,value:t[0]},s=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:qd(t),e),a=Kd(s,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map((()=>c||cd)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=a(t),i.done=t>=e,i)}}function Zd(e,t){return t?e*(1e3/t):0}const Jd=5;function Qd(e,t,n){const r=Math.max(t-Jd,0);return Zd(n-e(r),t-r)}const ef=.001,tf=.01,nf=10,rf=.05,of=1;function sf({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;Uu(e<=Yu(nf),"Spring duration must be 10 seconds or less");let s=1-t;s=uc(rf,of,s),e=uc(tf,nf,Xu(e)),s<1?(o=t=>{const r=t*s,o=r*e,i=r-n,a=lf(t,s),l=Math.exp(-o);return ef-i/a*l},i=t=>{const r=t*s*e,i=r*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=lf(Math.pow(t,2),s);return(-o(t)+ef>0?-1:1)*((i-a)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-ef,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let r=n;for(let o=1;o<af;o++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=Yu(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(a,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}const af=12;function lf(e,t){return e*Math.sqrt(1-t*t)}const cf=["duration","bounce"],uf=["stiffness","damping","mass"];function df(e,t){return t.some((t=>void 0!==e[t]))}function ff({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:c,velocity:u,duration:d,isResolvedFromDuration:f}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!df(e,uf)&&df(e,cf)){const n=sf(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}(r),p=u?-Xu(u):0,h=l/(2*Math.sqrt(a*c)),m=i-o,v=Xu(Math.sqrt(a/c)),g=Math.abs(m)<5;let y;if(n||(n=g?.01:2),t||(t=g?.005:.5),h<1){const e=lf(v,h);y=t=>{const n=Math.exp(-h*v*t);return i-n*((p+h*v*m)/e*Math.sin(e*t)+m*Math.cos(e*t))}}else if(1===h)y=e=>i-Math.exp(-v*e)*(m+(p+v*m)*e);else{const e=v*Math.sqrt(h*h-1);y=t=>{const n=Math.exp(-h*v*t),r=Math.min(e*t,300);return i-n*((p+h*v*m)*Math.sinh(r)+e*m*Math.cosh(r))/e}}return{calculatedDuration:f&&d||null,next:e=>{const r=y(e);if(f)s.done=e>=d;else{let o=p;0!==e&&(o=h<1?Qd(y,e,r):0);const a=Math.abs(o)<=n,l=Math.abs(i-r)<=t;s.done=a&&l}return s.value=s.done?i:r,s}}}function pf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let h=n*t;const m=d+h,v=void 0===s?m:s(m);v!==m&&(h=v-d);const g=e=>-h*Math.exp(-e/r),y=e=>v+g(e),b=e=>{const t=g(e),n=y(e);f.done=Math.abs(t)<=c,f.value=f.done?v:n};let w,x;const E=e=>{var t;(t=f.value,void 0!==a&&t<a||void 0!==l&&t>l)&&(w=e,x=ff({keyframes:[f.value,p(f.value)],velocity:Qd(y,e,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==w||(t=!0,b(e),E(e)),void 0!==w&&e>w?x.next(e-w):(!t&&b(e),f)}}}const hf=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Pu.update(t,!0),stop:()=>Cu.update(t),now:()=>bu.isProcessing?bu.timestamp:performance.now()}},mf={decay:pf,inertia:pf,tween:Gd,keyframes:Gd,spring:ff},vf=2e4;function gf(e){let t=0;let n=e.next(t);for(;!n.done&&t<vf;)t+=50,n=e.next(t);return t>=vf?1/0:t}function yf({autoplay:e=!0,delay:t=0,driver:n=hf,keyframes:r,type:o="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:d,...f}){let p,h,m=1,v=!1;const g=()=>{p&&p(),h=new Promise((e=>{p=e}))};let y;g();const b=mf[o]||Gd;let w;b!==Gd&&"number"!=typeof r[0]&&(w=Kd([0,100],r,{clamp:!1}),r=[0,100]);const x=b({...f,keyframes:r});let E;"mirror"===a&&(E=b({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let S="idle",P=null,C=null,T=null;null===x.calculatedDuration&&i&&(x.calculatedDuration=gf(x));const{calculatedDuration:R}=x;let A=1/0,D=1/0;null!==R&&(A=R+s,D=A*(i+1)-s);let O=0;const k=e=>{if(null===C)return;m>0&&(C=Math.min(C,e)),O=null!==P?P:(e-C)*m;const n=O-t,o=n<0;O=Math.max(n,0),"finished"===S&&null===P&&(O=D);let l=O,c=x;if(i){const e=O/A;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,i+1);const r=Boolean(t%2);r&&("reverse"===a?(n=1-n,s&&(n-=s/A)):"mirror"===a&&(c=E));let o=uc(0,1,n);O>D&&(o="reverse"===a&&r?1:0),l=o*A}const u=o?{done:!1,value:r[0]}:c.next(l);w&&(u.value=w(u.value));let{done:f}=u;o||null===R||(f=O>=D);const p=null===P&&("finished"===S||"running"===S&&f||m<0&&O<=0);return d&&d(u.value),p&&_(),u},L=()=>{y&&y.stop(),y=void 0},M=()=>{S="idle",L(),g(),C=T=null},_=()=>{S="finished",u&&u(),L(),g()},$=()=>{if(v)return;y||(y=n(k));const e=y.now();l&&l(),S="running",null!==P?C=e-P:C||(C=e),T=C,P=null,y.start()};e&&$();const I={then:(e,t)=>h.then(e,t),get time(){return Xu(O)},set time(e){e=Yu(e),O=e,null===P&&y&&0!==m?C=y.now()-e/m:P=e},get duration(){const e=null===x.calculatedDuration?gf(x):x.calculatedDuration;return Xu(e)},get speed(){return m},set speed(e){e!==m&&y&&(m=e,I.time=Xu(O))},get state(){return S},play:$,pause:()=>{S="paused",P=O},stop:()=>{v=!0,"idle"!==S&&(S="idle",c&&c(),M())},cancel:()=>{null!==T&&k(T),M()},complete:()=>{S="finished"},sample:e=>(C=0,k(e))};return I}const bf=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);function wf(e,t,{onUpdate:n,onComplete:r,...o}){if(!(nd.waapi()&&bf.has(t)&&!o.repeatDelay&&"mirror"!==o.repeatType&&0!==o.damping&&"inertia"!==o.type))return!1;let i,s,a=!1;const l=()=>{s=new Promise((e=>{i=e}))};l();let{keyframes:c,duration:u=300,ease:d}=o;if(((e,t)=>"spring"===t.type||"backgroundColor"===e||!Gu(t.ease))(t,o)){const e=yf({...o,repeat:0,delay:0});let t={done:!1,value:c[0]};const n=[];let r=0;for(;!t.done&&r<2e4;)t=e.sample(r),n.push(t.value),r+=10;c=n,u=r-10,d="linear"}const f=function(e,t,n,{delay:r=0,duration:o,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Qu(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===s?"alternate":"normal"})}(e.owner.current,t,c,{...o,duration:u,ease:d}),p=()=>{Pu.update((()=>f.cancel())),i(),l()};return f.onfinish=()=>{e.set(function(e,{repeat:t,repeatType:n="loop"}){return e[t&&"loop"!==n&&t%2==1?0:e.length-1]}(c,o)),r&&r(),p()},{then:(e,t)=>s.then(e,t),get time(){return Xu(f.currentTime||0)},set time(e){f.currentTime=Yu(e)},get speed(){return f.playbackRate},set speed(e){f.playbackRate=e},get duration(){return Xu(u)},play:()=>{a||f.play()},pause:()=>f.pause(),stop:()=>{if(a=!0,"idle"===f.playState)return;const{currentTime:t}=f;if(t){const n=yf({...o,autoplay:!1});e.setWithVelocity(n.sample(t-10).value,n.sample(t).value,10)}p()},complete:()=>f.finish(),cancel:p}}const xf={type:"spring",stiffness:500,damping:25,restSpeed:10},Ef={type:"keyframes",duration:.8},Sf={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Pf=(e,{keyframes:t})=>t.length>2?Ef:tc.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:xf:Sf,Cf=(e,t)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!jd.test(t)||t.startsWith("url("))),Tf=new Set(["brightness","contrast","saturate","opacity"]);function Rf(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(mc)||[];if(!r)return e;const o=n.replace(r,"");let i=Tf.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Af=/([a-z-]*)\(.*?\)/g,Df={...jd,getAnimatableNone:e=>{const t=e.match(Af);return t?t.map(Rf).join(" "):e}},Of={...Rc,color:Rd,backgroundColor:Rd,outlineColor:Rd,fill:Rd,stroke:Rd,borderColor:Rd,borderTopColor:Rd,borderRightColor:Rd,borderBottomColor:Rd,borderLeftColor:Rd,filter:Df,WebkitFilter:Df},kf=e=>Of[e];function Lf(e,t){let n=kf(e);return n!==Df&&(n=jd),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function Mf(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function _f(e){return"number"==typeof e?0:Lf("",e)}function $f(e,t){return e[t]||e.default||e}const If=(e,t,n,r={})=>o=>{const i=$f(r,e)||{},s=i.delay||r.delay||0;let{elapsed:a=0}=r;a-=Yu(s);const l=function(e,t,n,r){const o=Cf(t,n);let i=void 0!==r.from?r.from:e.get();if("none"===i&&o&&"string"==typeof n?i=Lf(t,n):Mf(i)&&"string"==typeof n?i=_f(n):!Array.isArray(n)&&Mf(n)&&"string"==typeof i&&(n=_f(i)),Array.isArray(n)){for(let e=0;e<n.length;e++)null===n[e]&&(n[e]=0===e?i:n[e-1]);return n}return[i,n]}(t,e,n,i),c=l[0],u=l[l.length-1],d=Cf(e,c),f=Cf(e,u);Uu(d===f,`You are trying to animate ${e} from "${c}" to "${u}". ${c} is not an animatable value - to enable this animation set ${c} to a value animatable to ${u} via the \`style\` property.`);let p={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...i,delay:-a,onUpdate:e=>{t.set(e),i.onUpdate&&i.onUpdate(e)},onComplete:()=>{o(),i.onComplete&&i.onComplete()}};if(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}(i)||(p={...p,...Pf(e,p)}),p.duration&&(p.duration=Yu(p.duration)),p.repeatDelay&&(p.repeatDelay=Yu(p.repeatDelay)),!d||!f||Ku||!1===i.type)return function({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Lu,pause:Lu,stop:Lu,then:e=>(e(),Promise.resolve()),cancel:Lu,complete:Lu});return t?yf({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}(p);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const n=wf(t,e,p);if(n)return n}return yf(p)};function Vf(e){return Boolean(rc(e)&&e.add)}const Nf=e=>/^0[^.\s]+$/.test(e);function Ff(e,t){-1===e.indexOf(t)&&e.push(t)}function jf(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Bf{constructor(){this.subscriptions=[]}add(e){return Ff(this.subscriptions,e),()=>jf(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Wf=new Set;function Hf(e,t,n){e||Wf.has(t)||(console.warn(t),n&&console.warn(n),Wf.add(t))}class Uf{constructor(e,t={}){var n;this.version="10.10.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(e,t=!0)=>{this.prev=this.current,this.current=e;const{delta:n,timestamp:r}=bu;this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,Pu.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Pu.postRender(this.velocityCheck),this.velocityCheck=({timestamp:e})=>{e!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=t.owner}onChange(e){return"production"!==process.env.NODE_ENV&&Hf(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Bf);const n=this.events[e].add(t);return"change"===e?()=>{n(),Pu.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Zd(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function zf(e,t){return new Uf(e,t)}const Yf=e=>t=>t.test(e),Xf=[dc,Ec,xc,wc,Pc,Sc,{test:e=>"auto"===e,parse:e=>e}],Kf=e=>Xf.find(Yf(e)),qf=[...Xf,Rd,jd],Gf=e=>qf.find(Yf(e));function Zf(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,zf(n))}function Jf(e,t){if(!t)return;return(t[e]||t.default||t).from}function Qf({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function ep(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:s,...a}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in a){const t=e.getValue(d),r=a[d];if(!t||void 0===r||u&&Qf(u,d))continue;const o={delay:n,elapsed:0,...i};if(window.HandoffAppearAnimations&&!t.hasAnimated){const n=e.getProps()[Hu];n&&(o.elapsed=window.HandoffAppearAnimations(n,d,t,Pu))}t.start(If(d,t,r,e.shouldReduceMotion&&tc.has(d)?{type:!1}:o));const s=t.animation;Vf(l)&&(l.add(d),s.then((()=>l.remove(d)))),c.push(s)}return s&&Promise.all(c).then((()=>{s&&function(e,t){const n=Wu(e,t);let{transitionEnd:r={},transition:o={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const s in i)Zf(e,s,eu(i[s]))}(e,s)})),c}function tp(e,t,n={}){const r=Wu(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(ep(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:s,staggerDirection:a}=o;return function(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>a-e*r;return Array.from(e.variantChildren).sort(np).forEach(((e,r)=>{e.notify("AnimationStart",t),s.push(tp(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(s)}(e,t,i+r,s,a,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[e,t]="beforeChildren"===a?[i,s]:[s,i];return e().then((()=>t()))}return Promise.all([i(),s(n.delay)])}function np(e,t){return e.sortNodePosition(t)}const rp=[..._l].reverse(),op=_l.length;function ip(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>tp(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=tp(e,t,n);else{const o="function"==typeof t?Wu(e,t,n.custom):t;r=Promise.all(ep(e,o,n))}return r.then((()=>e.notify("AnimationComplete",t)))}(e,t,n))))}function sp(e){let t=ip(e);const n={animate:lp(!0),whileInView:lp(),whileHover:lp(),whileTap:lp(),whileDrag:lp(),whileFocus:lp(),exit:lp()};let r=!0;const o=(t,n)=>{const r=Wu(e,n);if(r){const{transition:e,transitionEnd:n,...o}=r;t={...t,...o,...n}}return t};function i(i,s){const a=e.getProps(),l=e.getVariantContext(!0)||{},c=[],u=new Set;let d={},f=1/0;for(let t=0;t<op;t++){const p=rp[t],h=n[p],m=void 0!==a[p]?a[p]:l[p],v=Ll(m),g=p===s?h.isActive:null;!1===g&&(f=t);let y=m===l[p]&&m!==a[p]&&v;if(y&&r&&e.manuallyAnimateOnMount&&(y=!1),h.protectedKeys={...d},!h.isActive&&null===g||!m&&!h.prevProp||Ml(m)||"boolean"==typeof m)continue;const b=ap(h.prevProp,m);let w=b||p===s&&h.isActive&&!y&&v||t>f&&v;const x=Array.isArray(m)?m:[m];let E=x.reduce(o,{});!1===g&&(E={});const{prevResolvedValues:S={}}=h,P={...S,...E},C=e=>{w=!0,u.delete(e),h.needsAnimating[e]=!0};for(const e in P){const t=E[e],n=S[e];d.hasOwnProperty(e)||(t!==n?Jc(t)&&Jc(n)?!Bu(t,n)||b?C(e):h.protectedKeys[e]=!0:void 0!==t?C(e):u.add(e):void 0!==t&&u.has(e)?C(e):h.protectedKeys[e]=!0)}h.prevProp=m,h.prevResolvedValues=E,h.isActive&&(d={...d,...E}),r&&e.blockInitialAnimation&&(w=!1),w&&!y&&c.push(...x.map((e=>({animation:e,options:{type:p,...i}}))))}if(u.size){const t={};u.forEach((n=>{const r=e.getBaseTarget(n);void 0!==r&&(t[n]=r)})),c.push({animation:t})}let p=Boolean(c.length);return r&&!1===a.initial&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(c):Promise.resolve()}return{animateChanges:i,setActive:function(t,r,o){var s;if(n[t].isActive===r)return Promise.resolve();null===(s=e.variantChildren)||void 0===s||s.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const a=i(o,t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n}}function ap(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Bu(t,e)}function lp(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let cp=0;const up={animation:{Feature:class extends yu{constructor(e){super(e),e.animationState||(e.animationState=sp(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Ml(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends yu{constructor(){super(...arguments),this.id=cp++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t,custom:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const o=this.node.animationState.setActive("exit",!e,{custom:null!=n?n:this.node.getProps().custom});t&&!e&&o.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},dp=(e,t)=>Math.abs(e-t);class fp{constructor(e,t,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=mp(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=dp(e.x,t.x),r=dp(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=bu;this.history.push({...r,timestamp:o});const{onStart:i,onMove:s}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=pp(t,this.transformPagePoint),Pu.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:r}=this.handlers,o=mp("pointercancel"===e.type?this.lastMoveEventInfo:pp(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!au(e))return;this.handlers=t,this.transformPagePoint=n;const r=pp(lu(e),this.transformPagePoint),{point:o}=r,{timestamp:i}=bu;this.history=[{...o,timestamp:i}];const{onSessionStart:s}=t;s&&s(e,mp(r,this.history)),this.removeListeners=fu(uu(window,"pointermove",this.handlePointerMove),uu(window,"pointerup",this.handlePointerUp),uu(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Cu.update(this.updatePoint)}}function pp(e,t){return t?{point:t(e.point)}:e}function hp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function mp({point:e},t){return{point:e,delta:hp(e,gp(t)),offset:hp(e,vp(t)),velocity:yp(t,.1)}}function vp(e){return e[0]}function gp(e){return e[e.length-1]}function yp(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=gp(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Yu(t)));)n--;if(!r)return{x:0,y:0};const i=Xu(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function bp(e){return e.max-e.min}function wp(e,t=0,n=.01){return Math.abs(e-t)<=n}function xp(e,t,n,r=.5){e.origin=r,e.originPoint=Ad(t.min,t.max,e.origin),e.scale=bp(n)/bp(t),(wp(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Ad(n.min,n.max,e.origin)-e.originPoint,(wp(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Ep(e,t,n,r){xp(e.x,t.x,n.x,r?r.originX:void 0),xp(e.y,t.y,n.y,r?r.originY:void 0)}function Sp(e,t,n){e.min=n.min+t.min,e.max=e.min+bp(t)}function Pp(e,t,n){e.min=t.min-n.min,e.max=e.min+bp(t)}function Cp(e,t,n){Pp(e.x,t.x,n.x),Pp(e.y,t.y,n.y)}function Tp(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Rp(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const Ap=.35;function Dp(e,t,n){return{min:Op(e,t),max:Op(e,n)}}function Op(e,t){return"number"==typeof e?e:e[t]||0}const kp=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Lp=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Mp(e){return[e("x"),e("y")]}function _p({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function $p(e){return void 0===e||1===e}function Ip({scale:e,scaleX:t,scaleY:n}){return!$p(e)||!$p(t)||!$p(n)}function Vp(e){return Ip(e)||Np(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Np(e){return Fp(e.x)||Fp(e.y)}function Fp(e){return e&&"0%"!==e}function jp(e,t,n){return n+t*(e-n)}function Bp(e,t,n,r,o){return void 0!==o&&(e=jp(e,o,r)),jp(e,n,r)+t}function Wp(e,t=0,n=1,r,o){e.min=Bp(e.min,t,n,r,o),e.max=Bp(e.max,t,n,r,o)}function Hp(e,{x:t,y:n}){Wp(e.x,t.translate,t.scale,t.originPoint),Wp(e.y,n.translate,n.scale,n.originPoint)}function Up(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function zp(e,t){e.min=e.min+t,e.max=e.max+t}function Yp(e,t,[n,r,o]){const i=void 0!==t[o]?t[o]:.5,s=Ad(e.min,e.max,i);Wp(e,t[n],t[r],s,t.scale)}const Xp=["x","scaleX","originX"],Kp=["y","scaleY","originY"];function qp(e,t){Yp(e.x,t,Xp),Yp(e.y,t,Kp)}function Gp(e,t){return _p(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const Zp=new WeakMap;class Jp{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Lp(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;this.panSession=new fp(e,{onSessionStart:e=>{this.stopAnimation(),t&&this.snapToCursor(lu(e,"page").point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=vu(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Mp((e=>{let t=this.getAxisMotionValue(e).get()||0;if(xc.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=bp(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),o&&Pu.update((()=>o(e,t)));const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(s),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&Pu.update((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Qp(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?Ad(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Ad(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:n}=this.visualElement.projection||{},r=this.constraints;e&&kl(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:Tp(e.x,n,o),y:Tp(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=Ap){return!1===e?e=0:!0===e&&(e=Ap),{x:Dp(e,"left","right"),y:Dp(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Mp((e=>{this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!kl(e))return!1;const n=e.current;zu(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=Gp(e,n),{scroll:o}=t;return o&&(zp(r.x,o.offset.x),zp(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:Rp(e.x,t.x),y:Rp(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=_p(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=Mp((s=>{if(!Qp(s,t,this.currentDirection))return;let l=a&&a[s]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[s]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(s,d)}));return Promise.all(l).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(If(e,n,0,t))}stopAnimation(){Mp((e=>this.getAxisMotionValue(e).stop()))}getAxisMotionValue(e){const t="_drag"+e.toUpperCase(),n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Mp((t=>{const{drag:n}=this.getProps();if(!Qp(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-Ad(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!kl(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Mp((e=>{const t=this.getAxisMotionValue(e);if(t){const n=t.get();r[e]=function(e,t){let n=.5;const r=bp(e),o=bp(t);return o>r?n=zd(t.min,t.max-r,e.min):r>o&&(n=zd(e.min,e.max-o,t.min)),uc(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Mp((t=>{if(!Qp(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(Ad(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;Zp.set(this.visualElement,this);const e=uu(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();kl(e)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),t();const o=su(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Mp((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=Ap,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:s}}}function Qp(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const eh=e=>(t,n)=>{e&&Pu.update((()=>e(t,n)))};function th(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const nh={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Ec.test(e))return e;e=parseFloat(e)}return`${th(e,t.target.x)}% ${th(e,t.target.y)}%`}},rh=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;const oh=4;function ih(e,t,n=1){zu(n<=oh,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=rh.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);return i?i.trim():lc(o)?ih(o,t,n+1):o}const sh="_$css",ah={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=e.includes("var("),i=[];o&&(e=e.replace(rh,(e=>(i.push(e),sh))));const s=jd.parse(e);if(s.length>5)return r;const a=jd.createTransformer(e),l="number"!=typeof s[0]?1:0,c=n.x.scale*t.x,u=n.y.scale*t.y;s[0+l]/=c,s[1+l]/=u;const d=Ad(c,u,.5);"number"==typeof s[2+l]&&(s[2+l]/=d),"number"==typeof s[3+l]&&(s[3+l]/=d);let f=a(s);if(o){let e=0;f=f.replace(sh,(()=>{const t=i[e];return e++,t}))}return f}};class lh extends e.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=uh,Object.assign(Ql,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Hl.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||Pu.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ch(t){const[n,r]=function(){const t=e.useContext(Rl);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=e.useId();return e.useEffect((()=>o(i)),[]),!n&&r?[!1,()=>r&&r(i)]:[!0]}(),o=e.useContext(zl);return e.createElement(lh,{...t,layoutGroup:o,switchLayoutGroup:e.useContext(Yl),isPresent:n,safeToRemove:r})}const uh={borderRadius:{...nh,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:nh,borderTopRightRadius:nh,borderBottomLeftRadius:nh,borderBottomRightRadius:nh,boxShadow:ah},dh=["TopLeft","TopRight","BottomLeft","BottomRight"],fh=dh.length,ph=e=>"string"==typeof e?parseFloat(e):e,hh=e=>"number"==typeof e||Ec.test(e);function mh(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const vh=yh(0,.5,hd),gh=yh(.5,.95,Lu);function yh(e,t,n){return r=>r<e?0:r>t?1:n(zd(e,t,r))}function bh(e,t){e.min=t.min,e.max=t.max}function wh(e,t){bh(e.x,t.x),bh(e.y,t.y)}function xh(e,t,n,r,o){return e=jp(e-=t,1/n,r),void 0!==o&&(e=jp(e,1/o,r)),e}function Eh(e,t,[n,r,o],i,s){!function(e,t=0,n=1,r=.5,o,i=e,s=e){xc.test(t)&&(t=parseFloat(t),t=Ad(s.min,s.max,t/100)-s.min);if("number"!=typeof t)return;let a=Ad(i.min,i.max,r);e===i&&(a-=t),e.min=xh(e.min,t,n,a,o),e.max=xh(e.max,t,n,a,o)}(e,t[n],t[r],t[o],t.scale,i,s)}const Sh=["x","scaleX","originX"],Ph=["y","scaleY","originY"];function Ch(e,t,n,r){Eh(e.x,t,Sh,n?n.x:void 0,r?r.x:void 0),Eh(e.y,t,Ph,n?n.y:void 0,r?r.y:void 0)}function Th(e){return 0===e.translate&&1===e.scale}function Rh(e){return Th(e.x)&&Th(e.y)}function Ah(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function Dh(e){return bp(e.x)/bp(e.y)}class Oh{constructor(){this.members=[]}add(e){Ff(this.members,e),e.scheduleRender()}remove(e){if(jf(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function kh(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y;if((o||i)&&(r=`translate3d(${o}px, ${i}px, 0) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:e,rotateX:t,rotateY:o}=n;e&&(r+=`rotate(${e}deg) `),t&&(r+=`rotateX(${t}deg) `),o&&(r+=`rotateY(${o}deg) `)}const s=e.x.scale*t.x,a=e.y.scale*t.y;return 1===s&&1===a||(r+=`scale(${s}, ${a})`),r||"none"}const Lh=(e,t)=>e.depth-t.depth;class Mh{constructor(){this.children=[],this.isDirty=!1}add(e){Ff(this.children,e),this.isDirty=!0}remove(e){jf(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Lh),this.isDirty=!1,this.children.forEach(e)}}const _h=["","X","Y","Z"];let $h=0;const Ih={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Vh({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e,n={},r=(null==t?void 0:t())){this.id=$h++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var e;Ih.totalNodes=Ih.resolvedTargetDeltas=Ih.recalculatedProjection=0,this.nodes.forEach(jh),this.nodes.forEach(Yh),this.nodes.forEach(Xh),this.nodes.forEach(Bh),e=Ih,window.MotionDebug&&window.MotionDebug.record(e)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=e,this.latestValues=n,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0,e&&this.root.registerPotentialNode(e,this);for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Mh)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Bf),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}registerPotentialNode(e,t){this.potentialNodes.set(e,t)}mount(t,n=!1){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=performance.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Cu.read(r),e(i-t))};return Pu.read(r,!0),()=>Cu.read(r)}(r,250),Hl.hasAnimatedSinceResize&&(Hl.hasAnimatedSinceResize=!1,this.nodes.forEach(zh))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&s&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||Qh,{onLayoutAnimationStart:i,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Ah(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...$f(o,"layout"),onPlay:i,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||0!==this.animationProgress||zh(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Cu.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Kh),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let o=0;o<this.path.length;o++){const e=this.path[o];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Hh);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(em),this.potentialNodes.clear()),this.nodes.forEach(Uh),this.nodes.forEach(Nh),this.nodes.forEach(Fh),this.clearAllSnapshots(),Tu.update(),Tu.preRender(),Tu.render())}clearAllSnapshots(){this.nodes.forEach(Wh),this.sharedNodes.forEach(qh)}scheduleUpdateProjection(){Pu.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Pu.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Lp(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&(this.scroll={animationId:this.root.animationId,phase:e,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform,t=this.projectionDelta&&!Rh(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||Vp(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),tm((r=n).x),tm(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return Lp();const t=e.measureViewportBox(),{scroll:n}=this.root;return n&&(zp(t.x,n.offset.x),zp(t.y,n.offset.y)),t}removeElementScroll(e){const t=Lp();wh(t,e);for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:o,options:i}=r;if(r!==this.root&&o&&i.layoutScroll){if(o.isRoot){wh(t,e);const{scroll:n}=this.root;n&&(zp(t.x,-n.offset.x),zp(t.y,-n.offset.y))}zp(t.x,o.offset.x),zp(t.y,o.offset.y)}}return t}applyTransform(e,t=!1){const n=Lp();wh(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&qp(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),Vp(e.latestValues)&&qp(n,e.latestValues)}return Vp(this.latestValues)&&qp(n,this.latestValues),n}removeTransform(e){const t=Lp();wh(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!Vp(e.latestValues))continue;Ip(e.latestValues)&&e.updateSnapshot();const r=Lp();wh(r,e.measurePageBox()),Ch(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return Vp(this.latestValues)&&Ch(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=bu.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout?(this.relativeParent=e,this.relativeTarget=Lp(),this.relativeTargetOrigin=Lp(),Cp(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),wh(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target=Lp(),this.targetWithTransforms=Lp()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.relativeParent.resolvedRelativeTargetAt!==bu.timestamp&&this.relativeParent.resolveTargetDelta(!0),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,Sp(s.x,a.x,l.x),Sp(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):wh(this.target,this.layout.layoutBox),Hp(this.target,this.targetDelta)):wh(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target?(this.relativeParent=e,this.relativeTarget=Lp(),this.relativeTargetOrigin=Lp(),Cp(this.relativeTargetOrigin,this.target,e.target),wh(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Ih.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Ip(this.parent.latestValues)&&!Np(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===bu.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;wh(this.layoutCorrected,this.layout.layoutBox),function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,s;t.x=t.y=1;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const o=i.instance;o&&o.style&&"contents"===o.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&qp(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Hp(e,s)),r&&Vp(i.latestValues)&&qp(e,i.latestValues))}t.x=Up(t.x),t.y=Up(t.y)}(this.layoutCorrected,this.treeScale,this.path,n);const{target:s}=t;if(!s)return;this.projectionDelta||(this.projectionDelta=kp(),this.projectionDeltaWithTransform=kp());const a=this.treeScale.x,l=this.treeScale.y,c=this.projectionTransform;Ep(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.projectionTransform=kh(this.projectionDelta,this.treeScale),this.projectionTransform===c&&this.treeScale.x===a&&this.treeScale.y===l||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s)),Ih.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i=kp();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s=Lp(),a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(Jh));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,f,p,h;Gh(i.x,e.x,n),Gh(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Cp(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),l=this.relativeTarget,f=this.relativeTargetOrigin,p=s,h=n,Zh(l.x,f.x,p.x,h),Zh(l.y,f.y,p.y,h),d&&Ah(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d=Lp()),wh(d,this.relativeTarget)),a&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=Ad(0,void 0!==n.opacity?n.opacity:1,vh(r)),e.opacityExit=Ad(void 0!==t.opacity?t.opacity:1,0,gh(r))):i&&(e.opacity=Ad(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let s=0;s<fh;s++){const o=`border${dh[s]}Radius`;let i=mh(t,o),a=mh(n,o);void 0===i&&void 0===a||(i||(i=0),a||(a=0),0===i||0===a||hh(i)===hh(a)?(e[o]=Math.max(Ad(ph(i),ph(a),r),0),(xc.test(a)||xc.test(i))&&(e[o]+="%")):e[o]=a)}(t.rotate||n.rotate)&&(e.rotate=Ad(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Cu.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Pu.update((()=>{Hl.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=rc(e)?e:zf(e);return r.start(If("",r,t,n)),r.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&nm(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Lp();const t=bp(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=bp(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}wh(t,n),qp(t,o),Ep(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Oh);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(t=!0),!t)return;const r={};for(let o=0;o<_h.length;o++){const t="rotate"+_h[o];n[t]&&(r[t]=n[t],e.setStaticValue(t,0))}e.render();for(const o in r)e.setStaticValue(o,r[o]);e.scheduleRender()}getProjectionStyles(e={}){var t,n;const r={};if(!this.instance||this.isSVG)return r;if(!this.isVisible)return{visibility:"hidden"};r.visibility="";const o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=tu(e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=tu(e.pointerEvents)||""),this.hasProjected&&!Vp(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const s=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=kh(this.projectionDeltaWithTransform,this.treeScale,s),o&&(r.transform=o(s,r.transform));const{x:a,y:l}=this.projectionDelta;r.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=s.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:r.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const c in Ql){if(void 0===s[c])continue;const{correct:e,applyTo:t}=Ql[c],n="none"===r.transform?s[c]:e(s[c],i);if(t){const e=t.length;for(let o=0;o<e;o++)r[t[o]]=n}else r[c]=n}return this.options.layoutId&&(r.pointerEvents=i===this?tu(e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Hh),this.root.sharedNodes.clear()}}}function Nh(e){e.updateLayout()}function Fh(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?Mp((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=bp(r);r.min=t[e].min,r.max=r.min+o})):nm(o,n.layoutBox,t)&&Mp((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],s=bp(t[r]);o.max=o.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)}));const s=kp();Ep(s,t,n.layoutBox);const a=kp();i?Ep(a,e.applyTransform(r,!0),n.measuredBox):Ep(a,t,n.layoutBox);const l=!Rh(s);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const s=Lp();Cp(s,n.layoutBox,o.layoutBox);const a=Lp();Cp(a,t,i.layoutBox),Ah(s,a)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function jh(e){Ih.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Bh(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Wh(e){e.clearSnapshot()}function Hh(e){e.clearMeasurements()}function Uh(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function zh(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Yh(e){e.resolveTargetDelta()}function Xh(e){e.calcProjection()}function Kh(e){e.resetRotation()}function qh(e){e.removeLeadSnapshot()}function Gh(e,t,n){e.translate=Ad(t.translate,0,n),e.scale=Ad(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Zh(e,t,n,r){e.min=Ad(t.min,n.min,r),e.max=Ad(t.max,n.max,r)}function Jh(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Qh={duration:.45,ease:[.4,0,.1,1]};function em(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const r=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);r&&e.mount(r,!0)}function tm(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function nm(e,t,n){return"position"===e||"preserve-aspect"===e&&!wp(Dh(t),Dh(n),.2)}const rm=Vh({attachResizeListener:(e,t)=>su(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),om={current:void 0},im=Vh({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!om.current){const e=new rm(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),om.current=e}return om.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),sm={pan:{Feature:class extends yu{constructor(){super(...arguments),this.removePointerDownListener=Lu}onPointerDown(e){this.session=new fp(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:eh(e),onStart:eh(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Pu.update((()=>r(e,t)))}}}mount(){this.removePointerDownListener=uu(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends yu{constructor(e){super(e),this.removeGroupControls=Lu,this.removeListeners=Lu,this.controls=new Jp(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Lu}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:im,MeasureLayout:ch}},am=new Set(["width","height","top","left","right","bottom","x","y"]),lm=e=>am.has(e),cm=e=>e===dc||e===Ec,um=(e,t)=>parseFloat(e.split(", ")[t]),dm=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return um(o[1],t);{const t=r.match(/^matrix\((.+)\)$/);return t?um(t[1],e):0}},fm=new Set(["x","y","z"]),pm=ec.filter((e=>!fm.has(e)));const hm={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:dm(4,13),y:dm(5,14)},mm=(e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(lm);let i=[],s=!1;const a=[];if(o.forEach((o=>{const l=e.getValue(o);if(!e.hasValue(o))return;let c=n[o],u=Kf(c);const d=t[o];let f;if(Jc(d)){const e=d.length,t=null===d[0]?1:0;c=d[t],u=Kf(c);for(let n=t;n<e;n++)f?zu(Kf(d[n])===f,"All keyframes must be of the same type"):(f=Kf(d[n]),zu(f===u||cm(u)&&cm(f),"Keyframes must be of the same dimension as the current value"))}else f=Kf(d);if(u!==f)if(cm(u)&&cm(f)){const e=l.get();"string"==typeof e&&l.set(parseFloat(e)),"string"==typeof d?t[o]=parseFloat(d):Array.isArray(d)&&f===Ec&&(t[o]=d.map(parseFloat))}else(null==u?void 0:u.transform)&&(null==f?void 0:f.transform)&&(0===c||0===d)?0===c?l.set(f.transform(c)):t[o]=u.transform(d):(s||(i=function(e){const t=[];return pm.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.render(),t}(e),s=!0),a.push(o),r[o]=void 0!==r[o]?r[o]:t[o],l.jump(d))})),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,o=((e,t,n)=>{const r=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),{display:s}=i,a={};"none"===s&&t.setStaticValue("display",e.display||"block"),n.forEach((e=>{a[e]=hm[e](r,i)})),t.render();const l=t.measureViewportBox();return n.forEach((n=>{const r=t.getValue(n);r&&r.jump(a[n]),e[n]=hm[n](l,i)})),e})(t,e,a);return i.length&&i.forEach((([t,n])=>{e.getValue(t).set(n)})),e.render(),Al&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:r}}return{target:t,transitionEnd:r}};function vm(e,t,n,r){return(e=>Object.keys(e).some(lm))(t)?mm(e,t,n,r):{target:t,transitionEnd:r}}const gm=(e,t,n,r)=>{const o=function(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach((e=>{const t=e.get();if(!lc(t))return;const n=ih(t,r);n&&e.set(n)}));for(const o in t){const e=t[o];if(!lc(e))continue;const i=ih(e,r);i&&(t[o]=i,n||(n={}),void 0===n[o]&&(n[o]=e))}return{target:t,transitionEnd:n}}(e,t,r);return vm(e,t=o.target,n,r=o.transitionEnd)},ym={current:null},bm={current:!1};const wm=new WeakMap,xm=Object.keys(Bl),Em=xm.length,Sm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Pm=$l.length;class Cm{constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,visualState:o},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Pu.render(this.render,!1,!0);const{latestValues:s,renderState:a}=o;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=a,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=i,this.isControllingVariants=Il(t),this.isVariantNode=Vl(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(t,{});for(const u in c){const e=c[u];void 0!==s[u]&&rc(e)&&(e.set(s[u],!1),Vf(l)&&l.add(u))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,wm.set(e,this),this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),bm.current||function(){if(bm.current=!0,Al)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ym.current=e.matches;e.addListener(t),t()}else ym.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||ym.current),"production"!==process.env.NODE_ENV&&Hf(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){wm.delete(this.current),this.projection&&this.projection.unmount(),Cu.update(this.notifyUpdate),Cu.render(this.render),this.valueSubscriptions.forEach((e=>e())),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,t){const n=tc.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Pu.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,(()=>{r(),o()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures({children:e,...t},n,r,o,i){let s,a;if("production"!==process.env.NODE_ENV&&r&&n){const e="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Uu(!1,e):zu(!1,e)}for(let l=0;l<Em;l++){const e=xm[l],{isEnabled:n,Feature:r,ProjectionNode:o,MeasureLayout:i}=Bl[e];o&&(s=o),n(t)&&(!this.features[e]&&r&&(this.features[e]=new r(this)),i&&(a=i))}if(!this.projection&&s){this.projection=new s(o,this.latestValues,this.parent&&this.parent.projection);const{layoutId:e,layout:n,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;this.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(r)||a&&kl(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:c})}return a}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update(this.props,this.prevProps):(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Lp()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<Sm.length;n++){const t=Sm[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){const{willChange:r}=t;for(const o in t){const i=t[o],s=n[o];if(rc(i))e.addValue(o,i),Vf(r)&&r.add(o),"development"===process.env.NODE_ENV&&Hf("10.10.0"===i.version,`Attempting to mix Framer Motion versions ${i.version} with 10.10.0 may not work as expected.`);else if(rc(s))e.addValue(o,zf(i,{owner:e})),Vf(r)&&r.remove(o);else if(s!==i)if(e.hasValue(o)){const t=e.getValue(o);!t.hasAnimated&&t.set(i)}else{const t=e.getStaticValue(o);e.addValue(o,zf(void 0!==t?t:i,{owner:e}))}}for(const o in n)void 0===t[o]&&e.removeValue(o);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const t={};for(let n=0;n<Pm;n++){const e=$l[n],r=this.props[e];(Ll(r)||!1===r)&&(t[e]=r)}return t}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){t!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,t)),this.values.set(e,t),this.latestValues[e]=t.get()}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=zf(t,{owner:this}),this.addValue(e,n)),n}readValue(e){return void 0===this.latestValues[e]&&this.current?this.readValueFromInstance(this.current,e,this.options):this.latestValues[e]}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props,r="string"==typeof n||"object"==typeof n?null===(t=Zc(this.props,n))||void 0===t?void 0:t[e]:void 0;if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||rc(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new Bf),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class Tm extends Cm{sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...n},{transformValues:r},o){let i=function(e,t,n){const r={};for(const o in e){const e=Jf(o,t);if(void 0!==e)r[o]=e;else{const e=n.getValue(o);e&&(r[o]=e.get())}}return r}(n,e||{},this);if(r&&(t&&(t=r(t)),n&&(n=r(n)),i&&(i=r(i))),o){!function(e,t,n){var r,o;const i=Object.keys(t).filter((t=>!e.hasValue(t))),s=i.length;if(s)for(let a=0;a<s;a++){const s=i[a],l=t[s];let c=null;Array.isArray(l)&&(c=l[0]),null===c&&(c=null!==(o=null!==(r=n[s])&&void 0!==r?r:e.readValue(s))&&void 0!==o?o:t[s]),null!=c&&("string"==typeof c&&(/^\-?\d*\.?\d+$/.test(c)||Nf(c))?c=parseFloat(c):!Gf(c)&&jd.test(l)&&(c=Lf(s,l)),e.addValue(s,zf(c,{owner:e})),void 0===n[s]&&(n[s]=c),null!==c&&e.setBaseTarget(s,c))}}(this,n,i);const e=gm(this,n,i,t);t=e.transitionEnd,n=e.target}return{transition:e,transitionEnd:t,...n}}}class Rm extends Tm{readValueFromInstance(e,t){if(tc.has(t)){const e=kf(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=(ac(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Gp(e,t)}build(e,t,n,r){Ac(e,t,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return qc(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;rc(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}renderInstance(e,t,n,r){Yc(e,t,n,r)}}class Am extends Tm{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(tc.has(t)){const e=kf(t);return e&&e.default||0}return t=Xc.has(t)?t:zc(t),e.getAttribute(t)}measureInstanceViewportBox(){return Lp()}scrapeMotionValuesFromProps(e,t){return Gc(e,t)}build(e,t,n,r){jc(e,t,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,n,r){Kc(e,t,0,r)}mount(e){this.isSVGTag=Wc(e.tagName),super.mount(e)}}const Dm=(e,t)=>Jl(e)?new Am(t,{enableHardwareAcceleration:!1}):new Rm(t,{enableHardwareAcceleration:!0}),Om={...up,...ju,...sm,...{layout:{ProjectionNode:im,MeasureLayout:ch}}},km=Gl(((e,t)=>function(e,{forwardMotionProps:t=!1},n,r){return{...Jl(e)?ou:iu,preloadedFeatures:n,useRender:Uc(t),createVisualElement:r,Component:e}}(e,t,Om,Dm)));var Lm,Mm={exports:{}},_m={exports:{}},$m={};var Im,Vm,Nm,Fm,jm,Bm,Wm,Hm,Um,zm,Ym,Xm,Km,qm,Gm={};function Zm(){return Vm||(Vm=1,"production"===process.env.NODE_ENV?_m.exports=function(){if(Lm)return $m;Lm=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case l:case c:case r:case i:case o:case d:return e;default:switch(e=e&&e.$$typeof){case a:case u:case h:case p:case s:return e;default:return f}}case n:return f}}}function w(e){return b(e)===c}return $m.AsyncMode=l,$m.ConcurrentMode=c,$m.ContextConsumer=a,$m.ContextProvider=s,$m.Element=t,$m.ForwardRef=u,$m.Fragment=r,$m.Lazy=h,$m.Memo=p,$m.Portal=n,$m.Profiler=i,$m.StrictMode=o,$m.Suspense=d,$m.isAsyncMode=function(e){return w(e)||b(e)===l},$m.isConcurrentMode=w,$m.isContextConsumer=function(e){return b(e)===a},$m.isContextProvider=function(e){return b(e)===s},$m.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},$m.isForwardRef=function(e){return b(e)===u},$m.isFragment=function(e){return b(e)===r},$m.isLazy=function(e){return b(e)===h},$m.isMemo=function(e){return b(e)===p},$m.isPortal=function(e){return b(e)===n},$m.isProfiler=function(e){return b(e)===i},$m.isStrictMode=function(e){return b(e)===o},$m.isSuspense=function(e){return b(e)===d},$m.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===u||e.$$typeof===v||e.$$typeof===g||e.$$typeof===y||e.$$typeof===m)},$m.typeOf=b,$m}():_m.exports=(Im||(Im=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:var m=e.type;switch(m){case l:case c:case r:case i:case o:case d:return m;default:var v=m&&m.$$typeof;switch(v){case a:case u:case h:case p:case s:return v;default:return f}}case n:return f}}}var w=l,x=c,E=a,S=s,P=t,C=u,T=r,R=h,A=p,D=n,O=i,k=o,L=d,M=!1;function _(e){return b(e)===c}Gm.AsyncMode=w,Gm.ConcurrentMode=x,Gm.ContextConsumer=E,Gm.ContextProvider=S,Gm.Element=P,Gm.ForwardRef=C,Gm.Fragment=T,Gm.Lazy=R,Gm.Memo=A,Gm.Portal=D,Gm.Profiler=O,Gm.StrictMode=k,Gm.Suspense=L,Gm.isAsyncMode=function(e){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),_(e)||b(e)===l},Gm.isConcurrentMode=_,Gm.isContextConsumer=function(e){return b(e)===a},Gm.isContextProvider=function(e){return b(e)===s},Gm.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Gm.isForwardRef=function(e){return b(e)===u},Gm.isFragment=function(e){return b(e)===r},Gm.isLazy=function(e){return b(e)===h},Gm.isMemo=function(e){return b(e)===p},Gm.isPortal=function(e){return b(e)===n},Gm.isProfiler=function(e){return b(e)===i},Gm.isStrictMode=function(e){return b(e)===o},Gm.isSuspense=function(e){return b(e)===d},Gm.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===u||e.$$typeof===v||e.$$typeof===g||e.$$typeof===y||e.$$typeof===m)},Gm.typeOf=b}()),Gm)),_m.exports}function Jm(){if(Fm)return Nm;Fm=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return Nm=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(wg){return!1}}()?Object.assign:function(r,o){for(var i,s,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),l=1;l<arguments.length;l++){for(var c in i=Object(arguments[l]))t.call(i,c)&&(a[c]=i[c]);if(e){s=e(i);for(var u=0;u<s.length;u++)n.call(i,s[u])&&(a[s[u]]=i[s[u]])}}return a},Nm}function Qm(){if(Bm)return jm;Bm=1;return jm="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function ev(){return Hm?Wm:(Hm=1,Wm=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var tv=Zm();Mm.exports=function(){if(Xm)return Ym;Xm=1;var e=Zm(),t=Jm(),n=Qm(),r=ev(),o=function(){if(zm)return Um;zm=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Qm(),n={},r=ev();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(n){}}}function o(o,i,s,a,l){if("production"!==process.env.NODE_ENV)for(var c in o)if(r(o,c)){var u;try{if("function"!=typeof o[c]){var d=Error((a||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}u=o[c](i,c,a,s,null,t)}catch(p){u=p}if(!u||u instanceof Error||e((a||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var f=l?l():"";e("Failed "+s+" type: "+u.message+(null!=f?f:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},Um=o}(),i=function(){};function s(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(n){}}),Ym=function(a,l){var c="function"==typeof Symbol&&Symbol.iterator,u="@@iterator",d="<<anonymous>>",f={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:m(s),arrayOf:function(e){return m((function(t,r,o,i,s){if("function"!=typeof e)return new h("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var a=t[r];if(!Array.isArray(a))return new h("Invalid "+i+" `"+s+"` of type `"+b(a)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<a.length;l++){var c=e(a,l,o,i,s+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:m((function(e,t,n,r,o){var i=e[t];return a(i)?null:new h("Invalid "+r+" `"+o+"` of type `"+b(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:m((function(t,n,r,o,i){var s=t[n];return e.isValidElementType(s)?null:new h("Invalid "+o+" `"+i+"` of type `"+b(s)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return m((function(t,n,r,o,i){if(!(t[n]instanceof e)){var s=e.name||d;return new h("Invalid "+o+" `"+i+"` of type `"+((a=t[n]).constructor&&a.constructor.name?a.constructor.name:d)+"` supplied to `"+r+"`, expected instance of `"+s+"`.")}var a;return null}))},node:m((function(e,t,n,r,o){return y(e[t])?null:new h("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return m((function(t,o,i,s,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=b(l);if("object"!==c)return new h("Invalid "+s+" `"+a+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var u in l)if(r(l,u)){var d=e(l,u,i,s,a+"."+u,n);if(d instanceof Error)return d}return null}))},oneOf:function(e){return Array.isArray(e)?m((function(t,n,r,o,i){for(var s=t[n],a=0;a<e.length;a++)if(p(s,e[a]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===w(t)?String(t):t}));return new h("Invalid "+o+" `"+i+"` of value `"+String(s)+"` supplied to `"+r+"`, expected one of "+l+".")})):("production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),s)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(o)+" at index "+t+"."),s}return m((function(t,o,i,s,a){for(var l=[],c=0;c<e.length;c++){var u=(0,e[c])(t,o,i,s,a,n);if(null==u)return null;u.data&&r(u.data,"expectedType")&&l.push(u.data.expectedType)}return new h("Invalid "+s+" `"+a+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return m((function(t,r,o,i,s){var a=t[r],l=b(a);if("object"!==l)return new h("Invalid "+i+" `"+s+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return g(o,i,s,c,w(u));var d=u(a,c,o,i,s+"."+c,n);if(d)return d}return null}))},exact:function(e){return m((function(o,i,s,a,l){var c=o[i],u=b(c);if("object"!==u)return new h("Invalid "+a+" `"+l+"` of type `"+u+"` supplied to `"+s+"`, expected `object`.");var d=t({},o[i],e);for(var f in d){var p=e[f];if(r(e,f)&&"function"!=typeof p)return g(s,a,l,f,w(p));if(!p)return new h("Invalid "+a+" `"+l+"` key `"+f+"` supplied to `"+s+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=p(c,f,s,a,l+"."+f,n);if(m)return m}return null}))}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function m(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,s,a,c,u,f,p){if(c=c||d,f=f||a,p!==n){if(l){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var v=c+":"+a;!t[v]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+f+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[v]=!0,r++)}}return null==s[a]?o?null===s[a]?new h("The "+u+" `"+f+"` is marked as required in `"+c+"`, but its value is `null`."):new h("The "+u+" `"+f+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(s,a,c,u,f)}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}function v(e){return m((function(t,n,r,o,i,s){var a=t[n];return b(a)!==e?new h("Invalid "+o+" `"+i+"` of type `"+w(a)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,o){return new h((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function y(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(y);if(null===e||a(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e[u]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!y(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!y(o[1]))return!1}return!0;default:return!1}}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function w(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=w(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},Ym}()(tv.isElement,!0)}else Mm.exports=function(){if(qm)return Km;qm=1;var e=Qm();function t(){}function n(){}return n.resetWarningCache=t,Km=function(){function r(t,n,r,o,i,s){if(s!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i}}()();const nv=i(Mm.exports);function rv(){return rv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rv.apply(this,arguments)}function ov(e,t){return(ov=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var iv=function(t){var n,r;function o(){return t.apply(this,arguments)||this}r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,ov(n,r);var i=o.prototype;return i.getColumns=function(){var t=this.props,n=t.children,r=t.columnsCount,o=Array.from({length:r},(function(){return[]}));return e.Children.forEach(n,(function(t,n){t&&e.isValidElement(t)&&o[n%r].push(t)})),o},i.renderColumns=function(){var t=this.props.gutter;return this.getColumns().map((function(n,r){return e.createElement("div",{key:r,style:{display:"flex",flexDirection:"column",justifyContent:"flex-start",alignContent:"stretch",flex:1,width:0,gap:t}},n.map((function(e){return e})))}))},i.render=function(){var t=this.props,n=t.gutter,r=t.className,o=t.style;return e.createElement("div",{style:rv({display:"flex",flexDirection:"row",justifyContent:"center",alignContent:"stretch",boxSizing:"border-box",width:"100%",gap:n},o),className:r},this.renderColumns())},o}(e.Component);iv.propTypes="production"!==process.env.NODE_ENV?{children:nv.oneOfType([nv.arrayOf(nv.node),nv.node]).isRequired,columnsCount:nv.number,gutter:nv.string,className:nv.string,style:nv.object}:{},iv.defaultProps={columnsCount:3,gutter:"0",className:null,style:{}};var sv="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,av=function(){var t=function(){var t=e.useState(!1),n=t[0],r=t[1];return sv((function(){r(!0)}),[]),n}(),n=e.useState(0),r=n[0],o=n[1],i=e.useCallback((function(){t&&o(window.innerWidth)}),[t]);return sv((function(){if(t)return window.addEventListener("resize",i),i(),function(){return window.removeEventListener("resize",i)}}),[t,i]),r},lv=function(t){var n=t.columnsCountBreakPoints,r=void 0===n?{350:1,750:2,900:3}:n,o=t.children,i=t.className,s=void 0===i?null:i,a=t.style,l=void 0===a?null:a,c=av(),u=e.useMemo((function(){var e=Object.keys(r).sort((function(e,t){return e-t})),t=e.length>0?r[e[0]]:1;return e.forEach((function(e){e<c&&(t=r[e])})),t}),[c,r]);return e.createElement("div",{className:s,style:l},e.Children.map(o,(function(t,n){return e.cloneElement(t,{key:n,columnsCount:u})})))};lv.propTypes="production"!==process.env.NODE_ENV?{children:nv.oneOfType([nv.arrayOf(nv.node),nv.node]).isRequired,columnsCountBreakPoints:nv.object,className:nv.string,style:nv.object}:{};const[cv,uv]=go("Tooltip",[ia]),dv=ia(),fv=700,pv="tooltip.open",[hv,mv]=cv("TooltipProvider"),vv="Tooltip",[gv,yv]=cv(vv),bv="TooltipTrigger",wv=e.forwardRef(((t,n)=>{const{__scopeTooltip:r,...o}=t,i=yv(bv,r),s=mv(bv,r),a=dv(r),l=vo(n,e.useRef(null),i.onTriggerChange),c=e.useRef(!1),u=e.useRef(!1),d=e.useCallback((()=>c.current=!1),[]);return e.useEffect((()=>()=>document.removeEventListener("pointerup",d)),[d]),e.createElement(ya,p({asChild:!0},a),e.createElement(Po.button,p({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},o,{ref:l,onPointerMove:ho(t.onPointerMove,(e=>{"touch"!==e.pointerType&&(u.current||s.isPointerInTransitRef.current||(i.onTriggerEnter(),u.current=!0))})),onPointerLeave:ho(t.onPointerLeave,(()=>{i.onTriggerLeave(),u.current=!1})),onPointerDown:ho(t.onPointerDown,(()=>{c.current=!0,document.addEventListener("pointerup",d,{once:!0})})),onFocus:ho(t.onFocus,(()=>{c.current||i.onOpen()})),onBlur:ho(t.onBlur,i.onClose),onClick:ho(t.onClick,i.onClose)})))})),xv="TooltipPortal",[Ev,Sv]=cv(xv,{forceMount:void 0}),Pv="TooltipContent",Cv=e.forwardRef(((t,n)=>{const r=Sv(Pv,t.__scopeTooltip),{forceMount:o=r.forceMount,side:i="top",...s}=t,a=yv(Pv,t.__scopeTooltip);return e.createElement(Qo,{present:o||a.open},a.disableHoverableContent?e.createElement(Dv,p({side:i},s,{ref:n})):e.createElement(Tv,p({side:i},s,{ref:n})))})),Tv=e.forwardRef(((t,n)=>{const r=yv(Pv,t.__scopeTooltip),o=mv(Pv,t.__scopeTooltip),i=e.useRef(null),s=vo(n,i),[a,l]=e.useState(null),{trigger:c,onClose:u}=r,d=i.current,{onPointerInTransitChange:f}=o,h=e.useCallback((()=>{l(null),f(!1)}),[f]),m=e.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(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})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),i=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const t=e[r];for(;n.length>=2;){const e=n[n.length-1],r=n[n.length-2];if(!((e.x-r.x)*(t.y-r.y)>=(e.y-r.y)*(t.x-r.x)))break;n.pop()}n.push(t)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...o,...function(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}]}(t.getBoundingClientRect())]);l(i),f(!0)}),[f]);return e.useEffect((()=>()=>h()),[h]),e.useEffect((()=>{if(c&&d){const e=e=>m(e,d),t=e=>m(e,c);return c.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}}),[c,d,m,h]),e.useEffect((()=>{if(a){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==c?void 0:c.contains(t))||(null==d?void 0:d.contains(t)),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const e=t[i].x,a=t[i].y,l=t[s].x,c=t[s].y;a>r!=c>r&&n<(l-e)*(r-a)/(c-a)+e&&(o=!o)}return o}(n,a);r?h():o&&(h(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[c,d,a,u,h]),e.createElement(Dv,p({},t,{ref:s}))})),[Rv,Av]=cv(vv,{isInside:!1}),Dv=e.forwardRef(((t,n)=>{const{__scopeTooltip:r,children:o,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:a,...l}=t,c=yv(Pv,r),u=dv(r),{onClose:d}=c;return e.useEffect((()=>(document.addEventListener(pv,d),()=>document.removeEventListener(pv,d))),[d]),e.useEffect((()=>{if(c.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(c.trigger)&&d()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[c.trigger,d]),e.createElement(Ri,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:d},e.createElement(ba,p({"data-state":c.stateAttribute},u,l,{ref:n,style:{...l.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)"}}),e.createElement(xo,null,o),e.createElement(Rv,{scope:r,isInside:!0},e.createElement(Sa,{id:c.contentId,role:"tooltip"},i||o))))}));const Ov=t=>{const{__scopeTooltip:n,delayDuration:r=fv,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:s}=t,[a,l]=e.useState(!0),c=e.useRef(!1),u=e.useRef(0);return e.useEffect((()=>{const e=u.current;return()=>window.clearTimeout(e)}),[]),e.createElement(hv,{scope:n,isOpenDelayed:a,delayDuration:r,onOpen:e.useCallback((()=>{window.clearTimeout(u.current),l(!1)}),[]),onClose:e.useCallback((()=>{window.clearTimeout(u.current),u.current=window.setTimeout((()=>l(!0)),o)}),[o]),isPointerInTransitRef:c,onPointerInTransitChange:e.useCallback((e=>{c.current=e}),[]),disableHoverableContent:i},s)},kv=t=>{const{__scopeTooltip:n,children:r,open:o,defaultOpen:i=!1,onOpenChange:s,disableHoverableContent:a,delayDuration:l}=t,c=mv(vv,t.__scopeTooltip),u=dv(n),[d,f]=e.useState(null),p=Do(),h=e.useRef(0),m=null!=a?a:c.disableHoverableContent,v=null!=l?l:c.delayDuration,g=e.useRef(!1),[y=!1,b]=ko({prop:o,defaultProp:i,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(pv))):c.onClose(),null==s||s(e)}}),w=e.useMemo((()=>y?g.current?"delayed-open":"instant-open":"closed"),[y]),x=e.useCallback((()=>{window.clearTimeout(h.current),g.current=!1,b(!0)}),[b]),E=e.useCallback((()=>{window.clearTimeout(h.current),b(!1)}),[b]),S=e.useCallback((()=>{window.clearTimeout(h.current),h.current=window.setTimeout((()=>{g.current=!0,b(!0)}),v)}),[v,b]);return e.useEffect((()=>()=>window.clearTimeout(h.current)),[]),e.createElement(ga,u,e.createElement(gv,{scope:n,contentId:p,open:y,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:e.useCallback((()=>{c.isOpenDelayed?S():x()}),[c.isOpenDelayed,S,x]),onTriggerLeave:e.useCallback((()=>{m?E():window.clearTimeout(h.current)}),[E,m]),onOpen:x,onClose:E,disableHoverableContent:m},r))},Lv=wv,Mv=t=>{const{__scopeTooltip:n,forceMount:r,children:o,container:i}=t,s=yv(xv,n);return e.createElement(Ev,{scope:n,forceMount:r},e.createElement(Qo,{present:r||s.open},e.createElement(xa,{asChild:!0,container:i},o)))},_v=Cv,$v=e.forwardRef(((t,n)=>{const{__scopeTooltip:r,...o}=t,i=dv(r);return Av("TooltipArrow",r).isInside?null:e.createElement(wa,p({},i,o,{ref:n}))}));const Iv="ScrollArea",[Vv,Nv]=h(Iv),[Fv,jv]=Vv(Iv),Bv=e.forwardRef(((t,n)=>{const{__scopeScrollArea:r,type:o="hover",dir:i,scrollHideDelay:s=600,...a}=t,[l,c]=e.useState(null),[u,d]=e.useState(null),[f,h]=e.useState(null),[m,v]=e.useState(null),[y,b]=e.useState(null),[w,x]=e.useState(0),[E,S]=e.useState(0),[P,C]=e.useState(!1),[T,R]=e.useState(!1),A=g(n,(e=>c(e))),D=Ir(i);return e.createElement(Fv,{scope:r,type:o,dir:D,scrollHideDelay:s,scrollArea:l,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:m,onScrollbarXChange:v,scrollbarXEnabled:P,onScrollbarXEnabledChange:C,scrollbarY:y,onScrollbarYChange:b,scrollbarYEnabled:T,onScrollbarYEnabledChange:R,onCornerWidthChange:x,onCornerHeightChange:S},e.createElement(O.div,p({dir:D},a,{ref:A,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":E+"px",...t.style}})))})),Wv=e.forwardRef(((t,n)=>{const{__scopeScrollArea:r,children:o,...i}=t,s=jv("ScrollAreaViewport",r),a=g(n,e.useRef(null),s.onViewportChange);return e.createElement(e.Fragment,null,e.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),e.createElement(O.div,p({"data-radix-scroll-area-viewport":""},i,{ref:a,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...t.style}}),e.createElement("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"}},o)))})),Hv="ScrollAreaScrollbar",Uv=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=jv(Hv,t.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:a}=i,l="horizontal"===t.orientation;return e.useEffect((()=>(l?s(!0):a(!0),()=>{l?s(!1):a(!1)})),[l,s,a]),"hover"===i.type?e.createElement(zv,p({},o,{ref:n,forceMount:r})):"scroll"===i.type?e.createElement(Yv,p({},o,{ref:n,forceMount:r})):"auto"===i.type?e.createElement(Xv,p({},o,{ref:n,forceMount:r})):"always"===i.type?e.createElement(Kv,p({},o,{ref:n})):null})),zv=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=jv(Hv,t.__scopeScrollArea),[s,a]=e.useState(!1);return e.useEffect((()=>{const e=i.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),a(!0)},r=()=>{t=window.setTimeout((()=>a(!1)),i.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}}),[i.scrollArea,i.scrollHideDelay]),e.createElement(G,{present:r||s},e.createElement(Xv,p({"data-state":s?"visible":"hidden"},o,{ref:n})))})),Yv=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=jv(Hv,t.__scopeScrollArea),s="horizontal"===t.orientation,a=pg((()=>c("SCROLL_END")),100),[l,c]=(u="hidden",d={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},e.useReducer(((e,t)=>{const n=d[e][t];return null!=n?n:e}),u));var u,d;return e.useEffect((()=>{if("idle"===l){const e=window.setTimeout((()=>c("HIDE")),i.scrollHideDelay);return()=>window.clearTimeout(e)}}),[l,i.scrollHideDelay,c]),e.useEffect((()=>{const e=i.viewport,t=s?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(c("SCROLL"),a()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}}),[i.viewport,s,c,a]),e.createElement(G,{present:r||"hidden"!==l},e.createElement(Kv,p({"data-state":"hidden"===l?"hidden":"visible"},o,{ref:n,onPointerEnter:y(t.onPointerEnter,(()=>c("POINTER_ENTER"))),onPointerLeave:y(t.onPointerLeave,(()=>c("POINTER_LEAVE")))})))})),Xv=e.forwardRef(((t,n)=>{const r=jv(Hv,t.__scopeScrollArea),{forceMount:o,...i}=t,[s,a]=e.useState(!1),l="horizontal"===t.orientation,c=pg((()=>{if(r.viewport){const e=r.viewport.offsetWidth<r.viewport.scrollWidth,t=r.viewport.offsetHeight<r.viewport.scrollHeight;a(l?e:t)}}),10);return hg(r.viewport,c),hg(r.content,c),e.createElement(G,{present:o||s},e.createElement(Kv,p({"data-state":s?"visible":"hidden"},i,{ref:n})))})),Kv=e.forwardRef(((t,n)=>{const{orientation:r="vertical",...o}=t,i=jv(Hv,t.__scopeScrollArea),s=e.useRef(null),a=e.useRef(0),[l,c]=e.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ag(l.viewport,l.content),d={...o,sizes:l,onSizesChange:c,hasThumb:Boolean(u>0&&u<1),onThumbChange:e=>s.current=e,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:e=>a.current=e};function f(e,t){return function(e,t,n,r="ltr"){const o=lg(n),i=o/2,s=t||i,a=o-s,l=n.scrollbar.paddingStart+s,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,u=n.content-n.viewport,d="ltr"===r?[0,u]:[-1*u,0];return ug([l,c],d)(e)}(e,a.current,l,t)}return"horizontal"===r?e.createElement(qv,p({},d,{ref:n,onThumbPositionChange:()=>{if(i.viewport&&s.current){const e=cg(i.viewport.scrollLeft,l,i.dir);s.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=f(e,i.dir))}})):"vertical"===r?e.createElement(Gv,p({},d,{ref:n,onThumbPositionChange:()=>{if(i.viewport&&s.current){const e=cg(i.viewport.scrollTop,l);s.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=f(e))}})):null})),qv=e.forwardRef(((t,n)=>{const{sizes:r,onSizesChange:o,...i}=t,s=jv(Hv,t.__scopeScrollArea),[a,l]=e.useState(),c=e.useRef(null),u=g(n,c,s.onScrollbarXChange);return e.useEffect((()=>{c.current&&l(getComputedStyle(c.current))}),[c]),e.createElement(Qv,p({"data-orientation":"horizontal"},i,{ref:u,sizes:r,style:{bottom:0,left:"rtl"===s.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===s.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":lg(r)+"px",...t.style},onThumbPointerDown:e=>t.onThumbPointerDown(e.x),onDragScroll:e=>t.onDragScroll(e.x),onWheelScroll:(e,n)=>{if(s.viewport){const r=s.viewport.scrollLeft+e.deltaX;t.onWheelScroll(r),dg(r,n)&&e.preventDefault()}},onResize:()=>{c.current&&s.viewport&&a&&o({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:sg(a.paddingLeft),paddingEnd:sg(a.paddingRight)}})}}))})),Gv=e.forwardRef(((t,n)=>{const{sizes:r,onSizesChange:o,...i}=t,s=jv(Hv,t.__scopeScrollArea),[a,l]=e.useState(),c=e.useRef(null),u=g(n,c,s.onScrollbarYChange);return e.useEffect((()=>{c.current&&l(getComputedStyle(c.current))}),[c]),e.createElement(Qv,p({"data-orientation":"vertical"},i,{ref:u,sizes:r,style:{top:0,right:"ltr"===s.dir?0:void 0,left:"rtl"===s.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":lg(r)+"px",...t.style},onThumbPointerDown:e=>t.onThumbPointerDown(e.y),onDragScroll:e=>t.onDragScroll(e.y),onWheelScroll:(e,n)=>{if(s.viewport){const r=s.viewport.scrollTop+e.deltaY;t.onWheelScroll(r),dg(r,n)&&e.preventDefault()}},onResize:()=>{c.current&&s.viewport&&a&&o({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:sg(a.paddingTop),paddingEnd:sg(a.paddingBottom)}})}}))})),[Zv,Jv]=Vv(Hv),Qv=e.forwardRef(((t,n)=>{const{__scopeScrollArea:r,sizes:o,hasThumb:i,onThumbChange:s,onThumbPointerUp:a,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=t,m=jv(Hv,r),[v,b]=e.useState(null),w=g(n,(e=>b(e))),x=e.useRef(null),E=e.useRef(""),P=m.viewport,C=o.content-o.viewport,T=S(d),R=S(c),A=pg(f,10);function D(e){if(x.current){const t=e.clientX-x.current.left,n=e.clientY-x.current.top;u({x:t,y:n})}}return e.useEffect((()=>{const e=e=>{const t=e.target;(null==v?void 0:v.contains(t))&&T(e,C)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})}),[P,v,C,T]),e.useEffect(R,[o,R]),hg(v,A),hg(m.content,A),e.createElement(Zv,{scope:r,scrollbar:v,hasThumb:i,onThumbChange:S(s),onThumbPointerUp:S(a),onThumbPositionChange:R,onThumbPointerDown:S(l)},e.createElement(O.div,p({},h,{ref:w,style:{position:"absolute",...h.style},onPointerDown:y(t.onPointerDown,(e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),x.current=v.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",D(e)}})),onPointerMove:y(t.onPointerMove,D),onPointerUp:y(t.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=E.current,x.current=null}))})))})),eg="ScrollAreaThumb",tg=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=Jv(eg,t.__scopeScrollArea);return e.createElement(G,{present:r||i.hasThumb},e.createElement(ng,p({ref:n},o)))})),ng=e.forwardRef(((t,n)=>{const{__scopeScrollArea:r,style:o,...i}=t,s=jv(eg,r),a=Jv(eg,r),{onThumbPositionChange:l}=a,c=g(n,(e=>a.onThumbChange(e))),u=e.useRef(),d=pg((()=>{u.current&&(u.current(),u.current=void 0)}),100);return e.useEffect((()=>{const e=s.viewport;if(e){const t=()=>{if(d(),!u.current){const t=fg(e,l);u.current=t,l()}};return l(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}}),[s.viewport,d,l]),e.createElement(O.div,p({"data-state":a.hasThumb?"visible":"hidden"},i,{ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:y(t.onPointerDownCapture,(e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;a.onThumbPointerDown({x:n,y:r})})),onPointerUp:y(t.onPointerUp,a.onThumbPointerUp)}))})),rg="ScrollAreaCorner",og=e.forwardRef(((t,n)=>{const r=jv(rg,t.__scopeScrollArea),o=Boolean(r.scrollbarX&&r.scrollbarY);return"scroll"!==r.type&&o?e.createElement(ig,p({},t,{ref:n})):null})),ig=e.forwardRef(((t,n)=>{const{__scopeScrollArea:r,...o}=t,i=jv(rg,r),[s,a]=e.useState(0),[l,c]=e.useState(0),u=Boolean(s&&l);return hg(i.scrollbarX,(()=>{var e;const t=(null===(e=i.scrollbarX)||void 0===e?void 0:e.offsetHeight)||0;i.onCornerHeightChange(t),c(t)})),hg(i.scrollbarY,(()=>{var e;const t=(null===(e=i.scrollbarY)||void 0===e?void 0:e.offsetWidth)||0;i.onCornerWidthChange(t),a(t)})),u?e.createElement(O.div,p({},o,{ref:n,style:{width:s,height:l,position:"absolute",right:"ltr"===i.dir?0:void 0,left:"rtl"===i.dir?0:void 0,bottom:0,...t.style}})):null}));function sg(e){return e?parseInt(e,10):0}function ag(e,t){const n=e/t;return isNaN(n)?0:n}function lg(e){const t=ag(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function cg(e,t,n="ltr"){const r=lg(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,a=i-r,l=_r(e,"ltr"===n?[0,s]:[-1*s,0]);return ug([0,s],[0,a])(l)}function ug(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function dg(e,t){return e>0&&e<t}const fg=(e,t=(()=>{}))=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=n.left!==i.left,a=n.top!==i.top;(s||a)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function pg(t,n){const r=S(t),o=e.useRef(0);return e.useEffect((()=>()=>window.clearTimeout(o.current)),[]),e.useCallback((()=>{window.clearTimeout(o.current),o.current=window.setTimeout(r,n)}),[r,n])}function hg(e,t){const n=S(t);b((()=>{let t=0;if(e){const r=new ResizeObserver((()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)}));return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}}),[e,n])}const mg=Bv,vg=Wv,gg=Uv,yg=tg,bg=og;exports.$57acba87d6e25586$export$6521433ed15a34db=yg,exports.$57acba87d6e25586$export$9a4e88b92edfce6b=gg,exports.$57acba87d6e25586$export$ac61190d9fc311a9=bg,exports.$57acba87d6e25586$export$be92b6f5f03c0fe9=mg,exports.$57acba87d6e25586$export$d5c6c08dc2d3ca7=vg,exports.$5d3850c4d0b4e6c7$export$602eac185826482c=lt,exports.$5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2=ut,exports.$5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9=at,exports.$5d3850c4d0b4e6c7$export$c6fdb837b070b4ff=ct,exports.$67824d98245208a0$export$adb584737d712b70=xr,exports.$67824d98245208a0$export$be92b6f5f03c0fe9=wr,exports.$a093c7e1ec25a057$export$21b07c8f274aebd5=$v,exports.$a093c7e1ec25a057$export$2881499e37b75b9a=Ov,exports.$a093c7e1ec25a057$export$41fb9f06171c75f4=Lv,exports.$a093c7e1ec25a057$export$602eac185826482c=Mv,exports.$a093c7e1ec25a057$export$7c6e2c02157bb7d2=_v,exports.$a093c7e1ec25a057$export$be92b6f5f03c0fe9=kv,exports.$cb5cc270b50c6fcd$export$21b07c8f274aebd5=ar,exports.$cb5cc270b50c6fcd$export$41fb9f06171c75f4=rr,exports.$cb5cc270b50c6fcd$export$602eac185826482c=or,exports.$cb5cc270b50c6fcd$export$7c6e2c02157bb7d2=ir,exports.$cb5cc270b50c6fcd$export$be92b6f5f03c0fe9=nr,exports.$cb5cc270b50c6fcd$export$f39c2d165cd861fe=sr,exports.$cc7e05a45900e73f$export$2f60d3ec9ad468f2=Sl,exports.$cc7e05a45900e73f$export$41fb9f06171c75f4=hl,exports.$cc7e05a45900e73f$export$4c8d1a57a761ef94=ml,exports.$cc7e05a45900e73f$export$602eac185826482c=gl,exports.$cc7e05a45900e73f$export$6d08773d2e66f8f2=wl,exports.$cc7e05a45900e73f$export$7c6e2c02157bb7d2=yl,exports.$cc7e05a45900e73f$export$be92b6f5f03c0fe9=pl,exports.$cc7e05a45900e73f$export$bf1aedc3039c8d63=Pl,exports.$cc7e05a45900e73f$export$c3468e2714d175fa=El,exports.$cc7e05a45900e73f$export$d5c6c08dc2d3ca7=bl,exports.$cc7e05a45900e73f$export$d6e5bf9c43ea9319=xl,exports.$cc7e05a45900e73f$export$f04a61298a47a40f=vl,exports.$e698a72e93240346$export$adb584737d712b70=Mr,exports.$e698a72e93240346$export$be92b6f5f03c0fe9=Lr,exports.$f99a8c78507165f7$export$6d08773d2e66f8f2=bi,exports.$f99a8c78507165f7$export$adb584737d712b70=wi,exports.$f99a8c78507165f7$export$be92b6f5f03c0fe9=yi,exports.$faa2e61a3361514f$export$13921ac0cc260818=uo,exports.$faa2e61a3361514f$export$6521433ed15a34db=po,exports.$faa2e61a3361514f$export$9a58ef0d7ad3278c=fo,exports.$faa2e61a3361514f$export$be92b6f5f03c0fe9=co,exports.Masonry=iv,exports.MasonryResponsive=lv,exports.jsxRuntimeExports=d,exports.motion=km;
|
|
2
|
+
//# sourceMappingURL=vendor-024ba8ae.cjs.map
|