ragbits-chat 1.4.0.dev202601300258__py3-none-any.whl → 1.4.0.dev202601310254__py3-none-any.whl

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.
Files changed (27) hide show
  1. ragbits/chat/interface/types.py +3 -2
  2. ragbits/chat/ui-build/assets/{AuthGuard-FL2hbNSz.js → AuthGuard-D7E88Uir.js} +1 -1
  3. ragbits/chat/ui-build/assets/{ChatHistory-LRndyrq0.js → ChatHistory-D8uJ-pWz.js} +2 -2
  4. ragbits/chat/ui-build/assets/{ChatOptionsForm-C7AySsjS.js → ChatOptionsForm-D2BdUqMs.js} +1 -1
  5. ragbits/chat/ui-build/assets/{CredentialsLogin-CjWUo2_0.js → CredentialsLogin-CEserYG_.js} +1 -1
  6. ragbits/chat/ui-build/assets/{FeedbackForm-BLuzDSTy.js → FeedbackForm-CihcDF7p.js} +1 -1
  7. ragbits/chat/ui-build/assets/{Login-CGHnIvPP.js → Login-DKdY_IGp.js} +1 -1
  8. ragbits/chat/ui-build/assets/{LogoutButton-C-wYL6PH.js → LogoutButton-ibzVLLAx.js} +1 -1
  9. ragbits/chat/ui-build/assets/{OAuth2Login-CJdQ3WzG.js → OAuth2Login-DepasZu7.js} +1 -1
  10. ragbits/chat/ui-build/assets/{ShareButton-Cc7tfnmL.js → ShareButton-BzNoTpD6.js} +1 -1
  11. ragbits/chat/ui-build/assets/{UploadButton-_aV-toOW.js → UploadButton-CfKYWcd6.js} +1 -1
  12. ragbits/chat/ui-build/assets/{UsageButton-CE7BRQcH.js → UsageButton-ByH8ZKPy.js} +1 -1
  13. ragbits/chat/ui-build/assets/{authStore-AVyfzjgs.js → authStore-BIM9JG1Q.js} +1 -1
  14. ragbits/chat/ui-build/assets/{chunk-IGSAU2ZA-BBfo0QFa.js → chunk-IGSAU2ZA-CbPuRduG.js} +1 -1
  15. ragbits/chat/ui-build/assets/{chunk-SSA7SXE4-D3GKTPj0.js → chunk-SSA7SXE4-DO9BwTof.js} +1 -1
  16. ragbits/chat/ui-build/assets/index-B-4qdttP.js +1 -0
  17. ragbits/chat/ui-build/assets/{index-DTNGcmXG.js → index-CSaYkt4U.js} +2 -2
  18. ragbits/chat/ui-build/assets/{index-CbVbgerL.js → index-Cyzr1kIj.js} +5 -5
  19. ragbits/chat/ui-build/assets/{index-B-LIlvZN.js → index-W9apL6ID.js} +1 -1
  20. ragbits/chat/ui-build/assets/{useInitializeUserStore-CVYyhiv3.js → useInitializeUserStore-Be1mCLhv.js} +1 -1
  21. ragbits/chat/ui-build/assets/{useMenuTriggerState-C5916IcO.js → useMenuTriggerState-DRPPkuuB.js} +1 -1
  22. ragbits/chat/ui-build/assets/{useSelectableItem-BWC6EImE.js → useSelectableItem-BHUz-f5B.js} +1 -1
  23. ragbits/chat/ui-build/index.html +1 -1
  24. {ragbits_chat-1.4.0.dev202601300258.dist-info → ragbits_chat-1.4.0.dev202601310254.dist-info}/METADATA +2 -2
  25. {ragbits_chat-1.4.0.dev202601300258.dist-info → ragbits_chat-1.4.0.dev202601310254.dist-info}/RECORD +26 -26
  26. ragbits/chat/ui-build/assets/index-BcnaGCUm.js +0 -1
  27. {ragbits_chat-1.4.0.dev202601300258.dist-info → ragbits_chat-1.4.0.dev202601310254.dist-info}/WHEEL +0 -0
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FeedbackForm-BLuzDSTy.js","assets/index-DTNGcmXG.js","assets/chunk-SSA7SXE4-D3GKTPj0.js","assets/useMenuTriggerState-C5916IcO.js","assets/useSelectableItem-BWC6EImE.js","assets/index-B-LIlvZN.js","assets/chunk-IGSAU2ZA-BBfo0QFa.js","assets/ChatOptionsForm-C7AySsjS.js","assets/ShareButton-Cc7tfnmL.js","assets/ChatHistory-LRndyrq0.js","assets/CredentialsLogin-CjWUo2_0.js","assets/authStore-AVyfzjgs.js","assets/useInitializeUserStore-CVYyhiv3.js","assets/AuthGuard-FL2hbNSz.js","assets/LogoutButton-C-wYL6PH.js","assets/UsageButton-CE7BRQcH.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FeedbackForm-CihcDF7p.js","assets/index-CSaYkt4U.js","assets/chunk-SSA7SXE4-DO9BwTof.js","assets/useMenuTriggerState-DRPPkuuB.js","assets/useSelectableItem-BHUz-f5B.js","assets/index-W9apL6ID.js","assets/chunk-IGSAU2ZA-CbPuRduG.js","assets/ChatOptionsForm-D2BdUqMs.js","assets/ShareButton-BzNoTpD6.js","assets/ChatHistory-D8uJ-pWz.js","assets/CredentialsLogin-CEserYG_.js","assets/authStore-BIM9JG1Q.js","assets/useInitializeUserStore-Be1mCLhv.js","assets/AuthGuard-D7E88Uir.js","assets/LogoutButton-ibzVLLAx.js","assets/UsageButton-ByH8ZKPy.js"])))=>i.map(i=>d[i]);
2
2
  (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var og=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Uy={exports:{}},pp={},Ky={exports:{}},ht={};var i1;function uL(){if(i1)return ht;i1=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.iterator;function b(U){return U===null||typeof U!="object"?null:(U=g&&U[g]||U["@@iterator"],typeof U=="function"?U:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,P={};function T(U,oe,z){this.props=U,this.context=oe,this.refs=P,this.updater=z||x}T.prototype.isReactComponent={},T.prototype.setState=function(U,oe){if(typeof U!="object"&&typeof U!="function"&&U!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,U,oe,"setState")},T.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function _(){}_.prototype=T.prototype;function A(U,oe,z){this.props=U,this.context=oe,this.refs=P,this.updater=z||x}var M=A.prototype=new _;M.constructor=A,k(M,T.prototype),M.isPureReactComponent=!0;var O=Array.isArray,j=Object.prototype.hasOwnProperty,$={current:null},Y={key:!0,ref:!0,__self:!0,__source:!0};function te(U,oe,z){var me,Ce={},ye=null,Oe=null;if(oe!=null)for(me in oe.ref!==void 0&&(Oe=oe.ref),oe.key!==void 0&&(ye=""+oe.key),oe)j.call(oe,me)&&!Y.hasOwnProperty(me)&&(Ce[me]=oe[me]);var Ne=arguments.length-2;if(Ne===1)Ce.children=z;else if(1<Ne){for(var _e=Array(Ne),Qe=0;Qe<Ne;Qe++)_e[Qe]=arguments[Qe+2];Ce.children=_e}if(U&&U.defaultProps)for(me in Ne=U.defaultProps,Ne)Ce[me]===void 0&&(Ce[me]=Ne[me]);return{$$typeof:e,type:U,key:ye,ref:Oe,props:Ce,_owner:$.current}}function ie(U,oe){return{$$typeof:e,type:U.type,key:oe,ref:U.ref,props:U.props,_owner:U._owner}}function B(U){return typeof U=="object"&&U!==null&&U.$$typeof===e}function W(U){var oe={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(z){return oe[z]})}var G=/\/+/g;function ee(U,oe){return typeof U=="object"&&U!==null&&U.key!=null?W(""+U.key):oe.toString(36)}function H(U,oe,z,me,Ce){var ye=typeof U;(ye==="undefined"||ye==="boolean")&&(U=null);var Oe=!1;if(U===null)Oe=!0;else switch(ye){case"string":case"number":Oe=!0;break;case"object":switch(U.$$typeof){case e:case t:Oe=!0}}if(Oe)return Oe=U,Ce=Ce(Oe),U=me===""?"."+ee(Oe,0):me,O(Ce)?(z="",U!=null&&(z=U.replace(G,"$&/")+"/"),H(Ce,oe,z,"",function(Qe){return Qe})):Ce!=null&&(B(Ce)&&(Ce=ie(Ce,z+(!Ce.key||Oe&&Oe.key===Ce.key?"":(""+Ce.key).replace(G,"$&/")+"/")+U)),oe.push(Ce)),1;if(Oe=0,me=me===""?".":me+":",O(U))for(var Ne=0;Ne<U.length;Ne++){ye=U[Ne];var _e=me+ee(ye,Ne);Oe+=H(ye,oe,z,_e,Ce)}else if(_e=b(U),typeof _e=="function")for(U=_e.call(U),Ne=0;!(ye=U.next()).done;)ye=ye.value,_e=me+ee(ye,Ne++),Oe+=H(ye,oe,z,_e,Ce);else if(ye==="object")throw oe=String(U),Error("Objects are not valid as a React child (found: "+(oe==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":oe)+"). If you meant to render a collection of children, use an array instead.");return Oe}function le(U,oe,z){if(U==null)return U;var me=[],Ce=0;return H(U,me,"","",function(ye){return oe.call(z,ye,Ce++)}),me}function J(U){if(U._status===-1){var oe=U._result;oe=oe(),oe.then(function(z){(U._status===0||U._status===-1)&&(U._status=1,U._result=z)},function(z){(U._status===0||U._status===-1)&&(U._status=2,U._result=z)}),U._status===-1&&(U._status=0,U._result=oe)}if(U._status===1)return U._result.default;throw U._result}var X={current:null},V={transition:null},ae={ReactCurrentDispatcher:X,ReactCurrentBatchConfig:V,ReactCurrentOwner:$};function D(){throw Error("act(...) is not supported in production builds of React.")}return ht.Children={map:le,forEach:function(U,oe,z){le(U,function(){oe.apply(this,arguments)},z)},count:function(U){var oe=0;return le(U,function(){oe++}),oe},toArray:function(U){return le(U,function(oe){return oe})||[]},only:function(U){if(!B(U))throw Error("React.Children.only expected to receive a single React element child.");return U}},ht.Component=T,ht.Fragment=n,ht.Profiler=i,ht.PureComponent=A,ht.StrictMode=r,ht.Suspense=d,ht.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ae,ht.act=D,ht.cloneElement=function(U,oe,z){if(U==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+U+".");var me=k({},U.props),Ce=U.key,ye=U.ref,Oe=U._owner;if(oe!=null){if(oe.ref!==void 0&&(ye=oe.ref,Oe=$.current),oe.key!==void 0&&(Ce=""+oe.key),U.type&&U.type.defaultProps)var Ne=U.type.defaultProps;for(_e in oe)j.call(oe,_e)&&!Y.hasOwnProperty(_e)&&(me[_e]=oe[_e]===void 0&&Ne!==void 0?Ne[_e]:oe[_e])}var _e=arguments.length-2;if(_e===1)me.children=z;else if(1<_e){Ne=Array(_e);for(var Qe=0;Qe<_e;Qe++)Ne[Qe]=arguments[Qe+2];me.children=Ne}return{$$typeof:e,type:U.type,key:Ce,ref:ye,props:me,_owner:Oe}},ht.createContext=function(U){return U={$$typeof:a,_currentValue:U,_currentValue2:U,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},U.Provider={$$typeof:s,_context:U},U.Consumer=U},ht.createElement=te,ht.createFactory=function(U){var oe=te.bind(null,U);return oe.type=U,oe},ht.createRef=function(){return{current:null}},ht.forwardRef=function(U){return{$$typeof:c,render:U}},ht.isValidElement=B,ht.lazy=function(U){return{$$typeof:m,_payload:{_status:-1,_result:U},_init:J}},ht.memo=function(U,oe){return{$$typeof:h,type:U,compare:oe===void 0?null:oe}},ht.startTransition=function(U){var oe=V.transition;V.transition={};try{U()}finally{V.transition=oe}},ht.unstable_act=D,ht.useCallback=function(U,oe){return X.current.useCallback(U,oe)},ht.useContext=function(U){return X.current.useContext(U)},ht.useDebugValue=function(){},ht.useDeferredValue=function(U){return X.current.useDeferredValue(U)},ht.useEffect=function(U,oe){return X.current.useEffect(U,oe)},ht.useId=function(){return X.current.useId()},ht.useImperativeHandle=function(U,oe,z){return X.current.useImperativeHandle(U,oe,z)},ht.useInsertionEffect=function(U,oe){return X.current.useInsertionEffect(U,oe)},ht.useLayoutEffect=function(U,oe){return X.current.useLayoutEffect(U,oe)},ht.useMemo=function(U,oe){return X.current.useMemo(U,oe)},ht.useReducer=function(U,oe,z){return X.current.useReducer(U,oe,z)},ht.useRef=function(U){return X.current.useRef(U)},ht.useState=function(U){return X.current.useState(U)},ht.useSyncExternalStore=function(U,oe,z){return X.current.useSyncExternalStore(U,oe,z)},ht.useTransition=function(){return X.current.useTransition()},ht.version="18.3.1",ht}var o1;function lx(){return o1||(o1=1,Ky.exports=uL()),Ky.exports}var s1;function cL(){if(s1)return pp;s1=1;var e=lx(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(c,d,h){var m,g={},b=null,x=null;h!==void 0&&(b=""+h),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(x=d.ref);for(m in d)r.call(d,m)&&!s.hasOwnProperty(m)&&(g[m]=d[m]);if(c&&c.defaultProps)for(m in d=c.defaultProps,d)g[m]===void 0&&(g[m]=d[m]);return{$$typeof:t,type:c,key:b,ref:x,props:g,_owner:i.current}}return pp.Fragment=n,pp.jsx=a,pp.jsxs=a,pp}var a1;function fL(){return a1||(a1=1,Uy.exports=cL()),Uy.exports}var R=fL(),S=lx();const He=hv(S);var sg={},Wy={exports:{}},oi={},Hy={exports:{}},Gy={};var l1;function dL(){return l1||(l1=1,(function(e){function t(V,ae){var D=V.length;V.push(ae);e:for(;0<D;){var U=D-1>>>1,oe=V[U];if(0<i(oe,ae))V[U]=ae,V[D]=oe,D=U;else break e}}function n(V){return V.length===0?null:V[0]}function r(V){if(V.length===0)return null;var ae=V[0],D=V.pop();if(D!==ae){V[0]=D;e:for(var U=0,oe=V.length,z=oe>>>1;U<z;){var me=2*(U+1)-1,Ce=V[me],ye=me+1,Oe=V[ye];if(0>i(Ce,D))ye<oe&&0>i(Oe,Ce)?(V[U]=Oe,V[ye]=D,U=ye):(V[U]=Ce,V[me]=D,U=me);else if(ye<oe&&0>i(Oe,D))V[U]=Oe,V[ye]=D,U=ye;else break e}}return ae}function i(V,ae){var D=V.sortIndex-ae.sortIndex;return D!==0?D:V.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var d=[],h=[],m=1,g=null,b=3,x=!1,k=!1,P=!1,T=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function M(V){for(var ae=n(h);ae!==null;){if(ae.callback===null)r(h);else if(ae.startTime<=V)r(h),ae.sortIndex=ae.expirationTime,t(d,ae);else break;ae=n(h)}}function O(V){if(P=!1,M(V),!k)if(n(d)!==null)k=!0,J(j);else{var ae=n(h);ae!==null&&X(O,ae.startTime-V)}}function j(V,ae){k=!1,P&&(P=!1,_(te),te=-1),x=!0;var D=b;try{for(M(ae),g=n(d);g!==null&&(!(g.expirationTime>ae)||V&&!W());){var U=g.callback;if(typeof U=="function"){g.callback=null,b=g.priorityLevel;var oe=U(g.expirationTime<=ae);ae=e.unstable_now(),typeof oe=="function"?g.callback=oe:g===n(d)&&r(d),M(ae)}else r(d);g=n(d)}if(g!==null)var z=!0;else{var me=n(h);me!==null&&X(O,me.startTime-ae),z=!1}return z}finally{g=null,b=D,x=!1}}var $=!1,Y=null,te=-1,ie=5,B=-1;function W(){return!(e.unstable_now()-B<ie)}function G(){if(Y!==null){var V=e.unstable_now();B=V;var ae=!0;try{ae=Y(!0,V)}finally{ae?ee():($=!1,Y=null)}}else $=!1}var ee;if(typeof A=="function")ee=function(){A(G)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,le=H.port2;H.port1.onmessage=G,ee=function(){le.postMessage(null)}}else ee=function(){T(G,0)};function J(V){Y=V,$||($=!0,ee())}function X(V,ae){te=T(function(){V(e.unstable_now())},ae)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(V){V.callback=null},e.unstable_continueExecution=function(){k||x||(k=!0,J(j))},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ie=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(V){switch(b){case 1:case 2:case 3:var ae=3;break;default:ae=b}var D=b;b=ae;try{return V()}finally{b=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(V,ae){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var D=b;b=V;try{return ae()}finally{b=D}},e.unstable_scheduleCallback=function(V,ae,D){var U=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?U+D:U):D=U,V){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=D+oe,V={id:m++,callback:ae,priorityLevel:V,startTime:D,expirationTime:oe,sortIndex:-1},D>U?(V.sortIndex=D,t(h,V),n(d)===null&&V===n(h)&&(P?(_(te),te=-1):P=!0,X(O,D-U))):(V.sortIndex=oe,t(d,V),k||x||(k=!0,J(j))),V},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(V){var ae=b;return function(){var D=b;b=ae;try{return V.apply(this,arguments)}finally{b=D}}}})(Gy)),Gy}var u1;function pL(){return u1||(u1=1,Hy.exports=dL()),Hy.exports}var c1;function hL(){if(c1)return oi;c1=1;var e=lx(),t=pL();function n(o){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+o,p=1;p<arguments.length;p++)l+="&args[]="+encodeURIComponent(arguments[p]);return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function s(o,l){a(o,l),a(o+"Capture",l)}function a(o,l){for(i[o]=l,o=0;o<l.length;o++)r.add(l[o])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},g={};function b(o){return d.call(g,o)?!0:d.call(m,o)?!1:h.test(o)?g[o]=!0:(m[o]=!0,!1)}function x(o,l,p,v){if(p!==null&&p.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return v?!1:p!==null?!p.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function k(o,l,p,v){if(l===null||typeof l>"u"||x(o,l,p,v))return!0;if(v)return!1;if(p!==null)switch(p.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function P(o,l,p,v,w,C,L){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=v,this.attributeNamespace=w,this.mustUseProperty=p,this.propertyName=o,this.type=l,this.sanitizeURL=C,this.removeEmptyString=L}var T={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){T[o]=new P(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var l=o[0];T[l]=new P(l,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){T[o]=new P(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){T[o]=new P(o,2,!1,o,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(o){T[o]=new P(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){T[o]=new P(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){T[o]=new P(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){T[o]=new P(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){T[o]=new P(o,5,!1,o.toLowerCase(),null,!1,!1)});var _=/[\-:]([a-z])/g;function A(o){return o[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(o){var l=o.replace(_,A);T[l]=new P(l,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var l=o.replace(_,A);T[l]=new P(l,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var l=o.replace(_,A);T[l]=new P(l,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){T[o]=new P(o,1,!1,o.toLowerCase(),null,!1,!1)}),T.xlinkHref=new P("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){T[o]=new P(o,1,!1,o.toLowerCase(),null,!0,!0)});function M(o,l,p,v){var w=T.hasOwnProperty(l)?T[l]:null;(w!==null?w.type!==0:v||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(k(l,p,w,v)&&(p=null),v||w===null?b(l)&&(p===null?o.removeAttribute(l):o.setAttribute(l,""+p)):w.mustUseProperty?o[w.propertyName]=p===null?w.type===3?!1:"":p:(l=w.attributeName,v=w.attributeNamespace,p===null?o.removeAttribute(l):(w=w.type,p=w===3||w===4&&p===!0?"":""+p,v?o.setAttributeNS(v,l,p):o.setAttribute(l,p))))}var O=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,j=Symbol.for("react.element"),$=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),te=Symbol.for("react.strict_mode"),ie=Symbol.for("react.profiler"),B=Symbol.for("react.provider"),W=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),le=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),X=Symbol.for("react.offscreen"),V=Symbol.iterator;function ae(o){return o===null||typeof o!="object"?null:(o=V&&o[V]||o["@@iterator"],typeof o=="function"?o:null)}var D=Object.assign,U;function oe(o){if(U===void 0)try{throw Error()}catch(p){var l=p.stack.trim().match(/\n( *(at )?)/);U=l&&l[1]||""}return`
3
3
  `+U+o}var z=!1;function me(o,l){if(!o||z)return"";z=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(de){var v=de}Reflect.construct(o,[],l)}else{try{l.call()}catch(de){v=de}o.call(l.prototype)}else{try{throw Error()}catch(de){v=de}o()}}catch(de){if(de&&v&&typeof de.stack=="string"){for(var w=de.stack.split(`
4
4
  `),C=v.stack.split(`
@@ -20,7 +20,7 @@ Error generating stack: `+C.message+`
20
20
  touch-action: pan-x pan-y pinch-zoom;
21
21
  }
22
22
  }
23
- `.trim(),W.head.prepend(G)},[b]),S.useEffect(()=>{let W=T.current;return()=>{var G;g||GS((G=W.target)!==null&&G!==void 0?G:void 0);for(let ee of W.disposables)ee();W.disposables=[]}},[g]),{isPressed:d||k,pressProps:Tn(x,B,{[QS]:!0})}}function Qx(e){return e.tagName==="A"&&e.hasAttribute("href")}function p0(e,t){const{key:n,code:r}=e,i=t,s=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof no(i).HTMLInputElement&&!MT(i,n)||i instanceof no(i).HTMLTextAreaElement||i.isContentEditable)&&!((s==="link"||!s&&Qx(i))&&n!=="Enter")}function au(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function K5(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!Qx(e)}function JS(e,t){return e instanceof HTMLInputElement?!MT(e,t):K5(e)}const W5=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function MT(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":W5.has(e.type)}let ta=null,ih=new Set,jp=new Map,ku=!1,wb=!1;const H5={Tab:!0,Escape:!0};function Cv(e,t){for(let n of ih)n(e,t)}function G5(e){return!(e.metaKey||!wu()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Qg(e){ku=!0,G5(e)&&(ta="keyboard",Cv("keyboard",e))}function Sf(e){ta="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(ku=!0,Cv("pointer",e))}function DT(e){KE(e)&&(ku=!0,ta="virtual")}function NT(e){e.target===window||e.target===document||Xg||!e.isTrusted||(!ku&&!wb&&(ta="virtual",Cv("virtual",e)),ku=!1,wb=!1)}function FT(){Xg||(ku=!1,wb=!0)}function Jg(e){if(typeof window>"u"||typeof document>"u"||jp.get(no(e)))return;const t=no(e),n=Dt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){ku=!0,r.apply(this,arguments)},n.addEventListener("keydown",Qg,!0),n.addEventListener("keyup",Qg,!0),n.addEventListener("click",DT,!0),t.addEventListener("focus",NT,!0),t.addEventListener("blur",FT,!1),typeof PointerEvent<"u"&&(n.addEventListener("pointerdown",Sf,!0),n.addEventListener("pointermove",Sf,!0),n.addEventListener("pointerup",Sf,!0)),t.addEventListener("beforeunload",()=>{OT(e)},{once:!0}),jp.set(t,{focus:r})}const OT=(e,t)=>{const n=no(e),r=Dt(e);t&&r.removeEventListener("DOMContentLoaded",t),jp.has(n)&&(n.HTMLElement.prototype.focus=jp.get(n).focus,r.removeEventListener("keydown",Qg,!0),r.removeEventListener("keyup",Qg,!0),r.removeEventListener("click",DT,!0),n.removeEventListener("focus",NT,!0),n.removeEventListener("blur",FT,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",Sf,!0),r.removeEventListener("pointermove",Sf,!0),r.removeEventListener("pointerup",Sf,!0)),jp.delete(n))};function q5(e){const t=Dt(e);let n;return t.readyState!=="loading"?Jg(e):(n=()=>{Jg(e)},t.addEventListener("DOMContentLoaded",n)),()=>OT(e,n)}typeof document<"u"&&q5();function Jx(){return ta!=="pointer"}function oh(){return ta}function Y5(e){ta=e,Cv(e,null)}function cq(){Jg();let[e,t]=S.useState(ta);return S.useEffect(()=>{let n=()=>{t(ta)};return ih.add(n),()=>{ih.delete(n)}},[]),ph()?null:e}const X5=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Q5(e,t,n){let r=Dt(n?.target);const i=typeof window<"u"?no(n?.target).HTMLInputElement:HTMLInputElement,s=typeof window<"u"?no(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,a=typeof window<"u"?no(n?.target).HTMLElement:HTMLElement,c=typeof window<"u"?no(n?.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof i&&!X5.has(r.activeElement.type)||r.activeElement instanceof s||r.activeElement instanceof a&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof c&&!H5[n.key])}function J5(e,t,n){Jg(),S.useEffect(()=>{let r=(i,s)=>{Q5(!!n?.isTextInput,i,s)&&e(Jx())};return ih.add(r),()=>{ih.delete(r)}},t)}function Cu(e){const t=Dt(e),n=zr(t);if(oh()==="virtual"){let r=n;zE(()=>{zr(t)===r&&e.isConnected&&tl(e)})}else tl(e)}function zT(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const s=S.useCallback(d=>{if(d.target===d.currentTarget)return r&&r(d),i&&i(!1),!0},[r,i]),a=RT(s),c=S.useCallback(d=>{const h=Dt(d.target),m=h?zr(h):zr();d.target===d.currentTarget&&m===Pn(d.nativeEvent)&&(n&&n(d),i&&i(!0),a(d))},[i,n,a]);return{focusProps:{onFocus:!t&&(n||i||r)?c:void 0,onBlur:!t&&(r||i)?s:void 0}}}function ZS(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};e(r),t&&n.stopPropagation()}}function Z5(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:ZS(e.onKeyDown),onKeyUp:ZS(e.onKeyUp)}}}let eF=He.createContext(null);function tF(e){let t=S.useContext(eF)||{};BE(t,e);let{ref:n,...r}=t;return r}function xh(e,t){let{focusProps:n}=zT(e),{keyboardProps:r}=Z5(e),i=Tn(n,r),s=tF(t),a=e.isDisabled?{}:s,c=S.useRef(e.autoFocus);S.useEffect(()=>{c.current&&t.current&&Cu(t.current),c.current=!1},[t]);let d=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(d=void 0),{focusableProps:Tn({...i,tabIndex:d},a)}}function nF({children:e}){let t=S.useMemo(()=>({register:()=>{}}),[]);return He.createElement(Xx.Provider,{value:t},e)}function Ev(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,s=S.useRef({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:c}=hx(),d=S.useCallback(g=>{g.currentTarget.contains(g.target)&&s.current.isFocusWithin&&!g.currentTarget.contains(g.relatedTarget)&&(s.current.isFocusWithin=!1,c(),n&&n(g),i&&i(!1))},[n,i,s,c]),h=RT(d),m=S.useCallback(g=>{if(!g.currentTarget.contains(g.target))return;const b=Dt(g.target),x=zr(b);if(!s.current.isFocusWithin&&x===Pn(g.nativeEvent)){r&&r(g),i&&i(!0),s.current.isFocusWithin=!0,h(g);let k=g.currentTarget;a(b,"focus",P=>{if(s.current.isFocusWithin&&!li(k,P.target)){let T=new b.defaultView.FocusEvent("blur",{relatedTarget:P.target});AT(T,k);let _=Yx(T);d(_)}},{capture:!0})}},[r,i,h,a,d]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:m,onBlur:d}}}let Sb=!1,h0=0;function rF(){Sb=!0,setTimeout(()=>{Sb=!1},50)}function ek(e){e.pointerType==="touch"&&rF()}function iF(){if(!(typeof document>"u"))return typeof PointerEvent<"u"&&document.addEventListener("pointerup",ek),h0++,()=>{h0--,!(h0>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",ek)}}function Eu(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[s,a]=S.useState(!1),c=S.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;S.useEffect(iF,[]);let{addGlobalListener:d,removeAllGlobalListeners:h}=hx(),{hoverProps:m,triggerHoverEnd:g}=S.useMemo(()=>{let b=(P,T)=>{if(c.pointerType=T,i||T==="touch"||c.isHovered||!P.currentTarget.contains(P.target))return;c.isHovered=!0;let _=P.currentTarget;c.target=_,d(Dt(P.target),"pointerover",A=>{c.isHovered&&c.target&&!li(c.target,A.target)&&x(A,A.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:_,pointerType:T}),n&&n(!0),a(!0)},x=(P,T)=>{let _=c.target;c.pointerType="",c.target=null,!(T==="touch"||!c.isHovered||!_)&&(c.isHovered=!1,h(),r&&r({type:"hoverend",target:_,pointerType:T}),n&&n(!1),a(!1))},k={};return typeof PointerEvent<"u"&&(k.onPointerEnter=P=>{Sb&&P.pointerType==="mouse"||b(P,P.pointerType)},k.onPointerLeave=P=>{!i&&P.currentTarget.contains(P.target)&&x(P,P.pointerType)}),{hoverProps:k,triggerHoverEnd:x}},[t,n,r,i,c,d,h]);return S.useEffect(()=>{i&&g({currentTarget:c.target},c.pointerType)},[i]),{hoverProps:m,isHovered:s}}function oF(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,s=S.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=Bn(d=>{n&&tk(d,t)&&(i&&i(d),s.current.isPointerDown=!0)}),c=Bn(d=>{n&&n(d)});S.useEffect(()=>{let d=s.current;if(r)return;const h=t.current,m=Dt(h);if(typeof PointerEvent<"u"){let g=b=>{d.isPointerDown&&tk(b,t)&&c(b),d.isPointerDown=!1};return m.addEventListener("pointerdown",a,!0),m.addEventListener("click",g,!0),()=>{m.removeEventListener("pointerdown",a,!0),m.removeEventListener("click",g,!0)}}},[t,r,a,c])}function tk(e,t){if(e.button>0)return!1;if(e.target){const n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current?!e.composedPath().includes(t.current):!1}const nk=He.createContext(null),kb="react-aria-focus-scope-restore";let Jt=null;function sF(e){let{children:t,contain:n,restoreFocus:r,autoFocus:i}=e,s=S.useRef(null),a=S.useRef(null),c=S.useRef([]),{parentNode:d}=S.useContext(nk)||{},h=S.useMemo(()=>new Eb({scopeRef:c}),[c]);an(()=>{let b=d||Mn.root;if(Mn.getTreeNode(b.scopeRef)&&Jt&&!Zg(Jt,b.scopeRef)){let x=Mn.getTreeNode(Jt);x&&(b=x)}b.addChild(h),Mn.addNode(h)},[h,d]),an(()=>{let b=Mn.getTreeNode(c);b&&(b.contain=!!n)},[n]),an(()=>{var b;let x=(b=s.current)===null||b===void 0?void 0:b.nextSibling,k=[],P=T=>T.stopPropagation();for(;x&&x!==a.current;)k.push(x),x.addEventListener(kb,P),x=x.nextSibling;return c.current=k,()=>{for(let T of k)T.removeEventListener(kb,P)}},[t]),fF(c,r,n),lF(c,n),dF(c,r,n),cF(c,i),S.useEffect(()=>{const b=zr(Dt(c.current?c.current[0]:void 0));let x=null;if(io(b,c.current)){for(let k of Mn.traverse())k.scopeRef&&io(b,k.scopeRef.current)&&(x=k);x===Mn.getTreeNode(c)&&(Jt=x.scopeRef)}},[c]),an(()=>()=>{var b,x,k;let P=(k=(x=Mn.getTreeNode(c))===null||x===void 0||(b=x.parent)===null||b===void 0?void 0:b.scopeRef)!==null&&k!==void 0?k:null;(c===Jt||Zg(c,Jt))&&(!P||Mn.getTreeNode(P))&&(Jt=P),Mn.removeTreeNode(c)},[c]);let m=S.useMemo(()=>aF(c),[]),g=S.useMemo(()=>({focusManager:m,parentNode:h}),[h,m]);return He.createElement(nk.Provider,{value:g},He.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:s}),t,He.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function aF(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:s,accept:a}=t;var c;let d=r||zr(Dt((c=n[0])!==null&&c!==void 0?c:void 0)),h=n[0].previousElementSibling,m=vu(n),g=Qs(m,{tabbable:i,accept:a},n);g.currentNode=io(d,n)?d:h;let b=g.nextNode();return!b&&s&&(g.currentNode=h,b=g.nextNode()),b&&Xs(b,!0),b},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:s,accept:a}=t;var c;let d=r||zr(Dt((c=n[0])!==null&&c!==void 0?c:void 0)),h=n[n.length-1].nextElementSibling,m=vu(n),g=Qs(m,{tabbable:i,accept:a},n);g.currentNode=io(d,n)?d:h;let b=g.previousNode();return!b&&s&&(g.currentNode=h,b=g.previousNode()),b&&Xs(b,!0),b},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,s=vu(n),a=Qs(s,{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let c=a.nextNode();return c&&Xs(c,!0),c},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,s=vu(n),a=Qs(s,{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let c=a.previousNode();return c&&Xs(c,!0),c}}}function vu(e){return e[0].parentElement}function Ap(e){let t=Mn.getTreeNode(Jt);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function lF(e,t){let n=S.useRef(void 0),r=S.useRef(void 0);an(()=>{let i=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const s=Dt(i?i[0]:void 0);let a=h=>{if(h.key!=="Tab"||h.altKey||h.ctrlKey||h.metaKey||!Ap(e)||h.isComposing)return;let m=zr(s),g=e.current;if(!g||!io(m,g))return;let b=vu(g),x=Qs(b,{tabbable:!0},g);if(!m)return;x.currentNode=m;let k=h.shiftKey?x.previousNode():x.nextNode();k||(x.currentNode=h.shiftKey?g[g.length-1].nextElementSibling:g[0].previousElementSibling,k=h.shiftKey?x.previousNode():x.nextNode()),h.preventDefault(),k&&Xs(k,!0)},c=h=>{(!Jt||Zg(Jt,e))&&io(Pn(h),e.current)?(Jt=e,n.current=Pn(h)):Ap(e)&&!Qa(Pn(h),e)?n.current?n.current.focus():Jt&&Jt.current&&Cb(Jt.current):Ap(e)&&(n.current=Pn(h))},d=h=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let m=oh(),g=(m==="virtual"||m===null)&&dx()&&NE(),b=zr(s);if(!g&&b&&Ap(e)&&!Qa(b,e)){Jt=e;let k=Pn(h);if(k&&k.isConnected){var x;n.current=k,(x=n.current)===null||x===void 0||x.focus()}else Jt.current&&Cb(Jt.current)}})};return s.addEventListener("keydown",a,!1),s.addEventListener("focusin",c,!1),i?.forEach(h=>h.addEventListener("focusin",c,!1)),i?.forEach(h=>h.addEventListener("focusout",d,!1)),()=>{s.removeEventListener("keydown",a,!1),s.removeEventListener("focusin",c,!1),i?.forEach(h=>h.removeEventListener("focusin",c,!1)),i?.forEach(h=>h.removeEventListener("focusout",d,!1))}},[e,t]),an(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function jT(e){return Qa(e)}function io(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function Qa(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of Mn.traverse(Mn.getTreeNode(t)))if(n&&io(e,n.current))return!0;return!1}function uF(e){return Qa(e,Jt)}function Zg(e,t){var n;let r=(n=Mn.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function Xs(e,t=!1){if(e!=null&&!t)try{Cu(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function BT(e,t=!0){let n=e[0].previousElementSibling,r=vu(e),i=Qs(r,{tabbable:t},e);i.currentNode=n;let s=i.nextNode();return t&&!s&&(r=vu(e),i=Qs(r,{tabbable:!1},e),i.currentNode=n,s=i.nextNode()),s}function Cb(e,t=!0){Xs(BT(e,t))}function cF(e,t){const n=He.useRef(t);S.useEffect(()=>{if(n.current){Jt=e;const r=Dt(e.current?e.current[0]:void 0);!io(zr(r),Jt.current)&&e.current&&Cb(e.current)}n.current=!1},[e])}function fF(e,t,n){an(()=>{if(t||n)return;let r=e.current;const i=Dt(r?r[0]:void 0);let s=a=>{let c=Pn(a);io(c,e.current)?Jt=e:jT(c)||(Jt=null)};return i.addEventListener("focusin",s,!1),r?.forEach(a=>a.addEventListener("focusin",s,!1)),()=>{i.removeEventListener("focusin",s,!1),r?.forEach(a=>a.removeEventListener("focusin",s,!1))}},[e,t,n])}function rk(e){let t=Mn.getTreeNode(Jt);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function dF(e,t,n){const r=S.useRef(typeof document<"u"?zr(Dt(e.current?e.current[0]:void 0)):null);an(()=>{let i=e.current;const s=Dt(i?i[0]:void 0);if(!t||n)return;let a=()=>{(!Jt||Zg(Jt,e))&&io(zr(s),e.current)&&(Jt=e)};return s.addEventListener("focusin",a,!1),i?.forEach(c=>c.addEventListener("focusin",a,!1)),()=>{s.removeEventListener("focusin",a,!1),i?.forEach(c=>c.removeEventListener("focusin",a,!1))}},[e,n]),an(()=>{const i=Dt(e.current?e.current[0]:void 0);if(!t)return;let s=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!Ap(e)||a.isComposing)return;let c=i.activeElement;if(!Qa(c,e)||!rk(e))return;let d=Mn.getTreeNode(e);if(!d)return;let h=d.nodeToRestore,m=Qs(i.body,{tabbable:!0});m.currentNode=c;let g=a.shiftKey?m.previousNode():m.nextNode();if((!h||!h.isConnected||h===i.body)&&(h=void 0,d.nodeToRestore=void 0),(!g||!Qa(g,e))&&h){m.currentNode=h;do g=a.shiftKey?m.previousNode():m.nextNode();while(Qa(g,e));a.preventDefault(),a.stopPropagation(),g?Xs(g,!0):jT(h)?Xs(h,!0):c.blur()}};return n||i.addEventListener("keydown",s,!0),()=>{n||i.removeEventListener("keydown",s,!0)}},[e,t,n]),an(()=>{const i=Dt(e.current?e.current[0]:void 0);if(!t)return;let s=Mn.getTreeNode(e);if(s){var a;return s.nodeToRestore=(a=r.current)!==null&&a!==void 0?a:void 0,()=>{let c=Mn.getTreeNode(e);if(!c)return;let d=c.nodeToRestore,h=zr(i);if(t&&d&&(h&&Qa(h,e)||h===i.body&&rk(e))){let m=Mn.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let g=m.getTreeNode(e);for(;g;){if(g.nodeToRestore&&g.nodeToRestore.isConnected){ik(g.nodeToRestore);return}g=g.parent}for(g=m.getTreeNode(e);g;){if(g.scopeRef&&g.scopeRef.current&&Mn.getTreeNode(g.scopeRef)){let b=BT(g.scopeRef.current,!0);ik(b);return}g=g.parent}}})}}}},[e,t])}function ik(e){e.dispatchEvent(new CustomEvent(kb,{bubbles:!0,cancelable:!0}))&&Xs(e)}function Qs(e,t,n){let r=t?.tabbable?LM:qE,i=e?.nodeType===Node.ELEMENT_NODE?e:null,s=Dt(i),a=cM(s,e||s,NodeFilter.SHOW_ELEMENT,{acceptNode(c){var d;return!(t==null||(d=t.from)===null||d===void 0)&&d.contains(c)?NodeFilter.FILTER_REJECT:r(c)&&$T(c)&&(!n||io(c,n))&&(!t?.accept||t.accept(c))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(a.currentNode=t.from),a}class Zx{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let s=new Eb({scopeRef:t});i.addChild(s),s.parent=i,this.fastMap.set(t,s),r&&(s.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let s of this.traverse())s!==n&&n.nodeToRestore&&s.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&io(s.nodeToRestore,n.scopeRef.current)&&(s.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(s=>r&&r.addChild(s))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new Zx;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new Eb({scopeRef:null}),this.fastMap.set(null,this.root)}}class Eb{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let Mn=new Zx;function Pu(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=S.useRef({isFocused:!1,isFocusVisible:t||Jx()}),[s,a]=S.useState(!1),[c,d]=S.useState(()=>i.current.isFocused&&i.current.isFocusVisible),h=S.useCallback(()=>d(i.current.isFocused&&i.current.isFocusVisible),[]),m=S.useCallback(x=>{i.current.isFocused=x,a(x),h()},[h]);J5(x=>{i.current.isFocusVisible=x,h()},[],{isTextInput:n});let{focusProps:g}=zT({isDisabled:r,onFocusChange:m}),{focusWithinProps:b}=Ev({isDisabled:!r,onFocusWithinChange:m});return{isFocused:s,isFocusVisible:c,focusProps:r?b:g}}function pF(e){let t=gF(Dt(e));t!==e&&(t&&hF(t,e),e&&mF(e,t))}function hF(e,t){e.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}function mF(e,t){e.dispatchEvent(new FocusEvent("focus",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:t}))}function gF(e){let t=zr(e),n=t?.getAttribute("aria-activedescendant");return n&&e.getElementById(n)||t}const m0=typeof document<"u"&&window.visualViewport,vF=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let vg=0,g0;function yF(e={}){let{isDisabled:t}=e;an(()=>{if(!t)return vg++,vg===1&&(bv()?g0=xF():g0=bF()),()=>{vg--,vg===0&&g0()}},[t])}function bF(){let e=window.innerWidth-document.documentElement.clientWidth;return Tf(e>0&&("scrollbarGutter"in document.documentElement.style?yu(document.documentElement,"scrollbarGutter","stable"):yu(document.documentElement,"paddingRight",`${e}px`)),yu(document.documentElement,"overflow","hidden"))}function xF(){let e,t,n=h=>{e=VE(h.target,!0),!(e===document.documentElement&&e===document.body)&&e instanceof HTMLElement&&window.getComputedStyle(e).overscrollBehavior==="auto"&&(t=yu(e,"overscrollBehavior","contain"))},r=h=>{if(!e||e===document.documentElement||e===document.body){h.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&h.preventDefault()},i=()=>{t&&t()},s=h=>{let m=h.target;wF(m)&&(c(),m.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{m.style.transform="",m0&&(m0.height<window.innerHeight?requestAnimationFrame(()=>{ok(m)}):m0.addEventListener("resize",()=>ok(m),{once:!0}))}))},a=null,c=()=>{if(a)return;let h=()=>{window.scrollTo(0,0)},m=window.pageXOffset,g=window.pageYOffset;a=Tf(gp(window,"scroll",h),yu(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),yu(document.documentElement,"overflow","hidden"),yu(document.body,"marginTop",`-${g}px`),()=>{window.scrollTo(m,g)}),window.scrollTo(0,0)},d=Tf(gp(document,"touchstart",n,{passive:!1,capture:!0}),gp(document,"touchmove",r,{passive:!1,capture:!0}),gp(document,"touchend",i,{passive:!1,capture:!0}),gp(document,"focus",s,!0));return()=>{t?.(),a?.(),d()}}function yu(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function gp(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ok(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let r=VE(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect().top,s=n.getBoundingClientRect().top;s>i+n.clientHeight&&(r.scrollTop+=s-i)}n=r.parentElement}}function wF(e){return e instanceof HTMLInputElement&&!vF.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}const SF=S.createContext({});function VT(){var e;return(e=S.useContext(SF))!==null&&e!==void 0?e:{}}const Pb=He.createContext(null);function kF(e){let{children:t}=e,n=S.useContext(Pb),[r,i]=S.useState(0),s=S.useMemo(()=>({parent:n,modalCount:r,addModal(){i(a=>a+1),n&&n.addModal()},removeModal(){i(a=>a-1),n&&n.removeModal()}}),[n,r]);return He.createElement(Pb.Provider,{value:s},t)}function CF(){let e=S.useContext(Pb);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:void 0}}}function EF(e){let{modalProviderProps:t}=CF();return He.createElement("div",{"data-overlay-container":!0,...e,...t})}function UT(e){return He.createElement(kF,null,He.createElement(EF,e))}function sk(e){let t=ph(),{portalContainer:n=t?null:document.body,...r}=e,{getContainer:i}=VT();if(!e.portalContainer&&i&&(n=i()),He.useEffect(()=>{if(n?.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[n]),!n)return null;let s=He.createElement(UT,r);return GE.createPortal(s,n)}var KT={};KT={dismiss:"تجاهل"};var WT={};WT={dismiss:"Отхвърляне"};var HT={};HT={dismiss:"Odstranit"};var GT={};GT={dismiss:"Luk"};var qT={};qT={dismiss:"Schließen"};var YT={};YT={dismiss:"Απόρριψη"};var XT={};XT={dismiss:"Dismiss"};var QT={};QT={dismiss:"Descartar"};var JT={};JT={dismiss:"Lõpeta"};var ZT={};ZT={dismiss:"Hylkää"};var e_={};e_={dismiss:"Rejeter"};var t_={};t_={dismiss:"התעלם"};var n_={};n_={dismiss:"Odbaci"};var r_={};r_={dismiss:"Elutasítás"};var i_={};i_={dismiss:"Ignora"};var o_={};o_={dismiss:"閉じる"};var s_={};s_={dismiss:"무시"};var a_={};a_={dismiss:"Atmesti"};var l_={};l_={dismiss:"Nerādīt"};var u_={};u_={dismiss:"Lukk"};var c_={};c_={dismiss:"Negeren"};var f_={};f_={dismiss:"Zignoruj"};var d_={};d_={dismiss:"Descartar"};var p_={};p_={dismiss:"Dispensar"};var h_={};h_={dismiss:"Revocare"};var m_={};m_={dismiss:"Пропустить"};var g_={};g_={dismiss:"Zrušiť"};var v_={};v_={dismiss:"Opusti"};var y_={};y_={dismiss:"Odbaci"};var b_={};b_={dismiss:"Avvisa"};var x_={};x_={dismiss:"Kapat"};var w_={};w_={dismiss:"Скасувати"};var S_={};S_={dismiss:"取消"};var k_={};k_={dismiss:"關閉"};var C_={};C_={"ar-AE":KT,"bg-BG":WT,"cs-CZ":HT,"da-DK":GT,"de-DE":qT,"el-GR":YT,"en-US":XT,"es-ES":QT,"et-EE":JT,"fi-FI":ZT,"fr-FR":e_,"he-IL":t_,"hr-HR":n_,"hu-HU":r_,"it-IT":i_,"ja-JP":o_,"ko-KR":s_,"lt-LT":a_,"lv-LV":l_,"nb-NO":u_,"nl-NL":c_,"pl-PL":f_,"pt-BR":d_,"pt-PT":p_,"ro-RO":h_,"ru-RU":m_,"sk-SK":g_,"sl-SI":v_,"sr-SP":y_,"sv-SE":b_,"tr-TR":x_,"uk-UA":w_,"zh-CN":S_,"zh-TW":k_};const ak={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function PF(e={}){let{style:t,isFocusable:n}=e,[r,i]=S.useState(!1),{focusWithinProps:s}=Ev({isDisabled:!n,onFocusWithinChange:c=>i(c)}),a=S.useMemo(()=>r?t:t?{...ak,...t}:ak,[r]);return{visuallyHiddenProps:{...s,style:a}}}function TF(e){let{children:t,elementType:n="div",isFocusable:r,style:i,...s}=e,{visuallyHiddenProps:a}=PF(e);return He.createElement(n,Tn(s,a),t)}function _F(e){return e&&e.__esModule?e.default:e}function lk(e){let{onDismiss:t,...n}=e,r=ZL(_F(C_),"@react-aria/overlays"),i=jE(n,r.format("dismiss")),s=()=>{t&&t()};return He.createElement(TF,null,He.createElement("button",{...i,tabIndex:-1,onClick:s,style:{width:1,height:1}}))}let vp=new WeakMap,Ji=[];function IF(e,t=document.body){let n=new Set(e),r=new Set,i=d=>{for(let b of d.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(b);let h=b=>{if(n.has(b)||b.parentElement&&r.has(b.parentElement)&&b.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let x of n)if(b.contains(x))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},m=document.createTreeWalker(d,NodeFilter.SHOW_ELEMENT,{acceptNode:h}),g=h(d);if(g===NodeFilter.FILTER_ACCEPT&&s(d),g!==NodeFilter.FILTER_REJECT){let b=m.nextNode();for(;b!=null;)s(b),b=m.nextNode()}},s=d=>{var h;let m=(h=vp.get(d))!==null&&h!==void 0?h:0;d.getAttribute("aria-hidden")==="true"&&m===0||(m===0&&d.setAttribute("aria-hidden","true"),r.add(d),vp.set(d,m+1))};Ji.length&&Ji[Ji.length-1].disconnect(),i(t);let a=new MutationObserver(d=>{for(let h of d)if(!(h.type!=="childList"||h.addedNodes.length===0)&&![...n,...r].some(m=>m.contains(h.target))){for(let m of h.removedNodes)m instanceof Element&&(n.delete(m),r.delete(m));for(let m of h.addedNodes)(m instanceof HTMLElement||m instanceof SVGElement)&&(m.dataset.liveAnnouncer==="true"||m.dataset.reactAriaTopLayer==="true")?n.add(m):m instanceof Element&&i(m)}});a.observe(t,{childList:!0,subtree:!0});let c={visibleNodes:n,hiddenNodes:r,observe(){a.observe(t,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return Ji.push(c),()=>{a.disconnect();for(let d of r){let h=vp.get(d);h!=null&&(h===1?(d.removeAttribute("aria-hidden"),vp.delete(d)):vp.set(d,h-1))}c===Ji[Ji.length-1]?(Ji.pop(),Ji.length&&Ji[Ji.length-1].observe()):Ji.splice(Ji.indexOf(c),1)}}const E_=He.createContext(null);function $F(e){let t=ph(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,s]=S.useState(!1),a=S.useMemo(()=>({contain:i,setContain:s}),[i,s]),{getContainer:c}=VT();if(!e.portalContainer&&c&&(n=c()),!n)return null;let d=e.children;return e.disableFocusManagement||(d=He.createElement(sF,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!r},d)),d=He.createElement(E_.Provider,{value:a},He.createElement(nF,null,d)),GE.createPortal(d,n)}function P_(){let e=S.useContext(E_),t=e?.setContain;an(()=>{t?.(!0)},[t])}var AF=({children:e,navigate:t,disableAnimation:n,useHref:r,disableRipple:i=!1,skipFramerMotionAnimations:s=n,reducedMotion:a="never",validationBehavior:c,locale:d="en-US",labelPlacement:h,defaultDates:m,createCalendar:g,spinnerVariant:b,...x})=>{let k=e;t&&(k=R.jsx(SM,{navigate:t,useHref:r,children:k}));const P=S.useMemo(()=>(n&&s&&(fs.skipAnimations=!0),{createCalendar:g,defaultDates:m,disableAnimation:n,disableRipple:i,validationBehavior:c,labelPlacement:h,spinnerVariant:b}),[g,m?.maxDate,m?.minDate,n,i,c,h,b]);return R.jsx(LL,{value:P,children:R.jsx(WL,{locale:d,children:R.jsx(G3,{reducedMotion:a,children:R.jsx(UT,{...x,children:k})})})})};function fq(e){const t=fi(),n=t?.labelPlacement;return S.useMemo(()=>{var r,i;const s=(i=(r=e.labelPlacement)!=null?r:n)!=null?i:"inside";return s==="inside"&&!e.label?"outside":s},[e.labelPlacement,n,e.label])}function RF(e){const t=fi(),n=t?.labelPlacement;return S.useMemo(()=>{var r,i;const s=(i=(r=e.labelPlacement)!=null?r:n)!=null?i:"inside";return s==="inside"&&!e.label?"outside":s},[e.labelPlacement,n,e.label])}function jr(e){return S.forwardRef(e)}var ia=(e,t,n=!0)=>{if(!t)return[e,{}];const r=t.reduce((i,s)=>s in e?{...i,[s]:e[s]}:i,{});return n?[Object.keys(e).filter(s=>!t.includes(s)).reduce((s,a)=>({...s,[a]:e[a]}),{}),r]:[e,r]},LF={default:"bg-default text-default-foreground",primary:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-success text-success-foreground",warning:"bg-warning text-warning-foreground",danger:"bg-danger text-danger-foreground",foreground:"bg-foreground text-background"},MF={default:"shadow-lg shadow-default/50 bg-default text-default-foreground",primary:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground",secondary:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground",success:"shadow-lg shadow-success/40 bg-success text-success-foreground",warning:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground",danger:"shadow-lg shadow-danger/40 bg-danger text-danger-foreground"},DF={default:"bg-transparent border-default text-foreground",primary:"bg-transparent border-primary text-primary",secondary:"bg-transparent border-secondary text-secondary",success:"bg-transparent border-success text-success",warning:"bg-transparent border-warning text-warning",danger:"bg-transparent border-danger text-danger"},NF={default:"bg-default/40 text-default-700",primary:"bg-primary/20 text-primary-600",secondary:"bg-secondary/20 text-secondary-600",success:"bg-success/20 text-success-700 dark:text-success",warning:"bg-warning/20 text-warning-700 dark:text-warning",danger:"bg-danger/20 text-danger-600 dark:text-danger-500"},FF={default:"border-default bg-default-100 text-default-foreground",primary:"border-default bg-default-100 text-primary",secondary:"border-default bg-default-100 text-secondary",success:"border-default bg-default-100 text-success",warning:"border-default bg-default-100 text-warning",danger:"border-default bg-default-100 text-danger"},OF={default:"bg-transparent text-default-foreground",primary:"bg-transparent text-primary",secondary:"bg-transparent text-secondary",success:"bg-transparent text-success",warning:"bg-transparent text-warning",danger:"bg-transparent text-danger"},zF={default:"border-default text-default-foreground",primary:"border-primary text-primary",secondary:"border-secondary text-secondary",success:"border-success text-success",warning:"border-warning text-warning",danger:"border-danger text-danger"},Te={solid:LF,shadow:MF,bordered:DF,flat:NF,faded:FF,light:OF,ghost:zF},jF={".spinner-bar-animation":{"animation-delay":"calc(-1.2s + (0.1s * var(--bar-index)))",transform:"rotate(calc(30deg * var(--bar-index)))translate(140%)"},".spinner-dot-animation":{"animation-delay":"calc(250ms * var(--dot-index))"},".spinner-dot-blink-animation":{"animation-delay":"calc(200ms * var(--dot-index))"}},BF={".leading-inherit":{"line-height":"inherit"},".bg-img-inherit":{"background-image":"inherit"},".bg-clip-inherit":{"background-clip":"inherit"},".text-fill-inherit":{"-webkit-text-fill-color":"inherit"},".tap-highlight-transparent":{"-webkit-tap-highlight-color":"transparent"},".input-search-cancel-button-none":{"&::-webkit-search-cancel-button":{"-webkit-appearance":"none"}}},VF={".scrollbar-hide":{"-ms-overflow-style":"none","scrollbar-width":"none","&::-webkit-scrollbar":{display:"none"}},".scrollbar-default":{"-ms-overflow-style":"auto","scrollbar-width":"auto","&::-webkit-scrollbar":{display:"block"}}},UF={".text-tiny":{"font-size":"var(--heroui-font-size-tiny)","line-height":"var(--heroui-line-height-tiny)"},".text-small":{"font-size":"var(--heroui-font-size-small)","line-height":"var(--heroui-line-height-small)"},".text-medium":{"font-size":"var(--heroui-font-size-medium)","line-height":"var(--heroui-line-height-medium)"},".text-large":{"font-size":"var(--heroui-font-size-large)","line-height":"var(--heroui-line-height-large)"}},is="250ms",KF={".transition-background":{"transition-property":"background","transition-timing-function":"ease","transition-duration":is},".transition-colors-opacity":{"transition-property":"color, background-color, border-color, text-decoration-color, fill, stroke, opacity","transition-timing-function":"ease","transition-duration":is},".transition-width":{"transition-property":"width","transition-timing-function":"ease","transition-duration":is},".transition-height":{"transition-property":"height","transition-timing-function":"ease","transition-duration":is},".transition-size":{"transition-property":"width, height","transition-timing-function":"ease","transition-duration":is},".transition-left":{"transition-property":"left","transition-timing-function":"ease","transition-duration":is},".transition-transform-opacity":{"transition-property":"transform, scale, opacity rotate","transition-timing-function":"ease","transition-duration":is},".transition-transform-background":{"transition-property":"transform, scale, background","transition-timing-function":"ease","transition-duration":is},".transition-transform-colors":{"transition-property":"transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke","transition-timing-function":"ease","transition-duration":is},".transition-transform-colors-opacity":{"transition-property":"transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke, opacity","transition-timing-function":"ease","transition-duration":is}},WF={...BF,...KF,...VF,...UF,...jF},yg=["small","medium","large"],Tb={theme:{spacing:["divider"],radius:yg},classGroups:{shadow:[{shadow:yg}],opacity:[{opacity:["disabled"]}],"font-size":[{text:["tiny",...yg]}],"border-w":[{border:yg}],"bg-image":["bg-stripe-gradient-default","bg-stripe-gradient-primary","bg-stripe-gradient-secondary","bg-stripe-gradient-success","bg-stripe-gradient-warning","bg-stripe-gradient-danger"],transition:Object.keys(WF).filter(e=>e.includes(".transition")).map(e=>e.replace(".",""))}},uk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,si=e=>!e||typeof e!="object"||Object.keys(e).length===0,HF=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function T_(e,t){e.forEach(function(n){Array.isArray(n)?T_(n,t):t.push(n)})}function __(e){let t=[];return T_(e,t),t}var I_=(...e)=>__(e).filter(Boolean),$_=(e,t)=>{let n={},r=Object.keys(e),i=Object.keys(t);for(let s of r)if(i.includes(s)){let a=e[s],c=t[s];Array.isArray(a)||Array.isArray(c)?n[s]=I_(c,a):typeof a=="object"&&typeof c=="object"?n[s]=$_(a,c):n[s]=c+" "+a}else n[s]=e[s];for(let s of i)r.includes(s)||(n[s]=t[s]);return n},ck=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();const ew="-",GF=e=>{const t=YF(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const c=a.split(ew);return c[0]===""&&c.length!==1&&c.shift(),A_(c,t)||qF(a)},getConflictingClassGroupIds:(a,c)=>{const d=n[a]||[];return c&&r[a]?[...d,...r[a]]:d}}},A_=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?A_(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(ew);return t.validators.find(({validator:a})=>a(s))?.classGroupId},fk=/^\[(.+)\]$/,qF=e=>{if(fk.test(e)){const t=fk.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},YF=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)_b(n[i],r,i,t);return r},_b=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:dk(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(XF(i)){_b(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,a])=>{_b(a,dk(t,s),n,r)})})},dk=(e,t)=>{let n=e;return t.split(ew).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},XF=e=>e.isThemeGetter,QF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return i(s,a),a},set(s,a){n.has(s)?n.set(s,a):i(s,a)}}},Ib="!",$b=":",JF=$b.length,ZF=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let a=0,c=0,d=0,h;for(let k=0;k<i.length;k++){let P=i[k];if(a===0&&c===0){if(P===$b){s.push(i.slice(d,k)),d=k+JF;continue}if(P==="/"){h=k;continue}}P==="["?a++:P==="]"?a--:P==="("?c++:P===")"&&c--}const m=s.length===0?i:i.substring(d),g=eO(m),b=g!==m,x=h&&h>d?h-d:void 0;return{modifiers:s,hasImportantModifier:b,baseClassName:g,maybePostfixModifierPosition:x}};if(t){const i=t+$b,s=r;r=a=>a.startsWith(i)?s(a.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},eO=e=>e.endsWith(Ib)?e.substring(0,e.length-1):e.startsWith(Ib)?e.substring(1):e,tO=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let s=[];return r.forEach(a=>{a[0]==="["||t[a]?(i.push(...s.sort(),a),s=[]):s.push(a)}),i.push(...s.sort()),i}},nO=e=>({cache:QF(e.cacheSize),parseClassName:ZF(e),sortModifiers:tO(e),...GF(e)}),rO=/\s+/,iO=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,a=[],c=e.trim().split(rO);let d="";for(let h=c.length-1;h>=0;h-=1){const m=c[h],{isExternal:g,modifiers:b,hasImportantModifier:x,baseClassName:k,maybePostfixModifierPosition:P}=n(m);if(g){d=m+(d.length>0?" "+d:d);continue}let T=!!P,_=r(T?k.substring(0,P):k);if(!_){if(!T){d=m+(d.length>0?" "+d:d);continue}if(_=r(k),!_){d=m+(d.length>0?" "+d:d);continue}T=!1}const A=s(b).join(":"),M=x?A+Ib:A,O=M+_;if(a.includes(O))continue;a.push(O);const j=i(_,T);for(let $=0;$<j.length;++$){const Y=j[$];a.push(M+Y)}d=m+(d.length>0?" "+d:d)}return d};function oO(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=R_(t))&&(r&&(r+=" "),r+=n);return r}const R_=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=R_(e[r]))&&(n&&(n+=" "),n+=t);return n};function Ab(e,...t){let n,r,i,s=a;function a(d){const h=t.reduce((m,g)=>g(m),e());return n=nO(h),r=n.cache.get,i=n.cache.set,s=c,c(d)}function c(d){const h=r(d);if(h)return h;const m=iO(d,n);return i(d,m),m}return function(){return s(oO.apply(null,arguments))}}const Zn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},L_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,M_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sO=/^\d+\/\d+$/,aO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lO=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,uO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,cO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,af=e=>sO.test(e),yt=e=>!!e&&!Number.isNaN(Number(e)),lu=e=>!!e&&Number.isInteger(Number(e)),pk=e=>e.endsWith("%")&&yt(e.slice(0,-1)),Ga=e=>aO.test(e),dO=()=>!0,pO=e=>lO.test(e)&&!uO.test(e),tw=()=>!1,hO=e=>cO.test(e),mO=e=>fO.test(e),gO=e=>!je(e)&&!Be(e),vO=e=>Of(e,F_,tw),je=e=>L_.test(e),uu=e=>Of(e,O_,pO),v0=e=>Of(e,_O,yt),yO=e=>Of(e,D_,tw),bO=e=>Of(e,N_,mO),xO=e=>Of(e,tw,hO),Be=e=>M_.test(e),bg=e=>zf(e,O_),wO=e=>zf(e,IO),SO=e=>zf(e,D_),kO=e=>zf(e,F_),CO=e=>zf(e,N_),EO=e=>zf(e,$O,!0),Of=(e,t,n)=>{const r=L_.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},zf=(e,t,n=!1)=>{const r=M_.exec(e);return r?r[1]?t(r[1]):n:!1},D_=e=>e==="position",PO=new Set(["image","url"]),N_=e=>PO.has(e),TO=new Set(["length","size","percentage"]),F_=e=>TO.has(e),O_=e=>e==="length",_O=e=>e==="number",IO=e=>e==="family-name",$O=e=>e==="shadow",Rb=()=>{const e=Zn("color"),t=Zn("font"),n=Zn("text"),r=Zn("font-weight"),i=Zn("tracking"),s=Zn("leading"),a=Zn("breakpoint"),c=Zn("container"),d=Zn("spacing"),h=Zn("radius"),m=Zn("shadow"),g=Zn("inset-shadow"),b=Zn("drop-shadow"),x=Zn("blur"),k=Zn("perspective"),P=Zn("aspect"),T=Zn("ease"),_=Zn("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],$=()=>[Be,je,d],Y=()=>[af,"full","auto",...$()],te=()=>[lu,"none","subgrid",Be,je],ie=()=>["auto",{span:["full",lu,Be,je]},Be,je],B=()=>[lu,"auto",Be,je],W=()=>["auto","min","max","fr",Be,je],G=()=>["start","end","center","between","around","evenly","stretch","baseline"],ee=()=>["start","end","center","stretch"],H=()=>["auto",...$()],le=()=>[af,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],J=()=>[e,Be,je],X=()=>[pk,uu],V=()=>["","none","full",h,Be,je],ae=()=>["",yt,bg,uu],D=()=>["solid","dashed","dotted","double"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>["","none",x,Be,je],z=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Be,je],me=()=>["none",yt,Be,je],Ce=()=>["none",yt,Be,je],ye=()=>[yt,Be,je],Oe=()=>[af,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ga],breakpoint:[Ga],color:[dO],container:[Ga],"drop-shadow":[Ga],ease:["in","out","in-out"],font:[gO],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ga],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ga],shadow:[Ga],spacing:["px",yt],text:[Ga],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",af,je,Be,P]}],container:["container"],columns:[{columns:[yt,je,Be,c]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...M(),je,Be]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{start:Y()}],end:[{end:Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[lu,"auto",Be,je]}],basis:[{basis:[af,"full","auto",c,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[yt,af,"auto","initial","none",je]}],grow:[{grow:["",yt,Be,je]}],shrink:[{shrink:["",yt,Be,je]}],order:[{order:[lu,"first","last","none",Be,je]}],"grid-cols":[{"grid-cols":te()}],"col-start-end":[{col:ie()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":te()}],"row-start-end":[{row:ie()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...ee(),"baseline"]}],"align-self":[{self:["auto",...ee(),"baseline"]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:le()}],w:[{w:[c,"screen",...le()]}],"min-w":[{"min-w":[c,"screen","none",...le()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[a]},...le()]}],h:[{h:["screen",...le()]}],"min-h":[{"min-h":["screen","none",...le()]}],"max-h":[{"max-h":["screen",...le()]}],"font-size":[{text:["base",n,bg,uu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Be,v0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pk,je]}],"font-family":[{font:[wO,je,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Be,je]}],"line-clamp":[{"line-clamp":[yt,"none",Be,v0]}],leading:[{leading:[s,...$()]}],"list-image":[{"list-image":["none",Be,je]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Be,je]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:J()}],"text-color":[{text:J()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:[yt,"from-font","auto",Be,uu]}],"text-decoration-color":[{decoration:J()}],"underline-offset":[{"underline-offset":[yt,"auto",Be,je]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Be,je]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Be,je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...M(),SO,yO]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",kO,vO]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},lu,Be,je],radial:["",Be,je],conic:[lu,Be,je]},CO,bO]}],"bg-color":[{bg:J()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:J()}],"gradient-via":[{via:J()}],"gradient-to":[{to:J()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...D(),"hidden","none"]}],"divide-style":[{divide:[...D(),"hidden","none"]}],"border-color":[{border:J()}],"border-color-x":[{"border-x":J()}],"border-color-y":[{"border-y":J()}],"border-color-s":[{"border-s":J()}],"border-color-e":[{"border-e":J()}],"border-color-t":[{"border-t":J()}],"border-color-r":[{"border-r":J()}],"border-color-b":[{"border-b":J()}],"border-color-l":[{"border-l":J()}],"divide-color":[{divide:J()}],"outline-style":[{outline:[...D(),"none","hidden"]}],"outline-offset":[{"outline-offset":[yt,Be,je]}],"outline-w":[{outline:["",yt,bg,uu]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",m,EO,xO]}],"shadow-color":[{shadow:J()}],"inset-shadow":[{"inset-shadow":["none",Be,je,g]}],"inset-shadow-color":[{"inset-shadow":J()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:J()}],"ring-offset-w":[{"ring-offset":[yt,uu]}],"ring-offset-color":[{"ring-offset":J()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":J()}],opacity:[{opacity:[yt,Be,je]}],"mix-blend":[{"mix-blend":[...U(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none",Be,je]}],blur:[{blur:oe()}],brightness:[{brightness:[yt,Be,je]}],contrast:[{contrast:[yt,Be,je]}],"drop-shadow":[{"drop-shadow":["","none",b,Be,je]}],grayscale:[{grayscale:["",yt,Be,je]}],"hue-rotate":[{"hue-rotate":[yt,Be,je]}],invert:[{invert:["",yt,Be,je]}],saturate:[{saturate:[yt,Be,je]}],sepia:[{sepia:["",yt,Be,je]}],"backdrop-filter":[{"backdrop-filter":["","none",Be,je]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[yt,Be,je]}],"backdrop-contrast":[{"backdrop-contrast":[yt,Be,je]}],"backdrop-grayscale":[{"backdrop-grayscale":["",yt,Be,je]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[yt,Be,je]}],"backdrop-invert":[{"backdrop-invert":["",yt,Be,je]}],"backdrop-opacity":[{"backdrop-opacity":[yt,Be,je]}],"backdrop-saturate":[{"backdrop-saturate":[yt,Be,je]}],"backdrop-sepia":[{"backdrop-sepia":["",yt,Be,je]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Be,je]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[yt,"initial",Be,je]}],ease:[{ease:["linear","initial",T,Be,je]}],delay:[{delay:[yt,Be,je]}],animate:[{animate:["none",_,Be,je]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,Be,je]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:Ce()}],"scale-x":[{"scale-x":Ce()}],"scale-y":[{"scale-y":Ce()}],"scale-z":[{"scale-z":Ce()}],"scale-3d":["scale-3d"],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[Be,je,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Oe()}],"translate-x":[{"translate-x":Oe()}],"translate-y":[{"translate-y":Oe()}],"translate-z":[{"translate-z":Oe()}],"translate-none":["translate-none"],accent:[{accent:J()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:J()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Be,je]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Be,je]}],fill:[{fill:["none",...J()]}],"stroke-w":[{stroke:[yt,bg,uu,v0]}],stroke:[{stroke:["none",...J()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},AO=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:s={}})=>(Rp(e,"cacheSize",t),Rp(e,"prefix",n),Rp(e,"experimentalParseClassName",r),xg(e.theme,s.theme),xg(e.classGroups,s.classGroups),xg(e.conflictingClassGroups,s.conflictingClassGroups),xg(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),Rp(e,"orderSensitiveModifiers",s.orderSensitiveModifiers),wg(e.theme,i.theme),wg(e.classGroups,i.classGroups),wg(e.conflictingClassGroups,i.conflictingClassGroups),wg(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),z_(e,i,"orderSensitiveModifiers"),e),Rp=(e,t,n)=>{n!==void 0&&(e[t]=n)},xg=(e,t)=>{if(t)for(const n in t)Rp(e,n,t[n])},wg=(e,t)=>{if(t)for(const n in t)z_(e,t,n)},z_=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},j_=(e,...t)=>typeof e=="function"?Ab(Rb,e,...t):Ab(()=>AO(Rb(),e),...t),RO=Ab(Rb);var LO={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},B_=e=>e||void 0,sh=(...e)=>B_(__(e).filter(Boolean).join(" ")),y0=null,Ys={},Lb=!1,yp=(...e)=>t=>t.twMerge?((!y0||Lb)&&(Lb=!1,y0=si(Ys)?RO:j_({...Ys,extend:{theme:Ys.theme,classGroups:Ys.classGroups,conflictingClassGroupModifiers:Ys.conflictingClassGroupModifiers,conflictingClassGroups:Ys.conflictingClassGroups,...Ys.extend}})),B_(y0(sh(e)))):sh(e),hk=(e,t)=>{for(let n in t)e.hasOwnProperty(n)?e[n]=sh(e[n],t[n]):e[n]=t[n];return e},MO=(e,t)=>{let{extend:n=null,slots:r={},variants:i={},compoundVariants:s=[],compoundSlots:a=[],defaultVariants:c={}}=e,d={...LO,...t},h=n!=null&&n.base?sh(n.base,e?.base):e?.base,m=n!=null&&n.variants&&!si(n.variants)?$_(i,n.variants):i,g=n!=null&&n.defaultVariants&&!si(n.defaultVariants)?{...n.defaultVariants,...c}:c;!si(d.twMergeConfig)&&!HF(d.twMergeConfig,Ys)&&(Lb=!0,Ys=d.twMergeConfig);let b=si(n?.slots),x=si(r)?{}:{base:sh(e?.base,b&&n?.base),...r},k=b?x:hk({...n?.slots},si(x)?{base:e?.base}:x),P=si(n?.compoundVariants)?s:I_(n?.compoundVariants,s),T=A=>{if(si(m)&&si(r)&&b)return yp(h,A?.class,A?.className)(d);if(P&&!Array.isArray(P))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof P}`);if(a&&!Array.isArray(a))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof a}`);let M=(G,ee,H=[],le)=>{let J=H;if(typeof ee=="string")J=J.concat(ck(ee).split(" ").map(X=>`${G}:${X}`));else if(Array.isArray(ee))J=J.concat(ee.reduce((X,V)=>X.concat(`${G}:${V}`),[]));else if(typeof ee=="object"&&typeof le=="string"){for(let X in ee)if(ee.hasOwnProperty(X)&&X===le){let V=ee[X];if(V&&typeof V=="string"){let ae=ck(V);J[le]?J[le]=J[le].concat(ae.split(" ").map(D=>`${G}:${D}`)):J[le]=ae.split(" ").map(D=>`${G}:${D}`)}else Array.isArray(V)&&V.length>0&&(J[le]=V.reduce((ae,D)=>ae.concat(`${G}:${D}`),[]))}}return J},O=(G,ee=m,H=null,le=null)=>{var J;let X=ee[G];if(!X||si(X))return null;let V=(J=le?.[G])!=null?J:A?.[G];if(V===null)return null;let ae=uk(V),D=Array.isArray(d.responsiveVariants)&&d.responsiveVariants.length>0||d.responsiveVariants===!0,U=g?.[G],oe=[];if(typeof ae=="object"&&D)for(let[Ce,ye]of Object.entries(ae)){let Oe=X[ye];if(Ce==="initial"){U=ye;continue}Array.isArray(d.responsiveVariants)&&!d.responsiveVariants.includes(Ce)||(oe=M(Ce,Oe,oe,H))}let z=ae!=null&&typeof ae!="object"?ae:uk(U),me=X[z||"false"];return typeof oe=="object"&&typeof H=="string"&&oe[H]?hk(oe,me):oe.length>0?(oe.push(me),H==="base"?oe.join(" "):oe):me},j=()=>m?Object.keys(m).map(G=>O(G,m)):null,$=(G,ee)=>{if(!m||typeof m!="object")return null;let H=new Array;for(let le in m){let J=O(le,m,G,ee),X=G==="base"&&typeof J=="string"?J:J&&J[G];X&&(H[H.length]=X)}return H},Y={};for(let G in A)A[G]!==void 0&&(Y[G]=A[G]);let te=(G,ee)=>{var H;let le=typeof A?.[G]=="object"?{[G]:(H=A[G])==null?void 0:H.initial}:{};return{...g,...Y,...le,...ee}},ie=(G=[],ee)=>{let H=[];for(let{class:le,className:J,...X}of G){let V=!0;for(let[ae,D]of Object.entries(X)){let U=te(ae,ee)[ae];if(Array.isArray(D)){if(!D.includes(U)){V=!1;break}}else{let oe=z=>z==null||z===!1;if(oe(D)&&oe(U))continue;if(U!==D){V=!1;break}}}V&&(le&&H.push(le),J&&H.push(J))}return H},B=G=>{let ee=ie(P,G);if(!Array.isArray(ee))return ee;let H={};for(let le of ee)if(typeof le=="string"&&(H.base=yp(H.base,le)(d)),typeof le=="object")for(let[J,X]of Object.entries(le))H[J]=yp(H[J],X)(d);return H},W=G=>{if(a.length<1)return null;let ee={};for(let{slots:H=[],class:le,className:J,...X}of a){if(!si(X)){let V=!0;for(let ae of Object.keys(X)){let D=te(ae,G)[ae];if(D===void 0||(Array.isArray(X[ae])?!X[ae].includes(D):X[ae]!==D)){V=!1;break}}if(!V)continue}for(let V of H)ee[V]=ee[V]||[],ee[V].push([le,J])}return ee};if(!si(r)||!b){let G={};if(typeof k=="object"&&!si(k))for(let ee of Object.keys(k))G[ee]=H=>{var le,J;return yp(k[ee],$(ee,H),((le=B(H))!=null?le:[])[ee],((J=W(H))!=null?J:[])[ee],H?.class,H?.className)(d)};return G}return yp(h,j(),ie(P),A?.class,A?.className)(d)},_=()=>{if(!(!m||typeof m!="object"))return Object.keys(m)};return T.variantKeys=_(),T.extend=n,T.base=h,T.slots=k,T.variants=m,T.defaultVariants=g,T.compoundSlots=a,T.compoundVariants=P,T},er=(e,t)=>{var n,r,i;return MO(e,{...t,twMerge:(n=t?.twMerge)!=null?n:!0,twMergeConfig:{...t?.twMergeConfig,theme:{...(r=t?.twMergeConfig)==null?void 0:r.theme,...Tb.theme},classGroups:{...(i=t?.twMergeConfig)==null?void 0:i.classGroups,...Tb.classGroups}}})},mk=er({slots:{base:"relative inline-flex flex-col gap-2 items-center justify-center",wrapper:"relative flex",label:"text-foreground dark:text-foreground-dark font-regular",circle1:"absolute w-full h-full rounded-full",circle2:"absolute w-full h-full rounded-full",dots:"relative rounded-full mx-auto",spinnerBars:["absolute","animate-fade-out","rounded-full","w-[25%]","h-[8%]","left-[calc(37.5%)]","top-[calc(46%)]","spinner-bar-animation"]},variants:{size:{sm:{wrapper:"w-5 h-5",circle1:"border-2",circle2:"border-2",dots:"size-1",label:"text-small"},md:{wrapper:"w-8 h-8",circle1:"border-3",circle2:"border-3",dots:"size-1.5",label:"text-medium"},lg:{wrapper:"w-10 h-10",circle1:"border-3",circle2:"border-3",dots:"size-2",label:"text-large"}},color:{current:{circle1:"border-b-current",circle2:"border-b-current",dots:"bg-current",spinnerBars:"bg-current"},white:{circle1:"border-b-white",circle2:"border-b-white",dots:"bg-white",spinnerBars:"bg-white"},default:{circle1:"border-b-default",circle2:"border-b-default",dots:"bg-default",spinnerBars:"bg-default"},primary:{circle1:"border-b-primary",circle2:"border-b-primary",dots:"bg-primary",spinnerBars:"bg-primary"},secondary:{circle1:"border-b-secondary",circle2:"border-b-secondary",dots:"bg-secondary",spinnerBars:"bg-secondary"},success:{circle1:"border-b-success",circle2:"border-b-success",dots:"bg-success",spinnerBars:"bg-success"},warning:{circle1:"border-b-warning",circle2:"border-b-warning",dots:"bg-warning",spinnerBars:"bg-warning"},danger:{circle1:"border-b-danger",circle2:"border-b-danger",dots:"bg-danger",spinnerBars:"bg-danger"}},labelColor:{foreground:{label:"text-foreground"},primary:{label:"text-primary"},secondary:{label:"text-secondary"},success:{label:"text-success"},warning:{label:"text-warning"},danger:{label:"text-danger"}},variant:{default:{circle1:["animate-spinner-ease-spin","border-solid","border-t-transparent","border-l-transparent","border-r-transparent"],circle2:["opacity-75","animate-spinner-linear-spin","border-dotted","border-t-transparent","border-l-transparent","border-r-transparent"]},gradient:{circle1:["border-0","bg-gradient-to-b","from-transparent","via-transparent","to-primary","animate-spinner-linear-spin","[animation-duration:1s]","[-webkit-mask:radial-gradient(closest-side,rgba(0,0,0,0.0)calc(100%-3px),rgba(0,0,0,1)calc(100%-3px))]"],circle2:["hidden"]},wave:{wrapper:"translate-y-3/4",dots:["animate-sway","spinner-dot-animation"]},dots:{wrapper:"translate-y-2/4",dots:["animate-blink","spinner-dot-blink-animation"]},spinner:{},simple:{wrapper:"text-foreground h-5 w-5 animate-spin",circle1:"opacity-25",circle2:"opacity-75"}}},defaultVariants:{size:"md",color:"primary",labelColor:"foreground",variant:"default"},compoundVariants:[{variant:"gradient",color:"current",class:{circle1:"to-current"}},{variant:"gradient",color:"white",class:{circle1:"to-white"}},{variant:"gradient",color:"default",class:{circle1:"to-default"}},{variant:"gradient",color:"primary",class:{circle1:"to-primary"}},{variant:"gradient",color:"secondary",class:{circle1:"to-secondary"}},{variant:"gradient",color:"success",class:{circle1:"to-success"}},{variant:"gradient",color:"warning",class:{circle1:"to-warning"}},{variant:"gradient",color:"danger",class:{circle1:"to-danger"}},{variant:"wave",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"wave",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"wave",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"dots",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"dots",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"dots",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"simple",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"simple",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",color:"current",class:{wrapper:"text-current"}},{variant:"simple",color:"white",class:{wrapper:"text-white"}},{variant:"simple",color:"default",class:{wrapper:"text-default"}},{variant:"simple",color:"primary",class:{wrapper:"text-primary"}},{variant:"simple",color:"secondary",class:{wrapper:"text-secondary"}},{variant:"simple",color:"success",class:{wrapper:"text-success"}},{variant:"simple",color:"warning",class:{wrapper:"text-warning"}},{variant:"simple",color:"danger",class:{wrapper:"text-danger"}}]}),wh=["outline-hidden","data-[focus-visible=true]:z-10","data-[focus-visible=true]:outline-2","data-[focus-visible=true]:outline-focus","data-[focus-visible=true]:outline-offset-2"],V_=["outline-hidden","group-data-[focus-visible=true]:z-10","group-data-[focus-visible=true]:ring-2","group-data-[focus-visible=true]:ring-focus","group-data-[focus-visible=true]:ring-offset-2","group-data-[focus-visible=true]:ring-offset-background"],DO=["outline-hidden","ring-2","ring-focus","ring-offset-2","ring-offset-background"],lf={default:["[&+.border-medium.border-default]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],primary:["[&+.border-medium.border-primary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],secondary:["[&+.border-medium.border-secondary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],success:["[&+.border-medium.border-success]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],warning:["[&+.border-medium.border-warning]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],danger:["[&+.border-medium.border-danger]:ms-[calc(var(--heroui-border-width-medium)*-1)]"]},NO=["font-inherit","text-[100%]","leading-[1.15]","m-0","p-0","overflow-visible","box-border","absolute","top-0","w-full","h-full","opacity-[0.0001]","z-[1]","cursor-pointer","disabled:cursor-default"],gk=er({slots:{base:["z-0","relative","bg-transparent","before:content-['']","before:hidden","before:z-[-1]","before:absolute","before:rotate-45","before:w-2.5","before:h-2.5","before:rounded-sm","data-[arrow=true]:before:block","data-[placement=top]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top]:before:left-1/2","data-[placement=top]:before:-translate-x-1/2","data-[placement=top-start]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-start]:before:left-3","data-[placement=top-end]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-end]:before:right-3","data-[placement=bottom]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom]:before:left-1/2","data-[placement=bottom]:before:-translate-x-1/2","data-[placement=bottom-start]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-start]:before:left-3","data-[placement=bottom-end]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-end]:before:right-3","data-[placement=left]:before:-right-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=left]:before:top-1/2","data-[placement=left]:before:-translate-y-1/2","data-[placement=left-start]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-start]:before:top-1/4","data-[placement=left-end]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-end]:before:bottom-1/4","data-[placement=right]:before:-left-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=right]:before:top-1/2","data-[placement=right]:before:-translate-y-1/2","data-[placement=right-start]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-start]:before:top-1/4","data-[placement=right-end]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-end]:before:bottom-1/4",...wh],content:["z-10","px-2.5","py-1","w-full","inline-flex","flex-col","items-center","justify-center","box-border","subpixel-antialiased","outline-hidden","box-border"],trigger:["z-10"],backdrop:["hidden"],arrow:[]},variants:{size:{sm:{content:"text-tiny"},md:{content:"text-small"},lg:{content:"text-medium"}},color:{default:{base:"before:bg-content1 before:shadow-small",content:"bg-content1"},foreground:{base:"before:bg-foreground",content:Te.solid.foreground},primary:{base:"before:bg-primary",content:Te.solid.primary},secondary:{base:"before:bg-secondary",content:Te.solid.secondary},success:{base:"before:bg-success",content:Te.solid.success},warning:{base:"before:bg-warning",content:Te.solid.warning},danger:{base:"before:bg-danger",content:Te.solid.danger}},radius:{none:{content:"rounded-none"},sm:{content:"rounded-small"},md:{content:"rounded-medium"},lg:{content:"rounded-large"},full:{content:"rounded-full"}},shadow:{none:{content:"shadow-none"},sm:{content:"shadow-small"},md:{content:"shadow-medium"},lg:{content:"shadow-large"}},backdrop:{transparent:{},opaque:{backdrop:"bg-overlay/50 backdrop-opacity-disabled"},blur:{backdrop:"backdrop-blur-sm backdrop-saturate-150 bg-overlay/30"}},triggerScaleOnOpen:{true:{trigger:["aria-expanded:scale-[0.97]","aria-expanded:opacity-70","subpixel-antialiased"]},false:{}},disableAnimation:{true:{base:"animate-none"}},isTriggerDisabled:{true:{trigger:"opacity-disabled pointer-events-none"},false:{}}},defaultVariants:{color:"default",radius:"lg",size:"md",shadow:"md",backdrop:"transparent",triggerScaleOnOpen:!0},compoundVariants:[{backdrop:["opaque","blur"],class:{backdrop:"block w-full h-full fixed inset-0 -z-30"}}]});er({slots:{base:"flex flex-col gap-2 w-full",label:"",labelWrapper:"flex justify-between",value:"",track:"z-0 relative bg-default-300/50 overflow-hidden rtl:rotate-180",indicator:"h-full"},variants:{color:{default:{indicator:"bg-default-400"},primary:{indicator:"bg-primary"},secondary:{indicator:"bg-secondary"},success:{indicator:"bg-success"},warning:{indicator:"bg-warning"},danger:{indicator:"bg-danger"}},size:{sm:{label:"text-small",value:"text-small",track:"h-1"},md:{label:"text-medium",value:"text-medium",track:"h-3"},lg:{label:"text-large",value:"text-large",track:"h-5"}},radius:{none:{track:"rounded-none",indicator:"rounded-none"},sm:{track:"rounded-small",indicator:"rounded-small"},md:{track:"rounded-medium",indicator:"rounded-medium"},lg:{track:"rounded-large",indicator:"rounded-large"},full:{track:"rounded-full",indicator:"rounded-full"}},isStriped:{true:{indicator:"bg-stripe-gradient-default bg-stripe-size"}},isIndeterminate:{true:{indicator:["absolute","w-full","origin-left","animate-indeterminate-bar"]}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:{},false:{indicator:"transition-transform !duration-500"}}},defaultVariants:{color:"primary",size:"md",radius:"full",isStriped:!1,isIndeterminate:!1,isDisabled:!1},compoundVariants:[{disableAnimation:!0,isIndeterminate:!1,class:{indicator:"!transition-none motion-reduce:transition-none"}},{color:"primary",isStriped:!0,class:{indicator:"bg-stripe-gradient-primary bg-stripe-size"}},{color:"secondary",isStriped:!0,class:{indicator:"bg-stripe-gradient-secondary bg-stripe-size"}},{color:"success",isStriped:!0,class:{indicator:"bg-stripe-gradient-success bg-stripe-size"}},{color:"warning",isStriped:!0,class:{indicator:"bg-stripe-gradient-warning bg-stripe-size"}},{color:"danger",isStriped:!0,class:{indicator:"bg-stripe-gradient-danger bg-stripe-size"}}]},{twMerge:!0});var vk=er({slots:{base:"flex flex-col justify-center gap-1 max-w-fit items-center",label:"",svgWrapper:"relative block",svg:"z-0 relative overflow-hidden",track:"h-full stroke-default-300/50",indicator:"h-full stroke-current",value:"absolute font-normal inset-0 flex items-center justify-center"},variants:{color:{default:{svg:"text-default-400"},primary:{svg:"text-primary"},secondary:{svg:"text-secondary"},success:{svg:"text-success"},warning:{svg:"text-warning"},danger:{svg:"text-danger"}},size:{sm:{svg:"w-8 h-8",label:"text-small",value:"text-[0.5rem]"},md:{svg:"w-10 h-10",label:"text-small",value:"text-[0.55rem]"},lg:{svg:"w-12 h-12",label:"text-medium",value:"text-[0.6rem]"}},isIndeterminate:{true:{svg:"animate-spinner-ease-spin"}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:{},false:{indicator:"transition-all !duration-500"}}},defaultVariants:{color:"primary",size:"md",isDisabled:!1},compoundVariants:[{disableAnimation:!0,isIndeterminate:!1,class:{svg:"!transition-none motion-reduce:transition-none"}}]}),FO=["data-[top-scroll=true]:[mask-image:linear-gradient(0deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[bottom-scroll=true]:[mask-image:linear-gradient(180deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[top-bottom-scroll=true]:[mask-image:linear-gradient(#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"],OO=["data-[left-scroll=true]:[mask-image:linear-gradient(270deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[right-scroll=true]:[mask-image:linear-gradient(90deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[left-right-scroll=true]:[mask-image:linear-gradient(to_right,#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"],yk=er({base:[],variants:{orientation:{vertical:["overflow-y-auto",...FO],horizontal:["overflow-x-auto",...OO]},hideScrollBar:{true:"scrollbar-hide",false:""}},defaultVariants:{orientation:"vertical",hideScrollBar:!1}}),bk=er({slots:{base:["group","relative","overflow-hidden","bg-content3 dark:bg-content2","pointer-events-none","before:opacity-100","before:absolute","before:inset-0","before:-translate-x-full","before:animate-shimmer","before:border-t","before:border-content4/30","before:bg-gradient-to-r","before:from-transparent","before:via-content4","dark:before:via-default-700/10","before:to-transparent","after:opacity-100","after:absolute","after:inset-0","after:-z-10","after:bg-content3","dark:after:bg-content2","data-[loaded=true]:pointer-events-auto","data-[loaded=true]:overflow-visible","data-[loaded=true]:!bg-transparent","data-[loaded=true]:before:opacity-0 data-[loaded=true]:before:-z-10 data-[loaded=true]:before:animate-none","data-[loaded=true]:after:opacity-0"],content:["opacity-0","group-data-[loaded=true]:opacity-100"]},variants:{disableAnimation:{true:{base:"before:animate-none before:transition-none after:transition-none",content:"transition-none"},false:{base:"transition-background !duration-300",content:"transition-opacity motion-reduce:transition-none !duration-300"}}},defaultVariants:{}}),xk=er({slots:{base:"group flex flex-col data-[hidden=true]:hidden",label:["absolute","z-10","pointer-events-none","origin-top-left","shrink-0","rtl:origin-top-right","subpixel-antialiased","block","text-small","text-foreground-500"],mainWrapper:"h-full",inputWrapper:"relative w-full inline-flex tap-highlight-transparent flex-row items-center shadow-xs px-3 gap-3",innerWrapper:"inline-flex w-full items-center h-full box-border",input:["w-full font-normal bg-transparent !outline-hidden placeholder:text-foreground-500 focus-visible:outline-hidden","data-[has-start-content=true]:ps-1.5","data-[has-end-content=true]:pe-1.5","data-[type=color]:rounded-none","file:cursor-pointer file:bg-transparent file:border-0","autofill:bg-transparent bg-clip-text"],clearButton:["p-2","-m-2","z-10","absolute","end-3","start-auto","pointer-events-none","appearance-none","outline-hidden","select-none","opacity-0","cursor-pointer","active:!opacity-70","rounded-full",...wh],helperWrapper:"hidden group-data-[has-helper=true]:flex p-1 relative flex-col gap-1.5",description:"text-tiny text-foreground-400",errorMessage:"text-tiny text-danger"},variants:{variant:{flat:{inputWrapper:["bg-default-100","data-[hover=true]:bg-default-200","group-data-[focus=true]:bg-default-100"]},faded:{inputWrapper:["bg-default-100","border-medium","border-default-200","data-[hover=true]:border-default-400 focus-within:border-default-400"],value:"group-data-[has-value=true]:text-default-foreground"},bordered:{inputWrapper:["border-medium","border-default-200","data-[hover=true]:border-default-400","group-data-[focus=true]:border-default-foreground"]},underlined:{inputWrapper:["!px-1","!pb-0","!gap-0","relative","box-border","border-b-medium","shadow-[0_1px_0px_0_rgba(0,0,0,0.05)]","border-default-200","!rounded-none","hover:border-default-300","after:content-['']","after:w-0","after:origin-center","after:bg-default-foreground","after:absolute","after:left-1/2","after:-translate-x-1/2","after:-bottom-[2px]","after:h-[2px]","group-data-[focus=true]:after:w-full"],innerWrapper:"pb-1",label:"group-data-[filled-within=true]:text-foreground"}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},size:{sm:{label:"text-tiny",inputWrapper:"h-8 min-h-8 px-2 rounded-small",input:"text-small",clearButton:"text-medium"},md:{inputWrapper:"h-10 min-h-10 rounded-medium",input:"text-small",clearButton:"text-large hover:!opacity-100"},lg:{label:"text-medium",inputWrapper:"h-12 min-h-12 rounded-large",input:"text-medium",clearButton:"text-large hover:!opacity-100"}},radius:{none:{inputWrapper:"rounded-none"},sm:{inputWrapper:"rounded-small"},md:{inputWrapper:"rounded-medium"},lg:{inputWrapper:"rounded-large"},full:{inputWrapper:"rounded-full"}},labelPlacement:{outside:{mainWrapper:"flex flex-col"},"outside-left":{base:"flex-row items-center flex-nowrap data-[has-helper=true]:items-start",inputWrapper:"flex-1",mainWrapper:"flex flex-col",label:"relative text-foreground pe-2 ps-2 pointer-events-auto"},"outside-top":{mainWrapper:"flex flex-col",label:"relative text-foreground pb-2 pointer-events-auto"},inside:{label:"cursor-text",inputWrapper:"flex-col items-start justify-center gap-0",innerWrapper:"group-data-[has-label=true]:items-end"}},fullWidth:{true:{base:"w-full"},false:{}},isClearable:{true:{input:"peer pe-6 input-search-cancel-button-none",clearButton:["peer-data-[filled=true]:pointer-events-auto","peer-data-[filled=true]:opacity-70 peer-data-[filled=true]:block","peer-data-[filled=true]:scale-100"]}},isDisabled:{true:{base:"opacity-disabled pointer-events-none",inputWrapper:"pointer-events-none",label:"pointer-events-none"}},isInvalid:{true:{label:"!text-danger",input:"!placeholder:text-danger !text-danger"}},isRequired:{true:{label:"after:content-['*'] after:text-danger after:ms-0.5"}},isMultiline:{true:{label:"relative",inputWrapper:"!h-auto",innerWrapper:"items-start group-data-[has-label=true]:items-start",input:"resize-none data-[hide-scroll=true]:scrollbar-hide",clearButton:"absolute top-2 right-2 rtl:right-auto rtl:left-2 z-10"}},disableAnimation:{true:{input:"transition-none",inputWrapper:"transition-none",label:"transition-none"},false:{inputWrapper:"transition-background motion-reduce:transition-none !duration-150",label:["will-change-auto","!duration-200","!ease-out","motion-reduce:transition-none","transition-[transform,color,left,opacity,translate,scale]"],clearButton:["scale-90","ease-out","duration-150","transition-[opacity,transform]","motion-reduce:transition-none","motion-reduce:scale-100"]}}},defaultVariants:{variant:"flat",color:"default",size:"md",fullWidth:!0,isDisabled:!1,isMultiline:!1},compoundVariants:[{variant:"flat",color:"default",class:{input:"group-data-[has-value=true]:text-default-foreground"}},{variant:"flat",color:"primary",class:{inputWrapper:["bg-primary-100","data-[hover=true]:bg-primary-50","text-primary","group-data-[focus=true]:bg-primary-50","placeholder:text-primary"],input:"placeholder:text-primary",label:"text-primary"}},{variant:"flat",color:"secondary",class:{inputWrapper:["bg-secondary-100","text-secondary","data-[hover=true]:bg-secondary-50","group-data-[focus=true]:bg-secondary-50","placeholder:text-secondary"],input:"placeholder:text-secondary",label:"text-secondary"}},{variant:"flat",color:"success",class:{inputWrapper:["bg-success-100","text-success-600","dark:text-success","placeholder:text-success-600","dark:placeholder:text-success","data-[hover=true]:bg-success-50","group-data-[focus=true]:bg-success-50"],input:"placeholder:text-success-600 dark:placeholder:text-success",label:"text-success-600 dark:text-success"}},{variant:"flat",color:"warning",class:{inputWrapper:["bg-warning-100","text-warning-600","dark:text-warning","placeholder:text-warning-600","dark:placeholder:text-warning","data-[hover=true]:bg-warning-50","group-data-[focus=true]:bg-warning-50"],input:"placeholder:text-warning-600 dark:placeholder:text-warning",label:"text-warning-600 dark:text-warning"}},{variant:"flat",color:"danger",class:{inputWrapper:["bg-danger-100","text-danger","dark:text-danger-500","placeholder:text-danger","dark:placeholder:text-danger-500","data-[hover=true]:bg-danger-50","group-data-[focus=true]:bg-danger-50"],input:"placeholder:text-danger dark:placeholder:text-danger-500",label:"text-danger dark:text-danger-500"}},{variant:"faded",color:"primary",class:{label:"text-primary",inputWrapper:"data-[hover=true]:border-primary focus-within:border-primary"}},{variant:"faded",color:"secondary",class:{label:"text-secondary",inputWrapper:"data-[hover=true]:border-secondary focus-within:border-secondary"}},{variant:"faded",color:"success",class:{label:"text-success",inputWrapper:"data-[hover=true]:border-success focus-within:border-success"}},{variant:"faded",color:"warning",class:{label:"text-warning",inputWrapper:"data-[hover=true]:border-warning focus-within:border-warning"}},{variant:"faded",color:"danger",class:{label:"text-danger",inputWrapper:"data-[hover=true]:border-danger focus-within:border-danger"}},{variant:"underlined",color:"default",class:{input:"group-data-[has-value=true]:text-foreground"}},{variant:"underlined",color:"primary",class:{inputWrapper:"after:bg-primary",label:"text-primary"}},{variant:"underlined",color:"secondary",class:{inputWrapper:"after:bg-secondary",label:"text-secondary"}},{variant:"underlined",color:"success",class:{inputWrapper:"after:bg-success",label:"text-success"}},{variant:"underlined",color:"warning",class:{inputWrapper:"after:bg-warning",label:"text-warning"}},{variant:"underlined",color:"danger",class:{inputWrapper:"after:bg-danger",label:"text-danger"}},{variant:"bordered",color:"primary",class:{inputWrapper:"group-data-[focus=true]:border-primary",label:"text-primary"}},{variant:"bordered",color:"secondary",class:{inputWrapper:"group-data-[focus=true]:border-secondary",label:"text-secondary"}},{variant:"bordered",color:"success",class:{inputWrapper:"group-data-[focus=true]:border-success",label:"text-success"}},{variant:"bordered",color:"warning",class:{inputWrapper:"group-data-[focus=true]:border-warning",label:"text-warning"}},{variant:"bordered",color:"danger",class:{inputWrapper:"group-data-[focus=true]:border-danger",label:"text-danger"}},{labelPlacement:"inside",color:"default",class:{label:"group-data-[filled-within=true]:text-default-600"}},{labelPlacement:"outside",color:"default",class:{label:"group-data-[filled-within=true]:text-foreground"}},{radius:"full",size:["sm"],class:{inputWrapper:"px-3"}},{radius:"full",size:"md",class:{inputWrapper:"px-4"}},{radius:"full",size:"lg",class:{inputWrapper:"px-5"}},{disableAnimation:!1,variant:["faded","bordered"],class:{inputWrapper:"transition-colors motion-reduce:transition-none"}},{disableAnimation:!1,variant:"underlined",class:{inputWrapper:"after:transition-width motion-reduce:after:transition-none"}},{variant:["flat","faded"],class:{inputWrapper:[...V_]}},{isInvalid:!0,variant:"flat",class:{inputWrapper:["!bg-danger-50","data-[hover=true]:!bg-danger-100","group-data-[focus=true]:!bg-danger-50"]}},{isInvalid:!0,variant:"bordered",class:{inputWrapper:"!border-danger group-data-[focus=true]:!border-danger"}},{isInvalid:!0,variant:"underlined",class:{inputWrapper:"after:!bg-danger"}},{labelPlacement:"inside",size:"sm",class:{inputWrapper:"h-12 py-1.5 px-3"}},{labelPlacement:"inside",size:"md",class:{inputWrapper:"h-14 py-2"}},{labelPlacement:"inside",size:"lg",class:{inputWrapper:"h-16 py-2.5 gap-0"}},{labelPlacement:"inside",size:"sm",variant:["bordered","faded"],class:{inputWrapper:"py-1"}},{labelPlacement:["inside","outside"],class:{label:["group-data-[filled-within=true]:pointer-events-auto"]}},{labelPlacement:"outside",isMultiline:!1,class:{base:"relative justify-end",label:["pb-0","z-20","top-1/2","-translate-y-1/2","group-data-[filled-within=true]:start-0"]}},{labelPlacement:["inside"],class:{label:["group-data-[filled-within=true]:scale-85"]}},{labelPlacement:["inside"],variant:"flat",class:{innerWrapper:"pb-0.5"}},{variant:"underlined",size:"sm",class:{innerWrapper:"pb-1"}},{variant:"underlined",size:["md","lg"],class:{innerWrapper:"pb-1.5"}},{labelPlacement:"inside",size:["sm","md"],class:{label:"text-small"}},{labelPlacement:"inside",isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px)]"]}},{labelPlacement:"inside",isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px)]"]}},{labelPlacement:"inside",isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px)]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_5px)]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_3.5px)]"]}},{labelPlacement:"inside",variant:"underlined",size:"lg",isMultiline:!1,class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_4px)]"]}},{labelPlacement:"outside",size:"sm",isMultiline:!1,class:{label:["start-2","text-tiny","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-tiny)/2_+_16px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_8px)]"}},{labelPlacement:"outside",size:"md",isMultiline:!1,class:{label:["start-3","end-auto","text-small","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_20px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_10px)]"}},{labelPlacement:"outside",size:"lg",isMultiline:!1,class:{label:["start-3","end-auto","text-medium","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_24px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_12px)]"}},{labelPlacement:"outside-left",size:"sm",class:{label:"group-data-[has-helper=true]:pt-2"}},{labelPlacement:"outside-left",size:"md",class:{label:"group-data-[has-helper=true]:pt-3"}},{labelPlacement:"outside-left",size:"lg",class:{label:"group-data-[has-helper=true]:pt-4"}},{labelPlacement:["outside","outside-left"],isMultiline:!0,class:{inputWrapper:"py-2"}},{labelPlacement:"outside",isMultiline:!0,class:{label:"pb-1.5"}},{labelPlacement:"inside",isMultiline:!0,class:{label:"pb-0.5",input:"pt-0"}},{isMultiline:!0,disableAnimation:!1,class:{input:"transition-height !duration-100 motion-reduce:transition-none"}},{labelPlacement:["inside","outside"],class:{label:["pe-2","max-w-full","text-ellipsis","overflow-hidden"]}},{isMultiline:!0,radius:"full",class:{inputWrapper:"data-[has-multiple-rows=true]:rounded-large"}},{isClearable:!0,isMultiline:!0,class:{clearButton:["group-data-[has-value=true]:opacity-70 group-data-[has-value=true]:block","group-data-[has-value=true]:scale-100","group-data-[has-value=true]:pointer-events-auto"]}}]}),wk=er({slots:{wrapper:["flex","w-screen","h-[100dvh]","fixed","inset-0","z-50","overflow-x-auto","justify-center","h-[--visual-viewport-height]"],base:["flex","flex-col","relative","bg-white","z-50","w-full","box-border","bg-content1","outline-hidden","mx-1","my-1","sm:mx-6","sm:my-16"],backdrop:"z-50",header:"flex py-4 px-6 flex-initial text-large font-semibold",body:"flex flex-1 flex-col gap-3 px-6 py-2",footer:"flex flex-row gap-2 px-6 py-4 justify-end",closeButton:["absolute","appearance-none","outline-hidden","select-none","top-1","end-1","p-2","text-foreground-500","rounded-full","hover:bg-default-100","active:bg-default-200","tap-highlight-transparent",...wh]},variants:{size:{xs:{base:"max-w-xs"},sm:{base:"max-w-sm"},md:{base:"max-w-md"},lg:{base:"max-w-lg"},xl:{base:"max-w-xl"},"2xl":{base:"max-w-2xl"},"3xl":{base:"max-w-3xl"},"4xl":{base:"max-w-4xl"},"5xl":{base:"max-w-5xl"},full:{base:"my-0 mx-0 sm:mx-0 sm:my-0 max-w-full h-[100dvh] min-h-[100dvh] !rounded-none"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"}},placement:{auto:{wrapper:"items-end sm:items-center"},center:{wrapper:"items-center sm:items-center"},top:{wrapper:"items-start sm:items-start"},"top-center":{wrapper:"items-start sm:items-center"},bottom:{wrapper:"items-end sm:items-end"},"bottom-center":{wrapper:"items-end sm:items-center"}},shadow:{none:{base:"shadow-none"},sm:{base:"shadow-small"},md:{base:"shadow-medium"},lg:{base:"shadow-large"}},backdrop:{transparent:{backdrop:"hidden"},opaque:{backdrop:"bg-overlay/50 backdrop-opacity-disabled"},blur:{backdrop:"backdrop-blur-md backdrop-saturate-150 bg-overlay/30"}},scrollBehavior:{normal:{base:"overflow-y-hidden"},inside:{base:"max-h-[calc(100%_-_8rem)]",body:"overflow-y-auto"},outside:{wrapper:"items-start sm:items-start overflow-y-auto",base:"my-16"}},disableAnimation:{false:{wrapper:["[--scale-enter:100%]","[--scale-exit:100%]","[--slide-enter:0px]","[--slide-exit:80px]","sm:[--scale-enter:100%]","sm:[--scale-exit:103%]","sm:[--slide-enter:0px]","sm:[--slide-exit:0px]"]}}},defaultVariants:{size:"md",radius:"lg",shadow:"sm",placement:"auto",backdrop:"opaque",scrollBehavior:"normal"},compoundVariants:[{backdrop:["opaque","blur"],class:{backdrop:"w-screen h-screen fixed inset-0"}}]}),zO=er({base:"shrink-0 bg-divider border-none",variants:{orientation:{horizontal:"w-full h-divider",vertical:"h-full w-divider"}},defaultVariants:{orientation:"horizontal"}}),jO=er({base:"flex flex-col gap-2 items-start"}),Sk=er({slots:{wrapper:"relative shadow-black/5",zoomedWrapper:"relative overflow-hidden rounded-inherit",img:"relative z-10 opacity-0 shadow-black/5 data-[loaded=true]:opacity-100",blurredImg:["absolute","z-0","inset-0","w-full","h-full","object-cover","filter","blur-lg","scale-105","saturate-150","opacity-30","translate-y-1"]},variants:{radius:{none:{},sm:{},md:{},lg:{},full:{}},shadow:{none:{wrapper:"shadow-none",img:"shadow-none"},sm:{wrapper:"shadow-small",img:"shadow-small"},md:{wrapper:"shadow-medium",img:"shadow-medium"},lg:{wrapper:"shadow-large",img:"shadow-large"}},isZoomed:{true:{img:["object-cover","transform","hover:scale-125"]}},showSkeleton:{true:{wrapper:["group","relative","overflow-hidden","bg-content3 dark:bg-content2"],img:"opacity-0"}},disableAnimation:{true:{img:"transition-none"},false:{img:"transition-transform-opacity motion-reduce:transition-none !duration-300"}}},defaultVariants:{radius:"lg",shadow:"none",isZoomed:!1,isBlurred:!1,showSkeleton:!1},compoundVariants:[{showSkeleton:!0,disableAnimation:!1,class:{wrapper:["before:opacity-100","before:absolute","before:inset-0","before:-translate-x-full","before:animate-shimmer","before:border-t","before:border-content4/30","before:bg-gradient-to-r","before:from-transparent","before:via-content4","dark:before:via-default-700/10","before:to-transparent","after:opacity-100","after:absolute","after:inset-0","after:-z-10","after:bg-content3","dark:after:bg-content2"]}}],compoundSlots:[{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"none",class:"rounded-none"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"full",class:"rounded-full"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"sm",class:"rounded-small"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"md",class:"rounded-md"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"lg",class:"rounded-large"}]}),BO=er({base:["z-0","group","relative","inline-flex","items-center","justify-center","box-border","appearance-none","outline-hidden","select-none","whitespace-nowrap","min-w-max","font-normal","subpixel-antialiased","overflow-hidden","tap-highlight-transparent","transform-gpu data-[pressed=true]:scale-[0.97]","cursor-pointer",...wh],variants:{variant:{solid:"",bordered:"border-medium bg-transparent",light:"bg-transparent",flat:"",faded:"border-medium",shadow:"",ghost:"border-medium bg-transparent"},size:{sm:"px-3 min-w-16 h-8 text-tiny gap-2 rounded-small",md:"px-4 min-w-20 h-10 text-small gap-2 rounded-medium",lg:"px-6 min-w-24 h-12 text-medium gap-3 rounded-large"},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},radius:{none:"rounded-none",sm:"rounded-small",md:"rounded-medium",lg:"rounded-large",full:"rounded-full"},fullWidth:{true:"w-full"},isDisabled:{true:"opacity-disabled pointer-events-none"},isInGroup:{true:"[&:not(:first-child):not(:last-child)]:rounded-none"},isIconOnly:{true:"px-0 !gap-0",false:"[&>svg]:max-w-[theme(spacing.8)]"},disableAnimation:{true:"!transition-none data-[pressed=true]:scale-100",false:"transition-transform-colors-opacity motion-reduce:transition-none"}},defaultVariants:{size:"md",variant:"solid",color:"default",fullWidth:!1,isDisabled:!1,isInGroup:!1},compoundVariants:[{variant:"solid",color:"default",class:Te.solid.default},{variant:"solid",color:"primary",class:Te.solid.primary},{variant:"solid",color:"secondary",class:Te.solid.secondary},{variant:"solid",color:"success",class:Te.solid.success},{variant:"solid",color:"warning",class:Te.solid.warning},{variant:"solid",color:"danger",class:Te.solid.danger},{variant:"shadow",color:"default",class:Te.shadow.default},{variant:"shadow",color:"primary",class:Te.shadow.primary},{variant:"shadow",color:"secondary",class:Te.shadow.secondary},{variant:"shadow",color:"success",class:Te.shadow.success},{variant:"shadow",color:"warning",class:Te.shadow.warning},{variant:"shadow",color:"danger",class:Te.shadow.danger},{variant:"bordered",color:"default",class:Te.bordered.default},{variant:"bordered",color:"primary",class:Te.bordered.primary},{variant:"bordered",color:"secondary",class:Te.bordered.secondary},{variant:"bordered",color:"success",class:Te.bordered.success},{variant:"bordered",color:"warning",class:Te.bordered.warning},{variant:"bordered",color:"danger",class:Te.bordered.danger},{variant:"flat",color:"default",class:Te.flat.default},{variant:"flat",color:"primary",class:Te.flat.primary},{variant:"flat",color:"secondary",class:Te.flat.secondary},{variant:"flat",color:"success",class:Te.flat.success},{variant:"flat",color:"warning",class:Te.flat.warning},{variant:"flat",color:"danger",class:Te.flat.danger},{variant:"faded",color:"default",class:Te.faded.default},{variant:"faded",color:"primary",class:Te.faded.primary},{variant:"faded",color:"secondary",class:Te.faded.secondary},{variant:"faded",color:"success",class:Te.faded.success},{variant:"faded",color:"warning",class:Te.faded.warning},{variant:"faded",color:"danger",class:Te.faded.danger},{variant:"light",color:"default",class:[Te.light.default,"data-[hover=true]:bg-default/40"]},{variant:"light",color:"primary",class:[Te.light.primary,"data-[hover=true]:bg-primary/20"]},{variant:"light",color:"secondary",class:[Te.light.secondary,"data-[hover=true]:bg-secondary/20"]},{variant:"light",color:"success",class:[Te.light.success,"data-[hover=true]:bg-success/20"]},{variant:"light",color:"warning",class:[Te.light.warning,"data-[hover=true]:bg-warning/20"]},{variant:"light",color:"danger",class:[Te.light.danger,"data-[hover=true]:bg-danger/20"]},{variant:"ghost",color:"default",class:[Te.ghost.default,"data-[hover=true]:!bg-default"]},{variant:"ghost",color:"primary",class:[Te.ghost.primary,"data-[hover=true]:!bg-primary data-[hover=true]:!text-primary-foreground"]},{variant:"ghost",color:"secondary",class:[Te.ghost.secondary,"data-[hover=true]:!bg-secondary data-[hover=true]:!text-secondary-foreground"]},{variant:"ghost",color:"success",class:[Te.ghost.success,"data-[hover=true]:!bg-success data-[hover=true]:!text-success-foreground"]},{variant:"ghost",color:"warning",class:[Te.ghost.warning,"data-[hover=true]:!bg-warning data-[hover=true]:!text-warning-foreground"]},{variant:"ghost",color:"danger",class:[Te.ghost.danger,"data-[hover=true]:!bg-danger data-[hover=true]:!text-danger-foreground"]},{isInGroup:!0,class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,size:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,isRounded:!0,class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,radius:"none",class:"rounded-none first:rounded-s-none last:rounded-e-none"},{isInGroup:!0,radius:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,radius:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,radius:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,radius:"full",class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,variant:["ghost","bordered"],color:"default",className:lf.default},{isInGroup:!0,variant:["ghost","bordered"],color:"primary",className:lf.primary},{isInGroup:!0,variant:["ghost","bordered"],color:"secondary",className:lf.secondary},{isInGroup:!0,variant:["ghost","bordered"],color:"success",className:lf.success},{isInGroup:!0,variant:["ghost","bordered"],color:"warning",className:lf.warning},{isInGroup:!0,variant:["ghost","bordered"],color:"danger",className:lf.danger},{isIconOnly:!0,size:"sm",class:"min-w-8 w-8 h-8"},{isIconOnly:!0,size:"md",class:"min-w-10 w-10 h-10"},{isIconOnly:!0,size:"lg",class:"min-w-12 w-12 h-12"},{variant:["solid","faded","flat","bordered","shadow"],class:"data-[hover=true]:opacity-hover"}]});er({base:"inline-flex items-center justify-center h-auto",variants:{fullWidth:{true:"w-full"}},defaultVariants:{fullWidth:!1}});var VO=er({slots:{base:"group relative max-w-fit inline-flex items-center justify-start cursor-pointer tap-highlight-transparent p-2 -m-2 select-none",wrapper:["relative","inline-flex","items-center","justify-center","shrink-0","overflow-hidden","before:content-['']","before:absolute","before:inset-0","before:border-solid","before:border-2","before:box-border","before:border-default","after:content-['']","after:absolute","after:inset-0","after:scale-50","after:opacity-0","after:origin-center","group-data-[selected=true]:after:scale-100","group-data-[selected=true]:after:opacity-100","group-data-[hover=true]:before:bg-default-100",...V_],hiddenInput:NO,icon:"z-10 w-4 h-3 opacity-0 group-data-[selected=true]:opacity-100 pointer-events-none",label:"relative text-foreground select-none"},variants:{color:{default:{wrapper:"after:bg-default after:text-default-foreground text-default-foreground"},primary:{wrapper:"after:bg-primary after:text-primary-foreground text-primary-foreground"},secondary:{wrapper:"after:bg-secondary after:text-secondary-foreground text-secondary-foreground"},success:{wrapper:"after:bg-success after:text-success-foreground text-success-foreground"},warning:{wrapper:"after:bg-warning after:text-warning-foreground text-warning-foreground"},danger:{wrapper:"after:bg-danger after:text-danger-foreground text-danger-foreground"}},size:{sm:{wrapper:["w-4 h-4 me-2","rounded-[calc(var(--heroui-radius-medium)*0.5)]","before:rounded-[calc(var(--heroui-radius-medium)*0.5)]","after:rounded-[calc(var(--heroui-radius-medium)*0.5)]"],label:"text-small",icon:"w-3 h-2"},md:{wrapper:["w-5 h-5 me-2","rounded-[calc(var(--heroui-radius-medium)*0.6)]","before:rounded-[calc(var(--heroui-radius-medium)*0.6)]","after:rounded-[calc(var(--heroui-radius-medium)*0.6)]"],label:"text-medium",icon:"w-4 h-3"},lg:{wrapper:["w-6 h-6 me-2","rounded-[calc(var(--heroui-radius-medium)*0.7)]","before:rounded-[calc(var(--heroui-radius-medium)*0.7)]","after:rounded-[calc(var(--heroui-radius-medium)*0.7)]"],label:"text-large",icon:"w-5 h-4"}},radius:{none:{wrapper:"rounded-none before:rounded-none after:rounded-none"},sm:{wrapper:["rounded-[calc(var(--heroui-radius-medium)*0.5)]","before:rounded-[calc(var(--heroui-radius-medium)*0.5)]","after:rounded-[calc(var(--heroui-radius-medium)*0.5)]"]},md:{wrapper:["rounded-[calc(var(--heroui-radius-medium)*0.6)]","before:rounded-[calc(var(--heroui-radius-medium)*0.6)]","after:rounded-[calc(var(--heroui-radius-medium)*0.6)]"]},lg:{wrapper:["rounded-[calc(var(--heroui-radius-medium)*0.7)]","before:rounded-[calc(var(--heroui-radius-medium)*0.7)]","after:rounded-[calc(var(--heroui-radius-medium)*0.7)]"]},full:{wrapper:"rounded-full before:rounded-full after:rounded-full"}},lineThrough:{true:{label:["inline-flex","items-center","justify-center","before:content-['']","before:absolute","before:bg-foreground","before:w-0","before:h-0.5","group-data-[selected=true]:opacity-60","group-data-[selected=true]:before:w-full"]}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},isInvalid:{true:{wrapper:"before:border-danger",label:"text-danger"}},disableAnimation:{true:{wrapper:"transition-none",icon:"transition-none",label:"transition-none"},false:{wrapper:["before:transition-colors","group-data-[pressed=true]:scale-95","transition-transform","after:transition-transform-opacity","after:!ease-linear","after:!duration-200","motion-reduce:transition-none"],icon:"transition-opacity motion-reduce:transition-none",label:"transition-colors-opacity before:transition-width motion-reduce:transition-none"}}},defaultVariants:{color:"primary",size:"md",isDisabled:!1,lineThrough:!1}});er({slots:{base:"relative flex flex-col gap-2",label:"relative text-medium text-foreground-500",wrapper:"flex flex-col flex-wrap gap-2 data-[orientation=horizontal]:flex-row",description:"text-small text-foreground-400",errorMessage:"text-small text-danger"},variants:{isRequired:{true:{label:"after:content-['*'] after:text-danger after:ml-0.5"}},isInvalid:{true:{description:"text-danger"}},disableAnimation:{true:{},false:{description:"transition-colors !duration-150 motion-reduce:transition-none"}}},defaultVariants:{isInvalid:!1,isRequired:!1}});var kk=er({slots:{base:["relative","max-w-fit","min-w-min","inline-flex","items-center","justify-between","box-border","whitespace-nowrap"],content:"flex-1 text-inherit font-normal",dot:["w-2","h-2","ml-1","rounded-full"],avatar:"shrink-0",closeButton:["z-10","appearance-none","outline-hidden","select-none","transition-opacity","opacity-70","hover:opacity-100","cursor-pointer","active:opacity-disabled","tap-highlight-transparent"]},variants:{variant:{solid:{},bordered:{base:"border-medium bg-transparent"},light:{base:"bg-transparent"},flat:{},faded:{base:"border-medium"},shadow:{},dot:{base:"border-medium border-default text-foreground bg-transparent"}},color:{default:{dot:"bg-default-400"},primary:{dot:"bg-primary"},secondary:{dot:"bg-secondary"},success:{dot:"bg-success"},warning:{dot:"bg-warning"},danger:{dot:"bg-danger"}},size:{sm:{base:"px-1 h-6 text-tiny",content:"px-1",closeButton:"text-medium",avatar:"w-4 h-4"},md:{base:"px-1 h-7 text-small",content:"px-2",closeButton:"text-large",avatar:"w-5 h-5"},lg:{base:"px-2 h-8 text-medium",content:"px-2",closeButton:"text-xl",avatar:"w-6 h-6"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"},full:{base:"rounded-full"}},isOneChar:{true:{},false:{}},isCloseable:{true:{},false:{}},hasStartContent:{true:{}},hasEndContent:{true:{}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},isCloseButtonFocusVisible:{true:{closeButton:[...DO,"ring-1","rounded-full"]}}},defaultVariants:{variant:"solid",color:"default",size:"md",radius:"full",isDisabled:!1},compoundVariants:[{variant:"solid",color:"default",class:{base:Te.solid.default}},{variant:"solid",color:"primary",class:{base:Te.solid.primary}},{variant:"solid",color:"secondary",class:{base:Te.solid.secondary}},{variant:"solid",color:"success",class:{base:Te.solid.success}},{variant:"solid",color:"warning",class:{base:Te.solid.warning}},{variant:"solid",color:"danger",class:{base:Te.solid.danger}},{variant:"shadow",color:"default",class:{base:Te.shadow.default}},{variant:"shadow",color:"primary",class:{base:Te.shadow.primary}},{variant:"shadow",color:"secondary",class:{base:Te.shadow.secondary}},{variant:"shadow",color:"success",class:{base:Te.shadow.success}},{variant:"shadow",color:"warning",class:{base:Te.shadow.warning}},{variant:"shadow",color:"danger",class:{base:Te.shadow.danger}},{variant:"bordered",color:"default",class:{base:Te.bordered.default}},{variant:"bordered",color:"primary",class:{base:Te.bordered.primary}},{variant:"bordered",color:"secondary",class:{base:Te.bordered.secondary}},{variant:"bordered",color:"success",class:{base:Te.bordered.success}},{variant:"bordered",color:"warning",class:{base:Te.bordered.warning}},{variant:"bordered",color:"danger",class:{base:Te.bordered.danger}},{variant:"flat",color:"default",class:{base:Te.flat.default}},{variant:"flat",color:"primary",class:{base:Te.flat.primary}},{variant:"flat",color:"secondary",class:{base:Te.flat.secondary}},{variant:"flat",color:"success",class:{base:Te.flat.success}},{variant:"flat",color:"warning",class:{base:Te.flat.warning}},{variant:"flat",color:"danger",class:{base:Te.flat.danger}},{variant:"faded",color:"default",class:{base:Te.faded.default}},{variant:"faded",color:"primary",class:{base:Te.faded.primary}},{variant:"faded",color:"secondary",class:{base:Te.faded.secondary}},{variant:"faded",color:"success",class:{base:Te.faded.success}},{variant:"faded",color:"warning",class:{base:Te.faded.warning}},{variant:"faded",color:"danger",class:{base:Te.faded.danger}},{variant:"light",color:"default",class:{base:Te.light.default}},{variant:"light",color:"primary",class:{base:Te.light.primary}},{variant:"light",color:"secondary",class:{base:Te.light.secondary}},{variant:"light",color:"success",class:{base:Te.light.success}},{variant:"light",color:"warning",class:{base:Te.light.warning}},{variant:"light",color:"danger",class:{base:Te.light.danger}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"sm",class:{base:"w-5 h-5 min-w-5 min-h-5"}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"md",class:{base:"w-6 h-6 min-w-6 min-h-6"}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"lg",class:{base:"w-7 h-7 min-w-7 min-h-7"}},{isOneChar:!0,isCloseable:!1,hasStartContent:!1,hasEndContent:!1,class:{base:"px-0 justify-center",content:"px-0 flex-none"}},{isOneChar:!0,isCloseable:!0,hasStartContent:!1,hasEndContent:!1,class:{base:"w-auto"}},{isOneChar:!0,variant:"dot",class:{base:"w-auto h-7 px-1 items-center",content:"px-2"}},{hasStartContent:!0,size:"sm",class:{content:"pl-0.5"}},{hasStartContent:!0,size:["md","lg"],class:{content:"pl-1"}},{hasEndContent:!0,size:"sm",class:{content:"pr-0.5"}},{hasEndContent:!0,size:["md","lg"],class:{content:"pr-1"}}]}),UO=er({base:"px-2",variants:{variant:{light:"",shadow:"px-4 shadow-medium rounded-medium bg-content1",bordered:"px-4 border-medium border-divider rounded-medium",splitted:"flex flex-col gap-2"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"light",fullWidth:!0}}),KO=er({slots:{base:"",heading:"",trigger:["flex py-4 w-full h-full gap-3 outline-hidden items-center tap-highlight-transparent",...wh],startContent:"shrink-0",indicator:"text-default-400",titleWrapper:"flex-1 flex flex-col text-start",title:"text-foreground text-medium",subtitle:"text-small text-foreground-500 font-normal",content:"py-2"},variants:{variant:{splitted:{base:"px-4 bg-content1 shadow-medium rounded-medium"}},isCompact:{true:{trigger:"py-2",title:"text-medium",subtitle:"text-small",indicator:"text-medium",content:"py-1"}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},hideIndicator:{true:{indicator:"hidden"}},disableAnimation:{true:{content:"hidden data-[open=true]:block"},false:{indicator:"transition-transform",trigger:"transition-opacity"}},disableIndicatorAnimation:{true:{indicator:"transition-none"},false:{indicator:"rotate-0 data-[open=true]:-rotate-90 rtl:-rotate-180 rtl:data-[open=true]:-rotate-90"}}},defaultVariants:{size:"md",radius:"lg",isDisabled:!1,hideIndicator:!1,disableIndicatorAnimation:!1}});function U_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=U_(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function WO(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=U_(e))&&(r&&(r+=" "),r+=t);return r}var HO=j_({extend:Tb});function bn(...e){return HO(WO(e))}const GO="modulepreload",qO=function(e){return"/"+e},Ck={},Br=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let d=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),c=a?.nonce||a?.getAttribute("nonce");i=d(n.map(h=>{if(h=qO(h),h in Ck)return;Ck[h]=!0;const m=h.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":GO,m||(b.as="script"),b.crossOrigin="",b.href=h,c&&b.setAttribute("nonce",c),document.head.appendChild(b),m)return new Promise((x,k)=>{b.addEventListener("load",x),b.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(a){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=a,window.dispatchEvent(c),!c.defaultPrevented)throw a}return i.then(a=>{for(const c of a||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})};function YO(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:s,onPressEnd:a,onPressUp:c,onPressChange:d,preventFocusOnPress:h,allowFocusWhenDisabled:m,onClick:g,href:b,target:x,rel:k,type:P="button"}=e,T;n==="button"?T={type:P,disabled:r}:T={role:"button",href:n==="a"&&!r?b:void 0,target:n==="a"?x:void 0,type:n==="input"?P:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?k:void 0};let{pressProps:_,isPressed:A}=il({onPressStart:s,onPressEnd:a,onPressChange:d,onPress:i,onPressUp:c,onClick:g,isDisabled:r,preventFocusOnPress:h,ref:t}),{focusableProps:M}=xh(e,t);m&&(M.tabIndex=r?-1:M.tabIndex);let O=Tn(M,_,$u(e,{labelable:!0}));return{isPressed:A,buttonProps:Tn(T,O,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}function XO(e,t,n){let{item:r,isDisabled:i}=e,s=r.key,a=t.selectionManager,c=S.useId(),d=S.useId(),h=t.disabledKeys.has(r.key)||i;S.useEffect(()=>{s===t.focusedKey&&document.activeElement!==n.current&&n.current&&Cu(n.current)},[n,s,t.focusedKey]);let m=S.useCallback(P=>{a.canSelectItem(s)&&(a.select(s,P),t.toggleKey(s))},[s,a]);const g=S.useCallback(P=>{a.selectionBehavior==="replace"&&a.extendSelection(P),a.setFocusedKey(P)},[a]),b=S.useCallback(P=>{const _={ArrowDown:()=>{const A=t.collection.getKeyAfter(s);if(A&&t.disabledKeys.has(A)){const M=t.collection.getKeyAfter(A);M&&g(M)}else A&&g(A)},ArrowUp:()=>{const A=t.collection.getKeyBefore(s);if(A&&t.disabledKeys.has(A)){const M=t.collection.getKeyBefore(A);M&&g(M)}else A&&g(A)},Home:()=>{const A=t.collection.getFirstKey();A&&g(A)},End:()=>{const A=t.collection.getLastKey();A&&g(A)}}[P.key];_&&(P.preventDefault(),a.canSelectItem(s)&&_(P))},[s,a]);let{buttonProps:x}=YO({id:c,elementType:"button",isDisabled:h,onKeyDown:b,onPress:m},n),k=t.selectionManager.isSelected(r.key);return{buttonProps:{...x,"aria-expanded":k,"aria-controls":k?d:void 0},regionProps:{id:d,role:"region","aria-labelledby":c}}}function Ek(e){return xM()?e.altKey:e.ctrlKey}function Dg(e,t){var n,r;let i=`[data-key="${CSS.escape(String(t))}"]`,s=(n=e.current)===null||n===void 0?void 0:n.dataset.collection;return s&&(i=`[data-collection="${CSS.escape(s)}"]${i}`),(r=e.current)===null||r===void 0?void 0:r.querySelector(i)}const K_=new WeakMap;function QO(e){let t=Pf();return K_.set(e,t),t}function dq(e){return K_.get(e)}const JO=1e3;function ZO(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=S.useRef({search:"",timeout:void 0}).current,s=a=>{let c=e6(a.key);if(!(!c||a.ctrlKey||a.metaKey||!a.currentTarget.contains(a.target))){if(c===" "&&i.search.trim().length>0&&(a.preventDefault(),"continuePropagation"in a||a.stopPropagation()),i.search+=c,t.getKeyForSearch!=null){let d=t.getKeyForSearch(i.search,n.focusedKey);d==null&&(d=t.getKeyForSearch(i.search)),d!=null&&(n.setFocusedKey(d),r&&r(d))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},JO)}};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?s:void 0}}}function e6(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function t6(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:s=!1,disallowEmptySelection:a=!1,disallowSelectAll:c=!1,escapeKeyBehavior:d="clearSelection",selectOnFocus:h=t.selectionBehavior==="replace",disallowTypeAhead:m=!1,shouldUseVirtualFocus:g,allowsTabNavigation:b=!1,isVirtualized:x,scrollRef:k=r,linkBehavior:P="action"}=e,{direction:T}=hh(),_=px(),A=X=>{var V;if(X.altKey&&X.key==="Tab"&&X.preventDefault(),!(!((V=r.current)===null||V===void 0)&&V.contains(X.target)))return;const ae=(Ie,mt)=>{if(Ie!=null){if(t.isLink(Ie)&&P==="selection"&&h&&!Ek(X)){HE.flushSync(()=>{t.setFocusedKey(Ie,mt)});let pt=Dg(r,Ie),Kt=t.getItemProps(Ie);pt&&_.open(pt,X,Kt.href,Kt.routerOptions);return}if(t.setFocusedKey(Ie,mt),t.isLink(Ie)&&P==="override")return;X.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Ie):h&&!Ek(X)&&t.replaceSelection(Ie)}};switch(X.key){case"ArrowDown":if(n.getKeyBelow){var D,U,oe;let Ie=t.focusedKey!=null?(D=n.getKeyBelow)===null||D===void 0?void 0:D.call(n,t.focusedKey):(U=n.getFirstKey)===null||U===void 0?void 0:U.call(n);Ie==null&&s&&(Ie=(oe=n.getFirstKey)===null||oe===void 0?void 0:oe.call(n,t.focusedKey)),Ie!=null&&(X.preventDefault(),ae(Ie))}break;case"ArrowUp":if(n.getKeyAbove){var z,me,Ce;let Ie=t.focusedKey!=null?(z=n.getKeyAbove)===null||z===void 0?void 0:z.call(n,t.focusedKey):(me=n.getLastKey)===null||me===void 0?void 0:me.call(n);Ie==null&&s&&(Ie=(Ce=n.getLastKey)===null||Ce===void 0?void 0:Ce.call(n,t.focusedKey)),Ie!=null&&(X.preventDefault(),ae(Ie))}break;case"ArrowLeft":if(n.getKeyLeftOf){var ye,Oe,Ne;let Ie=t.focusedKey!=null?(ye=n.getKeyLeftOf)===null||ye===void 0?void 0:ye.call(n,t.focusedKey):null;Ie==null&&s&&(Ie=T==="rtl"?(Oe=n.getFirstKey)===null||Oe===void 0?void 0:Oe.call(n,t.focusedKey):(Ne=n.getLastKey)===null||Ne===void 0?void 0:Ne.call(n,t.focusedKey)),Ie!=null&&(X.preventDefault(),ae(Ie,T==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var _e,Qe,at;let Ie=t.focusedKey!=null?(_e=n.getKeyRightOf)===null||_e===void 0?void 0:_e.call(n,t.focusedKey):null;Ie==null&&s&&(Ie=T==="rtl"?(Qe=n.getLastKey)===null||Qe===void 0?void 0:Qe.call(n,t.focusedKey):(at=n.getFirstKey)===null||at===void 0?void 0:at.call(n,t.focusedKey)),Ie!=null&&(X.preventDefault(),ae(Ie,T==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(t.focusedKey===null&&X.shiftKey)return;X.preventDefault();let Ie=n.getFirstKey(t.focusedKey,hp(X));t.setFocusedKey(Ie),Ie!=null&&(hp(X)&&X.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Ie):h&&t.replaceSelection(Ie))}break;case"End":if(n.getLastKey){if(t.focusedKey===null&&X.shiftKey)return;X.preventDefault();let Ie=n.getLastKey(t.focusedKey,hp(X));t.setFocusedKey(Ie),Ie!=null&&(hp(X)&&X.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Ie):h&&t.replaceSelection(Ie))}break;case"PageDown":if(n.getKeyPageBelow&&t.focusedKey!=null){let Ie=n.getKeyPageBelow(t.focusedKey);Ie!=null&&(X.preventDefault(),ae(Ie))}break;case"PageUp":if(n.getKeyPageAbove&&t.focusedKey!=null){let Ie=n.getKeyPageAbove(t.focusedKey);Ie!=null&&(X.preventDefault(),ae(Ie))}break;case"a":hp(X)&&t.selectionMode==="multiple"&&c!==!0&&(X.preventDefault(),t.selectAll());break;case"Escape":d==="clearSelection"&&!a&&t.selectedKeys.size!==0&&(X.stopPropagation(),X.preventDefault(),t.clearSelection());break;case"Tab":if(!b){if(X.shiftKey)r.current.focus();else{let Ie=Qs(r.current,{tabbable:!0}),mt,pt;do pt=Ie.lastChild(),pt&&(mt=pt);while(pt);mt&&!mt.contains(document.activeElement)&&tl(mt)}break}}},M=S.useRef({top:0,left:0});ug(k,"scroll",x?void 0:()=>{var X,V,ae,D;M.current={top:(ae=(X=k.current)===null||X===void 0?void 0:X.scrollTop)!==null&&ae!==void 0?ae:0,left:(D=(V=k.current)===null||V===void 0?void 0:V.scrollLeft)!==null&&D!==void 0?D:0}});let O=X=>{if(t.isFocused){X.currentTarget.contains(X.target)||t.setFocused(!1);return}if(X.currentTarget.contains(X.target)){if(t.setFocused(!0),t.focusedKey==null){var V,ae;let oe=me=>{me!=null&&(t.setFocusedKey(me),h&&!t.isSelected(me)&&t.replaceSelection(me))},z=X.relatedTarget;var D,U;z&&X.currentTarget.compareDocumentPosition(z)&Node.DOCUMENT_POSITION_FOLLOWING?oe((D=t.lastSelectedKey)!==null&&D!==void 0?D:(V=n.getLastKey)===null||V===void 0?void 0:V.call(n)):oe((U=t.firstSelectedKey)!==null&&U!==void 0?U:(ae=n.getFirstKey)===null||ae===void 0?void 0:ae.call(n))}else!x&&k.current&&(k.current.scrollTop=M.current.top,k.current.scrollLeft=M.current.left);if(t.focusedKey!=null&&k.current){let oe=Dg(r,t.focusedKey);oe instanceof HTMLElement&&(!oe.contains(document.activeElement)&&!g&&tl(oe),oh()==="keyboard"&&P1(oe,{containingElement:r.current}))}}},j=X=>{X.currentTarget.contains(X.relatedTarget)||t.setFocused(!1)},$=S.useRef(!1);ug(r,$M,g?X=>{let{detail:V}=X;X.stopPropagation(),t.setFocused(!0),V?.focusStrategy==="first"&&($.current=!0)}:void 0);let Y=Bn(()=>{var X,V;let ae=(V=(X=n.getFirstKey)===null||X===void 0?void 0:X.call(n))!==null&&V!==void 0?V:null;ae==null?(pF(r.current),t.collection.size>0&&($.current=!1)):(t.setFocusedKey(ae),$.current=!1)});k1(()=>{$.current&&Y()},[t.collection,Y]);let te=Bn(()=>{t.collection.size>0&&($.current=!1)});k1(()=>{te()},[t.focusedKey,te]),ug(r,IM,g?X=>{var V;X.stopPropagation(),t.setFocused(!1),!((V=X.detail)===null||V===void 0)&&V.clearFocusKey&&t.setFocusedKey(null)}:void 0);const ie=S.useRef(i),B=S.useRef(!1);S.useEffect(()=>{if(ie.current){var X,V;let U=null;var ae;i==="first"&&(U=(ae=(X=n.getFirstKey)===null||X===void 0?void 0:X.call(n))!==null&&ae!==void 0?ae:null);var D;i==="last"&&(U=(D=(V=n.getLastKey)===null||V===void 0?void 0:V.call(n))!==null&&D!==void 0?D:null);let oe=t.selectedKeys;if(oe.size){for(let z of oe)if(t.canSelectItem(z)){U=z;break}}t.setFocused(!0),t.setFocusedKey(U),U==null&&!g&&r.current&&Cu(r.current),t.collection.size>0&&(ie.current=!1,B.current=!0)}});let W=S.useRef(t.focusedKey),G=S.useRef(null);S.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==W.current||B.current)&&k.current&&r.current){let X=oh(),V=Dg(r,t.focusedKey);if(!(V instanceof HTMLElement))return;(X==="keyboard"||B.current)&&(G.current&&cancelAnimationFrame(G.current),G.current=requestAnimationFrame(()=>{k.current&&(UE(k.current,V),X!=="virtual"&&P1(V,{containingElement:r.current}))}))}!g&&t.isFocused&&t.focusedKey==null&&W.current!=null&&r.current&&Cu(r.current),W.current=t.focusedKey,B.current=!1}),S.useEffect(()=>()=>{G.current&&cancelAnimationFrame(G.current)},[]),ug(r,"react-aria-focus-scope-restore",X=>{X.preventDefault(),t.setFocused(!0)});let ee={onKeyDown:A,onFocus:O,onBlur:j,onMouseDown(X){k.current===X.target&&X.preventDefault()}},{typeSelectProps:H}=ZO({keyboardDelegate:n,selectionManager:t});m||(ee=Tn(H,ee));let le;g||(le=t.focusedKey==null?0:-1);let J=QO(t.collection);return{collectionProps:Tn(ee,{tabIndex:le,"data-collection":J})}}class Pk{getItemRect(t){let n=this.ref.current;if(!n)return null;let r=t!=null?Dg(this.ref,t):null;if(!r)return null;let i=n.getBoundingClientRect(),s=r.getBoundingClientRect();return{x:s.left-i.left+n.scrollLeft,y:s.top-i.top+n.scrollTop,width:s.width,height:s.height}}getContentSize(){let t=this.ref.current;var n,r;return{width:(n=t?.scrollWidth)!==null&&n!==void 0?n:0,height:(r=t?.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let t=this.ref.current;var n,r,i,s;return{x:(n=t?.scrollLeft)!==null&&n!==void 0?n:0,y:(r=t?.scrollTop)!==null&&r!==void 0?r:0,width:(i=t?.offsetWidth)!==null&&i!==void 0?i:0,height:(s=t?.offsetHeight)!==null&&s!==void 0?s:0}}constructor(t){this.ref=t}}class n6{isDisabled(t){var n;return this.disabledBehavior==="all"&&(((n=t.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(t.key))}findNextNonDisabled(t,n){let r=t;for(;r!=null;){let i=this.collection.getItem(r);if(i?.type==="item"&&!this.isDisabled(i))return r;r=n(r)}return null}getNextKey(t){let n=t;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,r=>this.collection.getKeyAfter(r))}getPreviousKey(t){let n=t;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,r=>this.collection.getKeyBefore(r))}findKey(t,n,r){let i=t,s=this.layoutDelegate.getItemRect(i);if(!s||i==null)return null;let a=s;do{if(i=n(i),i==null)break;s=this.layoutDelegate.getItemRect(i)}while(s&&r(a,s)&&i!=null);return i}isSameRow(t,n){return t.y===n.y||t.x!==n.x}isSameColumn(t,n){return t.x===n.x||t.y!==n.y}getKeyBelow(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(t)}getKeyAbove(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(t)}getNextColumn(t,n){return n?this.getPreviousKey(t):this.getNextKey(t)}getKeyRightOf(t){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="rtl"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="rtl"):null}getKeyLeftOf(t){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="ltr"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="ltr"):null}getFirstKey(){let t=this.collection.getFirstKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyAfter(n))}getLastKey(){let t=this.collection.getLastKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!qp(n))return this.getFirstKey();let i=t;if(this.orientation==="horizontal"){let s=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>s&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let s=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>s&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getFirstKey()}getKeyPageBelow(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!qp(n))return this.getLastKey();let i=t;if(this.orientation==="horizontal"){let s=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<s&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let s=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<s&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getLastKey()}getKeyForSearch(t,n){if(!this.collator)return null;let r=this.collection,i=n||this.getFirstKey();for(;i!=null;){let s=r.getItem(i);if(!s)return null;let a=s.textValue.slice(0,t.length);if(s.textValue&&this.collator.compare(a,t)===0)return i;i=this.getNextKey(i)}return null}constructor(...t){if(t.length===1){let n=t[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation||"vertical",this.direction=n.direction,this.layout=n.layout||"stack",this.layoutDelegate=n.layoutDelegate||new Pk(n.ref)}else this.collection=t[0],this.disabledKeys=t[1],this.ref=t[2],this.collator=t[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new Pk(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function r6(e){let{selectionManager:t,collection:n,disabledKeys:r,ref:i,keyboardDelegate:s,layoutDelegate:a}=e,c=OM({usage:"search",sensitivity:"base"}),d=t.disabledBehavior,h=S.useMemo(()=>s||new n6({collection:n,disabledKeys:r,disabledBehavior:d,ref:i,collator:c,layoutDelegate:a}),[s,a,n,r,i,c,d]),{collectionProps:m}=t6({...e,ref:i,selectionManager:t,keyboardDelegate:h});return{listProps:m}}function i6(e,t,n){let{listProps:r}=r6({...e,...t,allowsTabNavigation:!0,disallowSelectAll:!0,ref:n});return delete r.onKeyDownCapture,{accordionProps:{...r,tabIndex:void 0}}}function o6(e){var t,n;const r=fi(),{ref:i,as:s,item:a,onFocusChange:c}=e,{state:d,className:h,indicator:m,children:g,title:b,subtitle:x,startContent:k,motionProps:P,focusedKey:T,variant:_,isCompact:A=!1,classNames:M={},isDisabled:O=!1,hideIndicator:j=!1,disableAnimation:$=(t=r?.disableAnimation)!=null?t:!1,keepContentMounted:Y=!1,disableIndicatorAnimation:te=!1,HeadingComponent:ie=s||"h2",onPress:B,onPressStart:W,onPressEnd:G,onPressChange:ee,onPressUp:H,onClick:le,...J}=e,X=s||"div",V=typeof X=="string",ae=$i(i),D=d.disabledKeys.has(a.key)||O,U=d.selectionManager.isSelected(a.key),{buttonProps:oe,regionProps:z}=XO({item:a,isDisabled:D},{...d,focusedKey:T},ae),{onFocus:me,onBlur:Ce,...ye}=oe,{isFocused:Oe,isFocusVisible:Ne,focusProps:_e}=Pu({autoFocus:(n=a.props)==null?void 0:n.autoFocus}),{isHovered:Qe,hoverProps:at}=Eu({isDisabled:D}),{pressProps:Ie,isPressed:mt}=il({ref:ae,isDisabled:D,onPress:B,onPressStart:W,onPressEnd:G,onPressChange:ee,onPressUp:H}),pt=S.useCallback(()=>{c?.(!0,a.key)},[]),Kt=S.useCallback(()=>{c?.(!1,a.key)},[]),Ue=S.useMemo(()=>({...M}),[ds(M)]),it=S.useMemo(()=>KO({isCompact:A,isDisabled:D,hideIndicator:j,disableAnimation:$,disableIndicatorAnimation:te,variant:_}),[A,D,j,$,te,_]),Wt=Vt(Ue?.base,h),tr=S.useCallback((pe={})=>({"data-open":Ae(U),"data-disabled":Ae(D),"data-slot":"base",className:it.base({class:Wt}),...rn(Ef(J,{enabled:V}),pe)}),[Wt,V,J,it,a.props,U,D]),ln=(pe={})=>{var Se,ze;return{ref:ae,"data-open":Ae(U),"data-focus":Ae(Oe),"data-focus-visible":Ae(Ne),"data-disabled":Ae(D),"data-hover":Ae(Qe),"data-pressed":Ae(mt),"data-slot":"trigger",className:it.trigger({class:Ue?.trigger}),onFocus:p1(pt,me,_e.onFocus,J.onFocus,(Se=a.props)==null?void 0:Se.onFocus),onBlur:p1(Kt,Ce,_e.onBlur,J.onBlur,(ze=a.props)==null?void 0:ze.onBlur),...rn(ye,at,Ie,pe,{onClick:el(Ie.onClick,le)})}},_t=S.useCallback((pe={})=>({"data-open":Ae(U),"data-disabled":Ae(D),"data-slot":"content",className:it.content({class:Ue?.content}),...rn(z,pe)}),[it,Ue,z,U,D,Ue?.content]),Rt=S.useCallback((pe={})=>({"aria-hidden":Ae(!0),"data-open":Ae(U),"data-disabled":Ae(D),"data-slot":"indicator",className:it.indicator({class:Ue?.indicator}),...pe}),[it,Ue?.indicator,U,D,Ue?.indicator]),_n=S.useCallback((pe={})=>({"data-open":Ae(U),"data-disabled":Ae(D),"data-slot":"heading",className:it.heading({class:Ue?.heading}),...pe}),[it,Ue?.heading,U,D,Ue?.heading]),Er=S.useCallback((pe={})=>({"data-open":Ae(U),"data-disabled":Ae(D),"data-slot":"title",className:it.title({class:Ue?.title}),...pe}),[it,Ue?.title,U,D,Ue?.title]),Nt=S.useCallback((pe={})=>({"data-open":Ae(U),"data-disabled":Ae(D),"data-slot":"subtitle",className:it.subtitle({class:Ue?.subtitle}),...pe}),[it,Ue,U,D,Ue?.subtitle]);return{Component:X,HeadingComponent:ie,item:a,slots:it,classNames:Ue,domRef:ae,indicator:m,children:g,title:b,subtitle:x,startContent:k,isOpen:U,isDisabled:D,hideIndicator:j,keepContentMounted:Y,disableAnimation:$,motionProps:P,getBaseProps:tr,getHeadingProps:_n,getButtonProps:ln,getContentProps:_t,getIndicatorProps:Rt,getTitleProps:Er,getSubtitleProps:Nt}}var Tk=e=>R.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...e,children:R.jsx("path",{d:"M15.5 19l-7-7 7-7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})}),W_=e=>R.jsx("svg",{"aria-hidden":"true",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...e,children:R.jsx("path",{d:"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",fill:"currentColor"})}),s6=e=>{const{isSelected:t,isIndeterminate:n,disableAnimation:r,...i}=e;return R.jsx("svg",{"aria-hidden":"true",className:"fill-current",fill:"none",focusable:"false",height:"1em",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:"1em",...i,children:R.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})},Bp={ease:[.36,.66,.4,1]},ev={scaleSpring:{enter:{transform:"scale(1)",opacity:1,transition:{type:"spring",bounce:0,duration:.2}},exit:{transform:"scale(0.85)",opacity:0,transition:{type:"easeOut",duration:.15}}},scaleSpringOpacity:{initial:{opacity:0,transform:"scale(0.8)"},enter:{opacity:1,transform:"scale(1)",transition:{type:"spring",bounce:0,duration:.3}},exit:{opacity:0,transform:"scale(0.96)",transition:{type:"easeOut",bounce:0,duration:.15}}},fade:{enter:{opacity:1,transition:{duration:.4,ease:Bp.ease}},exit:{opacity:0,transition:{duration:.3,ease:Bp.ease}}},collapse:{enter:{opacity:1,height:"auto",transition:{height:{type:"spring",bounce:0,duration:.3},opacity:{easings:"ease",duration:.4}}},exit:{opacity:0,height:0,transition:{easings:"ease",duration:.3}}}},_k=()=>Br(()=>import("./index-BcnaGCUm.js"),[]).then(e=>e.default),H_=jr((e,t)=>{const{Component:n,HeadingComponent:r,classNames:i,slots:s,indicator:a,children:c,title:d,subtitle:h,startContent:m,isOpen:g,isDisabled:b,hideIndicator:x,keepContentMounted:k,disableAnimation:P,motionProps:T,getBaseProps:_,getHeadingProps:A,getButtonProps:M,getTitleProps:O,getSubtitleProps:j,getContentProps:$,getIndicatorProps:Y}=o6({...e,ref:t}),te=k5(),B=S.useMemo(()=>typeof a=="function"?a({indicator:R.jsx(Tk,{}),isOpen:g,isDisabled:b}):a||null,[a,g,b])||R.jsx(Tk,{}),W=S.useMemo(()=>{if(P)return k?R.jsx("div",{...$(),children:c}):g&&R.jsx("div",{...$(),children:c});const G={exit:{...ev.collapse.exit,overflowY:"hidden"},enter:{...ev.collapse.enter,overflowY:"unset"}};return k?R.jsx($f,{features:_k,children:R.jsx(Af.section,{animate:g?"enter":"exit",exit:"exit",initial:"exit",style:{willChange:te},variants:G,onKeyDown:ee=>{ee.stopPropagation()},...T,children:R.jsx("div",{...$(),children:c})},"accordion-content")}):R.jsx(ol,{initial:!1,children:g&&R.jsx($f,{features:_k,children:R.jsx(Af.section,{animate:"enter",exit:"exit",initial:"exit",style:{willChange:te},variants:G,onKeyDown:ee=>{ee.stopPropagation()},...T,children:R.jsx("div",{...$(),children:c})},"accordion-content")})})},[g,P,k,c,T]);return R.jsxs(n,{..._(),children:[R.jsx(r,{...A(),children:R.jsxs("button",{...M(),children:[m&&R.jsx("div",{className:s.startContent({class:i?.startContent}),children:m}),R.jsxs("div",{className:s.titleWrapper({class:i?.titleWrapper}),children:[d&&R.jsx("span",{...O(),children:d}),h&&R.jsx("span",{...j(),children:h})]}),!x&&B&&R.jsx("span",{...Y(),children:B})]})}),W]})});H_.displayName="HeroUI.AccordionItem";var a6=H_;class l6{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(t){let n=this.keyMap.get(t);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}constructor(t,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t,n=n||new Set;let r=c=>{if(this.keyMap.set(c.key,c),c.childNodes&&(c.type==="section"||n.has(c.key)))for(let d of c.childNodes)r(d)};for(let c of t)r(c);let i=null,s=0;for(let[c,d]of this.keyMap)i?(i.nextKey=c,d.prevKey=i.key):(this.firstKey=c,d.prevKey=void 0),d.type==="item"&&(d.index=s++),i=d,i.nextKey=void 0;var a;this.lastKey=(a=i?.key)!==null&&a!==void 0?a:null}}class Po extends Set{constructor(t,n,r){super(t),t instanceof Po?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function u6(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function c6(e){let{selectionMode:t="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:s="all"}=e,a=S.useRef(!1),[,c]=S.useState(!1),d=S.useRef(null),h=S.useRef(null),[,m]=S.useState(null),g=S.useMemo(()=>Ik(e.selectedKeys),[e.selectedKeys]),b=S.useMemo(()=>Ik(e.defaultSelectedKeys,new Po),[e.defaultSelectedKeys]),[x,k]=Au(g,b,e.onSelectionChange),P=S.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[T,_]=S.useState(i);i==="replace"&&T==="toggle"&&typeof x=="object"&&x.size===0&&_("replace");let A=S.useRef(i);return S.useEffect(()=>{i!==A.current&&(_(i),A.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:T,setSelectionBehavior:_,get isFocused(){return a.current},setFocused(M){a.current=M,c(M)},get focusedKey(){return d.current},get childFocusStrategy(){return h.current},setFocusedKey(M,O="first"){d.current=M,h.current=O,m(M)},selectedKeys:x,setSelectedKeys(M){(r||!u6(M,x))&&k(M)},disabledKeys:P,disabledBehavior:s}}function Ik(e,t){return e?e==="all"?"all":new Po(e):t}function G_(e){return null}G_.getCollectionNode=function*(t,n){let{childItems:r,title:i,children:s}=t,a=t.title||t.children,c=t.textValue||(typeof a=="string"?a:"")||t["aria-label"]||"";!c&&n?.suppressTextValueWarning,yield{type:"item",props:t,rendered:a,textValue:c,"aria-label":t["aria-label"],hasChildNodes:f6(t),*childNodes(){if(r)for(let d of r)yield{type:"item",value:d};else if(i){let d=[];He.Children.forEach(s,h=>{d.push({type:"item",element:h})}),yield*d}}}};function f6(e){return e.hasChildItems!=null?e.hasChildItems:!!(e.childItems||e.title&&He.Children.count(e.children)>0)}let d6=G_;class p6{build(t,n){return this.context=n,$k(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:n,items:r}=t;if(He.isValidElement(n)&&n.type===He.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let s of r)yield*this.getFullNode({value:s,index:i},{renderer:n}),i++}else{let i=[];He.Children.forEach(n,a=>{a&&i.push(a)});let s=0;for(let a of i){let c=this.getFullNode({element:a,index:s},{});for(let d of c)s++,yield d}}}getKey(t,n,r,i){if(t.key!=null)return t.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let s=n.value;if(s!=null){var a;let c=(a=s.key)!==null&&a!==void 0?a:s.id;if(c==null)throw new Error("No key found for item");return c}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(t,n){return{renderer:n.renderer||t.renderer}}*getFullNode(t,n,r,i){if(He.isValidElement(t.element)&&t.element.type===He.Fragment){let T=[];He.Children.forEach(t.element.props.children,A=>{T.push(A)});var s;let _=(s=t.index)!==null&&s!==void 0?s:0;for(const A of T)yield*this.getFullNode({element:A,index:_++},n,r,i);return}let a=t.element;if(!a&&t.value&&n&&n.renderer){let T=this.cache.get(t.value);if(T&&(!T.shouldInvalidate||!T.shouldInvalidate(this.context))){T.index=t.index,T.parentKey=i?i.key:null,yield T;return}a=n.renderer(t.value)}if(He.isValidElement(a)){let T=a.type;if(typeof T!="function"&&typeof T.getCollectionNode!="function"){let O=a.type;throw new Error(`Unknown element <${O}> in collection.`)}let _=T.getCollectionNode(a.props,this.context);var c;let A=(c=t.index)!==null&&c!==void 0?c:0,M=_.next();for(;!M.done&&M.value;){let O=M.value;t.index=A;var d;let j=(d=O.key)!==null&&d!==void 0?d:null;j==null&&(j=O.element?null:this.getKey(a,t,n,r));let Y=[...this.getFullNode({...O,key:j,index:A,wrapper:h6(t.wrapper,O.wrapper)},this.getChildState(n,O),r?`${r}${a.key}`:a.key,i)];for(let te of Y){var h,m;te.value=(m=(h=O.value)!==null&&h!==void 0?h:t.value)!==null&&m!==void 0?m:null,te.value&&this.cache.set(te.value,te);var g;if(t.type&&te.type!==t.type)throw new Error(`Unsupported type <${b0(te.type)}> in <${b0((g=i?.type)!==null&&g!==void 0?g:"unknown parent type")}>. Only <${b0(t.type)}> is supported.`);A++,yield te}M=_.next(Y)}return}if(t.key==null||t.type==null)return;let b=this;var x,k;let P={type:t.type,props:t.props,key:t.key,parentKey:i?i.key:null,value:(x=t.value)!==null&&x!==void 0?x:null,level:i?i.level+1:0,index:t.index,rendered:t.rendered,textValue:(k=t.textValue)!==null&&k!==void 0?k:"","aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes||!1,childNodes:$k(function*(){if(!t.hasChildNodes||!t.childNodes)return;let T=0;for(let _ of t.childNodes()){_.key!=null&&(_.key=`${P.key}${_.key}`);let A=b.getFullNode({..._,index:T},b.getChildState(n,_),P.key,P);for(let M of A)T++,yield M}})};yield P}constructor(){this.cache=new WeakMap}}function $k(e){let t=[],n=null;return{*[Symbol.iterator](){for(let r of t)yield r;n||(n=e());for(let r of n)t.push(r),yield r}}}function h6(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function b0(e){return e[0].toUpperCase()+e.slice(1)}function m6(e,t,n){let r=S.useMemo(()=>new p6,[]),{children:i,items:s,collection:a}=e;return S.useMemo(()=>{if(a)return a;let d=r.build({children:i,items:s},n);return t(d)},[r,i,s,a,n,t])}function g6(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function v6(e){return y6(e,0)}function y6(e,t){if(t<0)return;let n=0;for(let r of e){if(n===t)return r;n++}}function pq(e){let t;for(let n of e)t=n;return t}function x0(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...Ak(e,t),t],i=[...Ak(e,n),n],s=r.slice(0,i.length).findIndex((a,c)=>a!==i[c]);return s!==-1?(t=r[s],n=i[s],t.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===t)>=0,-1)}function Ak(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}class nw{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,n){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){if(this.state.selectionMode==="none")return!1;let n=this.getKey(t);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=t.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&x0(this.collection,i,t)<0)&&(t=i)}var n;return(n=t?.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&x0(this.collection,i,t)>0)&&(t=i)}var n;return(n=t?.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new Po([n],n,n);else{let a=this.state.selectedKeys;var i;let c=(i=a.anchorKey)!==null&&i!==void 0?i:n;r=new Po(a,c,n);var s;for(let d of this.getKeyRange(c,(s=a.currentKey)!==null&&s!==void 0?s:n))r.delete(d);for(let d of this.getKeyRange(n,c))this.canSelectItem(d)&&r.add(d)}this.state.setSelectedKeys(r)}getKeyRange(t,n){let r=this.collection.getItem(t),i=this.collection.getItem(n);return r&&i?x0(this.collection,r,i)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(t,n);let i=[],s=t;for(;s!=null;){let a=this.collection.getItem(s);if(a&&(a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&i.push(s),s===n)return i;s=this.collection.getKeyAfter(s)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r=new Po(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(t){if(this.selectionMode==="none")return;let n=this.getKey(t);if(n==null)return;let r=this.canSelectItem(n)?new Po([n],n,n):new Po;this.state.setSelectedKeys(r)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Po;for(let r of t){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let a=this.collection.getItem(r);a?.type==="item"&&t.push(r);var s;a?.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n((s=(i=v6(g6(a,this.collection)))===null||i===void 0?void 0:i.key)!==null&&s!==void 0?s:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Po)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let r of t)if(!n.has(r))return!1;for(let r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=this.collection.getItem(t);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(t){var n,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(t){var n;return(n=this.collection.getItem(t))===null||n===void 0?void 0:n.props}withCollection(t){return new nw(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(t,n,r){this.collection=t,this.state=n;var i;this.allowsCellSelection=(i=r?.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=r?.layoutDelegate||null}}function b6(e){let{onExpandedChange:t}=e,[n,r]=Au(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=c6(e),s=S.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),a=m6(e,S.useCallback(d=>new l6(d,{expandedKeys:n}),[n]),null);return S.useEffect(()=>{i.focusedKey!=null&&!a.getItem(i.focusedKey)&&i.setFocusedKey(null)},[a,i.focusedKey]),{collection:a,expandedKeys:n,disabledKeys:s,toggleKey:d=>{r(x6(n,d))},setExpandedKeys:r,selectionManager:new nw(a,i)}}function x6(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function w6(e){var t;const n=fi(),{ref:r,as:i,className:s,items:a,variant:c,motionProps:d,expandedKeys:h,disabledKeys:m,selectedKeys:g,children:b,defaultExpandedKeys:x,selectionMode:k="single",selectionBehavior:P="toggle",keepContentMounted:T=!1,disallowEmptySelection:_,defaultSelectedKeys:A,onExpandedChange:M,onSelectionChange:O,dividerProps:j={},isCompact:$=!1,isDisabled:Y=!1,showDivider:te=!0,hideIndicator:ie=!1,disableAnimation:B=(t=n?.disableAnimation)!=null?t:!1,disableIndicatorAnimation:W=!1,itemClasses:G,...ee}=e,[H,le]=S.useState(null),J=i||"div",X=typeof J=="string",V=$i(r),ae=S.useMemo(()=>UO({variant:c,className:s}),[c,s]),U={children:S.useMemo(()=>{let _e=[];return He.Children.map(b,Qe=>{var at;if(He.isValidElement(Qe)&&typeof((at=Qe.props)==null?void 0:at.children)!="string"){const Ie=He.cloneElement(Qe,{hasChildItems:!1});_e.push(Ie)}else _e.push(Qe)}),_e},[b]),items:a},oe={expandedKeys:h,defaultExpandedKeys:x,onExpandedChange:M},z={disabledKeys:m,selectedKeys:g,selectionMode:k,selectionBehavior:P,disallowEmptySelection:_,defaultSelectedKeys:A??x,onSelectionChange:O,...U,...oe},me=b6(z);me.selectionManager.setFocusedKey=_e=>{le(_e)};const{accordionProps:Ce}=i6({...U,...oe},me,V),ye=S.useMemo(()=>({state:me,focusedKey:H,motionProps:d,isCompact:$,isDisabled:Y,hideIndicator:ie,disableAnimation:B,keepContentMounted:T,disableIndicatorAnimation:W}),[H,$,Y,ie,g,B,T,me?.expandedKeys.values,W,me.expandedKeys.size,me.disabledKeys.size,d]),Oe=S.useCallback((_e={})=>({ref:V,className:ae,"data-orientation":"vertical",...rn(Ce,Ef(ee,{enabled:X}),_e)}),[]),Ne=S.useCallback((_e,Qe)=>{_e&&le(Qe)},[]);return{Component:J,values:ye,state:me,focusedKey:H,getBaseProps:Oe,isSplitted:c==="splitted",classNames:ae,showDivider:te,dividerProps:j,disableAnimation:B,handleFocusChanged:Ne,itemClasses:G}}function S6(e){let t=Ef(e,{enabled:typeof e.elementType=="string"}),n;return e.orientation==="vertical"&&(n="vertical"),e.elementType!=="hr"?{separatorProps:{...t,role:"separator","aria-orientation":n}}:{separatorProps:t}}function k6(e){const{as:t,className:n,orientation:r,...i}=e;let s=t||"hr";s==="hr"&&r==="vertical"&&(s="div");const{separatorProps:a}=S6({elementType:typeof s=="string"?s:"hr",orientation:r}),c=S.useMemo(()=>zO({orientation:r,className:n}),[r,n]),d=S.useCallback((h={})=>({className:c,role:"separator","data-orientation":r,...a,...i,...h}),[c,r,a,i]);return{Component:s,getDividerProps:d}}var q_=jr((e,t)=>{const{Component:n,getDividerProps:r}=k6({...e});return R.jsx(n,{ref:t,...r()})});q_.displayName="HeroUI.Divider";var C6=q_,Y_=jr((e,t)=>{const{Component:n,values:r,state:i,isSplitted:s,showDivider:a,getBaseProps:c,disableAnimation:d,handleFocusChanged:h,itemClasses:m,dividerProps:g}=w6({...e,ref:t}),b=S.useCallback((k,P)=>h(k,P),[h]),x=S.useMemo(()=>[...i.collection].map((k,P)=>{const T={...m,...k.props.classNames||{}};return R.jsxs(S.Fragment,{children:[R.jsx(a6,{item:k,variant:e.variant,onFocusChange:b,...r,...k.props,classNames:T}),!k.props.hidden&&!s&&a&&P<i.collection.size-1&&R.jsx(C6,{...g})]},k.key)}),[r,m,b,s,a,i.collection]);return R.jsx(n,{...c(),children:d?x:R.jsx(K3,{children:x})})});Y_.displayName="HeroUI.Accordion";var Rk=Y_,E6=e=>{const t={top:{originY:1},bottom:{originY:0},left:{originX:1},right:{originX:0},"top-start":{originX:0,originY:1},"top-end":{originX:1,originY:1},"bottom-start":{originX:0,originY:0},"bottom-end":{originX:1,originY:0},"right-start":{originX:0,originY:0},"right-end":{originX:0,originY:1},"left-start":{originX:1,originY:0},"left-end":{originX:1,originY:1}};return t?.[e]||{}},P6=e=>({top:"top",bottom:"bottom",left:"left",right:"right","top-start":"top start","top-end":"top end","bottom-start":"bottom start","bottom-end":"bottom end","left-start":"left top","left-end":"left bottom","right-start":"right top","right-end":"right bottom"})[e],hq=(e,t)=>{if(t.includes("-")){const[n]=t.split("-");if(n.includes(e))return!1}return!0},Lk=(e,t)=>{if(t.includes("-")){const[,n]=t.split("-");return`${e}-${n}`}return e},T6=d6,bp=T6,Sh=globalThis?.document?S.useLayoutEffect:S.useEffect;function _6(e={}){const{onLoad:t,onError:n,ignoreFallback:r,src:i,crossOrigin:s,srcSet:a,sizes:c,loading:d,shouldBypassImageLoad:h=!1}=e,m=IL(),g=S.useRef(m?new Image:null),[b,x]=S.useState("pending");S.useEffect(()=>{g.current&&(g.current.onload=T=>{k(),x("loaded"),t?.(T)},g.current.onerror=T=>{k(),x("failed"),n?.(T)})},[g.current]);const k=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)},P=S.useCallback(()=>{if(!i)return"pending";if(r||h)return"loaded";const T=new Image;return T.src=i,s&&(T.crossOrigin=s),a&&(T.srcset=a),c&&(T.sizes=c),d&&(T.loading=d),g.current=T,T.complete&&T.naturalWidth?"loaded":"loading"},[i,s,a,c,t,n,d,h]);return Sh(()=>{m&&x(P())},[m,P]),r?"loaded":b}var[mq,I6]=mv({name:"ButtonGroupContext",strict:!1});function X_(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:s,onPressEnd:a,onPressUp:c,onPressChange:d,preventFocusOnPress:h,allowFocusWhenDisabled:m,onClick:g,href:b,target:x,rel:k,type:P="button",allowTextSelectionOnPress:T}=e,_;n==="button"?_={type:P,disabled:r}:_={role:"button",href:n==="a"&&!r?b:void 0,target:n==="a"?x:void 0,type:n==="input"?P:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?k:void 0};let{pressProps:A,isPressed:M}=il({onClick:g,onPressStart:s,onPressEnd:a,onPressUp:c,onPressChange:d,onPress:i,isDisabled:r,preventFocusOnPress:h,allowTextSelectionOnPress:T,ref:t}),{focusableProps:O}=xh(e,t);m&&(O.tabIndex=r?-1:O.tabIndex);let j=Tn(O,A,$u(e,{labelable:!0}));return{isPressed:M,buttonProps:Tn(_,j,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}var $6=()=>Br(()=>import("./index-BcnaGCUm.js"),[]).then(e=>e.default),Q_=e=>{const{ripples:t=[],motionProps:n,color:r="currentColor",style:i,onClear:s}=e;return R.jsx(R.Fragment,{children:t.map(a=>{const c=CL(.01*a.size,.2,a.size>100?.75:.5);return R.jsx($f,{features:$6,children:R.jsx(ol,{mode:"popLayout",children:R.jsx(Af.span,{animate:{transform:"scale(2)",opacity:0},className:"heroui-ripple",exit:{opacity:0},initial:{transform:"scale(0)",opacity:.35},style:{position:"absolute",backgroundColor:r,borderRadius:"100%",transformOrigin:"center",pointerEvents:"none",overflow:"hidden",inset:0,zIndex:0,top:a.y,left:a.x,width:`${a.size}px`,height:`${a.size}px`,...i},transition:{duration:c},onAnimationComplete:()=>{s(a.key)},...n})})},a.key)})})};Q_.displayName="HeroUI.Ripple";var A6=Q_;function R6(e={}){const[t,n]=S.useState([]),r=S.useCallback(s=>{const a=s.target,c=Math.max(a.clientWidth,a.clientHeight);n(d=>[...d,{key:kL(d.length.toString()),size:c,x:s.x-c/2,y:s.y-c/2}])},[]),i=S.useCallback(s=>{n(a=>a.filter(c=>c.key!==s))},[]);return{ripples:t,onClear:i,onPress:r,...e}}function L6(e){var t,n,r,i,s,a,c,d,h;const m=I6(),g=fi(),b=!!m,{ref:x,as:k,children:P,startContent:T,endContent:_,autoFocus:A,className:M,spinner:O,isLoading:j=!1,disableRipple:$=!1,fullWidth:Y=(t=m?.fullWidth)!=null?t:!1,radius:te=m?.radius,size:ie=(n=m?.size)!=null?n:"md",color:B=(r=m?.color)!=null?r:"default",variant:W=(i=m?.variant)!=null?i:"solid",disableAnimation:G=(a=(s=m?.disableAnimation)!=null?s:g?.disableAnimation)!=null?a:!1,isDisabled:ee=(c=m?.isDisabled)!=null?c:!1,isIconOnly:H=(d=m?.isIconOnly)!=null?d:!1,spinnerPlacement:le="start",onPress:J,onClick:X,...V}=e,ae=k||"button",D=typeof ae=="string",U=$i(x),oe=(h=$||g?.disableRipple)!=null?h:G,{isFocusVisible:z,isFocused:me,focusProps:Ce}=Pu({autoFocus:A}),ye=ee||j,Oe=S.useMemo(()=>BO({size:ie,color:B,variant:W,radius:te,fullWidth:Y,isDisabled:ye,isInGroup:b,disableAnimation:G,isIconOnly:H,className:M}),[ie,B,W,te,Y,ye,b,H,G,M]),{onPress:Ne,onClear:_e,ripples:Qe}=R6(),at=S.useCallback(Rt=>{oe||ye||G||U.current&&Ne(Rt)},[oe,ye,G,U,Ne]),{buttonProps:Ie,isPressed:mt}=X_({elementType:k,isDisabled:ye,onPress:el(J,at),onClick:X,...V},U),{isHovered:pt,hoverProps:Kt}=Eu({isDisabled:ye}),Ue=S.useCallback((Rt={})=>({"data-disabled":Ae(ye),"data-focus":Ae(me),"data-pressed":Ae(mt),"data-focus-visible":Ae(z),"data-hover":Ae(pt),"data-loading":Ae(j),...rn(Ie,Ce,Kt,Ef(V,{enabled:D}),Ef(Rt)),className:Oe}),[j,ye,me,mt,D,z,pt,Ie,Ce,Kt,V,Oe]),it=Rt=>S.isValidElement(Rt)?S.cloneElement(Rt,{"aria-hidden":!0,focusable:!1}):null,Wt=it(T),tr=it(_),ln=S.useMemo(()=>({sm:"sm",md:"sm",lg:"md"})[ie],[ie]),_t=S.useCallback(()=>({ripples:Qe,onClear:_e}),[Qe,_e]);return{Component:ae,children:P,domRef:U,spinner:O,styles:Oe,startContent:Wt,endContent:tr,isLoading:j,spinnerPlacement:le,spinnerSize:ln,disableRipple:oe,getButtonProps:Ue,getRippleProps:_t,isIconOnly:H}}function M6(e){var t,n;const[r,i]=ia(e,mk.variantKeys),s=fi(),a=(n=(t=e?.variant)!=null?t:s?.spinnerVariant)!=null?n:"default",{children:c,className:d,classNames:h,label:m,...g}=r,b=S.useMemo(()=>mk({...i}),[ds(i)]),x=Vt(h?.base,d),k=m||c,P=S.useMemo(()=>k&&typeof k=="string"?k:g["aria-label"]?"":"Loading",[c,k,g["aria-label"]]),T=S.useCallback(()=>({"aria-label":P,className:b.base({class:x}),...g}),[P,b,x,g]);return{label:k,slots:b,classNames:h,variant:a,getSpinnerProps:T}}var J_=jr((e,t)=>{const{slots:n,classNames:r,label:i,variant:s,getSpinnerProps:a}=M6({...e});return s==="wave"||s==="dots"?R.jsxs("div",{ref:t,...a(),children:[R.jsx("div",{className:n.wrapper({class:r?.wrapper}),children:[...new Array(3)].map((c,d)=>R.jsx("i",{className:n.dots({class:r?.dots}),style:{"--dot-index":d}},`dot-${d}`))}),i&&R.jsx("span",{className:n.label({class:r?.label}),children:i})]}):s==="simple"?R.jsxs("div",{ref:t,...a(),children:[R.jsxs("svg",{className:n.wrapper({class:r?.wrapper}),fill:"none",viewBox:"0 0 24 24",children:[R.jsx("circle",{className:n.circle1({class:r?.circle1}),cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),R.jsx("path",{className:n.circle2({class:r?.circle2}),d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",fill:"currentColor"})]}),i&&R.jsx("span",{className:n.label({class:r?.label}),children:i})]}):s==="spinner"?R.jsxs("div",{ref:t,...a(),children:[R.jsx("div",{className:n.wrapper({class:r?.wrapper}),children:[...new Array(12)].map((c,d)=>R.jsx("i",{className:n.spinnerBars({class:r?.spinnerBars}),style:{"--bar-index":d}},`star-${d}`))}),i&&R.jsx("span",{className:n.label({class:r?.label}),children:i})]}):R.jsxs("div",{ref:t,...a(),children:[R.jsxs("div",{className:n.wrapper({class:r?.wrapper}),children:[R.jsx("i",{className:n.circle1({class:r?.circle1})}),R.jsx("i",{className:n.circle2({class:r?.circle2})})]}),i&&R.jsx("span",{className:n.label({class:r?.label}),children:i})]})});J_.displayName="HeroUI.Spinner";var D6=J_,Z_=jr((e,t)=>{const{Component:n,domRef:r,children:i,spinnerSize:s,spinner:a=R.jsx(D6,{color:"current",size:s}),spinnerPlacement:c,startContent:d,endContent:h,isLoading:m,disableRipple:g,getButtonProps:b,getRippleProps:x,isIconOnly:k}=L6({...e,ref:t});return R.jsxs(n,{ref:r,...b(),children:[d,m&&c==="start"&&a,m&&k?null:i,m&&c==="end"&&a,h,!g&&R.jsx(A6,{...x()})]})});Z_.displayName="HeroUI.Button";var wr=Z_;function N6(e){const[t,n]=ia(e,kk.variantKeys),{ref:r,as:i,children:s,avatar:a,startContent:c,endContent:d,onClose:h,classNames:m,className:g,...b}=t,x=i||"div",k=$i(r),P=Vt(m?.base,g),T=!!h,_=e.variant==="dot",{focusProps:A,isFocusVisible:M}=Pu(),O=S.useMemo(()=>typeof s=="string"&&s?.length===1,[s]),j=S.useMemo(()=>!!a||!!c,[a,c]),$=S.useMemo(()=>!!d||T,[d,T]),Y=S.useMemo(()=>kk({...n,hasStartContent:j,hasEndContent:$,isOneChar:O,isCloseable:T,isCloseButtonFocusVisible:M}),[ds(n),M,j,$,O,T]),{pressProps:te}=il({isDisabled:!!e?.isDisabled,onPress:h}),ie=()=>({ref:k,className:Y.base({class:P}),...b}),B=()=>({role:"button",tabIndex:0,className:Y.closeButton({class:m?.closeButton}),"aria-label":"close chip",...rn(te,A)}),W=ee=>S.isValidElement(ee)?S.cloneElement(ee,{className:Y.avatar({class:m?.avatar})}):null,G=ee=>S.isValidElement(ee)?S.cloneElement(ee,{className:Vt("max-h-[80%]",ee.props.className)}):null;return{Component:x,children:s,slots:Y,classNames:m,isDot:_,isCloseable:T,startContent:W(a)||G(c),endContent:G(d),getCloseButtonProps:B,getChipProps:ie}}var e2=jr((e,t)=>{const{Component:n,children:r,slots:i,classNames:s,isDot:a,isCloseable:c,startContent:d,endContent:h,getCloseButtonProps:m,getChipProps:g}=N6({...e,ref:t}),b=S.useMemo(()=>a&&!d?R.jsx("span",{className:i.dot({class:s?.dot})}):d,[i,d,a]),x=S.useMemo(()=>c?R.jsx("span",{...m(),children:h||R.jsx(W_,{})}):h,[h,c,m]);return R.jsxs(n,{...g(),children:[b,R.jsx("span",{className:i.content({class:s?.content}),children:r}),x]})});e2.displayName="HeroUI.Chip";var Sg=e2;const t2={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},n2={...t2,customError:!0,valid:!1},df={isInvalid:!1,validationDetails:t2,validationErrors:[]},r2=S.createContext({}),tv="__formValidationState"+Date.now();function rw(e){if(e[tv]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:s}=e[tv];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:s}}return F6(e)}function F6(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:s,validate:a,validationBehavior:c="aria"}=e;n&&(t||(t=n==="invalid"));let d=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:n2}:null,h=S.useMemo(()=>{if(!a||i==null)return null;let B=O6(a,i);return Mk(B)},[a,i]);s?.validationDetails.valid&&(s=void 0);let m=S.useContext(r2),g=S.useMemo(()=>r?Array.isArray(r)?r.flatMap(B=>Mb(m[B])):Mb(m[r]):[],[m,r]),[b,x]=S.useState(m),[k,P]=S.useState(!1);m!==b&&(x(m),P(!1));let T=S.useMemo(()=>Mk(k?[]:g),[k,g]),_=S.useRef(df),[A,M]=S.useState(df),O=S.useRef(df),j=()=>{if(!$)return;Y(!1);let B=h||s||_.current;w0(B,O.current)||(O.current=B,M(B))},[$,Y]=S.useState(!1);return S.useEffect(j),{realtimeValidation:d||T||h||s||df,displayValidation:c==="native"?d||T||A:d||T||h||s||A,updateValidation(B){c==="aria"&&!w0(A,B)?M(B):_.current=B},resetValidation(){let B=df;w0(B,O.current)||(O.current=B,M(B)),c==="native"&&Y(!1),P(!0)},commitValidation(){c==="native"&&Y(!0),P(!0)}}}function Mb(e){return e?Array.isArray(e)?e:[e]:[]}function O6(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return Mb(n)}return[]}function Mk(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:n2}:null}function w0(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function i2(e,t,n){let{validationBehavior:r,focus:i}=e;an(()=>{if(r==="native"&&n?.current&&!n.current.disabled){let d=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(d),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(j6(n.current))}});let s=Bn(()=>{t.resetValidation()}),a=Bn(d=>{var h;t.displayValidation.isInvalid||t.commitValidation();let m=n==null||(h=n.current)===null||h===void 0?void 0:h.form;if(!d.defaultPrevented&&n&&m&&B6(m)===n.current){var g;i?i():(g=n.current)===null||g===void 0||g.focus(),Y5("keyboard")}d.preventDefault()}),c=Bn(()=>{t.commitValidation()});S.useEffect(()=>{let d=n?.current;if(!d)return;let h=d.form;return d.addEventListener("invalid",a),d.addEventListener("change",c),h?.addEventListener("reset",s),()=>{d.removeEventListener("invalid",a),d.removeEventListener("change",c),h?.removeEventListener("reset",s)}},[n,a,c,s,r])}function z6(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function j6(e){return{isInvalid:!e.validity.valid,validationDetails:z6(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function B6(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}function V6(e,t,n){let{isDisabled:r=!1,isReadOnly:i=!1,value:s,name:a,children:c,"aria-label":d,"aria-labelledby":h,validationState:m="valid",isInvalid:g}=e,b=O=>{O.stopPropagation(),t.setSelected(O.target.checked)},{pressProps:x,isPressed:k}=il({isDisabled:r}),{pressProps:P,isPressed:T}=il({onPress(){var O;t.toggle(),(O=n.current)===null||O===void 0||O.focus()},isDisabled:r||i}),{focusableProps:_}=xh(e,n),A=Tn(x,_),M=$u(e,{labelable:!0});return WE(n,t.isSelected,t.setSelected),{labelProps:Tn(P,{onClick:O=>O.preventDefault()}),inputProps:Tn(M,{"aria-invalid":g||m==="invalid"||void 0,"aria-errormessage":e["aria-errormessage"],"aria-controls":e["aria-controls"],"aria-readonly":i||void 0,onChange:b,disabled:r,...s==null?{}:{value:s},name:a,type:"checkbox",...A}),isSelected:t.isSelected,isPressed:k||T,isDisabled:r,isReadOnly:i,isInvalid:g||m==="invalid"}}function o2(e,t,n){let r=rw({...e,value:t.isSelected}),{isInvalid:i,validationErrors:s,validationDetails:a}=r.displayValidation,{labelProps:c,inputProps:d,isSelected:h,isPressed:m,isDisabled:g,isReadOnly:b}=V6({...e,isInvalid:i},t,n);i2(e,r,n);let{isIndeterminate:x,isRequired:k,validationBehavior:P="aria"}=e;S.useEffect(()=>{n.current&&(n.current.indeterminate=!!x)});let{pressProps:T}=il({isDisabled:g||b,onPress(){let{[tv]:_}=e,{commitValidation:A}=_||r;A()}});return{labelProps:Tn(c,T),inputProps:{...d,checked:h,"aria-required":k&&P==="aria"||void 0,required:k&&P==="native"},isSelected:h,isPressed:m,isDisabled:g,isReadOnly:b,isInvalid:i,validationErrors:s,validationDetails:a}}const U6=new WeakMap;function s2(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:s="label"}=e;t=Pf(t);let a=Pf(),c={};n&&(r=r?`${a} ${r}`:a,c={id:a,htmlFor:s==="label"?t:void 0});let d=jE({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:c,fieldProps:d}}function K6(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:s,fieldProps:a}=s2(e),c=Y0([!!t,!!n,r,i]),d=Y0([!!t,!!n,r,i]);return a=Tn(a,{"aria-describedby":[c,d,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:s,fieldProps:a,descriptionProps:{id:c},errorMessageProps:{id:d}}}function a2(e={}){let{isReadOnly:t}=e,[n,r]=Au(e.isSelected,e.defaultSelected||!1,e.onChange);function i(a){t||r(a)}function s(){t||r(!n)}return{isSelected:n,setSelected:i,toggle:s}}function W6(e,t,n){const r=a2({isReadOnly:e.isReadOnly||t.isReadOnly,isSelected:t.isSelected(e.value),onChange(T){T?t.addValue(e.value):t.removeValue(e.value),e.onChange&&e.onChange(T)}});let{name:i,descriptionId:s,errorMessageId:a,validationBehavior:c}=U6.get(t);var d;c=(d=e.validationBehavior)!==null&&d!==void 0?d:c;let{realtimeValidation:h}=rw({...e,value:r.isSelected,name:void 0,validationBehavior:"aria"}),m=S.useRef(df),g=()=>{t.setInvalid(e.value,h.isInvalid?h:m.current)};S.useEffect(g);let b=t.realtimeValidation.isInvalid?t.realtimeValidation:h,x=c==="native"?t.displayValidation:b;var k;let P=o2({...e,isReadOnly:e.isReadOnly||t.isReadOnly,isDisabled:e.isDisabled||t.isDisabled,name:e.name||i,isRequired:(k=e.isRequired)!==null&&k!==void 0?k:t.isRequired,validationBehavior:c,[tv]:{realtimeValidation:b,displayValidation:x,resetValidation:t.resetValidation,commitValidation:t.commitValidation,updateValidation(T){m.current=T,g()}}},r,n);return{...P,inputProps:{...P.inputProps,"aria-describedby":[e["aria-describedby"],t.isInvalid?a:null,s].filter(Boolean).join(" ")||void 0}}}var Dk=Symbol("default");function H6(e){const t=S.useRef(null),n=S.useRef(void 0),r=S.useCallback(i=>{if(typeof e=="function"){const s=e,a=s(i);return()=>{typeof a=="function"?a():s(null)}}else if(e)return e.current=i,()=>{e.current=null}},[e]);return S.useMemo(()=>({get current(){return t.current},set current(i){t.current=i,n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=r(i))}}),[r])}function iw(e,t){let n=S.useContext(e);if(t===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=new Intl.ListFormat().format(Object.keys(n.slots).map(s=>`"${s}"`));if(!t&&!n.slots[Dk])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let i=t||Dk;if(!n.slots[i])throw new Error(`Invalid slot "${t}". Valid slot names are ${r}.`);return n.slots[i]}return n}function G6(e,t,n){let r=iw(n,e.slot)||{},{ref:i,...s}=r,a=H6(S.useMemo(()=>EE(t,i),[t,i])),c=rn(s,e);return"style"in s&&s.style&&"style"in e&&e.style&&(typeof s.style=="function"||typeof e.style=="function"?c.style=d=>{let h=typeof s.style=="function"?s.style(d):s.style,m={...d.defaultStyle,...h},g=typeof e.style=="function"?e.style({...d,defaultStyle:m}):e.style;return{...m,...g}}:c.style={...s.style,...e.style}),[c,a]}var nv=S.createContext(null),q6=S.forwardRef(function(t,n){[t,n]=G6(t,n,nv);let{validationErrors:r,validationBehavior:i="native",children:s,className:a,...c}=t;const d=S.useMemo(()=>jO({className:a}),[a]);return R.jsx("form",{noValidate:i!=="native",...c,ref:n,className:d,children:R.jsx(nv.Provider,{value:{...t,validationBehavior:i},children:R.jsx(r2.Provider,{value:r??{},children:s})})})}),Y6=S.forwardRef(function(t,n){var r,i;const s=fi(),a=(i=(r=t.validationBehavior)!=null?r:s?.validationBehavior)!=null?i:"native";return R.jsx(q6,{...t,ref:n,validationBehavior:a})}),[gq,X6]=mv({name:"CheckboxGroupContext",strict:!1});function Q6(e){const{isSelected:t,disableAnimation:n,...r}=e;return R.jsx("svg",{"aria-hidden":"true",fill:"none",role:"presentation",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:t?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,style:!n&&t?{transition:"stroke-dashoffset 250ms linear 0.2s"}:{},viewBox:"0 0 17 18",...r,children:R.jsx("polyline",{points:"1 9 7 14 15 4"})})}function J6(e){const{isSelected:t,disableAnimation:n,...r}=e;return R.jsx("svg",{stroke:"currentColor",strokeWidth:3,viewBox:"0 0 24 24",...r,children:R.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function Z6(e){const{isIndeterminate:t,...n}=e,r=t?J6:Q6;return R.jsx(r,{...n})}function Db(e,t=[]){const n=S.useRef(e);return Sh(()=>{n.current=e}),S.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function ez(e={}){var t,n,r,i,s,a,c,d;const h=fi(),m=X6(),{validationBehavior:g}=iw(nv)||{},b=!!m,{as:x,ref:k,value:P="",children:T,icon:_,name:A,isRequired:M,isReadOnly:O=!1,autoFocus:j=!1,isSelected:$,size:Y=(t=m?.size)!=null?t:"md",color:te=(n=m?.color)!=null?n:"primary",radius:ie=m?.radius,lineThrough:B=(r=m?.lineThrough)!=null?r:!1,isDisabled:W=(i=m?.isDisabled)!=null?i:!1,disableAnimation:G=(a=(s=m?.disableAnimation)!=null?s:h?.disableAnimation)!=null?a:!1,validationState:ee,isInvalid:H=ee?ee==="invalid":(c=m?.isInvalid)!=null?c:!1,isIndeterminate:le=!1,validationBehavior:J=b?m.validationBehavior:(d=g??h?.validationBehavior)!=null?d:"native",defaultSelected:X,classNames:V,className:ae,onValueChange:D,validate:U,...oe}=e,z=x||"label",me=S.useRef(null),Ce=S.useRef(null);let ye=e.onChange;b&&(ye=el(()=>{m.groupState.resetValidation()},ye));const Oe=S.useId(),Ne=S.useMemo(()=>({name:A,value:P,children:T,autoFocus:j,defaultSelected:X,isIndeterminate:le,isRequired:M,isInvalid:H,isSelected:$,isDisabled:W,isReadOnly:O,"aria-label":CE(oe["aria-label"],T),"aria-labelledby":oe["aria-labelledby"]||Oe,onChange:D}),[A,P,T,j,X,le,M,H,$,W,O,oe["aria-label"],oe["aria-labelledby"],Oe,D]),_e=a2(Ne),Qe={isInvalid:H,isRequired:M,validate:U,validationState:ee,validationBehavior:J},{inputProps:at,isSelected:Ie,isDisabled:mt,isReadOnly:pt,isPressed:Kt,isInvalid:Ue}=b?W6({...Ne,...Qe},m.groupState,Ce):o2({...Ne,...Qe},_e,Ce),it=mt||pt,Wt=ee==="invalid"||H||Ue,tr=it?!1:Kt,{hoverProps:ln,isHovered:_t}=Eu({isDisabled:at.disabled}),{focusProps:Rt,isFocused:_n,isFocusVisible:Er}=Pu({autoFocus:at.autoFocus}),Nt=S.useMemo(()=>VO({color:te,size:Y,radius:ie,isInvalid:Wt,lineThrough:B,isDisabled:mt,disableAnimation:G}),[te,Y,ie,Wt,B,mt,G]);Sh(()=>{if(!Ce.current)return;const Pt=!!Ce.current.checked;_e.setSelected(Pt)},[Ce.current]);const pe=Db(ye),Se=S.useCallback(Pt=>{if(pt||mt){Pt.preventDefault();return}pe?.(Pt)},[pt,mt,pe]),ze=Vt(V?.base,ae),nt=S.useCallback(()=>({ref:me,className:Nt.base({class:ze}),"data-disabled":Ae(mt),"data-selected":Ae(Ie||le),"data-invalid":Ae(Wt),"data-hover":Ae(_t),"data-focus":Ae(_n),"data-pressed":Ae(tr),"data-readonly":Ae(at.readOnly),"data-focus-visible":Ae(Er),"data-indeterminate":Ae(le),...rn(ln,oe)}),[Nt,ze,mt,Ie,le,Wt,_t,_n,tr,at.readOnly,Er,ln,oe]),lt=S.useCallback((Pt={})=>({...Pt,"aria-hidden":!0,className:Vt(Nt.wrapper({class:Vt(V?.wrapper,Pt?.className)}))}),[Nt,V?.wrapper]),Ht=S.useCallback(()=>({ref:PE(Ce,k),...rn(at,Rt),className:Nt.hiddenInput({class:V?.hiddenInput}),onChange:el(at.onChange,Se)}),[at,Rt,Se,V?.hiddenInput]),Vn=S.useCallback(()=>({id:Oe,className:Nt.label({class:V?.label})}),[Nt,V?.label,mt,Ie,Wt]),Zt=S.useCallback(()=>({isSelected:Ie,isIndeterminate:le,disableAnimation:G,className:Nt.icon({class:V?.icon})}),[Nt,V?.icon,Ie,le,G]);return{Component:z,icon:_,children:T,isSelected:Ie,isDisabled:mt,isInvalid:Wt,isFocused:_n,isHovered:_t,isFocusVisible:Er,getBaseProps:nt,getWrapperProps:lt,getInputProps:Ht,getLabelProps:Vn,getIconProps:Zt}}var l2=jr((e,t)=>{const{Component:n,children:r,icon:i=R.jsx(Z6,{}),getBaseProps:s,getWrapperProps:a,getInputProps:c,getIconProps:d,getLabelProps:h}=ez({...e,ref:t}),m=typeof i=="function"?i(d()):S.cloneElement(i,d());return R.jsxs(n,{...s(),children:[R.jsx("input",{...c()}),R.jsx("span",{...a(),children:m}),r&&R.jsx("span",{...h(),children:r})]})});l2.displayName="HeroUI.Checkbox";var u2=l2;function c2(e){let[t,n]=Au(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const r=S.useCallback(()=>{n(!0)},[n]),i=S.useCallback(()=>{n(!1)},[n]),s=S.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:i,toggle:s}}const tz=1500,Nk=500;let cu={},nz=0,xp=!1,Gs=null,fu=null;function rz(e={}){let{delay:t=tz,closeDelay:n=Nk}=e,{isOpen:r,open:i,close:s}=c2(e),a=S.useMemo(()=>`${++nz}`,[]),c=S.useRef(null),d=S.useRef(s),h=()=>{cu[a]=b},m=()=>{for(let k in cu)k!==a&&(cu[k](!0),delete cu[k])},g=()=>{c.current&&clearTimeout(c.current),c.current=null,m(),h(),xp=!0,i(),Gs&&(clearTimeout(Gs),Gs=null),fu&&(clearTimeout(fu),fu=null)},b=k=>{k||n<=0?(c.current&&clearTimeout(c.current),c.current=null,d.current()):c.current||(c.current=setTimeout(()=>{c.current=null,d.current()},n)),Gs&&(clearTimeout(Gs),Gs=null),xp&&(fu&&clearTimeout(fu),fu=setTimeout(()=>{delete cu[a],fu=null,xp=!1},Math.max(Nk,n)))},x=()=>{m(),h(),!r&&!Gs&&!xp?Gs=setTimeout(()=>{Gs=null,xp=!0,g()},t):r||g()};return S.useEffect(()=>{d.current=s},[s]),S.useEffect(()=>()=>{c.current&&clearTimeout(c.current),cu[a]&&delete cu[a]},[a]),{isOpen:r,open:k=>{!k&&t>0&&!c.current?x():g()},close:b}}function iz(e,t){let n=$u(e,{labelable:!0}),{hoverProps:r}=Eu({onHoverStart:()=>t?.open(!0),onHoverEnd:()=>t?.close()});return{tooltipProps:Tn(n,r,{role:"tooltip"})}}function oz(e,t,n){let{isDisabled:r,trigger:i}=e,s=Pf(),a=S.useRef(!1),c=S.useRef(!1),d=()=>{(a.current||c.current)&&t.open(c.current)},h=_=>{!a.current&&!c.current&&t.close(_)};S.useEffect(()=>{let _=A=>{n&&n.current&&A.key==="Escape"&&(A.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener("keydown",_,!0),()=>{document.removeEventListener("keydown",_,!0)}},[n,t]);let m=()=>{i!=="focus"&&(oh()==="pointer"?a.current=!0:a.current=!1,d())},g=()=>{i!=="focus"&&(c.current=!1,a.current=!1,h())},b=()=>{c.current=!1,a.current=!1,h(!0)},x=()=>{Jx()&&(c.current=!0,d())},k=()=>{c.current=!1,a.current=!1,h(!0)},{hoverProps:P}=Eu({isDisabled:r,onHoverStart:m,onHoverEnd:g}),{focusableProps:T}=xh({isDisabled:r,onFocus:x,onBlur:k},n);return{triggerProps:{"aria-describedby":t.isOpen?s:void 0,...Tn(T,P,{onPointerDown:b,onKeyDown:b,tabIndex:void 0})},tooltipProps:{id:s}}}var qs=[];function f2(e,t){const{disableOutsideEvents:n=!0,isDismissable:r=!1,isKeyboardDismissDisabled:i=!1,isOpen:s,onClose:a,shouldCloseOnBlur:c,shouldCloseOnInteractOutside:d}=e;S.useEffect(()=>(s&&qs.push(t),()=>{const P=qs.indexOf(t);P>=0&&qs.splice(P,1)}),[s,t]);const h=()=>{qs[qs.length-1]===t&&a&&a()},m=P=>{(!d||d(P.target))&&(qs[qs.length-1]===t&&n&&(P.stopPropagation(),P.preventDefault()),P.pointerType!=="touch"&&h())},g=P=>{P.pointerType==="touch"&&(!d||d(P.target))&&(qs[qs.length-1]===t&&n&&(P.stopPropagation(),P.preventDefault()),h())},b=P=>{P.key==="Escape"&&!i&&!P.nativeEvent.isComposing&&(P.stopPropagation(),P.preventDefault(),h())};oF({isDisabled:!(r&&s),onInteractOutside:r&&s?g:void 0,onInteractOutsideStart:m,ref:t});const{focusWithinProps:x}=Ev({isDisabled:!c,onBlurWithin:P=>{!P.relatedTarget||uF(P.relatedTarget)||(!d||d(P.relatedTarget))&&h()}}),k=P=>{P.target===P.currentTarget&&P.preventDefault()};return{overlayProps:{onKeyDown:b,...x},underlayProps:{onPointerDown:k}}}function sz(e){var t,n;const r=fi(),[i,s]=ia(e,gk.variantKeys),{ref:a,as:c,isOpen:d,content:h,children:m,defaultOpen:g,onOpenChange:b,isDisabled:x,trigger:k,shouldFlip:P=!0,containerPadding:T=12,placement:_="top",delay:A=0,closeDelay:M=500,showArrow:O=!1,offset:j=7,crossOffset:$=0,isDismissable:Y,shouldCloseOnBlur:te=!0,portalContainer:ie,isKeyboardDismissDisabled:B=!1,updatePositionDeps:W=[],shouldCloseOnInteractOutside:G,className:ee,onClose:H,motionProps:le,classNames:J,...X}=i,V=c||"div",ae=(n=(t=e?.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,D=rz({delay:A,closeDelay:M,isDisabled:x,defaultOpen:g,isOpen:d,onOpenChange:Ue=>{b?.(Ue),Ue||H?.()}}),U=S.useRef(null),oe=S.useRef(null),z=S.useId(),me=D.isOpen&&!x;S.useImperativeHandle(a,()=>vL(oe));const{triggerProps:Ce,tooltipProps:ye}=oz({isDisabled:x,trigger:k},D,U),{tooltipProps:Oe}=iz({isOpen:me,...rn(i,ye)},D),{overlayProps:Ne,placement:_e,updatePosition:Qe}=L5({isOpen:me,targetRef:U,placement:P6(_),overlayRef:oe,offset:O?j+3:j,crossOffset:$,shouldFlip:P,containerPadding:T});Sh(()=>{W.length&&Qe()},W);const{overlayProps:at}=f2({isOpen:me,onClose:D.close,isDismissable:Y,shouldCloseOnBlur:te,isKeyboardDismissDisabled:B,shouldCloseOnInteractOutside:G},oe),Ie=S.useMemo(()=>{var Ue,it,Wt;return gk({...s,disableAnimation:ae,radius:(Ue=e?.radius)!=null?Ue:"md",size:(it=e?.size)!=null?it:"md",shadow:(Wt=e?.shadow)!=null?Wt:"sm"})},[ds(s),ae,e?.radius,e?.size,e?.shadow]),mt=S.useCallback((Ue={},it=null)=>({...rn(Ce,Ue),ref:PE(it,U),"aria-describedby":me?z:void 0}),[Ce,me,z,D]),pt=S.useCallback(()=>({ref:oe,"data-slot":"base","data-open":Ae(me),"data-arrow":Ae(O),"data-disabled":Ae(x),"data-placement":Lk(_e||"top",_),...rn(Oe,at,X),style:rn(Ne.style,X.style,i.style),className:Ie.base({class:J?.base}),id:z}),[Ie,me,O,x,_e,_,Oe,at,X,Ne,i,z]),Kt=S.useCallback(()=>({"data-slot":"content","data-open":Ae(me),"data-arrow":Ae(O),"data-disabled":Ae(x),"data-placement":Lk(_e||"top",_),className:Ie.content({class:Vt(J?.content,ee)})}),[Ie,me,O,x,_e,_,J]);return{Component:V,content:h,children:m,isOpen:me,triggerRef:U,showArrow:O,portalContainer:ie,placement:_,disableAnimation:ae,isDisabled:x,motionProps:le,getTooltipContentProps:Kt,getTriggerProps:mt,getTooltipProps:pt}}var az=()=>Br(()=>import("./index-BcnaGCUm.js"),[]).then(e=>e.default),d2=jr((e,t)=>{var n;const{Component:r,children:i,content:s,isOpen:a,portalContainer:c,placement:d,disableAnimation:h,motionProps:m,getTriggerProps:g,getTooltipProps:b,getTooltipContentProps:x}=sz({...e,ref:t});let k;try{if(S.Children.count(i)!==1)throw new Error;if(!S.isValidElement(i))k=R.jsx("p",{...g(),children:i});else{const j=i,$=(n=j.props.ref)!=null?n:j.ref;k=S.cloneElement(j,g(j.props,$))}}catch{k=R.jsx("span",{}),PL("Tooltip must have only one child node. Please, check your code.")}const{ref:P,id:T,style:_,...A}=b(),M=R.jsx("div",{ref:P,id:T,style:_,children:R.jsx(Af.div,{animate:"enter",exit:"exit",initial:"exit",variants:ev.scaleSpring,...rn(m,A),style:{...E6(d)},children:R.jsx(r,{...x(),children:s})},`${T}-tooltip-inner`)},`${T}-tooltip-content`);return R.jsxs(R.Fragment,{children:[k,h?a&&R.jsx(sk,{portalContainer:c,children:R.jsx("div",{ref:P,id:T,style:_,...A,children:R.jsx(r,{...x(),children:s})})}):R.jsx($f,{features:az,children:R.jsx(ol,{children:a&&R.jsx(sk,{portalContainer:c,children:M})})})]})});d2.displayName="HeroUI.Tooltip";var lz=d2;function uz(e={}){const{rerender:t=!1,delay:n=0}=e,r=S.useRef(!1),[i,s]=S.useState(!1);return S.useEffect(()=>{r.current=!0;let a=null;return t&&(n>0?a=setTimeout(()=>{s(!0)},n):s(!0)),()=>{r.current=!1,t&&s(!1),a&&clearTimeout(a)}},[t]),[S.useCallback(()=>r.current,[]),i]}function cz(e){let{value:t=0,minValue:n=0,maxValue:r=100,valueLabel:i,isIndeterminate:s,formatOptions:a={style:"percent"}}=e,c=$u(e,{labelable:!0}),{labelProps:d,fieldProps:h}=s2({...e,labelElementType:"span"});t=Vg(t,n,r);let m=(t-n)/(r-n),g=FM(a);if(!s&&!i){let b=a.style==="percent"?m:t;i=g.format(b)}return{progressBarProps:Tn(c,{...h,"aria-valuenow":s?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":s?void 0:i,role:"progressbar"}),labelProps:d}}function fz(e){var t,n,r;const i=fi(),[s,a]=ia(e,vk.variantKeys),{ref:c,as:d,id:h,className:m,classNames:g,label:b,valueLabel:x,value:k=void 0,minValue:P=0,maxValue:T=100,strokeWidth:_,showValueLabel:A=!1,formatOptions:M={style:"percent"},...O}=s,j=d||"div",$=$i(c),Y=Vt(g?.base,m),[,te]=uz({rerender:!0,delay:100}),ie=((t=e.isIndeterminate)!=null?t:!0)&&k===void 0,B=(r=(n=e.disableAnimation)!=null?n:i?.disableAnimation)!=null?r:!1,{progressBarProps:W,labelProps:G}=cz({id:h,label:b,value:k,minValue:P,maxValue:T,valueLabel:x,formatOptions:M,isIndeterminate:ie,"aria-labelledby":e["aria-labelledby"],"aria-label":e["aria-label"]}),ee=S.useMemo(()=>vk({...a,disableAnimation:B,isIndeterminate:ie}),[ds(a),B,ie]),H=B?!0:te,le=16,J=_||(e.size==="sm"?2:3),X=16-J,V=2*X*Math.PI,ae=S.useMemo(()=>H?ie?.25:k?EL((k-P)/(T-P),1):0:0,[H,k,P,T,ie]),D=V-ae*V,U=S.useCallback((ye={})=>({ref:$,"data-indeterminate":Ae(ie),"data-disabled":Ae(e.isDisabled),className:ee.base({class:Y}),...rn(W,O,ye)}),[$,ee,ie,e.isDisabled,Y,W,O]),oe=S.useCallback((ye={})=>({className:ee.label({class:g?.label}),...rn(G,ye)}),[ee,g,G]),z=S.useCallback((ye={})=>({viewBox:"0 0 32 32",fill:"none",strokeWidth:J,className:ee.svg({class:g?.svg}),...ye}),[J,ee,g]),me=S.useCallback((ye={})=>({cx:le,cy:le,r:X,role:"presentation",strokeDasharray:`${V} ${V}`,strokeDashoffset:D,transform:"rotate(-90 16 16)",strokeLinecap:"round",className:ee.indicator({class:g?.indicator}),...ye}),[ee,g,D,V,X]),Ce=S.useCallback((ye={})=>({cx:le,cy:le,r:X,role:"presentation",strokeDasharray:`${V} ${V}`,strokeDashoffset:0,transform:"rotate(-90 16 16)",strokeLinecap:"round",className:ee.track({class:g?.track}),...ye}),[ee,g,V,X]);return{Component:j,domRef:$,slots:ee,classNames:g,label:b,showValueLabel:A,getProgressBarProps:U,getLabelProps:oe,getSvgProps:z,getIndicatorProps:me,getTrackProps:Ce}}var p2=jr((e,t)=>{const{Component:n,slots:r,classNames:i,label:s,showValueLabel:a,getProgressBarProps:c,getLabelProps:d,getSvgProps:h,getIndicatorProps:m,getTrackProps:g}=fz({ref:t,...e}),b=c();return R.jsxs(n,{...b,children:[R.jsxs("div",{className:r.svgWrapper({class:i?.svgWrapper}),children:[R.jsxs("svg",{...h(),children:[R.jsx("circle",{...g()}),R.jsx("circle",{...m()})]}),a&&R.jsx("span",{className:r.value({class:i?.value}),children:b["aria-valuetext"]})]}),s&&R.jsx("span",{...d(),children:s})]})});p2.displayName="HeroUI.CircularProgress";var h2=p2;function dz(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:s=!1,type:a="text",validationBehavior:c="aria"}=e,[d,h]=Au(e.value,e.defaultValue||"",e.onChange),{focusableProps:m}=xh(e,t),g=rw({...e,value:d}),{isInvalid:b,validationErrors:x,validationDetails:k}=g.displayValidation,{labelProps:P,fieldProps:T,descriptionProps:_,errorMessageProps:A}=K6({...e,isInvalid:b,errorMessage:e.errorMessage||x}),M=$u(e,{labelable:!0});const O={type:a,pattern:e.pattern};return WE(t,d,h),i2(e,g,t),S.useEffect(()=>{if(t.current instanceof no(t.current).HTMLTextAreaElement){let j=t.current;Object.defineProperty(j,"defaultValue",{get:()=>j.value,set:()=>{},configurable:!0})}},[t]),{labelProps:P,inputProps:Tn(M,n==="input"?O:void 0,{disabled:r,readOnly:s,required:i&&c==="native","aria-required":i&&c==="aria"||void 0,"aria-invalid":b||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:d,onChange:j=>h(j.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(He.version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...m,...T}),descriptionProps:_,errorMessageProps:A,isInvalid:b,validationErrors:x,validationDetails:k}}function pz(e){var t,n,r,i,s,a,c;const d=fi(),{validationBehavior:h}=iw(nv)||{},[m,g]=ia(e,xk.variantKeys),{ref:b,as:x,type:k,label:P,baseRef:T,wrapperRef:_,description:A,className:M,classNames:O,autoFocus:j,startContent:$,endContent:Y,onClear:te,onChange:ie,validationState:B,validationBehavior:W=(t=h??d?.validationBehavior)!=null?t:"native",innerWrapperRef:G,onValueChange:ee=()=>{},...H}=m,le=S.useCallback(Xe=>{ee(Xe??"")},[ee]),[J,X]=S.useState(!1),V=x||"div",ae=(r=(n=e.disableAnimation)!=null?n:d?.disableAnimation)!=null?r:!1,D=$i(b),U=$i(T),oe=$i(_),z=$i(G),[me,Ce]=Au(m.value,(i=m.defaultValue)!=null?i:"",le),ye=k==="file",Oe=((c=(a=(s=D?.current)==null?void 0:s.files)==null?void 0:a.length)!=null?c:0)>0,Ne=["date","time","month","week","range"].includes(k),_e=!xL(me)||Ne||Oe,Qe=_e||J,at=k==="hidden",Ie=e.isMultiline,mt=Vt(O?.base,M,_e?"is-filled":""),pt=S.useCallback(()=>{var Xe;ye?D.current.value="":Ce(""),te?.(),(Xe=D.current)==null||Xe.focus()},[Ce,te,ye]);Sh(()=>{D.current&&Ce(D.current.value)},[D.current]);const{labelProps:Kt,inputProps:Ue,isInvalid:it,validationErrors:Wt,validationDetails:tr,descriptionProps:ln,errorMessageProps:_t}=dz({...e,validationBehavior:W,autoCapitalize:e.autoCapitalize,value:me,"aria-label":e.label?e["aria-label"]:CE(e["aria-label"],e.placeholder),inputElementType:Ie?"textarea":"input",onChange:Ce},D);ye&&(delete Ue.value,delete Ue.onChange);const{isFocusVisible:Rt,isFocused:_n,focusProps:Er}=Pu({autoFocus:j,isTextInput:!0}),{isHovered:Nt,hoverProps:pe}=Eu({isDisabled:!!e?.isDisabled}),{isHovered:Se,hoverProps:ze}=Eu({isDisabled:!!e?.isDisabled}),{focusProps:nt,isFocusVisible:lt}=Pu(),{focusWithinProps:Ht}=Ev({onFocusWithinChange:X}),{pressProps:Vn}=il({isDisabled:!!e?.isDisabled||!!e?.isReadOnly,onPress:pt}),Zt=B==="invalid"||it,Pt=RF({labelPlacement:e.labelPlacement,label:P}),Pr=typeof m.errorMessage=="function"?m.errorMessage({isInvalid:Zt,validationErrors:Wt,validationDetails:tr}):m.errorMessage||Wt?.join(" "),Ft=!!te||e.isClearable,nr=!!P||!!A||!!Pr,un=!!m.placeholder,aa=!!P,hs=!!A||!!Pr,pi=Pt==="outside-left",hi=Pt==="outside-top",ul=Pt==="outside"||pi||hi,Du=Pt==="inside",ms=D.current?(!D.current.value||D.current.value===""||!me||me==="")&&un:!1,Ur=!!$,cl=ul?pi||hi||un||Pt==="outside"&&Ur:!1,fl=Pt==="outside"&&!un&&!Ur,en=S.useMemo(()=>xk({...g,isInvalid:Zt,labelPlacement:Pt,isClearable:Ft,disableAnimation:ae}),[ds(g),Zt,Pt,Ft,Ur,ae]),gs=S.useCallback((Xe={})=>({ref:U,className:en.base({class:mt}),"data-slot":"base","data-filled":Ae(_e||un||Ur||ms||ye),"data-filled-within":Ae(Qe||un||Ur||ms||ye),"data-focus-within":Ae(J),"data-focus-visible":Ae(Rt),"data-readonly":Ae(e.isReadOnly),"data-focus":Ae(_n),"data-hover":Ae(Nt||Se),"data-required":Ae(e.isRequired),"data-invalid":Ae(Zt),"data-disabled":Ae(e.isDisabled),"data-has-elements":Ae(nr),"data-has-helper":Ae(hs),"data-has-label":Ae(aa),"data-has-value":Ae(!ms),"data-hidden":Ae(at),...Ht,...Xe}),[en,mt,_e,_n,Nt,Se,Zt,hs,aa,nr,ms,Ur,J,Rt,Qe,un,Ht,at,e.isReadOnly,e.isRequired,e.isDisabled]),vs=S.useCallback((Xe={})=>({"data-slot":"label",className:en.label({class:O?.label}),...rn(Kt,ze,Xe)}),[en,Se,Kt,O?.label]),Ro=S.useCallback(Xe=>{Xe.key==="Escape"&&me&&(Ft||te)&&!e.isReadOnly&&(Ce(""),te?.())},[me,Ce,te,Ft,e.isReadOnly]),dl=S.useCallback((Xe={})=>({"data-slot":"input","data-filled":Ae(_e),"data-filled-within":Ae(Qe),"data-has-start-content":Ae(Ur),"data-has-end-content":Ae(!!Y),"data-type":k,className:en.input({class:Vt(O?.input,_e?"is-filled":"",Ie?"pe-0":"",k==="password"?"[&::-ms-reveal]:hidden":"")}),...rn(Er,Ue,Ef(H,{enabled:!0,labelable:!0,omitEventNames:new Set(Object.keys(Ue))}),Xe),"aria-readonly":Ae(e.isReadOnly),onChange:el(Ue.onChange,ie),onKeyDown:el(Ue.onKeyDown,Xe.onKeyDown,Ro),ref:D}),[en,me,Er,Ue,H,_e,Qe,Ur,Y,O?.input,e.isReadOnly,e.isRequired,ie,Ro]),ys=S.useCallback((Xe={})=>({ref:oe,"data-slot":"input-wrapper","data-hover":Ae(Nt||Se),"data-focus-visible":Ae(Rt),"data-focus":Ae(_n),className:en.inputWrapper({class:Vt(O?.inputWrapper,_e?"is-filled":"")}),...rn(Xe,pe),onClick:so=>{D.current&&so.currentTarget===so.target&&D.current.focus()},style:{cursor:"text",...Xe.style}}),[en,Nt,Se,Rt,_n,me,O?.inputWrapper]),la=S.useCallback((Xe={})=>({...Xe,ref:z,"data-slot":"inner-wrapper",onClick:so=>{D.current&&so.currentTarget===so.target&&D.current.focus()},className:en.innerWrapper({class:Vt(O?.innerWrapper,Xe?.className)})}),[en,O?.innerWrapper]),ua=S.useCallback((Xe={})=>({...Xe,"data-slot":"main-wrapper",className:en.mainWrapper({class:Vt(O?.mainWrapper,Xe?.className)})}),[en,O?.mainWrapper]),pl=S.useCallback((Xe={})=>({...Xe,"data-slot":"helper-wrapper",className:en.helperWrapper({class:Vt(O?.helperWrapper,Xe?.className)})}),[en,O?.helperWrapper]),Kf=S.useCallback((Xe={})=>({...Xe,...ln,"data-slot":"description",className:en.description({class:Vt(O?.description,Xe?.className)})}),[en,O?.description]),Wf=S.useCallback((Xe={})=>({...Xe,..._t,"data-slot":"error-message",className:en.errorMessage({class:Vt(O?.errorMessage,Xe?.className)})}),[en,_t,O?.errorMessage]),Hf=S.useCallback((Xe={})=>({...Xe,type:"button",tabIndex:-1,disabled:e.isDisabled,"aria-label":"clear input","data-slot":"clear-button","data-focus-visible":Ae(lt),className:en.clearButton({class:Vt(O?.clearButton,Xe?.className)}),...rn(Vn,nt)}),[en,lt,Vn,nt,O?.clearButton]);return{Component:V,classNames:O,domRef:D,label:P,description:A,startContent:$,endContent:Y,labelPlacement:Pt,isClearable:Ft,hasHelper:hs,hasStartContent:Ur,isLabelOutside:cl,isOutsideLeft:pi,isOutsideTop:hi,isLabelOutsideAsPlaceholder:fl,shouldLabelBeOutside:ul,shouldLabelBeInside:Du,hasPlaceholder:un,isInvalid:Zt,errorMessage:Pr,getBaseProps:gs,getLabelProps:vs,getInputProps:dl,getMainWrapperProps:ua,getInputWrapperProps:ys,getInnerWrapperProps:la,getHelperWrapperProps:pl,getDescriptionProps:Kf,getErrorMessageProps:Wf,getClearButtonProps:Hf}}function Nb(){return Nb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nb.apply(null,arguments)}function hz(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var mz=S.useLayoutEffect,gz=function(t){var n=He.useRef(t);return mz(function(){n.current=t}),n},Fk=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},vz=function(t,n){var r=He.useRef();return He.useCallback(function(i){t.current=i,r.current&&Fk(r.current,null),r.current=n,n&&Fk(n,i)},[n])},Ok={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},yz=function(t){Object.keys(Ok).forEach(function(n){t.style.setProperty(n,Ok[n],"important")})},zk=yz,Dr=null,jk=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function bz(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),Dr||(Dr=document.createElement("textarea"),Dr.setAttribute("tabindex","-1"),Dr.setAttribute("aria-hidden","true"),zk(Dr)),Dr.parentNode===null&&document.body.appendChild(Dr);var i=e.paddingSize,s=e.borderSize,a=e.sizingStyle,c=a.boxSizing;Object.keys(a).forEach(function(b){var x=b;Dr.style[x]=a[x]}),zk(Dr),Dr.value=t;var d=jk(Dr,e);Dr.value=t,d=jk(Dr,e),Dr.value="x";var h=Dr.scrollHeight-i,m=h*n;c==="border-box"&&(m=m+i+s),d=Math.max(m,d);var g=h*r;return c==="border-box"&&(g=g+i+s),d=Math.min(g,d),[d,h]}var Bk=function(){},xz=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},wz=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Sz=!!document.documentElement.currentStyle,kz=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=xz(wz,n),i=r.boxSizing;if(i==="")return null;Sz&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var s=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),a=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:s,borderSize:a}},Cz=kz;function ow(e,t,n){var r=gz(n);S.useLayoutEffect(function(){var i=function(a){return r.current(a)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var Ez=function(t,n){ow(document.body,"reset",function(r){t.current.form===r.target&&n(r)})},Pz=function(t){ow(window,"resize",t)},Tz=function(t){ow(document.fonts,"loadingdone",t)},_z=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Iz=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,s=t.minRows,a=t.onChange,c=a===void 0?Bk:a,d=t.onHeightChange,h=d===void 0?Bk:d,m=hz(t,_z),g=m.value!==void 0,b=S.useRef(null),x=vz(b,n),k=S.useRef(0),P=S.useRef(),T=function(){var M=b.current,O=r&&P.current?P.current:Cz(M);if(O){P.current=O;var j=bz(O,M.value||M.placeholder||"x",s,i),$=j[0],Y=j[1];k.current!==$&&(k.current=$,M.style.setProperty("height",$+"px","important"),h($,{rowHeight:Y}))}},_=function(M){g||T(),c(M)};return S.useLayoutEffect(T),Ez(b,function(){if(!g){var A=b.current.value;requestAnimationFrame(function(){var M=b.current;M&&A!==M.value&&T()})}}),Pz(T),Tz(T),S.createElement("textarea",Nb({},m,{onChange:_,ref:x}))},$z=S.forwardRef(Iz),m2=jr(({style:e,minRows:t=3,maxRows:n=8,cacheMeasurements:r=!1,disableAutosize:i=!1,onHeightChange:s,...a},c)=>{const{Component:d,label:h,description:m,startContent:g,endContent:b,hasHelper:x,shouldLabelBeOutside:k,shouldLabelBeInside:P,isInvalid:T,errorMessage:_,getBaseProps:A,getLabelProps:M,getInputProps:O,getInnerWrapperProps:j,getInputWrapperProps:$,getHelperWrapperProps:Y,getDescriptionProps:te,getErrorMessageProps:ie,isClearable:B,getClearButtonProps:W}=pz({...a,ref:c,isMultiline:!0}),[G,ee]=S.useState(t>1),[H,le]=S.useState(!1),J=h?R.jsx("label",{...M(),children:h}):null,X=O(),V=(me,Ce)=>{if(t===1&&ee(me>=Ce.rowHeight*2),n>t){const ye=me>=n*Ce.rowHeight;le(ye)}s?.(me,Ce)},ae=i?R.jsx("textarea",{...X,style:rn(X.style,e??{})}):R.jsx($z,{...X,cacheMeasurements:r,"data-hide-scroll":Ae(!H),maxRows:n,minRows:t,style:rn(X.style,e??{}),onHeightChange:V}),D=S.useMemo(()=>B?R.jsx("button",{...W(),children:R.jsx(W_,{})}):null,[B,W]),U=S.useMemo(()=>g||b?R.jsxs("div",{...j(),children:[g,ae,b]}):R.jsx("div",{...j(),children:ae}),[g,X,b,j]),oe=T&&_,z=oe||m;return R.jsxs(d,{...A(),children:[k?J:null,R.jsxs("div",{...$(),"data-has-multiple-rows":Ae(G),children:[P?J:null,U,D]}),x&&z?R.jsx("div",{...Y(),children:oe?R.jsx("div",{...ie(),children:_}):R.jsx("div",{...te(),children:m})}):null]})});m2.displayName="HeroUI.Textarea";var Az=m2;function Rz(e,t){let{role:n="dialog"}=e,r=Y0();r=e["aria-label"]?void 0:r;let i=S.useRef(!1);return S.useEffect(()=>{if(t.current&&!t.current.contains(document.activeElement)){Cu(t.current);let s=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),Cu(t.current)),i.current=!1)},500);return()=>{clearTimeout(s)}}},[t]),P_(),{dialogProps:{...$u(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||r,onBlur:s=>{i.current&&s.stopPropagation()}},titleProps:{id:r}}}function Lz(e){var t,n;const r=fi(),[i,s]=ia(e,Sk.variantKeys),{ref:a,as:c,src:d,className:h,classNames:m,loading:g,isBlurred:b,fallbackSrc:x,isLoading:k,disableSkeleton:P=!!x,removeWrapper:T=!1,onError:_,onLoad:A,srcSet:M,sizes:O,crossOrigin:j,...$}=i,Y=_6({src:d,loading:g,onError:_,onLoad:A,ignoreFallback:!1,srcSet:M,sizes:O,crossOrigin:j,shouldBypassImageLoad:c!==void 0}),te=(n=(t=e.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,ie=Y==="loaded"&&!k,B=Y==="loading"||k,W=e.isZoomed,G=c||"img",ee=$i(a),{w:H,h:le}=S.useMemo(()=>({w:i.width?typeof i.width=="number"?`${i.width}px`:i.width:"fit-content",h:i.height?typeof i.height=="number"?`${i.height}px`:i.height:"auto"}),[i?.width,i?.height]),J=(!d||!ie)&&!!x,X=B&&!P,V=S.useMemo(()=>Sk({...s,disableAnimation:te,showSkeleton:X}),[ds(s),te,X]),ae=Vt(h,m?.img),D=(z={})=>{const me=Vt(ae,z?.className);return{src:d,ref:ee,"data-loaded":Ae(ie),className:V.img({class:me}),loading:g,srcSet:M,sizes:O,crossOrigin:j,...$,style:{...$?.height&&{height:le},...z.style,...$.style}}},U=S.useCallback(()=>{const z=J?{backgroundImage:`url(${x})`}:{};return{className:V.wrapper({class:m?.wrapper}),style:{...z,maxWidth:H}}},[V,J,x,m?.wrapper,H]),oe=S.useCallback(()=>({src:d,"aria-hidden":Ae(!0),className:V.blurredImg({class:m?.blurredImg})}),[V,d,m?.blurredImg]);return{Component:G,domRef:ee,slots:V,classNames:m,isBlurred:b,disableSkeleton:P,fallbackSrc:x,removeWrapper:T,isZoomed:W,isLoading:B,getImgProps:D,getWrapperProps:U,getBlurredImgProps:oe}}var g2=jr((e,t)=>{const{Component:n,domRef:r,slots:i,classNames:s,isBlurred:a,isZoomed:c,fallbackSrc:d,removeWrapper:h,disableSkeleton:m,getImgProps:g,getWrapperProps:b,getBlurredImgProps:x}=Lz({...e,ref:t}),k=R.jsx(n,{ref:r,...g()});if(h)return k;const P=R.jsx("div",{className:i.zoomedWrapper({class:s?.zoomedWrapper}),children:k});return a?R.jsxs("div",{...b(),children:[c?P:k,S.cloneElement(k,x())]}):c||!m||d?R.jsxs("div",{...b(),children:[" ",c?P:k]}):k});g2.displayName="HeroUI.Image";var S0=g2,[Mz,v2]=mv({name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Modal />`"}),y2=jr((e,t)=>{const{as:n,children:r,className:i,...s}=e,{slots:a,classNames:c,bodyId:d,setBodyMounted:h}=v2(),m=$i(t),g=n||"div";return S.useEffect(()=>(h(!0),()=>h(!1)),[h]),R.jsx(g,{ref:m,className:a.body({class:Vt(c?.body,i)}),id:d,...s,children:r})});y2.displayName="HeroUI.ModalBody";var Dz=y2,Nz={enter:{scale:"var(--scale-enter)",y:"var(--slide-enter)",opacity:1,willChange:"auto",transition:{scale:{duration:.4,ease:Bp.ease},opacity:{duration:.4,ease:Bp.ease},y:{type:"spring",bounce:0,duration:.6}}},exit:{scale:"var(--scale-exit)",y:"var(--slide-exit)",opacity:0,willChange:"transform",transition:{duration:.3,ease:Bp.ease}}},ss=typeof document<"u"&&window.visualViewport,Fz=He.createContext(!1);function Oz(){return!1}function zz(){return!0}function jz(e){return()=>{}}function Bz(){return typeof He.useSyncExternalStore=="function"?He.useSyncExternalStore(jz,Oz,zz):S.useContext(Fz)}function Vz(){let e=Bz(),[t,n]=S.useState(()=>e?{width:0,height:0}:Vk());return S.useEffect(()=>{let r=()=>{n(i=>{let s=Vk();return s.width===i.width&&s.height===i.height?i:s})};return ss?ss.addEventListener("resize",r):window.addEventListener("resize",r),()=>{ss?ss.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),t}function Vk(){return{width:ss&&ss?.width||window.innerWidth,height:ss&&ss?.height||window.innerHeight}}var Uk=()=>Br(()=>import("./index-BcnaGCUm.js"),[]).then(e=>e.default),b2=e=>{const{as:t,children:n,role:r="dialog",...i}=e,{Component:s,domRef:a,slots:c,classNames:d,motionProps:h,backdrop:m,closeButton:g,hideCloseButton:b,disableAnimation:x,getDialogProps:k,getBackdropProps:P,getCloseButtonProps:T,onClose:_}=v2(),A=t||s||"div",M=Vz(),{dialogProps:O}=Rz({role:r},a),j=S.isValidElement(g)?S.cloneElement(g,T()):R.jsx("button",{...T(),children:R.jsx(s6,{})}),$=S.useCallback(G=>{G.key==="Tab"&&G.nativeEvent.isComposing&&(G.stopPropagation(),G.preventDefault())},[]),Y=k(rn(O,i)),te=R.jsxs(A,{...Y,onKeyDown:el(Y.onKeyDown,$),children:[R.jsx(lk,{onDismiss:_}),!b&&j,typeof n=="function"?n(_):n,R.jsx(lk,{onDismiss:_})]}),ie=S.useMemo(()=>m==="transparent"?null:x?R.jsx("div",{...P()}):R.jsx($f,{features:Uk,children:R.jsx(Af.div,{animate:"enter",exit:"exit",initial:"exit",variants:ev.fade,...P()})}),[m,x,P]),B={"--visual-viewport-height":M.height+"px"},W=x?R.jsx("div",{className:c.wrapper({class:d?.wrapper}),"data-slot":"wrapper",style:B,children:te}):R.jsx($f,{features:Uk,children:R.jsx(Af.div,{animate:"enter",className:c.wrapper({class:d?.wrapper}),"data-slot":"wrapper",exit:"exit",initial:"exit",variants:Nz,...h,style:B,children:te})});return R.jsxs("div",{tabIndex:-1,children:[ie,W]})};b2.displayName="HeroUI.ModalContent";var Uz=b2;function Kz(e={shouldBlockScroll:!0},t,n){let{overlayProps:r,underlayProps:i}=f2({...e,isOpen:t.isOpen,onClose:t.close},n);return yF({isDisabled:!t.isOpen||!e.shouldBlockScroll}),P_(),S.useEffect(()=>{if(t.isOpen&&n.current)return IF([n.current])},[t.isOpen,n]),{modalProps:Tn(r),underlayProps:i}}function Wz(e){var t,n,r;const i=fi(),[s,a]=ia(e,wk.variantKeys),{ref:c,as:d,className:h,classNames:m,isOpen:g,defaultOpen:b,onOpenChange:x,motionProps:k,closeButton:P,isDismissable:T=!0,hideCloseButton:_=!1,shouldBlockScroll:A=!0,portalContainer:M,isKeyboardDismissDisabled:O=!1,onClose:j,...$}=s,Y=d||"section",te=$i(c),ie=S.useRef(null),[B,W]=S.useState(!1),[G,ee]=S.useState(!1),H=(n=(t=e.disableAnimation)!=null?t:i?.disableAnimation)!=null?n:!1,le=S.useId(),J=S.useId(),X=S.useId(),V=c2({isOpen:g,defaultOpen:b,onOpenChange:_e=>{x?.(_e),_e||j?.()}}),{modalProps:ae,underlayProps:D}=Kz({isDismissable:T,shouldBlockScroll:A,isKeyboardDismissDisabled:O},V,te),{buttonProps:U}=X_({onPress:V.close},ie),{isFocusVisible:oe,focusProps:z}=Pu(),me=Vt(m?.base,h),Ce=S.useMemo(()=>wk({...a,disableAnimation:H}),[ds(a),H]),ye=(_e={},Qe=null)=>{var at;return{ref:EE(Qe,te),...rn(ae,$,_e),className:Ce.base({class:Vt(me,_e.className)}),id:le,"data-open":Ae(V.isOpen),"data-dismissable":Ae(T),"aria-modal":Ae(!0),"data-placement":(at=e?.placement)!=null?at:"right","aria-labelledby":B?J:void 0,"aria-describedby":G?X:void 0}},Oe=S.useCallback((_e={})=>({className:Ce.backdrop({class:m?.backdrop}),...D,..._e}),[Ce,m,D]),Ne=()=>({role:"button",tabIndex:0,"aria-label":"Close","data-focus-visible":Ae(oe),className:Ce.closeButton({class:m?.closeButton}),...rn(U,z)});return{Component:Y,slots:Ce,domRef:te,headerId:J,bodyId:X,motionProps:k,classNames:m,isDismissable:T,closeButton:P,hideCloseButton:_,portalContainer:M,shouldBlockScroll:A,backdrop:(r=e.backdrop)!=null?r:"opaque",isOpen:V.isOpen,onClose:V.close,disableAnimation:H,setBodyMounted:ee,setHeaderMounted:W,getDialogProps:ye,getBackdropProps:Oe,getCloseButtonProps:Ne}}var x2=jr((e,t)=>{const{children:n,...r}=e,i=Wz({...r,ref:t}),s=R.jsx($F,{portalContainer:i.portalContainer,children:n});return R.jsx(Mz,{value:i,children:i.disableAnimation&&i.isOpen?s:R.jsx(ol,{children:i.isOpen?s:null})})});x2.displayName="HeroUI.Modal";var Hz=x2;function Gz(e={}){const{id:t,defaultOpen:n,isOpen:r,onClose:i,onOpen:s,onChange:a=()=>{}}=e,c=Db(s),d=Db(i),[h,m]=Au(r,n||!1,a),g=S.useId(),b=t||g,x=r!==void 0,k=S.useCallback(()=>{x||m(!1),d?.()},[x,d]),P=S.useCallback(()=>{x||m(!0),c?.()},[x,c]),T=S.useCallback(()=>{(h?k:P)()},[h,P,k]);return{isOpen:!!h,onOpen:P,onClose:k,onOpenChange:T,isControlled:x,getButtonProps:(_={})=>({..._,"aria-expanded":h,"aria-controls":b,onClick:Tf(_.onClick,T)}),getDisclosureProps:(_={})=>({..._,hidden:!h,id:b})}}function qz(e){var t,n;const r=fi(),[i,s]=ia(e,bk.variantKeys),{as:a,children:c,isLoaded:d=!1,className:h,classNames:m,...g}=i,b=a||"div",x=(n=(t=e.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,k=S.useMemo(()=>bk({...s,disableAnimation:x}),[ds(s),x,c]),P=Vt(m?.base,h);return{Component:b,children:c,slots:k,classNames:m,getSkeletonProps:(A={})=>({"data-loaded":Ae(d),className:k.base({class:Vt(P,A?.className)}),...g}),getContentProps:(A={})=>({className:k.content({class:Vt(m?.content,A?.className)})})}}var w2=jr((e,t)=>{const{Component:n,children:r,getSkeletonProps:i,getContentProps:s}=qz({...e});return R.jsx(n,{ref:t,...i(),children:R.jsx("div",{...s(),children:r})})});w2.displayName="HeroUI.Skeleton";var S2=w2;function Yz(e={}){const{domRef:t,isEnabled:n=!0,overflowCheck:r="vertical",visibility:i="auto",offset:s=0,onVisibilityChange:a,updateDeps:c=[]}=e,d=S.useRef(i);S.useEffect(()=>{const h=t?.current;if(!h||!n)return;const m=(x,k,P,T,_)=>{if(i==="auto"){const A=`${T}${SL(_)}Scroll`;k&&P?(h.dataset[A]="true",h.removeAttribute(`data-${T}-scroll`),h.removeAttribute(`data-${_}-scroll`)):(h.dataset[`${T}Scroll`]=k.toString(),h.dataset[`${_}Scroll`]=P.toString(),h.removeAttribute(`data-${T}-${_}-scroll`))}else{const A=k&&P?"both":k?T:P?_:"none";A!==d.current&&(a?.(A),d.current=A)}},g=()=>{var x,k;const P=[{type:"vertical",prefix:"top",suffix:"bottom"},{type:"horizontal",prefix:"left",suffix:"right"}],T=h.querySelector('ul[data-slot="list"]'),_=+((x=T?.getAttribute("data-virtual-scroll-height"))!=null?x:h.scrollHeight),A=+((k=T?.getAttribute("data-virtual-scroll-top"))!=null?k:h.scrollTop);for(const{type:M,prefix:O,suffix:j}of P)if(r===M||r==="both"){const $=M==="vertical"?A>s:h.scrollLeft>s,Y=M==="vertical"?A+h.clientHeight+s<_:h.scrollLeft+h.clientWidth+s<h.scrollWidth;m(M,$,Y,O,j)}},b=()=>{["top","bottom","top-bottom","left","right","left-right"].forEach(x=>{h.removeAttribute(`data-${x}-scroll`)})};return g(),h.addEventListener("scroll",g,!0),i!=="auto"&&(b(),i==="both"?(h.dataset.topBottomScroll=String(r==="vertical"),h.dataset.leftRightScroll=String(r==="horizontal")):(h.dataset.topBottomScroll="false",h.dataset.leftRightScroll="false",["top","bottom","left","right"].forEach(x=>{h.dataset[`${x}Scroll`]=String(i===x)}))),()=>{h.removeEventListener("scroll",g,!0),b()}},[...c,n,i,r,a,t])}function Xz(e){var t;const[n,r]=ia(e,yk.variantKeys),{ref:i,as:s,children:a,className:c,style:d,size:h=40,offset:m=0,visibility:g="auto",isEnabled:b=!0,onVisibilityChange:x,...k}=n,P=s||"div",T=$i(i);Yz({domRef:T,offset:m,visibility:g,isEnabled:b,onVisibilityChange:x,updateDeps:[a],overflowCheck:(t=e.orientation)!=null?t:"vertical"});const _=S.useMemo(()=>yk({...r,className:c}),[ds(r),c]);return{Component:P,styles:_,domRef:T,children:a,getBaseProps:(M={})=>{var O;return{ref:T,className:_,"data-orientation":(O=e.orientation)!=null?O:"vertical",style:{"--scroll-shadow-size":`${h}px`,...d,...M.style},...k,...M}}}}var k2=jr((e,t)=>{const{Component:n,children:r,getBaseProps:i}=Xz({...e,ref:t});return R.jsx(n,{...i(),children:r})});k2.displayName="HeroUI.ScrollShadow";var C2=k2,To=(e=>(e.LIGHT="light",e.DARK="dark",e))(To||{});const E2=S.createContext(null),vq={Like:"like",Dislike:"dislike"},Qz={Start:"START"},kf={User:"user",Assistant:"assistant"},uf={Pending:"pending",InProgress:"in_progress",Completed:"completed"};class Jz{constructor(t={}){if(this.chunkQueue=new Map,this.baseUrl=t.baseUrl??"",this.auth=t.auth,this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.slice(0,-1)),!!this.baseUrl)try{new URL(this.baseUrl)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}. Please provide a valid URL.`)}}getBaseUrl(){return this.baseUrl}_buildApiUrl(t){return`${this.baseUrl}${t}`}async _makeRequest(t,n={}){const r={"Content-Type":"application/json"};n.body instanceof FormData&&delete r["Content-Type"];const i={...r,...this.normalizeHeaders(n.headers)};this.auth?.getToken&&(i.Authorization=`Bearer ${this.auth.getToken()}`);const s=await fetch(t,{...n,headers:i,...this.auth?.credentials?{credentials:this.auth?.credentials}:{}});if(s.status===401&&this.auth?.onUnauthorized?.(),!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return s}async makeRequest(t,...n){const r=n[0],{method:i="GET",body:s,pathParams:a,queryParams:c,headers:d={},...h}=r||{},m={method:i,headers:d,...h};s&&i!=="GET"&&(s instanceof FormData?(m.body=s,m.headers&&"Content-Type"in m.headers&&delete m.headers["Content-Type"]):m.body=typeof s=="string"?s:JSON.stringify(s));let g=t.toString();if(a&&typeof a=="object"&&(g=g.replace(/:([^/]+)/g,(x,k)=>{if(k in a){const P=a[k];return encodeURIComponent(String(P))}else throw new Error(`Path parameter ${k} is required`)})),c&&Object.keys(c).length>0){const x=new URLSearchParams;for(const[k,P]of Object.entries(c))P!=null&&x.append(k,String(P));g+=`?${x.toString()}`}return g=this._buildApiUrl(g),(await this._makeRequest(g,m)).json()}makeStreamRequest(t,n,r,i,s){let a=!1;const c=async h=>{const m=h.body?.pipeThrough(new TextDecoderStream).getReader();if(!m)throw new Error("Response body is null");let g="";for(;!a&&!i?.aborted;)try{const{value:b,done:x}=await m.read();if(x){r.onClose?.();break}g+=b;const k=g.split(`
23
+ `.trim(),W.head.prepend(G)},[b]),S.useEffect(()=>{let W=T.current;return()=>{var G;g||GS((G=W.target)!==null&&G!==void 0?G:void 0);for(let ee of W.disposables)ee();W.disposables=[]}},[g]),{isPressed:d||k,pressProps:Tn(x,B,{[QS]:!0})}}function Qx(e){return e.tagName==="A"&&e.hasAttribute("href")}function p0(e,t){const{key:n,code:r}=e,i=t,s=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof no(i).HTMLInputElement&&!MT(i,n)||i instanceof no(i).HTMLTextAreaElement||i.isContentEditable)&&!((s==="link"||!s&&Qx(i))&&n!=="Enter")}function au(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function K5(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!Qx(e)}function JS(e,t){return e instanceof HTMLInputElement?!MT(e,t):K5(e)}const W5=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function MT(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":W5.has(e.type)}let ta=null,ih=new Set,jp=new Map,ku=!1,wb=!1;const H5={Tab:!0,Escape:!0};function Cv(e,t){for(let n of ih)n(e,t)}function G5(e){return!(e.metaKey||!wu()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Qg(e){ku=!0,G5(e)&&(ta="keyboard",Cv("keyboard",e))}function Sf(e){ta="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(ku=!0,Cv("pointer",e))}function DT(e){KE(e)&&(ku=!0,ta="virtual")}function NT(e){e.target===window||e.target===document||Xg||!e.isTrusted||(!ku&&!wb&&(ta="virtual",Cv("virtual",e)),ku=!1,wb=!1)}function FT(){Xg||(ku=!1,wb=!0)}function Jg(e){if(typeof window>"u"||typeof document>"u"||jp.get(no(e)))return;const t=no(e),n=Dt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){ku=!0,r.apply(this,arguments)},n.addEventListener("keydown",Qg,!0),n.addEventListener("keyup",Qg,!0),n.addEventListener("click",DT,!0),t.addEventListener("focus",NT,!0),t.addEventListener("blur",FT,!1),typeof PointerEvent<"u"&&(n.addEventListener("pointerdown",Sf,!0),n.addEventListener("pointermove",Sf,!0),n.addEventListener("pointerup",Sf,!0)),t.addEventListener("beforeunload",()=>{OT(e)},{once:!0}),jp.set(t,{focus:r})}const OT=(e,t)=>{const n=no(e),r=Dt(e);t&&r.removeEventListener("DOMContentLoaded",t),jp.has(n)&&(n.HTMLElement.prototype.focus=jp.get(n).focus,r.removeEventListener("keydown",Qg,!0),r.removeEventListener("keyup",Qg,!0),r.removeEventListener("click",DT,!0),n.removeEventListener("focus",NT,!0),n.removeEventListener("blur",FT,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",Sf,!0),r.removeEventListener("pointermove",Sf,!0),r.removeEventListener("pointerup",Sf,!0)),jp.delete(n))};function q5(e){const t=Dt(e);let n;return t.readyState!=="loading"?Jg(e):(n=()=>{Jg(e)},t.addEventListener("DOMContentLoaded",n)),()=>OT(e,n)}typeof document<"u"&&q5();function Jx(){return ta!=="pointer"}function oh(){return ta}function Y5(e){ta=e,Cv(e,null)}function cq(){Jg();let[e,t]=S.useState(ta);return S.useEffect(()=>{let n=()=>{t(ta)};return ih.add(n),()=>{ih.delete(n)}},[]),ph()?null:e}const X5=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Q5(e,t,n){let r=Dt(n?.target);const i=typeof window<"u"?no(n?.target).HTMLInputElement:HTMLInputElement,s=typeof window<"u"?no(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,a=typeof window<"u"?no(n?.target).HTMLElement:HTMLElement,c=typeof window<"u"?no(n?.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof i&&!X5.has(r.activeElement.type)||r.activeElement instanceof s||r.activeElement instanceof a&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof c&&!H5[n.key])}function J5(e,t,n){Jg(),S.useEffect(()=>{let r=(i,s)=>{Q5(!!n?.isTextInput,i,s)&&e(Jx())};return ih.add(r),()=>{ih.delete(r)}},t)}function Cu(e){const t=Dt(e),n=zr(t);if(oh()==="virtual"){let r=n;zE(()=>{zr(t)===r&&e.isConnected&&tl(e)})}else tl(e)}function zT(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const s=S.useCallback(d=>{if(d.target===d.currentTarget)return r&&r(d),i&&i(!1),!0},[r,i]),a=RT(s),c=S.useCallback(d=>{const h=Dt(d.target),m=h?zr(h):zr();d.target===d.currentTarget&&m===Pn(d.nativeEvent)&&(n&&n(d),i&&i(!0),a(d))},[i,n,a]);return{focusProps:{onFocus:!t&&(n||i||r)?c:void 0,onBlur:!t&&(r||i)?s:void 0}}}function ZS(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};e(r),t&&n.stopPropagation()}}function Z5(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:ZS(e.onKeyDown),onKeyUp:ZS(e.onKeyUp)}}}let eF=He.createContext(null);function tF(e){let t=S.useContext(eF)||{};BE(t,e);let{ref:n,...r}=t;return r}function xh(e,t){let{focusProps:n}=zT(e),{keyboardProps:r}=Z5(e),i=Tn(n,r),s=tF(t),a=e.isDisabled?{}:s,c=S.useRef(e.autoFocus);S.useEffect(()=>{c.current&&t.current&&Cu(t.current),c.current=!1},[t]);let d=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(d=void 0),{focusableProps:Tn({...i,tabIndex:d},a)}}function nF({children:e}){let t=S.useMemo(()=>({register:()=>{}}),[]);return He.createElement(Xx.Provider,{value:t},e)}function Ev(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,s=S.useRef({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:c}=hx(),d=S.useCallback(g=>{g.currentTarget.contains(g.target)&&s.current.isFocusWithin&&!g.currentTarget.contains(g.relatedTarget)&&(s.current.isFocusWithin=!1,c(),n&&n(g),i&&i(!1))},[n,i,s,c]),h=RT(d),m=S.useCallback(g=>{if(!g.currentTarget.contains(g.target))return;const b=Dt(g.target),x=zr(b);if(!s.current.isFocusWithin&&x===Pn(g.nativeEvent)){r&&r(g),i&&i(!0),s.current.isFocusWithin=!0,h(g);let k=g.currentTarget;a(b,"focus",P=>{if(s.current.isFocusWithin&&!li(k,P.target)){let T=new b.defaultView.FocusEvent("blur",{relatedTarget:P.target});AT(T,k);let _=Yx(T);d(_)}},{capture:!0})}},[r,i,h,a,d]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:m,onBlur:d}}}let Sb=!1,h0=0;function rF(){Sb=!0,setTimeout(()=>{Sb=!1},50)}function ek(e){e.pointerType==="touch"&&rF()}function iF(){if(!(typeof document>"u"))return typeof PointerEvent<"u"&&document.addEventListener("pointerup",ek),h0++,()=>{h0--,!(h0>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",ek)}}function Eu(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[s,a]=S.useState(!1),c=S.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;S.useEffect(iF,[]);let{addGlobalListener:d,removeAllGlobalListeners:h}=hx(),{hoverProps:m,triggerHoverEnd:g}=S.useMemo(()=>{let b=(P,T)=>{if(c.pointerType=T,i||T==="touch"||c.isHovered||!P.currentTarget.contains(P.target))return;c.isHovered=!0;let _=P.currentTarget;c.target=_,d(Dt(P.target),"pointerover",A=>{c.isHovered&&c.target&&!li(c.target,A.target)&&x(A,A.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:_,pointerType:T}),n&&n(!0),a(!0)},x=(P,T)=>{let _=c.target;c.pointerType="",c.target=null,!(T==="touch"||!c.isHovered||!_)&&(c.isHovered=!1,h(),r&&r({type:"hoverend",target:_,pointerType:T}),n&&n(!1),a(!1))},k={};return typeof PointerEvent<"u"&&(k.onPointerEnter=P=>{Sb&&P.pointerType==="mouse"||b(P,P.pointerType)},k.onPointerLeave=P=>{!i&&P.currentTarget.contains(P.target)&&x(P,P.pointerType)}),{hoverProps:k,triggerHoverEnd:x}},[t,n,r,i,c,d,h]);return S.useEffect(()=>{i&&g({currentTarget:c.target},c.pointerType)},[i]),{hoverProps:m,isHovered:s}}function oF(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,s=S.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=Bn(d=>{n&&tk(d,t)&&(i&&i(d),s.current.isPointerDown=!0)}),c=Bn(d=>{n&&n(d)});S.useEffect(()=>{let d=s.current;if(r)return;const h=t.current,m=Dt(h);if(typeof PointerEvent<"u"){let g=b=>{d.isPointerDown&&tk(b,t)&&c(b),d.isPointerDown=!1};return m.addEventListener("pointerdown",a,!0),m.addEventListener("click",g,!0),()=>{m.removeEventListener("pointerdown",a,!0),m.removeEventListener("click",g,!0)}}},[t,r,a,c])}function tk(e,t){if(e.button>0)return!1;if(e.target){const n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current?!e.composedPath().includes(t.current):!1}const nk=He.createContext(null),kb="react-aria-focus-scope-restore";let Jt=null;function sF(e){let{children:t,contain:n,restoreFocus:r,autoFocus:i}=e,s=S.useRef(null),a=S.useRef(null),c=S.useRef([]),{parentNode:d}=S.useContext(nk)||{},h=S.useMemo(()=>new Eb({scopeRef:c}),[c]);an(()=>{let b=d||Mn.root;if(Mn.getTreeNode(b.scopeRef)&&Jt&&!Zg(Jt,b.scopeRef)){let x=Mn.getTreeNode(Jt);x&&(b=x)}b.addChild(h),Mn.addNode(h)},[h,d]),an(()=>{let b=Mn.getTreeNode(c);b&&(b.contain=!!n)},[n]),an(()=>{var b;let x=(b=s.current)===null||b===void 0?void 0:b.nextSibling,k=[],P=T=>T.stopPropagation();for(;x&&x!==a.current;)k.push(x),x.addEventListener(kb,P),x=x.nextSibling;return c.current=k,()=>{for(let T of k)T.removeEventListener(kb,P)}},[t]),fF(c,r,n),lF(c,n),dF(c,r,n),cF(c,i),S.useEffect(()=>{const b=zr(Dt(c.current?c.current[0]:void 0));let x=null;if(io(b,c.current)){for(let k of Mn.traverse())k.scopeRef&&io(b,k.scopeRef.current)&&(x=k);x===Mn.getTreeNode(c)&&(Jt=x.scopeRef)}},[c]),an(()=>()=>{var b,x,k;let P=(k=(x=Mn.getTreeNode(c))===null||x===void 0||(b=x.parent)===null||b===void 0?void 0:b.scopeRef)!==null&&k!==void 0?k:null;(c===Jt||Zg(c,Jt))&&(!P||Mn.getTreeNode(P))&&(Jt=P),Mn.removeTreeNode(c)},[c]);let m=S.useMemo(()=>aF(c),[]),g=S.useMemo(()=>({focusManager:m,parentNode:h}),[h,m]);return He.createElement(nk.Provider,{value:g},He.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:s}),t,He.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function aF(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:s,accept:a}=t;var c;let d=r||zr(Dt((c=n[0])!==null&&c!==void 0?c:void 0)),h=n[0].previousElementSibling,m=vu(n),g=Qs(m,{tabbable:i,accept:a},n);g.currentNode=io(d,n)?d:h;let b=g.nextNode();return!b&&s&&(g.currentNode=h,b=g.nextNode()),b&&Xs(b,!0),b},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:s,accept:a}=t;var c;let d=r||zr(Dt((c=n[0])!==null&&c!==void 0?c:void 0)),h=n[n.length-1].nextElementSibling,m=vu(n),g=Qs(m,{tabbable:i,accept:a},n);g.currentNode=io(d,n)?d:h;let b=g.previousNode();return!b&&s&&(g.currentNode=h,b=g.previousNode()),b&&Xs(b,!0),b},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,s=vu(n),a=Qs(s,{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let c=a.nextNode();return c&&Xs(c,!0),c},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,s=vu(n),a=Qs(s,{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let c=a.previousNode();return c&&Xs(c,!0),c}}}function vu(e){return e[0].parentElement}function Ap(e){let t=Mn.getTreeNode(Jt);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function lF(e,t){let n=S.useRef(void 0),r=S.useRef(void 0);an(()=>{let i=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const s=Dt(i?i[0]:void 0);let a=h=>{if(h.key!=="Tab"||h.altKey||h.ctrlKey||h.metaKey||!Ap(e)||h.isComposing)return;let m=zr(s),g=e.current;if(!g||!io(m,g))return;let b=vu(g),x=Qs(b,{tabbable:!0},g);if(!m)return;x.currentNode=m;let k=h.shiftKey?x.previousNode():x.nextNode();k||(x.currentNode=h.shiftKey?g[g.length-1].nextElementSibling:g[0].previousElementSibling,k=h.shiftKey?x.previousNode():x.nextNode()),h.preventDefault(),k&&Xs(k,!0)},c=h=>{(!Jt||Zg(Jt,e))&&io(Pn(h),e.current)?(Jt=e,n.current=Pn(h)):Ap(e)&&!Qa(Pn(h),e)?n.current?n.current.focus():Jt&&Jt.current&&Cb(Jt.current):Ap(e)&&(n.current=Pn(h))},d=h=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let m=oh(),g=(m==="virtual"||m===null)&&dx()&&NE(),b=zr(s);if(!g&&b&&Ap(e)&&!Qa(b,e)){Jt=e;let k=Pn(h);if(k&&k.isConnected){var x;n.current=k,(x=n.current)===null||x===void 0||x.focus()}else Jt.current&&Cb(Jt.current)}})};return s.addEventListener("keydown",a,!1),s.addEventListener("focusin",c,!1),i?.forEach(h=>h.addEventListener("focusin",c,!1)),i?.forEach(h=>h.addEventListener("focusout",d,!1)),()=>{s.removeEventListener("keydown",a,!1),s.removeEventListener("focusin",c,!1),i?.forEach(h=>h.removeEventListener("focusin",c,!1)),i?.forEach(h=>h.removeEventListener("focusout",d,!1))}},[e,t]),an(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function jT(e){return Qa(e)}function io(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function Qa(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of Mn.traverse(Mn.getTreeNode(t)))if(n&&io(e,n.current))return!0;return!1}function uF(e){return Qa(e,Jt)}function Zg(e,t){var n;let r=(n=Mn.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function Xs(e,t=!1){if(e!=null&&!t)try{Cu(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function BT(e,t=!0){let n=e[0].previousElementSibling,r=vu(e),i=Qs(r,{tabbable:t},e);i.currentNode=n;let s=i.nextNode();return t&&!s&&(r=vu(e),i=Qs(r,{tabbable:!1},e),i.currentNode=n,s=i.nextNode()),s}function Cb(e,t=!0){Xs(BT(e,t))}function cF(e,t){const n=He.useRef(t);S.useEffect(()=>{if(n.current){Jt=e;const r=Dt(e.current?e.current[0]:void 0);!io(zr(r),Jt.current)&&e.current&&Cb(e.current)}n.current=!1},[e])}function fF(e,t,n){an(()=>{if(t||n)return;let r=e.current;const i=Dt(r?r[0]:void 0);let s=a=>{let c=Pn(a);io(c,e.current)?Jt=e:jT(c)||(Jt=null)};return i.addEventListener("focusin",s,!1),r?.forEach(a=>a.addEventListener("focusin",s,!1)),()=>{i.removeEventListener("focusin",s,!1),r?.forEach(a=>a.removeEventListener("focusin",s,!1))}},[e,t,n])}function rk(e){let t=Mn.getTreeNode(Jt);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function dF(e,t,n){const r=S.useRef(typeof document<"u"?zr(Dt(e.current?e.current[0]:void 0)):null);an(()=>{let i=e.current;const s=Dt(i?i[0]:void 0);if(!t||n)return;let a=()=>{(!Jt||Zg(Jt,e))&&io(zr(s),e.current)&&(Jt=e)};return s.addEventListener("focusin",a,!1),i?.forEach(c=>c.addEventListener("focusin",a,!1)),()=>{s.removeEventListener("focusin",a,!1),i?.forEach(c=>c.removeEventListener("focusin",a,!1))}},[e,n]),an(()=>{const i=Dt(e.current?e.current[0]:void 0);if(!t)return;let s=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!Ap(e)||a.isComposing)return;let c=i.activeElement;if(!Qa(c,e)||!rk(e))return;let d=Mn.getTreeNode(e);if(!d)return;let h=d.nodeToRestore,m=Qs(i.body,{tabbable:!0});m.currentNode=c;let g=a.shiftKey?m.previousNode():m.nextNode();if((!h||!h.isConnected||h===i.body)&&(h=void 0,d.nodeToRestore=void 0),(!g||!Qa(g,e))&&h){m.currentNode=h;do g=a.shiftKey?m.previousNode():m.nextNode();while(Qa(g,e));a.preventDefault(),a.stopPropagation(),g?Xs(g,!0):jT(h)?Xs(h,!0):c.blur()}};return n||i.addEventListener("keydown",s,!0),()=>{n||i.removeEventListener("keydown",s,!0)}},[e,t,n]),an(()=>{const i=Dt(e.current?e.current[0]:void 0);if(!t)return;let s=Mn.getTreeNode(e);if(s){var a;return s.nodeToRestore=(a=r.current)!==null&&a!==void 0?a:void 0,()=>{let c=Mn.getTreeNode(e);if(!c)return;let d=c.nodeToRestore,h=zr(i);if(t&&d&&(h&&Qa(h,e)||h===i.body&&rk(e))){let m=Mn.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let g=m.getTreeNode(e);for(;g;){if(g.nodeToRestore&&g.nodeToRestore.isConnected){ik(g.nodeToRestore);return}g=g.parent}for(g=m.getTreeNode(e);g;){if(g.scopeRef&&g.scopeRef.current&&Mn.getTreeNode(g.scopeRef)){let b=BT(g.scopeRef.current,!0);ik(b);return}g=g.parent}}})}}}},[e,t])}function ik(e){e.dispatchEvent(new CustomEvent(kb,{bubbles:!0,cancelable:!0}))&&Xs(e)}function Qs(e,t,n){let r=t?.tabbable?LM:qE,i=e?.nodeType===Node.ELEMENT_NODE?e:null,s=Dt(i),a=cM(s,e||s,NodeFilter.SHOW_ELEMENT,{acceptNode(c){var d;return!(t==null||(d=t.from)===null||d===void 0)&&d.contains(c)?NodeFilter.FILTER_REJECT:r(c)&&$T(c)&&(!n||io(c,n))&&(!t?.accept||t.accept(c))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(a.currentNode=t.from),a}class Zx{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let s=new Eb({scopeRef:t});i.addChild(s),s.parent=i,this.fastMap.set(t,s),r&&(s.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let s of this.traverse())s!==n&&n.nodeToRestore&&s.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&io(s.nodeToRestore,n.scopeRef.current)&&(s.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(s=>r&&r.addChild(s))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new Zx;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new Eb({scopeRef:null}),this.fastMap.set(null,this.root)}}class Eb{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let Mn=new Zx;function Pu(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=S.useRef({isFocused:!1,isFocusVisible:t||Jx()}),[s,a]=S.useState(!1),[c,d]=S.useState(()=>i.current.isFocused&&i.current.isFocusVisible),h=S.useCallback(()=>d(i.current.isFocused&&i.current.isFocusVisible),[]),m=S.useCallback(x=>{i.current.isFocused=x,a(x),h()},[h]);J5(x=>{i.current.isFocusVisible=x,h()},[],{isTextInput:n});let{focusProps:g}=zT({isDisabled:r,onFocusChange:m}),{focusWithinProps:b}=Ev({isDisabled:!r,onFocusWithinChange:m});return{isFocused:s,isFocusVisible:c,focusProps:r?b:g}}function pF(e){let t=gF(Dt(e));t!==e&&(t&&hF(t,e),e&&mF(e,t))}function hF(e,t){e.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}function mF(e,t){e.dispatchEvent(new FocusEvent("focus",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:t}))}function gF(e){let t=zr(e),n=t?.getAttribute("aria-activedescendant");return n&&e.getElementById(n)||t}const m0=typeof document<"u"&&window.visualViewport,vF=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let vg=0,g0;function yF(e={}){let{isDisabled:t}=e;an(()=>{if(!t)return vg++,vg===1&&(bv()?g0=xF():g0=bF()),()=>{vg--,vg===0&&g0()}},[t])}function bF(){let e=window.innerWidth-document.documentElement.clientWidth;return Tf(e>0&&("scrollbarGutter"in document.documentElement.style?yu(document.documentElement,"scrollbarGutter","stable"):yu(document.documentElement,"paddingRight",`${e}px`)),yu(document.documentElement,"overflow","hidden"))}function xF(){let e,t,n=h=>{e=VE(h.target,!0),!(e===document.documentElement&&e===document.body)&&e instanceof HTMLElement&&window.getComputedStyle(e).overscrollBehavior==="auto"&&(t=yu(e,"overscrollBehavior","contain"))},r=h=>{if(!e||e===document.documentElement||e===document.body){h.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&h.preventDefault()},i=()=>{t&&t()},s=h=>{let m=h.target;wF(m)&&(c(),m.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{m.style.transform="",m0&&(m0.height<window.innerHeight?requestAnimationFrame(()=>{ok(m)}):m0.addEventListener("resize",()=>ok(m),{once:!0}))}))},a=null,c=()=>{if(a)return;let h=()=>{window.scrollTo(0,0)},m=window.pageXOffset,g=window.pageYOffset;a=Tf(gp(window,"scroll",h),yu(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),yu(document.documentElement,"overflow","hidden"),yu(document.body,"marginTop",`-${g}px`),()=>{window.scrollTo(m,g)}),window.scrollTo(0,0)},d=Tf(gp(document,"touchstart",n,{passive:!1,capture:!0}),gp(document,"touchmove",r,{passive:!1,capture:!0}),gp(document,"touchend",i,{passive:!1,capture:!0}),gp(document,"focus",s,!0));return()=>{t?.(),a?.(),d()}}function yu(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function gp(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ok(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let r=VE(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect().top,s=n.getBoundingClientRect().top;s>i+n.clientHeight&&(r.scrollTop+=s-i)}n=r.parentElement}}function wF(e){return e instanceof HTMLInputElement&&!vF.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}const SF=S.createContext({});function VT(){var e;return(e=S.useContext(SF))!==null&&e!==void 0?e:{}}const Pb=He.createContext(null);function kF(e){let{children:t}=e,n=S.useContext(Pb),[r,i]=S.useState(0),s=S.useMemo(()=>({parent:n,modalCount:r,addModal(){i(a=>a+1),n&&n.addModal()},removeModal(){i(a=>a-1),n&&n.removeModal()}}),[n,r]);return He.createElement(Pb.Provider,{value:s},t)}function CF(){let e=S.useContext(Pb);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:void 0}}}function EF(e){let{modalProviderProps:t}=CF();return He.createElement("div",{"data-overlay-container":!0,...e,...t})}function UT(e){return He.createElement(kF,null,He.createElement(EF,e))}function sk(e){let t=ph(),{portalContainer:n=t?null:document.body,...r}=e,{getContainer:i}=VT();if(!e.portalContainer&&i&&(n=i()),He.useEffect(()=>{if(n?.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[n]),!n)return null;let s=He.createElement(UT,r);return GE.createPortal(s,n)}var KT={};KT={dismiss:"تجاهل"};var WT={};WT={dismiss:"Отхвърляне"};var HT={};HT={dismiss:"Odstranit"};var GT={};GT={dismiss:"Luk"};var qT={};qT={dismiss:"Schließen"};var YT={};YT={dismiss:"Απόρριψη"};var XT={};XT={dismiss:"Dismiss"};var QT={};QT={dismiss:"Descartar"};var JT={};JT={dismiss:"Lõpeta"};var ZT={};ZT={dismiss:"Hylkää"};var e_={};e_={dismiss:"Rejeter"};var t_={};t_={dismiss:"התעלם"};var n_={};n_={dismiss:"Odbaci"};var r_={};r_={dismiss:"Elutasítás"};var i_={};i_={dismiss:"Ignora"};var o_={};o_={dismiss:"閉じる"};var s_={};s_={dismiss:"무시"};var a_={};a_={dismiss:"Atmesti"};var l_={};l_={dismiss:"Nerādīt"};var u_={};u_={dismiss:"Lukk"};var c_={};c_={dismiss:"Negeren"};var f_={};f_={dismiss:"Zignoruj"};var d_={};d_={dismiss:"Descartar"};var p_={};p_={dismiss:"Dispensar"};var h_={};h_={dismiss:"Revocare"};var m_={};m_={dismiss:"Пропустить"};var g_={};g_={dismiss:"Zrušiť"};var v_={};v_={dismiss:"Opusti"};var y_={};y_={dismiss:"Odbaci"};var b_={};b_={dismiss:"Avvisa"};var x_={};x_={dismiss:"Kapat"};var w_={};w_={dismiss:"Скасувати"};var S_={};S_={dismiss:"取消"};var k_={};k_={dismiss:"關閉"};var C_={};C_={"ar-AE":KT,"bg-BG":WT,"cs-CZ":HT,"da-DK":GT,"de-DE":qT,"el-GR":YT,"en-US":XT,"es-ES":QT,"et-EE":JT,"fi-FI":ZT,"fr-FR":e_,"he-IL":t_,"hr-HR":n_,"hu-HU":r_,"it-IT":i_,"ja-JP":o_,"ko-KR":s_,"lt-LT":a_,"lv-LV":l_,"nb-NO":u_,"nl-NL":c_,"pl-PL":f_,"pt-BR":d_,"pt-PT":p_,"ro-RO":h_,"ru-RU":m_,"sk-SK":g_,"sl-SI":v_,"sr-SP":y_,"sv-SE":b_,"tr-TR":x_,"uk-UA":w_,"zh-CN":S_,"zh-TW":k_};const ak={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function PF(e={}){let{style:t,isFocusable:n}=e,[r,i]=S.useState(!1),{focusWithinProps:s}=Ev({isDisabled:!n,onFocusWithinChange:c=>i(c)}),a=S.useMemo(()=>r?t:t?{...ak,...t}:ak,[r]);return{visuallyHiddenProps:{...s,style:a}}}function TF(e){let{children:t,elementType:n="div",isFocusable:r,style:i,...s}=e,{visuallyHiddenProps:a}=PF(e);return He.createElement(n,Tn(s,a),t)}function _F(e){return e&&e.__esModule?e.default:e}function lk(e){let{onDismiss:t,...n}=e,r=ZL(_F(C_),"@react-aria/overlays"),i=jE(n,r.format("dismiss")),s=()=>{t&&t()};return He.createElement(TF,null,He.createElement("button",{...i,tabIndex:-1,onClick:s,style:{width:1,height:1}}))}let vp=new WeakMap,Ji=[];function IF(e,t=document.body){let n=new Set(e),r=new Set,i=d=>{for(let b of d.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(b);let h=b=>{if(n.has(b)||b.parentElement&&r.has(b.parentElement)&&b.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let x of n)if(b.contains(x))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},m=document.createTreeWalker(d,NodeFilter.SHOW_ELEMENT,{acceptNode:h}),g=h(d);if(g===NodeFilter.FILTER_ACCEPT&&s(d),g!==NodeFilter.FILTER_REJECT){let b=m.nextNode();for(;b!=null;)s(b),b=m.nextNode()}},s=d=>{var h;let m=(h=vp.get(d))!==null&&h!==void 0?h:0;d.getAttribute("aria-hidden")==="true"&&m===0||(m===0&&d.setAttribute("aria-hidden","true"),r.add(d),vp.set(d,m+1))};Ji.length&&Ji[Ji.length-1].disconnect(),i(t);let a=new MutationObserver(d=>{for(let h of d)if(!(h.type!=="childList"||h.addedNodes.length===0)&&![...n,...r].some(m=>m.contains(h.target))){for(let m of h.removedNodes)m instanceof Element&&(n.delete(m),r.delete(m));for(let m of h.addedNodes)(m instanceof HTMLElement||m instanceof SVGElement)&&(m.dataset.liveAnnouncer==="true"||m.dataset.reactAriaTopLayer==="true")?n.add(m):m instanceof Element&&i(m)}});a.observe(t,{childList:!0,subtree:!0});let c={visibleNodes:n,hiddenNodes:r,observe(){a.observe(t,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return Ji.push(c),()=>{a.disconnect();for(let d of r){let h=vp.get(d);h!=null&&(h===1?(d.removeAttribute("aria-hidden"),vp.delete(d)):vp.set(d,h-1))}c===Ji[Ji.length-1]?(Ji.pop(),Ji.length&&Ji[Ji.length-1].observe()):Ji.splice(Ji.indexOf(c),1)}}const E_=He.createContext(null);function $F(e){let t=ph(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,s]=S.useState(!1),a=S.useMemo(()=>({contain:i,setContain:s}),[i,s]),{getContainer:c}=VT();if(!e.portalContainer&&c&&(n=c()),!n)return null;let d=e.children;return e.disableFocusManagement||(d=He.createElement(sF,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!r},d)),d=He.createElement(E_.Provider,{value:a},He.createElement(nF,null,d)),GE.createPortal(d,n)}function P_(){let e=S.useContext(E_),t=e?.setContain;an(()=>{t?.(!0)},[t])}var AF=({children:e,navigate:t,disableAnimation:n,useHref:r,disableRipple:i=!1,skipFramerMotionAnimations:s=n,reducedMotion:a="never",validationBehavior:c,locale:d="en-US",labelPlacement:h,defaultDates:m,createCalendar:g,spinnerVariant:b,...x})=>{let k=e;t&&(k=R.jsx(SM,{navigate:t,useHref:r,children:k}));const P=S.useMemo(()=>(n&&s&&(fs.skipAnimations=!0),{createCalendar:g,defaultDates:m,disableAnimation:n,disableRipple:i,validationBehavior:c,labelPlacement:h,spinnerVariant:b}),[g,m?.maxDate,m?.minDate,n,i,c,h,b]);return R.jsx(LL,{value:P,children:R.jsx(WL,{locale:d,children:R.jsx(G3,{reducedMotion:a,children:R.jsx(UT,{...x,children:k})})})})};function fq(e){const t=fi(),n=t?.labelPlacement;return S.useMemo(()=>{var r,i;const s=(i=(r=e.labelPlacement)!=null?r:n)!=null?i:"inside";return s==="inside"&&!e.label?"outside":s},[e.labelPlacement,n,e.label])}function RF(e){const t=fi(),n=t?.labelPlacement;return S.useMemo(()=>{var r,i;const s=(i=(r=e.labelPlacement)!=null?r:n)!=null?i:"inside";return s==="inside"&&!e.label?"outside":s},[e.labelPlacement,n,e.label])}function jr(e){return S.forwardRef(e)}var ia=(e,t,n=!0)=>{if(!t)return[e,{}];const r=t.reduce((i,s)=>s in e?{...i,[s]:e[s]}:i,{});return n?[Object.keys(e).filter(s=>!t.includes(s)).reduce((s,a)=>({...s,[a]:e[a]}),{}),r]:[e,r]},LF={default:"bg-default text-default-foreground",primary:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-success text-success-foreground",warning:"bg-warning text-warning-foreground",danger:"bg-danger text-danger-foreground",foreground:"bg-foreground text-background"},MF={default:"shadow-lg shadow-default/50 bg-default text-default-foreground",primary:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground",secondary:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground",success:"shadow-lg shadow-success/40 bg-success text-success-foreground",warning:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground",danger:"shadow-lg shadow-danger/40 bg-danger text-danger-foreground"},DF={default:"bg-transparent border-default text-foreground",primary:"bg-transparent border-primary text-primary",secondary:"bg-transparent border-secondary text-secondary",success:"bg-transparent border-success text-success",warning:"bg-transparent border-warning text-warning",danger:"bg-transparent border-danger text-danger"},NF={default:"bg-default/40 text-default-700",primary:"bg-primary/20 text-primary-600",secondary:"bg-secondary/20 text-secondary-600",success:"bg-success/20 text-success-700 dark:text-success",warning:"bg-warning/20 text-warning-700 dark:text-warning",danger:"bg-danger/20 text-danger-600 dark:text-danger-500"},FF={default:"border-default bg-default-100 text-default-foreground",primary:"border-default bg-default-100 text-primary",secondary:"border-default bg-default-100 text-secondary",success:"border-default bg-default-100 text-success",warning:"border-default bg-default-100 text-warning",danger:"border-default bg-default-100 text-danger"},OF={default:"bg-transparent text-default-foreground",primary:"bg-transparent text-primary",secondary:"bg-transparent text-secondary",success:"bg-transparent text-success",warning:"bg-transparent text-warning",danger:"bg-transparent text-danger"},zF={default:"border-default text-default-foreground",primary:"border-primary text-primary",secondary:"border-secondary text-secondary",success:"border-success text-success",warning:"border-warning text-warning",danger:"border-danger text-danger"},Te={solid:LF,shadow:MF,bordered:DF,flat:NF,faded:FF,light:OF,ghost:zF},jF={".spinner-bar-animation":{"animation-delay":"calc(-1.2s + (0.1s * var(--bar-index)))",transform:"rotate(calc(30deg * var(--bar-index)))translate(140%)"},".spinner-dot-animation":{"animation-delay":"calc(250ms * var(--dot-index))"},".spinner-dot-blink-animation":{"animation-delay":"calc(200ms * var(--dot-index))"}},BF={".leading-inherit":{"line-height":"inherit"},".bg-img-inherit":{"background-image":"inherit"},".bg-clip-inherit":{"background-clip":"inherit"},".text-fill-inherit":{"-webkit-text-fill-color":"inherit"},".tap-highlight-transparent":{"-webkit-tap-highlight-color":"transparent"},".input-search-cancel-button-none":{"&::-webkit-search-cancel-button":{"-webkit-appearance":"none"}}},VF={".scrollbar-hide":{"-ms-overflow-style":"none","scrollbar-width":"none","&::-webkit-scrollbar":{display:"none"}},".scrollbar-default":{"-ms-overflow-style":"auto","scrollbar-width":"auto","&::-webkit-scrollbar":{display:"block"}}},UF={".text-tiny":{"font-size":"var(--heroui-font-size-tiny)","line-height":"var(--heroui-line-height-tiny)"},".text-small":{"font-size":"var(--heroui-font-size-small)","line-height":"var(--heroui-line-height-small)"},".text-medium":{"font-size":"var(--heroui-font-size-medium)","line-height":"var(--heroui-line-height-medium)"},".text-large":{"font-size":"var(--heroui-font-size-large)","line-height":"var(--heroui-line-height-large)"}},is="250ms",KF={".transition-background":{"transition-property":"background","transition-timing-function":"ease","transition-duration":is},".transition-colors-opacity":{"transition-property":"color, background-color, border-color, text-decoration-color, fill, stroke, opacity","transition-timing-function":"ease","transition-duration":is},".transition-width":{"transition-property":"width","transition-timing-function":"ease","transition-duration":is},".transition-height":{"transition-property":"height","transition-timing-function":"ease","transition-duration":is},".transition-size":{"transition-property":"width, height","transition-timing-function":"ease","transition-duration":is},".transition-left":{"transition-property":"left","transition-timing-function":"ease","transition-duration":is},".transition-transform-opacity":{"transition-property":"transform, scale, opacity rotate","transition-timing-function":"ease","transition-duration":is},".transition-transform-background":{"transition-property":"transform, scale, background","transition-timing-function":"ease","transition-duration":is},".transition-transform-colors":{"transition-property":"transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke","transition-timing-function":"ease","transition-duration":is},".transition-transform-colors-opacity":{"transition-property":"transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke, opacity","transition-timing-function":"ease","transition-duration":is}},WF={...BF,...KF,...VF,...UF,...jF},yg=["small","medium","large"],Tb={theme:{spacing:["divider"],radius:yg},classGroups:{shadow:[{shadow:yg}],opacity:[{opacity:["disabled"]}],"font-size":[{text:["tiny",...yg]}],"border-w":[{border:yg}],"bg-image":["bg-stripe-gradient-default","bg-stripe-gradient-primary","bg-stripe-gradient-secondary","bg-stripe-gradient-success","bg-stripe-gradient-warning","bg-stripe-gradient-danger"],transition:Object.keys(WF).filter(e=>e.includes(".transition")).map(e=>e.replace(".",""))}},uk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,si=e=>!e||typeof e!="object"||Object.keys(e).length===0,HF=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function T_(e,t){e.forEach(function(n){Array.isArray(n)?T_(n,t):t.push(n)})}function __(e){let t=[];return T_(e,t),t}var I_=(...e)=>__(e).filter(Boolean),$_=(e,t)=>{let n={},r=Object.keys(e),i=Object.keys(t);for(let s of r)if(i.includes(s)){let a=e[s],c=t[s];Array.isArray(a)||Array.isArray(c)?n[s]=I_(c,a):typeof a=="object"&&typeof c=="object"?n[s]=$_(a,c):n[s]=c+" "+a}else n[s]=e[s];for(let s of i)r.includes(s)||(n[s]=t[s]);return n},ck=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();const ew="-",GF=e=>{const t=YF(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const c=a.split(ew);return c[0]===""&&c.length!==1&&c.shift(),A_(c,t)||qF(a)},getConflictingClassGroupIds:(a,c)=>{const d=n[a]||[];return c&&r[a]?[...d,...r[a]]:d}}},A_=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?A_(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(ew);return t.validators.find(({validator:a})=>a(s))?.classGroupId},fk=/^\[(.+)\]$/,qF=e=>{if(fk.test(e)){const t=fk.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},YF=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)_b(n[i],r,i,t);return r},_b=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:dk(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(XF(i)){_b(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,a])=>{_b(a,dk(t,s),n,r)})})},dk=(e,t)=>{let n=e;return t.split(ew).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},XF=e=>e.isThemeGetter,QF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return i(s,a),a},set(s,a){n.has(s)?n.set(s,a):i(s,a)}}},Ib="!",$b=":",JF=$b.length,ZF=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let a=0,c=0,d=0,h;for(let k=0;k<i.length;k++){let P=i[k];if(a===0&&c===0){if(P===$b){s.push(i.slice(d,k)),d=k+JF;continue}if(P==="/"){h=k;continue}}P==="["?a++:P==="]"?a--:P==="("?c++:P===")"&&c--}const m=s.length===0?i:i.substring(d),g=eO(m),b=g!==m,x=h&&h>d?h-d:void 0;return{modifiers:s,hasImportantModifier:b,baseClassName:g,maybePostfixModifierPosition:x}};if(t){const i=t+$b,s=r;r=a=>a.startsWith(i)?s(a.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},eO=e=>e.endsWith(Ib)?e.substring(0,e.length-1):e.startsWith(Ib)?e.substring(1):e,tO=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let s=[];return r.forEach(a=>{a[0]==="["||t[a]?(i.push(...s.sort(),a),s=[]):s.push(a)}),i.push(...s.sort()),i}},nO=e=>({cache:QF(e.cacheSize),parseClassName:ZF(e),sortModifiers:tO(e),...GF(e)}),rO=/\s+/,iO=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,a=[],c=e.trim().split(rO);let d="";for(let h=c.length-1;h>=0;h-=1){const m=c[h],{isExternal:g,modifiers:b,hasImportantModifier:x,baseClassName:k,maybePostfixModifierPosition:P}=n(m);if(g){d=m+(d.length>0?" "+d:d);continue}let T=!!P,_=r(T?k.substring(0,P):k);if(!_){if(!T){d=m+(d.length>0?" "+d:d);continue}if(_=r(k),!_){d=m+(d.length>0?" "+d:d);continue}T=!1}const A=s(b).join(":"),M=x?A+Ib:A,O=M+_;if(a.includes(O))continue;a.push(O);const j=i(_,T);for(let $=0;$<j.length;++$){const Y=j[$];a.push(M+Y)}d=m+(d.length>0?" "+d:d)}return d};function oO(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=R_(t))&&(r&&(r+=" "),r+=n);return r}const R_=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=R_(e[r]))&&(n&&(n+=" "),n+=t);return n};function Ab(e,...t){let n,r,i,s=a;function a(d){const h=t.reduce((m,g)=>g(m),e());return n=nO(h),r=n.cache.get,i=n.cache.set,s=c,c(d)}function c(d){const h=r(d);if(h)return h;const m=iO(d,n);return i(d,m),m}return function(){return s(oO.apply(null,arguments))}}const Zn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},L_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,M_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sO=/^\d+\/\d+$/,aO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lO=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,uO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,cO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,af=e=>sO.test(e),yt=e=>!!e&&!Number.isNaN(Number(e)),lu=e=>!!e&&Number.isInteger(Number(e)),pk=e=>e.endsWith("%")&&yt(e.slice(0,-1)),Ga=e=>aO.test(e),dO=()=>!0,pO=e=>lO.test(e)&&!uO.test(e),tw=()=>!1,hO=e=>cO.test(e),mO=e=>fO.test(e),gO=e=>!je(e)&&!Be(e),vO=e=>Of(e,F_,tw),je=e=>L_.test(e),uu=e=>Of(e,O_,pO),v0=e=>Of(e,_O,yt),yO=e=>Of(e,D_,tw),bO=e=>Of(e,N_,mO),xO=e=>Of(e,tw,hO),Be=e=>M_.test(e),bg=e=>zf(e,O_),wO=e=>zf(e,IO),SO=e=>zf(e,D_),kO=e=>zf(e,F_),CO=e=>zf(e,N_),EO=e=>zf(e,$O,!0),Of=(e,t,n)=>{const r=L_.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},zf=(e,t,n=!1)=>{const r=M_.exec(e);return r?r[1]?t(r[1]):n:!1},D_=e=>e==="position",PO=new Set(["image","url"]),N_=e=>PO.has(e),TO=new Set(["length","size","percentage"]),F_=e=>TO.has(e),O_=e=>e==="length",_O=e=>e==="number",IO=e=>e==="family-name",$O=e=>e==="shadow",Rb=()=>{const e=Zn("color"),t=Zn("font"),n=Zn("text"),r=Zn("font-weight"),i=Zn("tracking"),s=Zn("leading"),a=Zn("breakpoint"),c=Zn("container"),d=Zn("spacing"),h=Zn("radius"),m=Zn("shadow"),g=Zn("inset-shadow"),b=Zn("drop-shadow"),x=Zn("blur"),k=Zn("perspective"),P=Zn("aspect"),T=Zn("ease"),_=Zn("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],$=()=>[Be,je,d],Y=()=>[af,"full","auto",...$()],te=()=>[lu,"none","subgrid",Be,je],ie=()=>["auto",{span:["full",lu,Be,je]},Be,je],B=()=>[lu,"auto",Be,je],W=()=>["auto","min","max","fr",Be,je],G=()=>["start","end","center","between","around","evenly","stretch","baseline"],ee=()=>["start","end","center","stretch"],H=()=>["auto",...$()],le=()=>[af,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],J=()=>[e,Be,je],X=()=>[pk,uu],V=()=>["","none","full",h,Be,je],ae=()=>["",yt,bg,uu],D=()=>["solid","dashed","dotted","double"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>["","none",x,Be,je],z=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Be,je],me=()=>["none",yt,Be,je],Ce=()=>["none",yt,Be,je],ye=()=>[yt,Be,je],Oe=()=>[af,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ga],breakpoint:[Ga],color:[dO],container:[Ga],"drop-shadow":[Ga],ease:["in","out","in-out"],font:[gO],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ga],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ga],shadow:[Ga],spacing:["px",yt],text:[Ga],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",af,je,Be,P]}],container:["container"],columns:[{columns:[yt,je,Be,c]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...M(),je,Be]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{start:Y()}],end:[{end:Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[lu,"auto",Be,je]}],basis:[{basis:[af,"full","auto",c,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[yt,af,"auto","initial","none",je]}],grow:[{grow:["",yt,Be,je]}],shrink:[{shrink:["",yt,Be,je]}],order:[{order:[lu,"first","last","none",Be,je]}],"grid-cols":[{"grid-cols":te()}],"col-start-end":[{col:ie()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":te()}],"row-start-end":[{row:ie()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...ee(),"baseline"]}],"align-self":[{self:["auto",...ee(),"baseline"]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:le()}],w:[{w:[c,"screen",...le()]}],"min-w":[{"min-w":[c,"screen","none",...le()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[a]},...le()]}],h:[{h:["screen",...le()]}],"min-h":[{"min-h":["screen","none",...le()]}],"max-h":[{"max-h":["screen",...le()]}],"font-size":[{text:["base",n,bg,uu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Be,v0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pk,je]}],"font-family":[{font:[wO,je,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Be,je]}],"line-clamp":[{"line-clamp":[yt,"none",Be,v0]}],leading:[{leading:[s,...$()]}],"list-image":[{"list-image":["none",Be,je]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Be,je]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:J()}],"text-color":[{text:J()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:[yt,"from-font","auto",Be,uu]}],"text-decoration-color":[{decoration:J()}],"underline-offset":[{"underline-offset":[yt,"auto",Be,je]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Be,je]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Be,je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...M(),SO,yO]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",kO,vO]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},lu,Be,je],radial:["",Be,je],conic:[lu,Be,je]},CO,bO]}],"bg-color":[{bg:J()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:J()}],"gradient-via":[{via:J()}],"gradient-to":[{to:J()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...D(),"hidden","none"]}],"divide-style":[{divide:[...D(),"hidden","none"]}],"border-color":[{border:J()}],"border-color-x":[{"border-x":J()}],"border-color-y":[{"border-y":J()}],"border-color-s":[{"border-s":J()}],"border-color-e":[{"border-e":J()}],"border-color-t":[{"border-t":J()}],"border-color-r":[{"border-r":J()}],"border-color-b":[{"border-b":J()}],"border-color-l":[{"border-l":J()}],"divide-color":[{divide:J()}],"outline-style":[{outline:[...D(),"none","hidden"]}],"outline-offset":[{"outline-offset":[yt,Be,je]}],"outline-w":[{outline:["",yt,bg,uu]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",m,EO,xO]}],"shadow-color":[{shadow:J()}],"inset-shadow":[{"inset-shadow":["none",Be,je,g]}],"inset-shadow-color":[{"inset-shadow":J()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:J()}],"ring-offset-w":[{"ring-offset":[yt,uu]}],"ring-offset-color":[{"ring-offset":J()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":J()}],opacity:[{opacity:[yt,Be,je]}],"mix-blend":[{"mix-blend":[...U(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none",Be,je]}],blur:[{blur:oe()}],brightness:[{brightness:[yt,Be,je]}],contrast:[{contrast:[yt,Be,je]}],"drop-shadow":[{"drop-shadow":["","none",b,Be,je]}],grayscale:[{grayscale:["",yt,Be,je]}],"hue-rotate":[{"hue-rotate":[yt,Be,je]}],invert:[{invert:["",yt,Be,je]}],saturate:[{saturate:[yt,Be,je]}],sepia:[{sepia:["",yt,Be,je]}],"backdrop-filter":[{"backdrop-filter":["","none",Be,je]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[yt,Be,je]}],"backdrop-contrast":[{"backdrop-contrast":[yt,Be,je]}],"backdrop-grayscale":[{"backdrop-grayscale":["",yt,Be,je]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[yt,Be,je]}],"backdrop-invert":[{"backdrop-invert":["",yt,Be,je]}],"backdrop-opacity":[{"backdrop-opacity":[yt,Be,je]}],"backdrop-saturate":[{"backdrop-saturate":[yt,Be,je]}],"backdrop-sepia":[{"backdrop-sepia":["",yt,Be,je]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Be,je]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[yt,"initial",Be,je]}],ease:[{ease:["linear","initial",T,Be,je]}],delay:[{delay:[yt,Be,je]}],animate:[{animate:["none",_,Be,je]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,Be,je]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:Ce()}],"scale-x":[{"scale-x":Ce()}],"scale-y":[{"scale-y":Ce()}],"scale-z":[{"scale-z":Ce()}],"scale-3d":["scale-3d"],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[Be,je,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Oe()}],"translate-x":[{"translate-x":Oe()}],"translate-y":[{"translate-y":Oe()}],"translate-z":[{"translate-z":Oe()}],"translate-none":["translate-none"],accent:[{accent:J()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:J()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Be,je]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Be,je]}],fill:[{fill:["none",...J()]}],"stroke-w":[{stroke:[yt,bg,uu,v0]}],stroke:[{stroke:["none",...J()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},AO=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:s={}})=>(Rp(e,"cacheSize",t),Rp(e,"prefix",n),Rp(e,"experimentalParseClassName",r),xg(e.theme,s.theme),xg(e.classGroups,s.classGroups),xg(e.conflictingClassGroups,s.conflictingClassGroups),xg(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),Rp(e,"orderSensitiveModifiers",s.orderSensitiveModifiers),wg(e.theme,i.theme),wg(e.classGroups,i.classGroups),wg(e.conflictingClassGroups,i.conflictingClassGroups),wg(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),z_(e,i,"orderSensitiveModifiers"),e),Rp=(e,t,n)=>{n!==void 0&&(e[t]=n)},xg=(e,t)=>{if(t)for(const n in t)Rp(e,n,t[n])},wg=(e,t)=>{if(t)for(const n in t)z_(e,t,n)},z_=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},j_=(e,...t)=>typeof e=="function"?Ab(Rb,e,...t):Ab(()=>AO(Rb(),e),...t),RO=Ab(Rb);var LO={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},B_=e=>e||void 0,sh=(...e)=>B_(__(e).filter(Boolean).join(" ")),y0=null,Ys={},Lb=!1,yp=(...e)=>t=>t.twMerge?((!y0||Lb)&&(Lb=!1,y0=si(Ys)?RO:j_({...Ys,extend:{theme:Ys.theme,classGroups:Ys.classGroups,conflictingClassGroupModifiers:Ys.conflictingClassGroupModifiers,conflictingClassGroups:Ys.conflictingClassGroups,...Ys.extend}})),B_(y0(sh(e)))):sh(e),hk=(e,t)=>{for(let n in t)e.hasOwnProperty(n)?e[n]=sh(e[n],t[n]):e[n]=t[n];return e},MO=(e,t)=>{let{extend:n=null,slots:r={},variants:i={},compoundVariants:s=[],compoundSlots:a=[],defaultVariants:c={}}=e,d={...LO,...t},h=n!=null&&n.base?sh(n.base,e?.base):e?.base,m=n!=null&&n.variants&&!si(n.variants)?$_(i,n.variants):i,g=n!=null&&n.defaultVariants&&!si(n.defaultVariants)?{...n.defaultVariants,...c}:c;!si(d.twMergeConfig)&&!HF(d.twMergeConfig,Ys)&&(Lb=!0,Ys=d.twMergeConfig);let b=si(n?.slots),x=si(r)?{}:{base:sh(e?.base,b&&n?.base),...r},k=b?x:hk({...n?.slots},si(x)?{base:e?.base}:x),P=si(n?.compoundVariants)?s:I_(n?.compoundVariants,s),T=A=>{if(si(m)&&si(r)&&b)return yp(h,A?.class,A?.className)(d);if(P&&!Array.isArray(P))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof P}`);if(a&&!Array.isArray(a))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof a}`);let M=(G,ee,H=[],le)=>{let J=H;if(typeof ee=="string")J=J.concat(ck(ee).split(" ").map(X=>`${G}:${X}`));else if(Array.isArray(ee))J=J.concat(ee.reduce((X,V)=>X.concat(`${G}:${V}`),[]));else if(typeof ee=="object"&&typeof le=="string"){for(let X in ee)if(ee.hasOwnProperty(X)&&X===le){let V=ee[X];if(V&&typeof V=="string"){let ae=ck(V);J[le]?J[le]=J[le].concat(ae.split(" ").map(D=>`${G}:${D}`)):J[le]=ae.split(" ").map(D=>`${G}:${D}`)}else Array.isArray(V)&&V.length>0&&(J[le]=V.reduce((ae,D)=>ae.concat(`${G}:${D}`),[]))}}return J},O=(G,ee=m,H=null,le=null)=>{var J;let X=ee[G];if(!X||si(X))return null;let V=(J=le?.[G])!=null?J:A?.[G];if(V===null)return null;let ae=uk(V),D=Array.isArray(d.responsiveVariants)&&d.responsiveVariants.length>0||d.responsiveVariants===!0,U=g?.[G],oe=[];if(typeof ae=="object"&&D)for(let[Ce,ye]of Object.entries(ae)){let Oe=X[ye];if(Ce==="initial"){U=ye;continue}Array.isArray(d.responsiveVariants)&&!d.responsiveVariants.includes(Ce)||(oe=M(Ce,Oe,oe,H))}let z=ae!=null&&typeof ae!="object"?ae:uk(U),me=X[z||"false"];return typeof oe=="object"&&typeof H=="string"&&oe[H]?hk(oe,me):oe.length>0?(oe.push(me),H==="base"?oe.join(" "):oe):me},j=()=>m?Object.keys(m).map(G=>O(G,m)):null,$=(G,ee)=>{if(!m||typeof m!="object")return null;let H=new Array;for(let le in m){let J=O(le,m,G,ee),X=G==="base"&&typeof J=="string"?J:J&&J[G];X&&(H[H.length]=X)}return H},Y={};for(let G in A)A[G]!==void 0&&(Y[G]=A[G]);let te=(G,ee)=>{var H;let le=typeof A?.[G]=="object"?{[G]:(H=A[G])==null?void 0:H.initial}:{};return{...g,...Y,...le,...ee}},ie=(G=[],ee)=>{let H=[];for(let{class:le,className:J,...X}of G){let V=!0;for(let[ae,D]of Object.entries(X)){let U=te(ae,ee)[ae];if(Array.isArray(D)){if(!D.includes(U)){V=!1;break}}else{let oe=z=>z==null||z===!1;if(oe(D)&&oe(U))continue;if(U!==D){V=!1;break}}}V&&(le&&H.push(le),J&&H.push(J))}return H},B=G=>{let ee=ie(P,G);if(!Array.isArray(ee))return ee;let H={};for(let le of ee)if(typeof le=="string"&&(H.base=yp(H.base,le)(d)),typeof le=="object")for(let[J,X]of Object.entries(le))H[J]=yp(H[J],X)(d);return H},W=G=>{if(a.length<1)return null;let ee={};for(let{slots:H=[],class:le,className:J,...X}of a){if(!si(X)){let V=!0;for(let ae of Object.keys(X)){let D=te(ae,G)[ae];if(D===void 0||(Array.isArray(X[ae])?!X[ae].includes(D):X[ae]!==D)){V=!1;break}}if(!V)continue}for(let V of H)ee[V]=ee[V]||[],ee[V].push([le,J])}return ee};if(!si(r)||!b){let G={};if(typeof k=="object"&&!si(k))for(let ee of Object.keys(k))G[ee]=H=>{var le,J;return yp(k[ee],$(ee,H),((le=B(H))!=null?le:[])[ee],((J=W(H))!=null?J:[])[ee],H?.class,H?.className)(d)};return G}return yp(h,j(),ie(P),A?.class,A?.className)(d)},_=()=>{if(!(!m||typeof m!="object"))return Object.keys(m)};return T.variantKeys=_(),T.extend=n,T.base=h,T.slots=k,T.variants=m,T.defaultVariants=g,T.compoundSlots=a,T.compoundVariants=P,T},er=(e,t)=>{var n,r,i;return MO(e,{...t,twMerge:(n=t?.twMerge)!=null?n:!0,twMergeConfig:{...t?.twMergeConfig,theme:{...(r=t?.twMergeConfig)==null?void 0:r.theme,...Tb.theme},classGroups:{...(i=t?.twMergeConfig)==null?void 0:i.classGroups,...Tb.classGroups}}})},mk=er({slots:{base:"relative inline-flex flex-col gap-2 items-center justify-center",wrapper:"relative flex",label:"text-foreground dark:text-foreground-dark font-regular",circle1:"absolute w-full h-full rounded-full",circle2:"absolute w-full h-full rounded-full",dots:"relative rounded-full mx-auto",spinnerBars:["absolute","animate-fade-out","rounded-full","w-[25%]","h-[8%]","left-[calc(37.5%)]","top-[calc(46%)]","spinner-bar-animation"]},variants:{size:{sm:{wrapper:"w-5 h-5",circle1:"border-2",circle2:"border-2",dots:"size-1",label:"text-small"},md:{wrapper:"w-8 h-8",circle1:"border-3",circle2:"border-3",dots:"size-1.5",label:"text-medium"},lg:{wrapper:"w-10 h-10",circle1:"border-3",circle2:"border-3",dots:"size-2",label:"text-large"}},color:{current:{circle1:"border-b-current",circle2:"border-b-current",dots:"bg-current",spinnerBars:"bg-current"},white:{circle1:"border-b-white",circle2:"border-b-white",dots:"bg-white",spinnerBars:"bg-white"},default:{circle1:"border-b-default",circle2:"border-b-default",dots:"bg-default",spinnerBars:"bg-default"},primary:{circle1:"border-b-primary",circle2:"border-b-primary",dots:"bg-primary",spinnerBars:"bg-primary"},secondary:{circle1:"border-b-secondary",circle2:"border-b-secondary",dots:"bg-secondary",spinnerBars:"bg-secondary"},success:{circle1:"border-b-success",circle2:"border-b-success",dots:"bg-success",spinnerBars:"bg-success"},warning:{circle1:"border-b-warning",circle2:"border-b-warning",dots:"bg-warning",spinnerBars:"bg-warning"},danger:{circle1:"border-b-danger",circle2:"border-b-danger",dots:"bg-danger",spinnerBars:"bg-danger"}},labelColor:{foreground:{label:"text-foreground"},primary:{label:"text-primary"},secondary:{label:"text-secondary"},success:{label:"text-success"},warning:{label:"text-warning"},danger:{label:"text-danger"}},variant:{default:{circle1:["animate-spinner-ease-spin","border-solid","border-t-transparent","border-l-transparent","border-r-transparent"],circle2:["opacity-75","animate-spinner-linear-spin","border-dotted","border-t-transparent","border-l-transparent","border-r-transparent"]},gradient:{circle1:["border-0","bg-gradient-to-b","from-transparent","via-transparent","to-primary","animate-spinner-linear-spin","[animation-duration:1s]","[-webkit-mask:radial-gradient(closest-side,rgba(0,0,0,0.0)calc(100%-3px),rgba(0,0,0,1)calc(100%-3px))]"],circle2:["hidden"]},wave:{wrapper:"translate-y-3/4",dots:["animate-sway","spinner-dot-animation"]},dots:{wrapper:"translate-y-2/4",dots:["animate-blink","spinner-dot-blink-animation"]},spinner:{},simple:{wrapper:"text-foreground h-5 w-5 animate-spin",circle1:"opacity-25",circle2:"opacity-75"}}},defaultVariants:{size:"md",color:"primary",labelColor:"foreground",variant:"default"},compoundVariants:[{variant:"gradient",color:"current",class:{circle1:"to-current"}},{variant:"gradient",color:"white",class:{circle1:"to-white"}},{variant:"gradient",color:"default",class:{circle1:"to-default"}},{variant:"gradient",color:"primary",class:{circle1:"to-primary"}},{variant:"gradient",color:"secondary",class:{circle1:"to-secondary"}},{variant:"gradient",color:"success",class:{circle1:"to-success"}},{variant:"gradient",color:"warning",class:{circle1:"to-warning"}},{variant:"gradient",color:"danger",class:{circle1:"to-danger"}},{variant:"wave",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"wave",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"wave",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"dots",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"dots",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"dots",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"simple",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"simple",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",color:"current",class:{wrapper:"text-current"}},{variant:"simple",color:"white",class:{wrapper:"text-white"}},{variant:"simple",color:"default",class:{wrapper:"text-default"}},{variant:"simple",color:"primary",class:{wrapper:"text-primary"}},{variant:"simple",color:"secondary",class:{wrapper:"text-secondary"}},{variant:"simple",color:"success",class:{wrapper:"text-success"}},{variant:"simple",color:"warning",class:{wrapper:"text-warning"}},{variant:"simple",color:"danger",class:{wrapper:"text-danger"}}]}),wh=["outline-hidden","data-[focus-visible=true]:z-10","data-[focus-visible=true]:outline-2","data-[focus-visible=true]:outline-focus","data-[focus-visible=true]:outline-offset-2"],V_=["outline-hidden","group-data-[focus-visible=true]:z-10","group-data-[focus-visible=true]:ring-2","group-data-[focus-visible=true]:ring-focus","group-data-[focus-visible=true]:ring-offset-2","group-data-[focus-visible=true]:ring-offset-background"],DO=["outline-hidden","ring-2","ring-focus","ring-offset-2","ring-offset-background"],lf={default:["[&+.border-medium.border-default]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],primary:["[&+.border-medium.border-primary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],secondary:["[&+.border-medium.border-secondary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],success:["[&+.border-medium.border-success]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],warning:["[&+.border-medium.border-warning]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],danger:["[&+.border-medium.border-danger]:ms-[calc(var(--heroui-border-width-medium)*-1)]"]},NO=["font-inherit","text-[100%]","leading-[1.15]","m-0","p-0","overflow-visible","box-border","absolute","top-0","w-full","h-full","opacity-[0.0001]","z-[1]","cursor-pointer","disabled:cursor-default"],gk=er({slots:{base:["z-0","relative","bg-transparent","before:content-['']","before:hidden","before:z-[-1]","before:absolute","before:rotate-45","before:w-2.5","before:h-2.5","before:rounded-sm","data-[arrow=true]:before:block","data-[placement=top]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top]:before:left-1/2","data-[placement=top]:before:-translate-x-1/2","data-[placement=top-start]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-start]:before:left-3","data-[placement=top-end]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-end]:before:right-3","data-[placement=bottom]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom]:before:left-1/2","data-[placement=bottom]:before:-translate-x-1/2","data-[placement=bottom-start]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-start]:before:left-3","data-[placement=bottom-end]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-end]:before:right-3","data-[placement=left]:before:-right-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=left]:before:top-1/2","data-[placement=left]:before:-translate-y-1/2","data-[placement=left-start]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-start]:before:top-1/4","data-[placement=left-end]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-end]:before:bottom-1/4","data-[placement=right]:before:-left-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=right]:before:top-1/2","data-[placement=right]:before:-translate-y-1/2","data-[placement=right-start]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-start]:before:top-1/4","data-[placement=right-end]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-end]:before:bottom-1/4",...wh],content:["z-10","px-2.5","py-1","w-full","inline-flex","flex-col","items-center","justify-center","box-border","subpixel-antialiased","outline-hidden","box-border"],trigger:["z-10"],backdrop:["hidden"],arrow:[]},variants:{size:{sm:{content:"text-tiny"},md:{content:"text-small"},lg:{content:"text-medium"}},color:{default:{base:"before:bg-content1 before:shadow-small",content:"bg-content1"},foreground:{base:"before:bg-foreground",content:Te.solid.foreground},primary:{base:"before:bg-primary",content:Te.solid.primary},secondary:{base:"before:bg-secondary",content:Te.solid.secondary},success:{base:"before:bg-success",content:Te.solid.success},warning:{base:"before:bg-warning",content:Te.solid.warning},danger:{base:"before:bg-danger",content:Te.solid.danger}},radius:{none:{content:"rounded-none"},sm:{content:"rounded-small"},md:{content:"rounded-medium"},lg:{content:"rounded-large"},full:{content:"rounded-full"}},shadow:{none:{content:"shadow-none"},sm:{content:"shadow-small"},md:{content:"shadow-medium"},lg:{content:"shadow-large"}},backdrop:{transparent:{},opaque:{backdrop:"bg-overlay/50 backdrop-opacity-disabled"},blur:{backdrop:"backdrop-blur-sm backdrop-saturate-150 bg-overlay/30"}},triggerScaleOnOpen:{true:{trigger:["aria-expanded:scale-[0.97]","aria-expanded:opacity-70","subpixel-antialiased"]},false:{}},disableAnimation:{true:{base:"animate-none"}},isTriggerDisabled:{true:{trigger:"opacity-disabled pointer-events-none"},false:{}}},defaultVariants:{color:"default",radius:"lg",size:"md",shadow:"md",backdrop:"transparent",triggerScaleOnOpen:!0},compoundVariants:[{backdrop:["opaque","blur"],class:{backdrop:"block w-full h-full fixed inset-0 -z-30"}}]});er({slots:{base:"flex flex-col gap-2 w-full",label:"",labelWrapper:"flex justify-between",value:"",track:"z-0 relative bg-default-300/50 overflow-hidden rtl:rotate-180",indicator:"h-full"},variants:{color:{default:{indicator:"bg-default-400"},primary:{indicator:"bg-primary"},secondary:{indicator:"bg-secondary"},success:{indicator:"bg-success"},warning:{indicator:"bg-warning"},danger:{indicator:"bg-danger"}},size:{sm:{label:"text-small",value:"text-small",track:"h-1"},md:{label:"text-medium",value:"text-medium",track:"h-3"},lg:{label:"text-large",value:"text-large",track:"h-5"}},radius:{none:{track:"rounded-none",indicator:"rounded-none"},sm:{track:"rounded-small",indicator:"rounded-small"},md:{track:"rounded-medium",indicator:"rounded-medium"},lg:{track:"rounded-large",indicator:"rounded-large"},full:{track:"rounded-full",indicator:"rounded-full"}},isStriped:{true:{indicator:"bg-stripe-gradient-default bg-stripe-size"}},isIndeterminate:{true:{indicator:["absolute","w-full","origin-left","animate-indeterminate-bar"]}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:{},false:{indicator:"transition-transform !duration-500"}}},defaultVariants:{color:"primary",size:"md",radius:"full",isStriped:!1,isIndeterminate:!1,isDisabled:!1},compoundVariants:[{disableAnimation:!0,isIndeterminate:!1,class:{indicator:"!transition-none motion-reduce:transition-none"}},{color:"primary",isStriped:!0,class:{indicator:"bg-stripe-gradient-primary bg-stripe-size"}},{color:"secondary",isStriped:!0,class:{indicator:"bg-stripe-gradient-secondary bg-stripe-size"}},{color:"success",isStriped:!0,class:{indicator:"bg-stripe-gradient-success bg-stripe-size"}},{color:"warning",isStriped:!0,class:{indicator:"bg-stripe-gradient-warning bg-stripe-size"}},{color:"danger",isStriped:!0,class:{indicator:"bg-stripe-gradient-danger bg-stripe-size"}}]},{twMerge:!0});var vk=er({slots:{base:"flex flex-col justify-center gap-1 max-w-fit items-center",label:"",svgWrapper:"relative block",svg:"z-0 relative overflow-hidden",track:"h-full stroke-default-300/50",indicator:"h-full stroke-current",value:"absolute font-normal inset-0 flex items-center justify-center"},variants:{color:{default:{svg:"text-default-400"},primary:{svg:"text-primary"},secondary:{svg:"text-secondary"},success:{svg:"text-success"},warning:{svg:"text-warning"},danger:{svg:"text-danger"}},size:{sm:{svg:"w-8 h-8",label:"text-small",value:"text-[0.5rem]"},md:{svg:"w-10 h-10",label:"text-small",value:"text-[0.55rem]"},lg:{svg:"w-12 h-12",label:"text-medium",value:"text-[0.6rem]"}},isIndeterminate:{true:{svg:"animate-spinner-ease-spin"}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:{},false:{indicator:"transition-all !duration-500"}}},defaultVariants:{color:"primary",size:"md",isDisabled:!1},compoundVariants:[{disableAnimation:!0,isIndeterminate:!1,class:{svg:"!transition-none motion-reduce:transition-none"}}]}),FO=["data-[top-scroll=true]:[mask-image:linear-gradient(0deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[bottom-scroll=true]:[mask-image:linear-gradient(180deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[top-bottom-scroll=true]:[mask-image:linear-gradient(#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"],OO=["data-[left-scroll=true]:[mask-image:linear-gradient(270deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[right-scroll=true]:[mask-image:linear-gradient(90deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[left-right-scroll=true]:[mask-image:linear-gradient(to_right,#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"],yk=er({base:[],variants:{orientation:{vertical:["overflow-y-auto",...FO],horizontal:["overflow-x-auto",...OO]},hideScrollBar:{true:"scrollbar-hide",false:""}},defaultVariants:{orientation:"vertical",hideScrollBar:!1}}),bk=er({slots:{base:["group","relative","overflow-hidden","bg-content3 dark:bg-content2","pointer-events-none","before:opacity-100","before:absolute","before:inset-0","before:-translate-x-full","before:animate-shimmer","before:border-t","before:border-content4/30","before:bg-gradient-to-r","before:from-transparent","before:via-content4","dark:before:via-default-700/10","before:to-transparent","after:opacity-100","after:absolute","after:inset-0","after:-z-10","after:bg-content3","dark:after:bg-content2","data-[loaded=true]:pointer-events-auto","data-[loaded=true]:overflow-visible","data-[loaded=true]:!bg-transparent","data-[loaded=true]:before:opacity-0 data-[loaded=true]:before:-z-10 data-[loaded=true]:before:animate-none","data-[loaded=true]:after:opacity-0"],content:["opacity-0","group-data-[loaded=true]:opacity-100"]},variants:{disableAnimation:{true:{base:"before:animate-none before:transition-none after:transition-none",content:"transition-none"},false:{base:"transition-background !duration-300",content:"transition-opacity motion-reduce:transition-none !duration-300"}}},defaultVariants:{}}),xk=er({slots:{base:"group flex flex-col data-[hidden=true]:hidden",label:["absolute","z-10","pointer-events-none","origin-top-left","shrink-0","rtl:origin-top-right","subpixel-antialiased","block","text-small","text-foreground-500"],mainWrapper:"h-full",inputWrapper:"relative w-full inline-flex tap-highlight-transparent flex-row items-center shadow-xs px-3 gap-3",innerWrapper:"inline-flex w-full items-center h-full box-border",input:["w-full font-normal bg-transparent !outline-hidden placeholder:text-foreground-500 focus-visible:outline-hidden","data-[has-start-content=true]:ps-1.5","data-[has-end-content=true]:pe-1.5","data-[type=color]:rounded-none","file:cursor-pointer file:bg-transparent file:border-0","autofill:bg-transparent bg-clip-text"],clearButton:["p-2","-m-2","z-10","absolute","end-3","start-auto","pointer-events-none","appearance-none","outline-hidden","select-none","opacity-0","cursor-pointer","active:!opacity-70","rounded-full",...wh],helperWrapper:"hidden group-data-[has-helper=true]:flex p-1 relative flex-col gap-1.5",description:"text-tiny text-foreground-400",errorMessage:"text-tiny text-danger"},variants:{variant:{flat:{inputWrapper:["bg-default-100","data-[hover=true]:bg-default-200","group-data-[focus=true]:bg-default-100"]},faded:{inputWrapper:["bg-default-100","border-medium","border-default-200","data-[hover=true]:border-default-400 focus-within:border-default-400"],value:"group-data-[has-value=true]:text-default-foreground"},bordered:{inputWrapper:["border-medium","border-default-200","data-[hover=true]:border-default-400","group-data-[focus=true]:border-default-foreground"]},underlined:{inputWrapper:["!px-1","!pb-0","!gap-0","relative","box-border","border-b-medium","shadow-[0_1px_0px_0_rgba(0,0,0,0.05)]","border-default-200","!rounded-none","hover:border-default-300","after:content-['']","after:w-0","after:origin-center","after:bg-default-foreground","after:absolute","after:left-1/2","after:-translate-x-1/2","after:-bottom-[2px]","after:h-[2px]","group-data-[focus=true]:after:w-full"],innerWrapper:"pb-1",label:"group-data-[filled-within=true]:text-foreground"}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},size:{sm:{label:"text-tiny",inputWrapper:"h-8 min-h-8 px-2 rounded-small",input:"text-small",clearButton:"text-medium"},md:{inputWrapper:"h-10 min-h-10 rounded-medium",input:"text-small",clearButton:"text-large hover:!opacity-100"},lg:{label:"text-medium",inputWrapper:"h-12 min-h-12 rounded-large",input:"text-medium",clearButton:"text-large hover:!opacity-100"}},radius:{none:{inputWrapper:"rounded-none"},sm:{inputWrapper:"rounded-small"},md:{inputWrapper:"rounded-medium"},lg:{inputWrapper:"rounded-large"},full:{inputWrapper:"rounded-full"}},labelPlacement:{outside:{mainWrapper:"flex flex-col"},"outside-left":{base:"flex-row items-center flex-nowrap data-[has-helper=true]:items-start",inputWrapper:"flex-1",mainWrapper:"flex flex-col",label:"relative text-foreground pe-2 ps-2 pointer-events-auto"},"outside-top":{mainWrapper:"flex flex-col",label:"relative text-foreground pb-2 pointer-events-auto"},inside:{label:"cursor-text",inputWrapper:"flex-col items-start justify-center gap-0",innerWrapper:"group-data-[has-label=true]:items-end"}},fullWidth:{true:{base:"w-full"},false:{}},isClearable:{true:{input:"peer pe-6 input-search-cancel-button-none",clearButton:["peer-data-[filled=true]:pointer-events-auto","peer-data-[filled=true]:opacity-70 peer-data-[filled=true]:block","peer-data-[filled=true]:scale-100"]}},isDisabled:{true:{base:"opacity-disabled pointer-events-none",inputWrapper:"pointer-events-none",label:"pointer-events-none"}},isInvalid:{true:{label:"!text-danger",input:"!placeholder:text-danger !text-danger"}},isRequired:{true:{label:"after:content-['*'] after:text-danger after:ms-0.5"}},isMultiline:{true:{label:"relative",inputWrapper:"!h-auto",innerWrapper:"items-start group-data-[has-label=true]:items-start",input:"resize-none data-[hide-scroll=true]:scrollbar-hide",clearButton:"absolute top-2 right-2 rtl:right-auto rtl:left-2 z-10"}},disableAnimation:{true:{input:"transition-none",inputWrapper:"transition-none",label:"transition-none"},false:{inputWrapper:"transition-background motion-reduce:transition-none !duration-150",label:["will-change-auto","!duration-200","!ease-out","motion-reduce:transition-none","transition-[transform,color,left,opacity,translate,scale]"],clearButton:["scale-90","ease-out","duration-150","transition-[opacity,transform]","motion-reduce:transition-none","motion-reduce:scale-100"]}}},defaultVariants:{variant:"flat",color:"default",size:"md",fullWidth:!0,isDisabled:!1,isMultiline:!1},compoundVariants:[{variant:"flat",color:"default",class:{input:"group-data-[has-value=true]:text-default-foreground"}},{variant:"flat",color:"primary",class:{inputWrapper:["bg-primary-100","data-[hover=true]:bg-primary-50","text-primary","group-data-[focus=true]:bg-primary-50","placeholder:text-primary"],input:"placeholder:text-primary",label:"text-primary"}},{variant:"flat",color:"secondary",class:{inputWrapper:["bg-secondary-100","text-secondary","data-[hover=true]:bg-secondary-50","group-data-[focus=true]:bg-secondary-50","placeholder:text-secondary"],input:"placeholder:text-secondary",label:"text-secondary"}},{variant:"flat",color:"success",class:{inputWrapper:["bg-success-100","text-success-600","dark:text-success","placeholder:text-success-600","dark:placeholder:text-success","data-[hover=true]:bg-success-50","group-data-[focus=true]:bg-success-50"],input:"placeholder:text-success-600 dark:placeholder:text-success",label:"text-success-600 dark:text-success"}},{variant:"flat",color:"warning",class:{inputWrapper:["bg-warning-100","text-warning-600","dark:text-warning","placeholder:text-warning-600","dark:placeholder:text-warning","data-[hover=true]:bg-warning-50","group-data-[focus=true]:bg-warning-50"],input:"placeholder:text-warning-600 dark:placeholder:text-warning",label:"text-warning-600 dark:text-warning"}},{variant:"flat",color:"danger",class:{inputWrapper:["bg-danger-100","text-danger","dark:text-danger-500","placeholder:text-danger","dark:placeholder:text-danger-500","data-[hover=true]:bg-danger-50","group-data-[focus=true]:bg-danger-50"],input:"placeholder:text-danger dark:placeholder:text-danger-500",label:"text-danger dark:text-danger-500"}},{variant:"faded",color:"primary",class:{label:"text-primary",inputWrapper:"data-[hover=true]:border-primary focus-within:border-primary"}},{variant:"faded",color:"secondary",class:{label:"text-secondary",inputWrapper:"data-[hover=true]:border-secondary focus-within:border-secondary"}},{variant:"faded",color:"success",class:{label:"text-success",inputWrapper:"data-[hover=true]:border-success focus-within:border-success"}},{variant:"faded",color:"warning",class:{label:"text-warning",inputWrapper:"data-[hover=true]:border-warning focus-within:border-warning"}},{variant:"faded",color:"danger",class:{label:"text-danger",inputWrapper:"data-[hover=true]:border-danger focus-within:border-danger"}},{variant:"underlined",color:"default",class:{input:"group-data-[has-value=true]:text-foreground"}},{variant:"underlined",color:"primary",class:{inputWrapper:"after:bg-primary",label:"text-primary"}},{variant:"underlined",color:"secondary",class:{inputWrapper:"after:bg-secondary",label:"text-secondary"}},{variant:"underlined",color:"success",class:{inputWrapper:"after:bg-success",label:"text-success"}},{variant:"underlined",color:"warning",class:{inputWrapper:"after:bg-warning",label:"text-warning"}},{variant:"underlined",color:"danger",class:{inputWrapper:"after:bg-danger",label:"text-danger"}},{variant:"bordered",color:"primary",class:{inputWrapper:"group-data-[focus=true]:border-primary",label:"text-primary"}},{variant:"bordered",color:"secondary",class:{inputWrapper:"group-data-[focus=true]:border-secondary",label:"text-secondary"}},{variant:"bordered",color:"success",class:{inputWrapper:"group-data-[focus=true]:border-success",label:"text-success"}},{variant:"bordered",color:"warning",class:{inputWrapper:"group-data-[focus=true]:border-warning",label:"text-warning"}},{variant:"bordered",color:"danger",class:{inputWrapper:"group-data-[focus=true]:border-danger",label:"text-danger"}},{labelPlacement:"inside",color:"default",class:{label:"group-data-[filled-within=true]:text-default-600"}},{labelPlacement:"outside",color:"default",class:{label:"group-data-[filled-within=true]:text-foreground"}},{radius:"full",size:["sm"],class:{inputWrapper:"px-3"}},{radius:"full",size:"md",class:{inputWrapper:"px-4"}},{radius:"full",size:"lg",class:{inputWrapper:"px-5"}},{disableAnimation:!1,variant:["faded","bordered"],class:{inputWrapper:"transition-colors motion-reduce:transition-none"}},{disableAnimation:!1,variant:"underlined",class:{inputWrapper:"after:transition-width motion-reduce:after:transition-none"}},{variant:["flat","faded"],class:{inputWrapper:[...V_]}},{isInvalid:!0,variant:"flat",class:{inputWrapper:["!bg-danger-50","data-[hover=true]:!bg-danger-100","group-data-[focus=true]:!bg-danger-50"]}},{isInvalid:!0,variant:"bordered",class:{inputWrapper:"!border-danger group-data-[focus=true]:!border-danger"}},{isInvalid:!0,variant:"underlined",class:{inputWrapper:"after:!bg-danger"}},{labelPlacement:"inside",size:"sm",class:{inputWrapper:"h-12 py-1.5 px-3"}},{labelPlacement:"inside",size:"md",class:{inputWrapper:"h-14 py-2"}},{labelPlacement:"inside",size:"lg",class:{inputWrapper:"h-16 py-2.5 gap-0"}},{labelPlacement:"inside",size:"sm",variant:["bordered","faded"],class:{inputWrapper:"py-1"}},{labelPlacement:["inside","outside"],class:{label:["group-data-[filled-within=true]:pointer-events-auto"]}},{labelPlacement:"outside",isMultiline:!1,class:{base:"relative justify-end",label:["pb-0","z-20","top-1/2","-translate-y-1/2","group-data-[filled-within=true]:start-0"]}},{labelPlacement:["inside"],class:{label:["group-data-[filled-within=true]:scale-85"]}},{labelPlacement:["inside"],variant:"flat",class:{innerWrapper:"pb-0.5"}},{variant:"underlined",size:"sm",class:{innerWrapper:"pb-1"}},{variant:"underlined",size:["md","lg"],class:{innerWrapper:"pb-1.5"}},{labelPlacement:"inside",size:["sm","md"],class:{label:"text-small"}},{labelPlacement:"inside",isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px)]"]}},{labelPlacement:"inside",isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px)]"]}},{labelPlacement:"inside",isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px)]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_5px)]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_3.5px)]"]}},{labelPlacement:"inside",variant:"underlined",size:"lg",isMultiline:!1,class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_4px)]"]}},{labelPlacement:"outside",size:"sm",isMultiline:!1,class:{label:["start-2","text-tiny","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-tiny)/2_+_16px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_8px)]"}},{labelPlacement:"outside",size:"md",isMultiline:!1,class:{label:["start-3","end-auto","text-small","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_20px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_10px)]"}},{labelPlacement:"outside",size:"lg",isMultiline:!1,class:{label:["start-3","end-auto","text-medium","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_24px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_12px)]"}},{labelPlacement:"outside-left",size:"sm",class:{label:"group-data-[has-helper=true]:pt-2"}},{labelPlacement:"outside-left",size:"md",class:{label:"group-data-[has-helper=true]:pt-3"}},{labelPlacement:"outside-left",size:"lg",class:{label:"group-data-[has-helper=true]:pt-4"}},{labelPlacement:["outside","outside-left"],isMultiline:!0,class:{inputWrapper:"py-2"}},{labelPlacement:"outside",isMultiline:!0,class:{label:"pb-1.5"}},{labelPlacement:"inside",isMultiline:!0,class:{label:"pb-0.5",input:"pt-0"}},{isMultiline:!0,disableAnimation:!1,class:{input:"transition-height !duration-100 motion-reduce:transition-none"}},{labelPlacement:["inside","outside"],class:{label:["pe-2","max-w-full","text-ellipsis","overflow-hidden"]}},{isMultiline:!0,radius:"full",class:{inputWrapper:"data-[has-multiple-rows=true]:rounded-large"}},{isClearable:!0,isMultiline:!0,class:{clearButton:["group-data-[has-value=true]:opacity-70 group-data-[has-value=true]:block","group-data-[has-value=true]:scale-100","group-data-[has-value=true]:pointer-events-auto"]}}]}),wk=er({slots:{wrapper:["flex","w-screen","h-[100dvh]","fixed","inset-0","z-50","overflow-x-auto","justify-center","h-[--visual-viewport-height]"],base:["flex","flex-col","relative","bg-white","z-50","w-full","box-border","bg-content1","outline-hidden","mx-1","my-1","sm:mx-6","sm:my-16"],backdrop:"z-50",header:"flex py-4 px-6 flex-initial text-large font-semibold",body:"flex flex-1 flex-col gap-3 px-6 py-2",footer:"flex flex-row gap-2 px-6 py-4 justify-end",closeButton:["absolute","appearance-none","outline-hidden","select-none","top-1","end-1","p-2","text-foreground-500","rounded-full","hover:bg-default-100","active:bg-default-200","tap-highlight-transparent",...wh]},variants:{size:{xs:{base:"max-w-xs"},sm:{base:"max-w-sm"},md:{base:"max-w-md"},lg:{base:"max-w-lg"},xl:{base:"max-w-xl"},"2xl":{base:"max-w-2xl"},"3xl":{base:"max-w-3xl"},"4xl":{base:"max-w-4xl"},"5xl":{base:"max-w-5xl"},full:{base:"my-0 mx-0 sm:mx-0 sm:my-0 max-w-full h-[100dvh] min-h-[100dvh] !rounded-none"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"}},placement:{auto:{wrapper:"items-end sm:items-center"},center:{wrapper:"items-center sm:items-center"},top:{wrapper:"items-start sm:items-start"},"top-center":{wrapper:"items-start sm:items-center"},bottom:{wrapper:"items-end sm:items-end"},"bottom-center":{wrapper:"items-end sm:items-center"}},shadow:{none:{base:"shadow-none"},sm:{base:"shadow-small"},md:{base:"shadow-medium"},lg:{base:"shadow-large"}},backdrop:{transparent:{backdrop:"hidden"},opaque:{backdrop:"bg-overlay/50 backdrop-opacity-disabled"},blur:{backdrop:"backdrop-blur-md backdrop-saturate-150 bg-overlay/30"}},scrollBehavior:{normal:{base:"overflow-y-hidden"},inside:{base:"max-h-[calc(100%_-_8rem)]",body:"overflow-y-auto"},outside:{wrapper:"items-start sm:items-start overflow-y-auto",base:"my-16"}},disableAnimation:{false:{wrapper:["[--scale-enter:100%]","[--scale-exit:100%]","[--slide-enter:0px]","[--slide-exit:80px]","sm:[--scale-enter:100%]","sm:[--scale-exit:103%]","sm:[--slide-enter:0px]","sm:[--slide-exit:0px]"]}}},defaultVariants:{size:"md",radius:"lg",shadow:"sm",placement:"auto",backdrop:"opaque",scrollBehavior:"normal"},compoundVariants:[{backdrop:["opaque","blur"],class:{backdrop:"w-screen h-screen fixed inset-0"}}]}),zO=er({base:"shrink-0 bg-divider border-none",variants:{orientation:{horizontal:"w-full h-divider",vertical:"h-full w-divider"}},defaultVariants:{orientation:"horizontal"}}),jO=er({base:"flex flex-col gap-2 items-start"}),Sk=er({slots:{wrapper:"relative shadow-black/5",zoomedWrapper:"relative overflow-hidden rounded-inherit",img:"relative z-10 opacity-0 shadow-black/5 data-[loaded=true]:opacity-100",blurredImg:["absolute","z-0","inset-0","w-full","h-full","object-cover","filter","blur-lg","scale-105","saturate-150","opacity-30","translate-y-1"]},variants:{radius:{none:{},sm:{},md:{},lg:{},full:{}},shadow:{none:{wrapper:"shadow-none",img:"shadow-none"},sm:{wrapper:"shadow-small",img:"shadow-small"},md:{wrapper:"shadow-medium",img:"shadow-medium"},lg:{wrapper:"shadow-large",img:"shadow-large"}},isZoomed:{true:{img:["object-cover","transform","hover:scale-125"]}},showSkeleton:{true:{wrapper:["group","relative","overflow-hidden","bg-content3 dark:bg-content2"],img:"opacity-0"}},disableAnimation:{true:{img:"transition-none"},false:{img:"transition-transform-opacity motion-reduce:transition-none !duration-300"}}},defaultVariants:{radius:"lg",shadow:"none",isZoomed:!1,isBlurred:!1,showSkeleton:!1},compoundVariants:[{showSkeleton:!0,disableAnimation:!1,class:{wrapper:["before:opacity-100","before:absolute","before:inset-0","before:-translate-x-full","before:animate-shimmer","before:border-t","before:border-content4/30","before:bg-gradient-to-r","before:from-transparent","before:via-content4","dark:before:via-default-700/10","before:to-transparent","after:opacity-100","after:absolute","after:inset-0","after:-z-10","after:bg-content3","dark:after:bg-content2"]}}],compoundSlots:[{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"none",class:"rounded-none"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"full",class:"rounded-full"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"sm",class:"rounded-small"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"md",class:"rounded-md"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"lg",class:"rounded-large"}]}),BO=er({base:["z-0","group","relative","inline-flex","items-center","justify-center","box-border","appearance-none","outline-hidden","select-none","whitespace-nowrap","min-w-max","font-normal","subpixel-antialiased","overflow-hidden","tap-highlight-transparent","transform-gpu data-[pressed=true]:scale-[0.97]","cursor-pointer",...wh],variants:{variant:{solid:"",bordered:"border-medium bg-transparent",light:"bg-transparent",flat:"",faded:"border-medium",shadow:"",ghost:"border-medium bg-transparent"},size:{sm:"px-3 min-w-16 h-8 text-tiny gap-2 rounded-small",md:"px-4 min-w-20 h-10 text-small gap-2 rounded-medium",lg:"px-6 min-w-24 h-12 text-medium gap-3 rounded-large"},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},radius:{none:"rounded-none",sm:"rounded-small",md:"rounded-medium",lg:"rounded-large",full:"rounded-full"},fullWidth:{true:"w-full"},isDisabled:{true:"opacity-disabled pointer-events-none"},isInGroup:{true:"[&:not(:first-child):not(:last-child)]:rounded-none"},isIconOnly:{true:"px-0 !gap-0",false:"[&>svg]:max-w-[theme(spacing.8)]"},disableAnimation:{true:"!transition-none data-[pressed=true]:scale-100",false:"transition-transform-colors-opacity motion-reduce:transition-none"}},defaultVariants:{size:"md",variant:"solid",color:"default",fullWidth:!1,isDisabled:!1,isInGroup:!1},compoundVariants:[{variant:"solid",color:"default",class:Te.solid.default},{variant:"solid",color:"primary",class:Te.solid.primary},{variant:"solid",color:"secondary",class:Te.solid.secondary},{variant:"solid",color:"success",class:Te.solid.success},{variant:"solid",color:"warning",class:Te.solid.warning},{variant:"solid",color:"danger",class:Te.solid.danger},{variant:"shadow",color:"default",class:Te.shadow.default},{variant:"shadow",color:"primary",class:Te.shadow.primary},{variant:"shadow",color:"secondary",class:Te.shadow.secondary},{variant:"shadow",color:"success",class:Te.shadow.success},{variant:"shadow",color:"warning",class:Te.shadow.warning},{variant:"shadow",color:"danger",class:Te.shadow.danger},{variant:"bordered",color:"default",class:Te.bordered.default},{variant:"bordered",color:"primary",class:Te.bordered.primary},{variant:"bordered",color:"secondary",class:Te.bordered.secondary},{variant:"bordered",color:"success",class:Te.bordered.success},{variant:"bordered",color:"warning",class:Te.bordered.warning},{variant:"bordered",color:"danger",class:Te.bordered.danger},{variant:"flat",color:"default",class:Te.flat.default},{variant:"flat",color:"primary",class:Te.flat.primary},{variant:"flat",color:"secondary",class:Te.flat.secondary},{variant:"flat",color:"success",class:Te.flat.success},{variant:"flat",color:"warning",class:Te.flat.warning},{variant:"flat",color:"danger",class:Te.flat.danger},{variant:"faded",color:"default",class:Te.faded.default},{variant:"faded",color:"primary",class:Te.faded.primary},{variant:"faded",color:"secondary",class:Te.faded.secondary},{variant:"faded",color:"success",class:Te.faded.success},{variant:"faded",color:"warning",class:Te.faded.warning},{variant:"faded",color:"danger",class:Te.faded.danger},{variant:"light",color:"default",class:[Te.light.default,"data-[hover=true]:bg-default/40"]},{variant:"light",color:"primary",class:[Te.light.primary,"data-[hover=true]:bg-primary/20"]},{variant:"light",color:"secondary",class:[Te.light.secondary,"data-[hover=true]:bg-secondary/20"]},{variant:"light",color:"success",class:[Te.light.success,"data-[hover=true]:bg-success/20"]},{variant:"light",color:"warning",class:[Te.light.warning,"data-[hover=true]:bg-warning/20"]},{variant:"light",color:"danger",class:[Te.light.danger,"data-[hover=true]:bg-danger/20"]},{variant:"ghost",color:"default",class:[Te.ghost.default,"data-[hover=true]:!bg-default"]},{variant:"ghost",color:"primary",class:[Te.ghost.primary,"data-[hover=true]:!bg-primary data-[hover=true]:!text-primary-foreground"]},{variant:"ghost",color:"secondary",class:[Te.ghost.secondary,"data-[hover=true]:!bg-secondary data-[hover=true]:!text-secondary-foreground"]},{variant:"ghost",color:"success",class:[Te.ghost.success,"data-[hover=true]:!bg-success data-[hover=true]:!text-success-foreground"]},{variant:"ghost",color:"warning",class:[Te.ghost.warning,"data-[hover=true]:!bg-warning data-[hover=true]:!text-warning-foreground"]},{variant:"ghost",color:"danger",class:[Te.ghost.danger,"data-[hover=true]:!bg-danger data-[hover=true]:!text-danger-foreground"]},{isInGroup:!0,class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,size:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,isRounded:!0,class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,radius:"none",class:"rounded-none first:rounded-s-none last:rounded-e-none"},{isInGroup:!0,radius:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,radius:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,radius:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,radius:"full",class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,variant:["ghost","bordered"],color:"default",className:lf.default},{isInGroup:!0,variant:["ghost","bordered"],color:"primary",className:lf.primary},{isInGroup:!0,variant:["ghost","bordered"],color:"secondary",className:lf.secondary},{isInGroup:!0,variant:["ghost","bordered"],color:"success",className:lf.success},{isInGroup:!0,variant:["ghost","bordered"],color:"warning",className:lf.warning},{isInGroup:!0,variant:["ghost","bordered"],color:"danger",className:lf.danger},{isIconOnly:!0,size:"sm",class:"min-w-8 w-8 h-8"},{isIconOnly:!0,size:"md",class:"min-w-10 w-10 h-10"},{isIconOnly:!0,size:"lg",class:"min-w-12 w-12 h-12"},{variant:["solid","faded","flat","bordered","shadow"],class:"data-[hover=true]:opacity-hover"}]});er({base:"inline-flex items-center justify-center h-auto",variants:{fullWidth:{true:"w-full"}},defaultVariants:{fullWidth:!1}});var VO=er({slots:{base:"group relative max-w-fit inline-flex items-center justify-start cursor-pointer tap-highlight-transparent p-2 -m-2 select-none",wrapper:["relative","inline-flex","items-center","justify-center","shrink-0","overflow-hidden","before:content-['']","before:absolute","before:inset-0","before:border-solid","before:border-2","before:box-border","before:border-default","after:content-['']","after:absolute","after:inset-0","after:scale-50","after:opacity-0","after:origin-center","group-data-[selected=true]:after:scale-100","group-data-[selected=true]:after:opacity-100","group-data-[hover=true]:before:bg-default-100",...V_],hiddenInput:NO,icon:"z-10 w-4 h-3 opacity-0 group-data-[selected=true]:opacity-100 pointer-events-none",label:"relative text-foreground select-none"},variants:{color:{default:{wrapper:"after:bg-default after:text-default-foreground text-default-foreground"},primary:{wrapper:"after:bg-primary after:text-primary-foreground text-primary-foreground"},secondary:{wrapper:"after:bg-secondary after:text-secondary-foreground text-secondary-foreground"},success:{wrapper:"after:bg-success after:text-success-foreground text-success-foreground"},warning:{wrapper:"after:bg-warning after:text-warning-foreground text-warning-foreground"},danger:{wrapper:"after:bg-danger after:text-danger-foreground text-danger-foreground"}},size:{sm:{wrapper:["w-4 h-4 me-2","rounded-[calc(var(--heroui-radius-medium)*0.5)]","before:rounded-[calc(var(--heroui-radius-medium)*0.5)]","after:rounded-[calc(var(--heroui-radius-medium)*0.5)]"],label:"text-small",icon:"w-3 h-2"},md:{wrapper:["w-5 h-5 me-2","rounded-[calc(var(--heroui-radius-medium)*0.6)]","before:rounded-[calc(var(--heroui-radius-medium)*0.6)]","after:rounded-[calc(var(--heroui-radius-medium)*0.6)]"],label:"text-medium",icon:"w-4 h-3"},lg:{wrapper:["w-6 h-6 me-2","rounded-[calc(var(--heroui-radius-medium)*0.7)]","before:rounded-[calc(var(--heroui-radius-medium)*0.7)]","after:rounded-[calc(var(--heroui-radius-medium)*0.7)]"],label:"text-large",icon:"w-5 h-4"}},radius:{none:{wrapper:"rounded-none before:rounded-none after:rounded-none"},sm:{wrapper:["rounded-[calc(var(--heroui-radius-medium)*0.5)]","before:rounded-[calc(var(--heroui-radius-medium)*0.5)]","after:rounded-[calc(var(--heroui-radius-medium)*0.5)]"]},md:{wrapper:["rounded-[calc(var(--heroui-radius-medium)*0.6)]","before:rounded-[calc(var(--heroui-radius-medium)*0.6)]","after:rounded-[calc(var(--heroui-radius-medium)*0.6)]"]},lg:{wrapper:["rounded-[calc(var(--heroui-radius-medium)*0.7)]","before:rounded-[calc(var(--heroui-radius-medium)*0.7)]","after:rounded-[calc(var(--heroui-radius-medium)*0.7)]"]},full:{wrapper:"rounded-full before:rounded-full after:rounded-full"}},lineThrough:{true:{label:["inline-flex","items-center","justify-center","before:content-['']","before:absolute","before:bg-foreground","before:w-0","before:h-0.5","group-data-[selected=true]:opacity-60","group-data-[selected=true]:before:w-full"]}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},isInvalid:{true:{wrapper:"before:border-danger",label:"text-danger"}},disableAnimation:{true:{wrapper:"transition-none",icon:"transition-none",label:"transition-none"},false:{wrapper:["before:transition-colors","group-data-[pressed=true]:scale-95","transition-transform","after:transition-transform-opacity","after:!ease-linear","after:!duration-200","motion-reduce:transition-none"],icon:"transition-opacity motion-reduce:transition-none",label:"transition-colors-opacity before:transition-width motion-reduce:transition-none"}}},defaultVariants:{color:"primary",size:"md",isDisabled:!1,lineThrough:!1}});er({slots:{base:"relative flex flex-col gap-2",label:"relative text-medium text-foreground-500",wrapper:"flex flex-col flex-wrap gap-2 data-[orientation=horizontal]:flex-row",description:"text-small text-foreground-400",errorMessage:"text-small text-danger"},variants:{isRequired:{true:{label:"after:content-['*'] after:text-danger after:ml-0.5"}},isInvalid:{true:{description:"text-danger"}},disableAnimation:{true:{},false:{description:"transition-colors !duration-150 motion-reduce:transition-none"}}},defaultVariants:{isInvalid:!1,isRequired:!1}});var kk=er({slots:{base:["relative","max-w-fit","min-w-min","inline-flex","items-center","justify-between","box-border","whitespace-nowrap"],content:"flex-1 text-inherit font-normal",dot:["w-2","h-2","ml-1","rounded-full"],avatar:"shrink-0",closeButton:["z-10","appearance-none","outline-hidden","select-none","transition-opacity","opacity-70","hover:opacity-100","cursor-pointer","active:opacity-disabled","tap-highlight-transparent"]},variants:{variant:{solid:{},bordered:{base:"border-medium bg-transparent"},light:{base:"bg-transparent"},flat:{},faded:{base:"border-medium"},shadow:{},dot:{base:"border-medium border-default text-foreground bg-transparent"}},color:{default:{dot:"bg-default-400"},primary:{dot:"bg-primary"},secondary:{dot:"bg-secondary"},success:{dot:"bg-success"},warning:{dot:"bg-warning"},danger:{dot:"bg-danger"}},size:{sm:{base:"px-1 h-6 text-tiny",content:"px-1",closeButton:"text-medium",avatar:"w-4 h-4"},md:{base:"px-1 h-7 text-small",content:"px-2",closeButton:"text-large",avatar:"w-5 h-5"},lg:{base:"px-2 h-8 text-medium",content:"px-2",closeButton:"text-xl",avatar:"w-6 h-6"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"},full:{base:"rounded-full"}},isOneChar:{true:{},false:{}},isCloseable:{true:{},false:{}},hasStartContent:{true:{}},hasEndContent:{true:{}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},isCloseButtonFocusVisible:{true:{closeButton:[...DO,"ring-1","rounded-full"]}}},defaultVariants:{variant:"solid",color:"default",size:"md",radius:"full",isDisabled:!1},compoundVariants:[{variant:"solid",color:"default",class:{base:Te.solid.default}},{variant:"solid",color:"primary",class:{base:Te.solid.primary}},{variant:"solid",color:"secondary",class:{base:Te.solid.secondary}},{variant:"solid",color:"success",class:{base:Te.solid.success}},{variant:"solid",color:"warning",class:{base:Te.solid.warning}},{variant:"solid",color:"danger",class:{base:Te.solid.danger}},{variant:"shadow",color:"default",class:{base:Te.shadow.default}},{variant:"shadow",color:"primary",class:{base:Te.shadow.primary}},{variant:"shadow",color:"secondary",class:{base:Te.shadow.secondary}},{variant:"shadow",color:"success",class:{base:Te.shadow.success}},{variant:"shadow",color:"warning",class:{base:Te.shadow.warning}},{variant:"shadow",color:"danger",class:{base:Te.shadow.danger}},{variant:"bordered",color:"default",class:{base:Te.bordered.default}},{variant:"bordered",color:"primary",class:{base:Te.bordered.primary}},{variant:"bordered",color:"secondary",class:{base:Te.bordered.secondary}},{variant:"bordered",color:"success",class:{base:Te.bordered.success}},{variant:"bordered",color:"warning",class:{base:Te.bordered.warning}},{variant:"bordered",color:"danger",class:{base:Te.bordered.danger}},{variant:"flat",color:"default",class:{base:Te.flat.default}},{variant:"flat",color:"primary",class:{base:Te.flat.primary}},{variant:"flat",color:"secondary",class:{base:Te.flat.secondary}},{variant:"flat",color:"success",class:{base:Te.flat.success}},{variant:"flat",color:"warning",class:{base:Te.flat.warning}},{variant:"flat",color:"danger",class:{base:Te.flat.danger}},{variant:"faded",color:"default",class:{base:Te.faded.default}},{variant:"faded",color:"primary",class:{base:Te.faded.primary}},{variant:"faded",color:"secondary",class:{base:Te.faded.secondary}},{variant:"faded",color:"success",class:{base:Te.faded.success}},{variant:"faded",color:"warning",class:{base:Te.faded.warning}},{variant:"faded",color:"danger",class:{base:Te.faded.danger}},{variant:"light",color:"default",class:{base:Te.light.default}},{variant:"light",color:"primary",class:{base:Te.light.primary}},{variant:"light",color:"secondary",class:{base:Te.light.secondary}},{variant:"light",color:"success",class:{base:Te.light.success}},{variant:"light",color:"warning",class:{base:Te.light.warning}},{variant:"light",color:"danger",class:{base:Te.light.danger}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"sm",class:{base:"w-5 h-5 min-w-5 min-h-5"}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"md",class:{base:"w-6 h-6 min-w-6 min-h-6"}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"lg",class:{base:"w-7 h-7 min-w-7 min-h-7"}},{isOneChar:!0,isCloseable:!1,hasStartContent:!1,hasEndContent:!1,class:{base:"px-0 justify-center",content:"px-0 flex-none"}},{isOneChar:!0,isCloseable:!0,hasStartContent:!1,hasEndContent:!1,class:{base:"w-auto"}},{isOneChar:!0,variant:"dot",class:{base:"w-auto h-7 px-1 items-center",content:"px-2"}},{hasStartContent:!0,size:"sm",class:{content:"pl-0.5"}},{hasStartContent:!0,size:["md","lg"],class:{content:"pl-1"}},{hasEndContent:!0,size:"sm",class:{content:"pr-0.5"}},{hasEndContent:!0,size:["md","lg"],class:{content:"pr-1"}}]}),UO=er({base:"px-2",variants:{variant:{light:"",shadow:"px-4 shadow-medium rounded-medium bg-content1",bordered:"px-4 border-medium border-divider rounded-medium",splitted:"flex flex-col gap-2"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"light",fullWidth:!0}}),KO=er({slots:{base:"",heading:"",trigger:["flex py-4 w-full h-full gap-3 outline-hidden items-center tap-highlight-transparent",...wh],startContent:"shrink-0",indicator:"text-default-400",titleWrapper:"flex-1 flex flex-col text-start",title:"text-foreground text-medium",subtitle:"text-small text-foreground-500 font-normal",content:"py-2"},variants:{variant:{splitted:{base:"px-4 bg-content1 shadow-medium rounded-medium"}},isCompact:{true:{trigger:"py-2",title:"text-medium",subtitle:"text-small",indicator:"text-medium",content:"py-1"}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},hideIndicator:{true:{indicator:"hidden"}},disableAnimation:{true:{content:"hidden data-[open=true]:block"},false:{indicator:"transition-transform",trigger:"transition-opacity"}},disableIndicatorAnimation:{true:{indicator:"transition-none"},false:{indicator:"rotate-0 data-[open=true]:-rotate-90 rtl:-rotate-180 rtl:data-[open=true]:-rotate-90"}}},defaultVariants:{size:"md",radius:"lg",isDisabled:!1,hideIndicator:!1,disableIndicatorAnimation:!1}});function U_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=U_(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function WO(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=U_(e))&&(r&&(r+=" "),r+=t);return r}var HO=j_({extend:Tb});function bn(...e){return HO(WO(e))}const GO="modulepreload",qO=function(e){return"/"+e},Ck={},Br=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let d=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),c=a?.nonce||a?.getAttribute("nonce");i=d(n.map(h=>{if(h=qO(h),h in Ck)return;Ck[h]=!0;const m=h.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":GO,m||(b.as="script"),b.crossOrigin="",b.href=h,c&&b.setAttribute("nonce",c),document.head.appendChild(b),m)return new Promise((x,k)=>{b.addEventListener("load",x),b.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(a){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=a,window.dispatchEvent(c),!c.defaultPrevented)throw a}return i.then(a=>{for(const c of a||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})};function YO(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:s,onPressEnd:a,onPressUp:c,onPressChange:d,preventFocusOnPress:h,allowFocusWhenDisabled:m,onClick:g,href:b,target:x,rel:k,type:P="button"}=e,T;n==="button"?T={type:P,disabled:r}:T={role:"button",href:n==="a"&&!r?b:void 0,target:n==="a"?x:void 0,type:n==="input"?P:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?k:void 0};let{pressProps:_,isPressed:A}=il({onPressStart:s,onPressEnd:a,onPressChange:d,onPress:i,onPressUp:c,onClick:g,isDisabled:r,preventFocusOnPress:h,ref:t}),{focusableProps:M}=xh(e,t);m&&(M.tabIndex=r?-1:M.tabIndex);let O=Tn(M,_,$u(e,{labelable:!0}));return{isPressed:A,buttonProps:Tn(T,O,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}function XO(e,t,n){let{item:r,isDisabled:i}=e,s=r.key,a=t.selectionManager,c=S.useId(),d=S.useId(),h=t.disabledKeys.has(r.key)||i;S.useEffect(()=>{s===t.focusedKey&&document.activeElement!==n.current&&n.current&&Cu(n.current)},[n,s,t.focusedKey]);let m=S.useCallback(P=>{a.canSelectItem(s)&&(a.select(s,P),t.toggleKey(s))},[s,a]);const g=S.useCallback(P=>{a.selectionBehavior==="replace"&&a.extendSelection(P),a.setFocusedKey(P)},[a]),b=S.useCallback(P=>{const _={ArrowDown:()=>{const A=t.collection.getKeyAfter(s);if(A&&t.disabledKeys.has(A)){const M=t.collection.getKeyAfter(A);M&&g(M)}else A&&g(A)},ArrowUp:()=>{const A=t.collection.getKeyBefore(s);if(A&&t.disabledKeys.has(A)){const M=t.collection.getKeyBefore(A);M&&g(M)}else A&&g(A)},Home:()=>{const A=t.collection.getFirstKey();A&&g(A)},End:()=>{const A=t.collection.getLastKey();A&&g(A)}}[P.key];_&&(P.preventDefault(),a.canSelectItem(s)&&_(P))},[s,a]);let{buttonProps:x}=YO({id:c,elementType:"button",isDisabled:h,onKeyDown:b,onPress:m},n),k=t.selectionManager.isSelected(r.key);return{buttonProps:{...x,"aria-expanded":k,"aria-controls":k?d:void 0},regionProps:{id:d,role:"region","aria-labelledby":c}}}function Ek(e){return xM()?e.altKey:e.ctrlKey}function Dg(e,t){var n,r;let i=`[data-key="${CSS.escape(String(t))}"]`,s=(n=e.current)===null||n===void 0?void 0:n.dataset.collection;return s&&(i=`[data-collection="${CSS.escape(s)}"]${i}`),(r=e.current)===null||r===void 0?void 0:r.querySelector(i)}const K_=new WeakMap;function QO(e){let t=Pf();return K_.set(e,t),t}function dq(e){return K_.get(e)}const JO=1e3;function ZO(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=S.useRef({search:"",timeout:void 0}).current,s=a=>{let c=e6(a.key);if(!(!c||a.ctrlKey||a.metaKey||!a.currentTarget.contains(a.target))){if(c===" "&&i.search.trim().length>0&&(a.preventDefault(),"continuePropagation"in a||a.stopPropagation()),i.search+=c,t.getKeyForSearch!=null){let d=t.getKeyForSearch(i.search,n.focusedKey);d==null&&(d=t.getKeyForSearch(i.search)),d!=null&&(n.setFocusedKey(d),r&&r(d))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},JO)}};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?s:void 0}}}function e6(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function t6(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:s=!1,disallowEmptySelection:a=!1,disallowSelectAll:c=!1,escapeKeyBehavior:d="clearSelection",selectOnFocus:h=t.selectionBehavior==="replace",disallowTypeAhead:m=!1,shouldUseVirtualFocus:g,allowsTabNavigation:b=!1,isVirtualized:x,scrollRef:k=r,linkBehavior:P="action"}=e,{direction:T}=hh(),_=px(),A=X=>{var V;if(X.altKey&&X.key==="Tab"&&X.preventDefault(),!(!((V=r.current)===null||V===void 0)&&V.contains(X.target)))return;const ae=(Ie,mt)=>{if(Ie!=null){if(t.isLink(Ie)&&P==="selection"&&h&&!Ek(X)){HE.flushSync(()=>{t.setFocusedKey(Ie,mt)});let pt=Dg(r,Ie),Kt=t.getItemProps(Ie);pt&&_.open(pt,X,Kt.href,Kt.routerOptions);return}if(t.setFocusedKey(Ie,mt),t.isLink(Ie)&&P==="override")return;X.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Ie):h&&!Ek(X)&&t.replaceSelection(Ie)}};switch(X.key){case"ArrowDown":if(n.getKeyBelow){var D,U,oe;let Ie=t.focusedKey!=null?(D=n.getKeyBelow)===null||D===void 0?void 0:D.call(n,t.focusedKey):(U=n.getFirstKey)===null||U===void 0?void 0:U.call(n);Ie==null&&s&&(Ie=(oe=n.getFirstKey)===null||oe===void 0?void 0:oe.call(n,t.focusedKey)),Ie!=null&&(X.preventDefault(),ae(Ie))}break;case"ArrowUp":if(n.getKeyAbove){var z,me,Ce;let Ie=t.focusedKey!=null?(z=n.getKeyAbove)===null||z===void 0?void 0:z.call(n,t.focusedKey):(me=n.getLastKey)===null||me===void 0?void 0:me.call(n);Ie==null&&s&&(Ie=(Ce=n.getLastKey)===null||Ce===void 0?void 0:Ce.call(n,t.focusedKey)),Ie!=null&&(X.preventDefault(),ae(Ie))}break;case"ArrowLeft":if(n.getKeyLeftOf){var ye,Oe,Ne;let Ie=t.focusedKey!=null?(ye=n.getKeyLeftOf)===null||ye===void 0?void 0:ye.call(n,t.focusedKey):null;Ie==null&&s&&(Ie=T==="rtl"?(Oe=n.getFirstKey)===null||Oe===void 0?void 0:Oe.call(n,t.focusedKey):(Ne=n.getLastKey)===null||Ne===void 0?void 0:Ne.call(n,t.focusedKey)),Ie!=null&&(X.preventDefault(),ae(Ie,T==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var _e,Qe,at;let Ie=t.focusedKey!=null?(_e=n.getKeyRightOf)===null||_e===void 0?void 0:_e.call(n,t.focusedKey):null;Ie==null&&s&&(Ie=T==="rtl"?(Qe=n.getLastKey)===null||Qe===void 0?void 0:Qe.call(n,t.focusedKey):(at=n.getFirstKey)===null||at===void 0?void 0:at.call(n,t.focusedKey)),Ie!=null&&(X.preventDefault(),ae(Ie,T==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(t.focusedKey===null&&X.shiftKey)return;X.preventDefault();let Ie=n.getFirstKey(t.focusedKey,hp(X));t.setFocusedKey(Ie),Ie!=null&&(hp(X)&&X.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Ie):h&&t.replaceSelection(Ie))}break;case"End":if(n.getLastKey){if(t.focusedKey===null&&X.shiftKey)return;X.preventDefault();let Ie=n.getLastKey(t.focusedKey,hp(X));t.setFocusedKey(Ie),Ie!=null&&(hp(X)&&X.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Ie):h&&t.replaceSelection(Ie))}break;case"PageDown":if(n.getKeyPageBelow&&t.focusedKey!=null){let Ie=n.getKeyPageBelow(t.focusedKey);Ie!=null&&(X.preventDefault(),ae(Ie))}break;case"PageUp":if(n.getKeyPageAbove&&t.focusedKey!=null){let Ie=n.getKeyPageAbove(t.focusedKey);Ie!=null&&(X.preventDefault(),ae(Ie))}break;case"a":hp(X)&&t.selectionMode==="multiple"&&c!==!0&&(X.preventDefault(),t.selectAll());break;case"Escape":d==="clearSelection"&&!a&&t.selectedKeys.size!==0&&(X.stopPropagation(),X.preventDefault(),t.clearSelection());break;case"Tab":if(!b){if(X.shiftKey)r.current.focus();else{let Ie=Qs(r.current,{tabbable:!0}),mt,pt;do pt=Ie.lastChild(),pt&&(mt=pt);while(pt);mt&&!mt.contains(document.activeElement)&&tl(mt)}break}}},M=S.useRef({top:0,left:0});ug(k,"scroll",x?void 0:()=>{var X,V,ae,D;M.current={top:(ae=(X=k.current)===null||X===void 0?void 0:X.scrollTop)!==null&&ae!==void 0?ae:0,left:(D=(V=k.current)===null||V===void 0?void 0:V.scrollLeft)!==null&&D!==void 0?D:0}});let O=X=>{if(t.isFocused){X.currentTarget.contains(X.target)||t.setFocused(!1);return}if(X.currentTarget.contains(X.target)){if(t.setFocused(!0),t.focusedKey==null){var V,ae;let oe=me=>{me!=null&&(t.setFocusedKey(me),h&&!t.isSelected(me)&&t.replaceSelection(me))},z=X.relatedTarget;var D,U;z&&X.currentTarget.compareDocumentPosition(z)&Node.DOCUMENT_POSITION_FOLLOWING?oe((D=t.lastSelectedKey)!==null&&D!==void 0?D:(V=n.getLastKey)===null||V===void 0?void 0:V.call(n)):oe((U=t.firstSelectedKey)!==null&&U!==void 0?U:(ae=n.getFirstKey)===null||ae===void 0?void 0:ae.call(n))}else!x&&k.current&&(k.current.scrollTop=M.current.top,k.current.scrollLeft=M.current.left);if(t.focusedKey!=null&&k.current){let oe=Dg(r,t.focusedKey);oe instanceof HTMLElement&&(!oe.contains(document.activeElement)&&!g&&tl(oe),oh()==="keyboard"&&P1(oe,{containingElement:r.current}))}}},j=X=>{X.currentTarget.contains(X.relatedTarget)||t.setFocused(!1)},$=S.useRef(!1);ug(r,$M,g?X=>{let{detail:V}=X;X.stopPropagation(),t.setFocused(!0),V?.focusStrategy==="first"&&($.current=!0)}:void 0);let Y=Bn(()=>{var X,V;let ae=(V=(X=n.getFirstKey)===null||X===void 0?void 0:X.call(n))!==null&&V!==void 0?V:null;ae==null?(pF(r.current),t.collection.size>0&&($.current=!1)):(t.setFocusedKey(ae),$.current=!1)});k1(()=>{$.current&&Y()},[t.collection,Y]);let te=Bn(()=>{t.collection.size>0&&($.current=!1)});k1(()=>{te()},[t.focusedKey,te]),ug(r,IM,g?X=>{var V;X.stopPropagation(),t.setFocused(!1),!((V=X.detail)===null||V===void 0)&&V.clearFocusKey&&t.setFocusedKey(null)}:void 0);const ie=S.useRef(i),B=S.useRef(!1);S.useEffect(()=>{if(ie.current){var X,V;let U=null;var ae;i==="first"&&(U=(ae=(X=n.getFirstKey)===null||X===void 0?void 0:X.call(n))!==null&&ae!==void 0?ae:null);var D;i==="last"&&(U=(D=(V=n.getLastKey)===null||V===void 0?void 0:V.call(n))!==null&&D!==void 0?D:null);let oe=t.selectedKeys;if(oe.size){for(let z of oe)if(t.canSelectItem(z)){U=z;break}}t.setFocused(!0),t.setFocusedKey(U),U==null&&!g&&r.current&&Cu(r.current),t.collection.size>0&&(ie.current=!1,B.current=!0)}});let W=S.useRef(t.focusedKey),G=S.useRef(null);S.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==W.current||B.current)&&k.current&&r.current){let X=oh(),V=Dg(r,t.focusedKey);if(!(V instanceof HTMLElement))return;(X==="keyboard"||B.current)&&(G.current&&cancelAnimationFrame(G.current),G.current=requestAnimationFrame(()=>{k.current&&(UE(k.current,V),X!=="virtual"&&P1(V,{containingElement:r.current}))}))}!g&&t.isFocused&&t.focusedKey==null&&W.current!=null&&r.current&&Cu(r.current),W.current=t.focusedKey,B.current=!1}),S.useEffect(()=>()=>{G.current&&cancelAnimationFrame(G.current)},[]),ug(r,"react-aria-focus-scope-restore",X=>{X.preventDefault(),t.setFocused(!0)});let ee={onKeyDown:A,onFocus:O,onBlur:j,onMouseDown(X){k.current===X.target&&X.preventDefault()}},{typeSelectProps:H}=ZO({keyboardDelegate:n,selectionManager:t});m||(ee=Tn(H,ee));let le;g||(le=t.focusedKey==null?0:-1);let J=QO(t.collection);return{collectionProps:Tn(ee,{tabIndex:le,"data-collection":J})}}class Pk{getItemRect(t){let n=this.ref.current;if(!n)return null;let r=t!=null?Dg(this.ref,t):null;if(!r)return null;let i=n.getBoundingClientRect(),s=r.getBoundingClientRect();return{x:s.left-i.left+n.scrollLeft,y:s.top-i.top+n.scrollTop,width:s.width,height:s.height}}getContentSize(){let t=this.ref.current;var n,r;return{width:(n=t?.scrollWidth)!==null&&n!==void 0?n:0,height:(r=t?.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let t=this.ref.current;var n,r,i,s;return{x:(n=t?.scrollLeft)!==null&&n!==void 0?n:0,y:(r=t?.scrollTop)!==null&&r!==void 0?r:0,width:(i=t?.offsetWidth)!==null&&i!==void 0?i:0,height:(s=t?.offsetHeight)!==null&&s!==void 0?s:0}}constructor(t){this.ref=t}}class n6{isDisabled(t){var n;return this.disabledBehavior==="all"&&(((n=t.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(t.key))}findNextNonDisabled(t,n){let r=t;for(;r!=null;){let i=this.collection.getItem(r);if(i?.type==="item"&&!this.isDisabled(i))return r;r=n(r)}return null}getNextKey(t){let n=t;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,r=>this.collection.getKeyAfter(r))}getPreviousKey(t){let n=t;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,r=>this.collection.getKeyBefore(r))}findKey(t,n,r){let i=t,s=this.layoutDelegate.getItemRect(i);if(!s||i==null)return null;let a=s;do{if(i=n(i),i==null)break;s=this.layoutDelegate.getItemRect(i)}while(s&&r(a,s)&&i!=null);return i}isSameRow(t,n){return t.y===n.y||t.x!==n.x}isSameColumn(t,n){return t.x===n.x||t.y!==n.y}getKeyBelow(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(t)}getKeyAbove(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(t)}getNextColumn(t,n){return n?this.getPreviousKey(t):this.getNextKey(t)}getKeyRightOf(t){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="rtl"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="rtl"):null}getKeyLeftOf(t){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="ltr"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="ltr"):null}getFirstKey(){let t=this.collection.getFirstKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyAfter(n))}getLastKey(){let t=this.collection.getLastKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!qp(n))return this.getFirstKey();let i=t;if(this.orientation==="horizontal"){let s=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>s&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let s=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>s&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getFirstKey()}getKeyPageBelow(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!qp(n))return this.getLastKey();let i=t;if(this.orientation==="horizontal"){let s=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<s&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let s=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<s&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getLastKey()}getKeyForSearch(t,n){if(!this.collator)return null;let r=this.collection,i=n||this.getFirstKey();for(;i!=null;){let s=r.getItem(i);if(!s)return null;let a=s.textValue.slice(0,t.length);if(s.textValue&&this.collator.compare(a,t)===0)return i;i=this.getNextKey(i)}return null}constructor(...t){if(t.length===1){let n=t[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation||"vertical",this.direction=n.direction,this.layout=n.layout||"stack",this.layoutDelegate=n.layoutDelegate||new Pk(n.ref)}else this.collection=t[0],this.disabledKeys=t[1],this.ref=t[2],this.collator=t[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new Pk(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function r6(e){let{selectionManager:t,collection:n,disabledKeys:r,ref:i,keyboardDelegate:s,layoutDelegate:a}=e,c=OM({usage:"search",sensitivity:"base"}),d=t.disabledBehavior,h=S.useMemo(()=>s||new n6({collection:n,disabledKeys:r,disabledBehavior:d,ref:i,collator:c,layoutDelegate:a}),[s,a,n,r,i,c,d]),{collectionProps:m}=t6({...e,ref:i,selectionManager:t,keyboardDelegate:h});return{listProps:m}}function i6(e,t,n){let{listProps:r}=r6({...e,...t,allowsTabNavigation:!0,disallowSelectAll:!0,ref:n});return delete r.onKeyDownCapture,{accordionProps:{...r,tabIndex:void 0}}}function o6(e){var t,n;const r=fi(),{ref:i,as:s,item:a,onFocusChange:c}=e,{state:d,className:h,indicator:m,children:g,title:b,subtitle:x,startContent:k,motionProps:P,focusedKey:T,variant:_,isCompact:A=!1,classNames:M={},isDisabled:O=!1,hideIndicator:j=!1,disableAnimation:$=(t=r?.disableAnimation)!=null?t:!1,keepContentMounted:Y=!1,disableIndicatorAnimation:te=!1,HeadingComponent:ie=s||"h2",onPress:B,onPressStart:W,onPressEnd:G,onPressChange:ee,onPressUp:H,onClick:le,...J}=e,X=s||"div",V=typeof X=="string",ae=$i(i),D=d.disabledKeys.has(a.key)||O,U=d.selectionManager.isSelected(a.key),{buttonProps:oe,regionProps:z}=XO({item:a,isDisabled:D},{...d,focusedKey:T},ae),{onFocus:me,onBlur:Ce,...ye}=oe,{isFocused:Oe,isFocusVisible:Ne,focusProps:_e}=Pu({autoFocus:(n=a.props)==null?void 0:n.autoFocus}),{isHovered:Qe,hoverProps:at}=Eu({isDisabled:D}),{pressProps:Ie,isPressed:mt}=il({ref:ae,isDisabled:D,onPress:B,onPressStart:W,onPressEnd:G,onPressChange:ee,onPressUp:H}),pt=S.useCallback(()=>{c?.(!0,a.key)},[]),Kt=S.useCallback(()=>{c?.(!1,a.key)},[]),Ue=S.useMemo(()=>({...M}),[ds(M)]),it=S.useMemo(()=>KO({isCompact:A,isDisabled:D,hideIndicator:j,disableAnimation:$,disableIndicatorAnimation:te,variant:_}),[A,D,j,$,te,_]),Wt=Vt(Ue?.base,h),tr=S.useCallback((pe={})=>({"data-open":Ae(U),"data-disabled":Ae(D),"data-slot":"base",className:it.base({class:Wt}),...rn(Ef(J,{enabled:V}),pe)}),[Wt,V,J,it,a.props,U,D]),ln=(pe={})=>{var Se,ze;return{ref:ae,"data-open":Ae(U),"data-focus":Ae(Oe),"data-focus-visible":Ae(Ne),"data-disabled":Ae(D),"data-hover":Ae(Qe),"data-pressed":Ae(mt),"data-slot":"trigger",className:it.trigger({class:Ue?.trigger}),onFocus:p1(pt,me,_e.onFocus,J.onFocus,(Se=a.props)==null?void 0:Se.onFocus),onBlur:p1(Kt,Ce,_e.onBlur,J.onBlur,(ze=a.props)==null?void 0:ze.onBlur),...rn(ye,at,Ie,pe,{onClick:el(Ie.onClick,le)})}},_t=S.useCallback((pe={})=>({"data-open":Ae(U),"data-disabled":Ae(D),"data-slot":"content",className:it.content({class:Ue?.content}),...rn(z,pe)}),[it,Ue,z,U,D,Ue?.content]),Rt=S.useCallback((pe={})=>({"aria-hidden":Ae(!0),"data-open":Ae(U),"data-disabled":Ae(D),"data-slot":"indicator",className:it.indicator({class:Ue?.indicator}),...pe}),[it,Ue?.indicator,U,D,Ue?.indicator]),_n=S.useCallback((pe={})=>({"data-open":Ae(U),"data-disabled":Ae(D),"data-slot":"heading",className:it.heading({class:Ue?.heading}),...pe}),[it,Ue?.heading,U,D,Ue?.heading]),Er=S.useCallback((pe={})=>({"data-open":Ae(U),"data-disabled":Ae(D),"data-slot":"title",className:it.title({class:Ue?.title}),...pe}),[it,Ue?.title,U,D,Ue?.title]),Nt=S.useCallback((pe={})=>({"data-open":Ae(U),"data-disabled":Ae(D),"data-slot":"subtitle",className:it.subtitle({class:Ue?.subtitle}),...pe}),[it,Ue,U,D,Ue?.subtitle]);return{Component:X,HeadingComponent:ie,item:a,slots:it,classNames:Ue,domRef:ae,indicator:m,children:g,title:b,subtitle:x,startContent:k,isOpen:U,isDisabled:D,hideIndicator:j,keepContentMounted:Y,disableAnimation:$,motionProps:P,getBaseProps:tr,getHeadingProps:_n,getButtonProps:ln,getContentProps:_t,getIndicatorProps:Rt,getTitleProps:Er,getSubtitleProps:Nt}}var Tk=e=>R.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...e,children:R.jsx("path",{d:"M15.5 19l-7-7 7-7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})}),W_=e=>R.jsx("svg",{"aria-hidden":"true",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...e,children:R.jsx("path",{d:"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",fill:"currentColor"})}),s6=e=>{const{isSelected:t,isIndeterminate:n,disableAnimation:r,...i}=e;return R.jsx("svg",{"aria-hidden":"true",className:"fill-current",fill:"none",focusable:"false",height:"1em",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:"1em",...i,children:R.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})},Bp={ease:[.36,.66,.4,1]},ev={scaleSpring:{enter:{transform:"scale(1)",opacity:1,transition:{type:"spring",bounce:0,duration:.2}},exit:{transform:"scale(0.85)",opacity:0,transition:{type:"easeOut",duration:.15}}},scaleSpringOpacity:{initial:{opacity:0,transform:"scale(0.8)"},enter:{opacity:1,transform:"scale(1)",transition:{type:"spring",bounce:0,duration:.3}},exit:{opacity:0,transform:"scale(0.96)",transition:{type:"easeOut",bounce:0,duration:.15}}},fade:{enter:{opacity:1,transition:{duration:.4,ease:Bp.ease}},exit:{opacity:0,transition:{duration:.3,ease:Bp.ease}}},collapse:{enter:{opacity:1,height:"auto",transition:{height:{type:"spring",bounce:0,duration:.3},opacity:{easings:"ease",duration:.4}}},exit:{opacity:0,height:0,transition:{easings:"ease",duration:.3}}}},_k=()=>Br(()=>import("./index-B-4qdttP.js"),[]).then(e=>e.default),H_=jr((e,t)=>{const{Component:n,HeadingComponent:r,classNames:i,slots:s,indicator:a,children:c,title:d,subtitle:h,startContent:m,isOpen:g,isDisabled:b,hideIndicator:x,keepContentMounted:k,disableAnimation:P,motionProps:T,getBaseProps:_,getHeadingProps:A,getButtonProps:M,getTitleProps:O,getSubtitleProps:j,getContentProps:$,getIndicatorProps:Y}=o6({...e,ref:t}),te=k5(),B=S.useMemo(()=>typeof a=="function"?a({indicator:R.jsx(Tk,{}),isOpen:g,isDisabled:b}):a||null,[a,g,b])||R.jsx(Tk,{}),W=S.useMemo(()=>{if(P)return k?R.jsx("div",{...$(),children:c}):g&&R.jsx("div",{...$(),children:c});const G={exit:{...ev.collapse.exit,overflowY:"hidden"},enter:{...ev.collapse.enter,overflowY:"unset"}};return k?R.jsx($f,{features:_k,children:R.jsx(Af.section,{animate:g?"enter":"exit",exit:"exit",initial:"exit",style:{willChange:te},variants:G,onKeyDown:ee=>{ee.stopPropagation()},...T,children:R.jsx("div",{...$(),children:c})},"accordion-content")}):R.jsx(ol,{initial:!1,children:g&&R.jsx($f,{features:_k,children:R.jsx(Af.section,{animate:"enter",exit:"exit",initial:"exit",style:{willChange:te},variants:G,onKeyDown:ee=>{ee.stopPropagation()},...T,children:R.jsx("div",{...$(),children:c})},"accordion-content")})})},[g,P,k,c,T]);return R.jsxs(n,{..._(),children:[R.jsx(r,{...A(),children:R.jsxs("button",{...M(),children:[m&&R.jsx("div",{className:s.startContent({class:i?.startContent}),children:m}),R.jsxs("div",{className:s.titleWrapper({class:i?.titleWrapper}),children:[d&&R.jsx("span",{...O(),children:d}),h&&R.jsx("span",{...j(),children:h})]}),!x&&B&&R.jsx("span",{...Y(),children:B})]})}),W]})});H_.displayName="HeroUI.AccordionItem";var a6=H_;class l6{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(t){let n=this.keyMap.get(t);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}constructor(t,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t,n=n||new Set;let r=c=>{if(this.keyMap.set(c.key,c),c.childNodes&&(c.type==="section"||n.has(c.key)))for(let d of c.childNodes)r(d)};for(let c of t)r(c);let i=null,s=0;for(let[c,d]of this.keyMap)i?(i.nextKey=c,d.prevKey=i.key):(this.firstKey=c,d.prevKey=void 0),d.type==="item"&&(d.index=s++),i=d,i.nextKey=void 0;var a;this.lastKey=(a=i?.key)!==null&&a!==void 0?a:null}}class Po extends Set{constructor(t,n,r){super(t),t instanceof Po?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function u6(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function c6(e){let{selectionMode:t="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:s="all"}=e,a=S.useRef(!1),[,c]=S.useState(!1),d=S.useRef(null),h=S.useRef(null),[,m]=S.useState(null),g=S.useMemo(()=>Ik(e.selectedKeys),[e.selectedKeys]),b=S.useMemo(()=>Ik(e.defaultSelectedKeys,new Po),[e.defaultSelectedKeys]),[x,k]=Au(g,b,e.onSelectionChange),P=S.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[T,_]=S.useState(i);i==="replace"&&T==="toggle"&&typeof x=="object"&&x.size===0&&_("replace");let A=S.useRef(i);return S.useEffect(()=>{i!==A.current&&(_(i),A.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:T,setSelectionBehavior:_,get isFocused(){return a.current},setFocused(M){a.current=M,c(M)},get focusedKey(){return d.current},get childFocusStrategy(){return h.current},setFocusedKey(M,O="first"){d.current=M,h.current=O,m(M)},selectedKeys:x,setSelectedKeys(M){(r||!u6(M,x))&&k(M)},disabledKeys:P,disabledBehavior:s}}function Ik(e,t){return e?e==="all"?"all":new Po(e):t}function G_(e){return null}G_.getCollectionNode=function*(t,n){let{childItems:r,title:i,children:s}=t,a=t.title||t.children,c=t.textValue||(typeof a=="string"?a:"")||t["aria-label"]||"";!c&&n?.suppressTextValueWarning,yield{type:"item",props:t,rendered:a,textValue:c,"aria-label":t["aria-label"],hasChildNodes:f6(t),*childNodes(){if(r)for(let d of r)yield{type:"item",value:d};else if(i){let d=[];He.Children.forEach(s,h=>{d.push({type:"item",element:h})}),yield*d}}}};function f6(e){return e.hasChildItems!=null?e.hasChildItems:!!(e.childItems||e.title&&He.Children.count(e.children)>0)}let d6=G_;class p6{build(t,n){return this.context=n,$k(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:n,items:r}=t;if(He.isValidElement(n)&&n.type===He.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let s of r)yield*this.getFullNode({value:s,index:i},{renderer:n}),i++}else{let i=[];He.Children.forEach(n,a=>{a&&i.push(a)});let s=0;for(let a of i){let c=this.getFullNode({element:a,index:s},{});for(let d of c)s++,yield d}}}getKey(t,n,r,i){if(t.key!=null)return t.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let s=n.value;if(s!=null){var a;let c=(a=s.key)!==null&&a!==void 0?a:s.id;if(c==null)throw new Error("No key found for item");return c}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(t,n){return{renderer:n.renderer||t.renderer}}*getFullNode(t,n,r,i){if(He.isValidElement(t.element)&&t.element.type===He.Fragment){let T=[];He.Children.forEach(t.element.props.children,A=>{T.push(A)});var s;let _=(s=t.index)!==null&&s!==void 0?s:0;for(const A of T)yield*this.getFullNode({element:A,index:_++},n,r,i);return}let a=t.element;if(!a&&t.value&&n&&n.renderer){let T=this.cache.get(t.value);if(T&&(!T.shouldInvalidate||!T.shouldInvalidate(this.context))){T.index=t.index,T.parentKey=i?i.key:null,yield T;return}a=n.renderer(t.value)}if(He.isValidElement(a)){let T=a.type;if(typeof T!="function"&&typeof T.getCollectionNode!="function"){let O=a.type;throw new Error(`Unknown element <${O}> in collection.`)}let _=T.getCollectionNode(a.props,this.context);var c;let A=(c=t.index)!==null&&c!==void 0?c:0,M=_.next();for(;!M.done&&M.value;){let O=M.value;t.index=A;var d;let j=(d=O.key)!==null&&d!==void 0?d:null;j==null&&(j=O.element?null:this.getKey(a,t,n,r));let Y=[...this.getFullNode({...O,key:j,index:A,wrapper:h6(t.wrapper,O.wrapper)},this.getChildState(n,O),r?`${r}${a.key}`:a.key,i)];for(let te of Y){var h,m;te.value=(m=(h=O.value)!==null&&h!==void 0?h:t.value)!==null&&m!==void 0?m:null,te.value&&this.cache.set(te.value,te);var g;if(t.type&&te.type!==t.type)throw new Error(`Unsupported type <${b0(te.type)}> in <${b0((g=i?.type)!==null&&g!==void 0?g:"unknown parent type")}>. Only <${b0(t.type)}> is supported.`);A++,yield te}M=_.next(Y)}return}if(t.key==null||t.type==null)return;let b=this;var x,k;let P={type:t.type,props:t.props,key:t.key,parentKey:i?i.key:null,value:(x=t.value)!==null&&x!==void 0?x:null,level:i?i.level+1:0,index:t.index,rendered:t.rendered,textValue:(k=t.textValue)!==null&&k!==void 0?k:"","aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes||!1,childNodes:$k(function*(){if(!t.hasChildNodes||!t.childNodes)return;let T=0;for(let _ of t.childNodes()){_.key!=null&&(_.key=`${P.key}${_.key}`);let A=b.getFullNode({..._,index:T},b.getChildState(n,_),P.key,P);for(let M of A)T++,yield M}})};yield P}constructor(){this.cache=new WeakMap}}function $k(e){let t=[],n=null;return{*[Symbol.iterator](){for(let r of t)yield r;n||(n=e());for(let r of n)t.push(r),yield r}}}function h6(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function b0(e){return e[0].toUpperCase()+e.slice(1)}function m6(e,t,n){let r=S.useMemo(()=>new p6,[]),{children:i,items:s,collection:a}=e;return S.useMemo(()=>{if(a)return a;let d=r.build({children:i,items:s},n);return t(d)},[r,i,s,a,n,t])}function g6(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function v6(e){return y6(e,0)}function y6(e,t){if(t<0)return;let n=0;for(let r of e){if(n===t)return r;n++}}function pq(e){let t;for(let n of e)t=n;return t}function x0(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...Ak(e,t),t],i=[...Ak(e,n),n],s=r.slice(0,i.length).findIndex((a,c)=>a!==i[c]);return s!==-1?(t=r[s],n=i[s],t.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===t)>=0,-1)}function Ak(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}class nw{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,n){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){if(this.state.selectionMode==="none")return!1;let n=this.getKey(t);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=t.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&x0(this.collection,i,t)<0)&&(t=i)}var n;return(n=t?.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&x0(this.collection,i,t)>0)&&(t=i)}var n;return(n=t?.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new Po([n],n,n);else{let a=this.state.selectedKeys;var i;let c=(i=a.anchorKey)!==null&&i!==void 0?i:n;r=new Po(a,c,n);var s;for(let d of this.getKeyRange(c,(s=a.currentKey)!==null&&s!==void 0?s:n))r.delete(d);for(let d of this.getKeyRange(n,c))this.canSelectItem(d)&&r.add(d)}this.state.setSelectedKeys(r)}getKeyRange(t,n){let r=this.collection.getItem(t),i=this.collection.getItem(n);return r&&i?x0(this.collection,r,i)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(t,n);let i=[],s=t;for(;s!=null;){let a=this.collection.getItem(s);if(a&&(a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&i.push(s),s===n)return i;s=this.collection.getKeyAfter(s)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r=new Po(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(t){if(this.selectionMode==="none")return;let n=this.getKey(t);if(n==null)return;let r=this.canSelectItem(n)?new Po([n],n,n):new Po;this.state.setSelectedKeys(r)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Po;for(let r of t){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let a=this.collection.getItem(r);a?.type==="item"&&t.push(r);var s;a?.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n((s=(i=v6(g6(a,this.collection)))===null||i===void 0?void 0:i.key)!==null&&s!==void 0?s:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Po)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let r of t)if(!n.has(r))return!1;for(let r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=this.collection.getItem(t);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(t){var n,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(t){var n;return(n=this.collection.getItem(t))===null||n===void 0?void 0:n.props}withCollection(t){return new nw(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(t,n,r){this.collection=t,this.state=n;var i;this.allowsCellSelection=(i=r?.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=r?.layoutDelegate||null}}function b6(e){let{onExpandedChange:t}=e,[n,r]=Au(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=c6(e),s=S.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),a=m6(e,S.useCallback(d=>new l6(d,{expandedKeys:n}),[n]),null);return S.useEffect(()=>{i.focusedKey!=null&&!a.getItem(i.focusedKey)&&i.setFocusedKey(null)},[a,i.focusedKey]),{collection:a,expandedKeys:n,disabledKeys:s,toggleKey:d=>{r(x6(n,d))},setExpandedKeys:r,selectionManager:new nw(a,i)}}function x6(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function w6(e){var t;const n=fi(),{ref:r,as:i,className:s,items:a,variant:c,motionProps:d,expandedKeys:h,disabledKeys:m,selectedKeys:g,children:b,defaultExpandedKeys:x,selectionMode:k="single",selectionBehavior:P="toggle",keepContentMounted:T=!1,disallowEmptySelection:_,defaultSelectedKeys:A,onExpandedChange:M,onSelectionChange:O,dividerProps:j={},isCompact:$=!1,isDisabled:Y=!1,showDivider:te=!0,hideIndicator:ie=!1,disableAnimation:B=(t=n?.disableAnimation)!=null?t:!1,disableIndicatorAnimation:W=!1,itemClasses:G,...ee}=e,[H,le]=S.useState(null),J=i||"div",X=typeof J=="string",V=$i(r),ae=S.useMemo(()=>UO({variant:c,className:s}),[c,s]),U={children:S.useMemo(()=>{let _e=[];return He.Children.map(b,Qe=>{var at;if(He.isValidElement(Qe)&&typeof((at=Qe.props)==null?void 0:at.children)!="string"){const Ie=He.cloneElement(Qe,{hasChildItems:!1});_e.push(Ie)}else _e.push(Qe)}),_e},[b]),items:a},oe={expandedKeys:h,defaultExpandedKeys:x,onExpandedChange:M},z={disabledKeys:m,selectedKeys:g,selectionMode:k,selectionBehavior:P,disallowEmptySelection:_,defaultSelectedKeys:A??x,onSelectionChange:O,...U,...oe},me=b6(z);me.selectionManager.setFocusedKey=_e=>{le(_e)};const{accordionProps:Ce}=i6({...U,...oe},me,V),ye=S.useMemo(()=>({state:me,focusedKey:H,motionProps:d,isCompact:$,isDisabled:Y,hideIndicator:ie,disableAnimation:B,keepContentMounted:T,disableIndicatorAnimation:W}),[H,$,Y,ie,g,B,T,me?.expandedKeys.values,W,me.expandedKeys.size,me.disabledKeys.size,d]),Oe=S.useCallback((_e={})=>({ref:V,className:ae,"data-orientation":"vertical",...rn(Ce,Ef(ee,{enabled:X}),_e)}),[]),Ne=S.useCallback((_e,Qe)=>{_e&&le(Qe)},[]);return{Component:J,values:ye,state:me,focusedKey:H,getBaseProps:Oe,isSplitted:c==="splitted",classNames:ae,showDivider:te,dividerProps:j,disableAnimation:B,handleFocusChanged:Ne,itemClasses:G}}function S6(e){let t=Ef(e,{enabled:typeof e.elementType=="string"}),n;return e.orientation==="vertical"&&(n="vertical"),e.elementType!=="hr"?{separatorProps:{...t,role:"separator","aria-orientation":n}}:{separatorProps:t}}function k6(e){const{as:t,className:n,orientation:r,...i}=e;let s=t||"hr";s==="hr"&&r==="vertical"&&(s="div");const{separatorProps:a}=S6({elementType:typeof s=="string"?s:"hr",orientation:r}),c=S.useMemo(()=>zO({orientation:r,className:n}),[r,n]),d=S.useCallback((h={})=>({className:c,role:"separator","data-orientation":r,...a,...i,...h}),[c,r,a,i]);return{Component:s,getDividerProps:d}}var q_=jr((e,t)=>{const{Component:n,getDividerProps:r}=k6({...e});return R.jsx(n,{ref:t,...r()})});q_.displayName="HeroUI.Divider";var C6=q_,Y_=jr((e,t)=>{const{Component:n,values:r,state:i,isSplitted:s,showDivider:a,getBaseProps:c,disableAnimation:d,handleFocusChanged:h,itemClasses:m,dividerProps:g}=w6({...e,ref:t}),b=S.useCallback((k,P)=>h(k,P),[h]),x=S.useMemo(()=>[...i.collection].map((k,P)=>{const T={...m,...k.props.classNames||{}};return R.jsxs(S.Fragment,{children:[R.jsx(a6,{item:k,variant:e.variant,onFocusChange:b,...r,...k.props,classNames:T}),!k.props.hidden&&!s&&a&&P<i.collection.size-1&&R.jsx(C6,{...g})]},k.key)}),[r,m,b,s,a,i.collection]);return R.jsx(n,{...c(),children:d?x:R.jsx(K3,{children:x})})});Y_.displayName="HeroUI.Accordion";var Rk=Y_,E6=e=>{const t={top:{originY:1},bottom:{originY:0},left:{originX:1},right:{originX:0},"top-start":{originX:0,originY:1},"top-end":{originX:1,originY:1},"bottom-start":{originX:0,originY:0},"bottom-end":{originX:1,originY:0},"right-start":{originX:0,originY:0},"right-end":{originX:0,originY:1},"left-start":{originX:1,originY:0},"left-end":{originX:1,originY:1}};return t?.[e]||{}},P6=e=>({top:"top",bottom:"bottom",left:"left",right:"right","top-start":"top start","top-end":"top end","bottom-start":"bottom start","bottom-end":"bottom end","left-start":"left top","left-end":"left bottom","right-start":"right top","right-end":"right bottom"})[e],hq=(e,t)=>{if(t.includes("-")){const[n]=t.split("-");if(n.includes(e))return!1}return!0},Lk=(e,t)=>{if(t.includes("-")){const[,n]=t.split("-");return`${e}-${n}`}return e},T6=d6,bp=T6,Sh=globalThis?.document?S.useLayoutEffect:S.useEffect;function _6(e={}){const{onLoad:t,onError:n,ignoreFallback:r,src:i,crossOrigin:s,srcSet:a,sizes:c,loading:d,shouldBypassImageLoad:h=!1}=e,m=IL(),g=S.useRef(m?new Image:null),[b,x]=S.useState("pending");S.useEffect(()=>{g.current&&(g.current.onload=T=>{k(),x("loaded"),t?.(T)},g.current.onerror=T=>{k(),x("failed"),n?.(T)})},[g.current]);const k=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)},P=S.useCallback(()=>{if(!i)return"pending";if(r||h)return"loaded";const T=new Image;return T.src=i,s&&(T.crossOrigin=s),a&&(T.srcset=a),c&&(T.sizes=c),d&&(T.loading=d),g.current=T,T.complete&&T.naturalWidth?"loaded":"loading"},[i,s,a,c,t,n,d,h]);return Sh(()=>{m&&x(P())},[m,P]),r?"loaded":b}var[mq,I6]=mv({name:"ButtonGroupContext",strict:!1});function X_(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:s,onPressEnd:a,onPressUp:c,onPressChange:d,preventFocusOnPress:h,allowFocusWhenDisabled:m,onClick:g,href:b,target:x,rel:k,type:P="button",allowTextSelectionOnPress:T}=e,_;n==="button"?_={type:P,disabled:r}:_={role:"button",href:n==="a"&&!r?b:void 0,target:n==="a"?x:void 0,type:n==="input"?P:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?k:void 0};let{pressProps:A,isPressed:M}=il({onClick:g,onPressStart:s,onPressEnd:a,onPressUp:c,onPressChange:d,onPress:i,isDisabled:r,preventFocusOnPress:h,allowTextSelectionOnPress:T,ref:t}),{focusableProps:O}=xh(e,t);m&&(O.tabIndex=r?-1:O.tabIndex);let j=Tn(O,A,$u(e,{labelable:!0}));return{isPressed:M,buttonProps:Tn(_,j,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}var $6=()=>Br(()=>import("./index-B-4qdttP.js"),[]).then(e=>e.default),Q_=e=>{const{ripples:t=[],motionProps:n,color:r="currentColor",style:i,onClear:s}=e;return R.jsx(R.Fragment,{children:t.map(a=>{const c=CL(.01*a.size,.2,a.size>100?.75:.5);return R.jsx($f,{features:$6,children:R.jsx(ol,{mode:"popLayout",children:R.jsx(Af.span,{animate:{transform:"scale(2)",opacity:0},className:"heroui-ripple",exit:{opacity:0},initial:{transform:"scale(0)",opacity:.35},style:{position:"absolute",backgroundColor:r,borderRadius:"100%",transformOrigin:"center",pointerEvents:"none",overflow:"hidden",inset:0,zIndex:0,top:a.y,left:a.x,width:`${a.size}px`,height:`${a.size}px`,...i},transition:{duration:c},onAnimationComplete:()=>{s(a.key)},...n})})},a.key)})})};Q_.displayName="HeroUI.Ripple";var A6=Q_;function R6(e={}){const[t,n]=S.useState([]),r=S.useCallback(s=>{const a=s.target,c=Math.max(a.clientWidth,a.clientHeight);n(d=>[...d,{key:kL(d.length.toString()),size:c,x:s.x-c/2,y:s.y-c/2}])},[]),i=S.useCallback(s=>{n(a=>a.filter(c=>c.key!==s))},[]);return{ripples:t,onClear:i,onPress:r,...e}}function L6(e){var t,n,r,i,s,a,c,d,h;const m=I6(),g=fi(),b=!!m,{ref:x,as:k,children:P,startContent:T,endContent:_,autoFocus:A,className:M,spinner:O,isLoading:j=!1,disableRipple:$=!1,fullWidth:Y=(t=m?.fullWidth)!=null?t:!1,radius:te=m?.radius,size:ie=(n=m?.size)!=null?n:"md",color:B=(r=m?.color)!=null?r:"default",variant:W=(i=m?.variant)!=null?i:"solid",disableAnimation:G=(a=(s=m?.disableAnimation)!=null?s:g?.disableAnimation)!=null?a:!1,isDisabled:ee=(c=m?.isDisabled)!=null?c:!1,isIconOnly:H=(d=m?.isIconOnly)!=null?d:!1,spinnerPlacement:le="start",onPress:J,onClick:X,...V}=e,ae=k||"button",D=typeof ae=="string",U=$i(x),oe=(h=$||g?.disableRipple)!=null?h:G,{isFocusVisible:z,isFocused:me,focusProps:Ce}=Pu({autoFocus:A}),ye=ee||j,Oe=S.useMemo(()=>BO({size:ie,color:B,variant:W,radius:te,fullWidth:Y,isDisabled:ye,isInGroup:b,disableAnimation:G,isIconOnly:H,className:M}),[ie,B,W,te,Y,ye,b,H,G,M]),{onPress:Ne,onClear:_e,ripples:Qe}=R6(),at=S.useCallback(Rt=>{oe||ye||G||U.current&&Ne(Rt)},[oe,ye,G,U,Ne]),{buttonProps:Ie,isPressed:mt}=X_({elementType:k,isDisabled:ye,onPress:el(J,at),onClick:X,...V},U),{isHovered:pt,hoverProps:Kt}=Eu({isDisabled:ye}),Ue=S.useCallback((Rt={})=>({"data-disabled":Ae(ye),"data-focus":Ae(me),"data-pressed":Ae(mt),"data-focus-visible":Ae(z),"data-hover":Ae(pt),"data-loading":Ae(j),...rn(Ie,Ce,Kt,Ef(V,{enabled:D}),Ef(Rt)),className:Oe}),[j,ye,me,mt,D,z,pt,Ie,Ce,Kt,V,Oe]),it=Rt=>S.isValidElement(Rt)?S.cloneElement(Rt,{"aria-hidden":!0,focusable:!1}):null,Wt=it(T),tr=it(_),ln=S.useMemo(()=>({sm:"sm",md:"sm",lg:"md"})[ie],[ie]),_t=S.useCallback(()=>({ripples:Qe,onClear:_e}),[Qe,_e]);return{Component:ae,children:P,domRef:U,spinner:O,styles:Oe,startContent:Wt,endContent:tr,isLoading:j,spinnerPlacement:le,spinnerSize:ln,disableRipple:oe,getButtonProps:Ue,getRippleProps:_t,isIconOnly:H}}function M6(e){var t,n;const[r,i]=ia(e,mk.variantKeys),s=fi(),a=(n=(t=e?.variant)!=null?t:s?.spinnerVariant)!=null?n:"default",{children:c,className:d,classNames:h,label:m,...g}=r,b=S.useMemo(()=>mk({...i}),[ds(i)]),x=Vt(h?.base,d),k=m||c,P=S.useMemo(()=>k&&typeof k=="string"?k:g["aria-label"]?"":"Loading",[c,k,g["aria-label"]]),T=S.useCallback(()=>({"aria-label":P,className:b.base({class:x}),...g}),[P,b,x,g]);return{label:k,slots:b,classNames:h,variant:a,getSpinnerProps:T}}var J_=jr((e,t)=>{const{slots:n,classNames:r,label:i,variant:s,getSpinnerProps:a}=M6({...e});return s==="wave"||s==="dots"?R.jsxs("div",{ref:t,...a(),children:[R.jsx("div",{className:n.wrapper({class:r?.wrapper}),children:[...new Array(3)].map((c,d)=>R.jsx("i",{className:n.dots({class:r?.dots}),style:{"--dot-index":d}},`dot-${d}`))}),i&&R.jsx("span",{className:n.label({class:r?.label}),children:i})]}):s==="simple"?R.jsxs("div",{ref:t,...a(),children:[R.jsxs("svg",{className:n.wrapper({class:r?.wrapper}),fill:"none",viewBox:"0 0 24 24",children:[R.jsx("circle",{className:n.circle1({class:r?.circle1}),cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),R.jsx("path",{className:n.circle2({class:r?.circle2}),d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",fill:"currentColor"})]}),i&&R.jsx("span",{className:n.label({class:r?.label}),children:i})]}):s==="spinner"?R.jsxs("div",{ref:t,...a(),children:[R.jsx("div",{className:n.wrapper({class:r?.wrapper}),children:[...new Array(12)].map((c,d)=>R.jsx("i",{className:n.spinnerBars({class:r?.spinnerBars}),style:{"--bar-index":d}},`star-${d}`))}),i&&R.jsx("span",{className:n.label({class:r?.label}),children:i})]}):R.jsxs("div",{ref:t,...a(),children:[R.jsxs("div",{className:n.wrapper({class:r?.wrapper}),children:[R.jsx("i",{className:n.circle1({class:r?.circle1})}),R.jsx("i",{className:n.circle2({class:r?.circle2})})]}),i&&R.jsx("span",{className:n.label({class:r?.label}),children:i})]})});J_.displayName="HeroUI.Spinner";var D6=J_,Z_=jr((e,t)=>{const{Component:n,domRef:r,children:i,spinnerSize:s,spinner:a=R.jsx(D6,{color:"current",size:s}),spinnerPlacement:c,startContent:d,endContent:h,isLoading:m,disableRipple:g,getButtonProps:b,getRippleProps:x,isIconOnly:k}=L6({...e,ref:t});return R.jsxs(n,{ref:r,...b(),children:[d,m&&c==="start"&&a,m&&k?null:i,m&&c==="end"&&a,h,!g&&R.jsx(A6,{...x()})]})});Z_.displayName="HeroUI.Button";var wr=Z_;function N6(e){const[t,n]=ia(e,kk.variantKeys),{ref:r,as:i,children:s,avatar:a,startContent:c,endContent:d,onClose:h,classNames:m,className:g,...b}=t,x=i||"div",k=$i(r),P=Vt(m?.base,g),T=!!h,_=e.variant==="dot",{focusProps:A,isFocusVisible:M}=Pu(),O=S.useMemo(()=>typeof s=="string"&&s?.length===1,[s]),j=S.useMemo(()=>!!a||!!c,[a,c]),$=S.useMemo(()=>!!d||T,[d,T]),Y=S.useMemo(()=>kk({...n,hasStartContent:j,hasEndContent:$,isOneChar:O,isCloseable:T,isCloseButtonFocusVisible:M}),[ds(n),M,j,$,O,T]),{pressProps:te}=il({isDisabled:!!e?.isDisabled,onPress:h}),ie=()=>({ref:k,className:Y.base({class:P}),...b}),B=()=>({role:"button",tabIndex:0,className:Y.closeButton({class:m?.closeButton}),"aria-label":"close chip",...rn(te,A)}),W=ee=>S.isValidElement(ee)?S.cloneElement(ee,{className:Y.avatar({class:m?.avatar})}):null,G=ee=>S.isValidElement(ee)?S.cloneElement(ee,{className:Vt("max-h-[80%]",ee.props.className)}):null;return{Component:x,children:s,slots:Y,classNames:m,isDot:_,isCloseable:T,startContent:W(a)||G(c),endContent:G(d),getCloseButtonProps:B,getChipProps:ie}}var e2=jr((e,t)=>{const{Component:n,children:r,slots:i,classNames:s,isDot:a,isCloseable:c,startContent:d,endContent:h,getCloseButtonProps:m,getChipProps:g}=N6({...e,ref:t}),b=S.useMemo(()=>a&&!d?R.jsx("span",{className:i.dot({class:s?.dot})}):d,[i,d,a]),x=S.useMemo(()=>c?R.jsx("span",{...m(),children:h||R.jsx(W_,{})}):h,[h,c,m]);return R.jsxs(n,{...g(),children:[b,R.jsx("span",{className:i.content({class:s?.content}),children:r}),x]})});e2.displayName="HeroUI.Chip";var Sg=e2;const t2={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},n2={...t2,customError:!0,valid:!1},df={isInvalid:!1,validationDetails:t2,validationErrors:[]},r2=S.createContext({}),tv="__formValidationState"+Date.now();function rw(e){if(e[tv]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:s}=e[tv];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:s}}return F6(e)}function F6(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:s,validate:a,validationBehavior:c="aria"}=e;n&&(t||(t=n==="invalid"));let d=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:n2}:null,h=S.useMemo(()=>{if(!a||i==null)return null;let B=O6(a,i);return Mk(B)},[a,i]);s?.validationDetails.valid&&(s=void 0);let m=S.useContext(r2),g=S.useMemo(()=>r?Array.isArray(r)?r.flatMap(B=>Mb(m[B])):Mb(m[r]):[],[m,r]),[b,x]=S.useState(m),[k,P]=S.useState(!1);m!==b&&(x(m),P(!1));let T=S.useMemo(()=>Mk(k?[]:g),[k,g]),_=S.useRef(df),[A,M]=S.useState(df),O=S.useRef(df),j=()=>{if(!$)return;Y(!1);let B=h||s||_.current;w0(B,O.current)||(O.current=B,M(B))},[$,Y]=S.useState(!1);return S.useEffect(j),{realtimeValidation:d||T||h||s||df,displayValidation:c==="native"?d||T||A:d||T||h||s||A,updateValidation(B){c==="aria"&&!w0(A,B)?M(B):_.current=B},resetValidation(){let B=df;w0(B,O.current)||(O.current=B,M(B)),c==="native"&&Y(!1),P(!0)},commitValidation(){c==="native"&&Y(!0),P(!0)}}}function Mb(e){return e?Array.isArray(e)?e:[e]:[]}function O6(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return Mb(n)}return[]}function Mk(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:n2}:null}function w0(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function i2(e,t,n){let{validationBehavior:r,focus:i}=e;an(()=>{if(r==="native"&&n?.current&&!n.current.disabled){let d=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(d),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(j6(n.current))}});let s=Bn(()=>{t.resetValidation()}),a=Bn(d=>{var h;t.displayValidation.isInvalid||t.commitValidation();let m=n==null||(h=n.current)===null||h===void 0?void 0:h.form;if(!d.defaultPrevented&&n&&m&&B6(m)===n.current){var g;i?i():(g=n.current)===null||g===void 0||g.focus(),Y5("keyboard")}d.preventDefault()}),c=Bn(()=>{t.commitValidation()});S.useEffect(()=>{let d=n?.current;if(!d)return;let h=d.form;return d.addEventListener("invalid",a),d.addEventListener("change",c),h?.addEventListener("reset",s),()=>{d.removeEventListener("invalid",a),d.removeEventListener("change",c),h?.removeEventListener("reset",s)}},[n,a,c,s,r])}function z6(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function j6(e){return{isInvalid:!e.validity.valid,validationDetails:z6(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function B6(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}function V6(e,t,n){let{isDisabled:r=!1,isReadOnly:i=!1,value:s,name:a,children:c,"aria-label":d,"aria-labelledby":h,validationState:m="valid",isInvalid:g}=e,b=O=>{O.stopPropagation(),t.setSelected(O.target.checked)},{pressProps:x,isPressed:k}=il({isDisabled:r}),{pressProps:P,isPressed:T}=il({onPress(){var O;t.toggle(),(O=n.current)===null||O===void 0||O.focus()},isDisabled:r||i}),{focusableProps:_}=xh(e,n),A=Tn(x,_),M=$u(e,{labelable:!0});return WE(n,t.isSelected,t.setSelected),{labelProps:Tn(P,{onClick:O=>O.preventDefault()}),inputProps:Tn(M,{"aria-invalid":g||m==="invalid"||void 0,"aria-errormessage":e["aria-errormessage"],"aria-controls":e["aria-controls"],"aria-readonly":i||void 0,onChange:b,disabled:r,...s==null?{}:{value:s},name:a,type:"checkbox",...A}),isSelected:t.isSelected,isPressed:k||T,isDisabled:r,isReadOnly:i,isInvalid:g||m==="invalid"}}function o2(e,t,n){let r=rw({...e,value:t.isSelected}),{isInvalid:i,validationErrors:s,validationDetails:a}=r.displayValidation,{labelProps:c,inputProps:d,isSelected:h,isPressed:m,isDisabled:g,isReadOnly:b}=V6({...e,isInvalid:i},t,n);i2(e,r,n);let{isIndeterminate:x,isRequired:k,validationBehavior:P="aria"}=e;S.useEffect(()=>{n.current&&(n.current.indeterminate=!!x)});let{pressProps:T}=il({isDisabled:g||b,onPress(){let{[tv]:_}=e,{commitValidation:A}=_||r;A()}});return{labelProps:Tn(c,T),inputProps:{...d,checked:h,"aria-required":k&&P==="aria"||void 0,required:k&&P==="native"},isSelected:h,isPressed:m,isDisabled:g,isReadOnly:b,isInvalid:i,validationErrors:s,validationDetails:a}}const U6=new WeakMap;function s2(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:s="label"}=e;t=Pf(t);let a=Pf(),c={};n&&(r=r?`${a} ${r}`:a,c={id:a,htmlFor:s==="label"?t:void 0});let d=jE({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:c,fieldProps:d}}function K6(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:s,fieldProps:a}=s2(e),c=Y0([!!t,!!n,r,i]),d=Y0([!!t,!!n,r,i]);return a=Tn(a,{"aria-describedby":[c,d,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:s,fieldProps:a,descriptionProps:{id:c},errorMessageProps:{id:d}}}function a2(e={}){let{isReadOnly:t}=e,[n,r]=Au(e.isSelected,e.defaultSelected||!1,e.onChange);function i(a){t||r(a)}function s(){t||r(!n)}return{isSelected:n,setSelected:i,toggle:s}}function W6(e,t,n){const r=a2({isReadOnly:e.isReadOnly||t.isReadOnly,isSelected:t.isSelected(e.value),onChange(T){T?t.addValue(e.value):t.removeValue(e.value),e.onChange&&e.onChange(T)}});let{name:i,descriptionId:s,errorMessageId:a,validationBehavior:c}=U6.get(t);var d;c=(d=e.validationBehavior)!==null&&d!==void 0?d:c;let{realtimeValidation:h}=rw({...e,value:r.isSelected,name:void 0,validationBehavior:"aria"}),m=S.useRef(df),g=()=>{t.setInvalid(e.value,h.isInvalid?h:m.current)};S.useEffect(g);let b=t.realtimeValidation.isInvalid?t.realtimeValidation:h,x=c==="native"?t.displayValidation:b;var k;let P=o2({...e,isReadOnly:e.isReadOnly||t.isReadOnly,isDisabled:e.isDisabled||t.isDisabled,name:e.name||i,isRequired:(k=e.isRequired)!==null&&k!==void 0?k:t.isRequired,validationBehavior:c,[tv]:{realtimeValidation:b,displayValidation:x,resetValidation:t.resetValidation,commitValidation:t.commitValidation,updateValidation(T){m.current=T,g()}}},r,n);return{...P,inputProps:{...P.inputProps,"aria-describedby":[e["aria-describedby"],t.isInvalid?a:null,s].filter(Boolean).join(" ")||void 0}}}var Dk=Symbol("default");function H6(e){const t=S.useRef(null),n=S.useRef(void 0),r=S.useCallback(i=>{if(typeof e=="function"){const s=e,a=s(i);return()=>{typeof a=="function"?a():s(null)}}else if(e)return e.current=i,()=>{e.current=null}},[e]);return S.useMemo(()=>({get current(){return t.current},set current(i){t.current=i,n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=r(i))}}),[r])}function iw(e,t){let n=S.useContext(e);if(t===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=new Intl.ListFormat().format(Object.keys(n.slots).map(s=>`"${s}"`));if(!t&&!n.slots[Dk])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let i=t||Dk;if(!n.slots[i])throw new Error(`Invalid slot "${t}". Valid slot names are ${r}.`);return n.slots[i]}return n}function G6(e,t,n){let r=iw(n,e.slot)||{},{ref:i,...s}=r,a=H6(S.useMemo(()=>EE(t,i),[t,i])),c=rn(s,e);return"style"in s&&s.style&&"style"in e&&e.style&&(typeof s.style=="function"||typeof e.style=="function"?c.style=d=>{let h=typeof s.style=="function"?s.style(d):s.style,m={...d.defaultStyle,...h},g=typeof e.style=="function"?e.style({...d,defaultStyle:m}):e.style;return{...m,...g}}:c.style={...s.style,...e.style}),[c,a]}var nv=S.createContext(null),q6=S.forwardRef(function(t,n){[t,n]=G6(t,n,nv);let{validationErrors:r,validationBehavior:i="native",children:s,className:a,...c}=t;const d=S.useMemo(()=>jO({className:a}),[a]);return R.jsx("form",{noValidate:i!=="native",...c,ref:n,className:d,children:R.jsx(nv.Provider,{value:{...t,validationBehavior:i},children:R.jsx(r2.Provider,{value:r??{},children:s})})})}),Y6=S.forwardRef(function(t,n){var r,i;const s=fi(),a=(i=(r=t.validationBehavior)!=null?r:s?.validationBehavior)!=null?i:"native";return R.jsx(q6,{...t,ref:n,validationBehavior:a})}),[gq,X6]=mv({name:"CheckboxGroupContext",strict:!1});function Q6(e){const{isSelected:t,disableAnimation:n,...r}=e;return R.jsx("svg",{"aria-hidden":"true",fill:"none",role:"presentation",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:t?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,style:!n&&t?{transition:"stroke-dashoffset 250ms linear 0.2s"}:{},viewBox:"0 0 17 18",...r,children:R.jsx("polyline",{points:"1 9 7 14 15 4"})})}function J6(e){const{isSelected:t,disableAnimation:n,...r}=e;return R.jsx("svg",{stroke:"currentColor",strokeWidth:3,viewBox:"0 0 24 24",...r,children:R.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function Z6(e){const{isIndeterminate:t,...n}=e,r=t?J6:Q6;return R.jsx(r,{...n})}function Db(e,t=[]){const n=S.useRef(e);return Sh(()=>{n.current=e}),S.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function ez(e={}){var t,n,r,i,s,a,c,d;const h=fi(),m=X6(),{validationBehavior:g}=iw(nv)||{},b=!!m,{as:x,ref:k,value:P="",children:T,icon:_,name:A,isRequired:M,isReadOnly:O=!1,autoFocus:j=!1,isSelected:$,size:Y=(t=m?.size)!=null?t:"md",color:te=(n=m?.color)!=null?n:"primary",radius:ie=m?.radius,lineThrough:B=(r=m?.lineThrough)!=null?r:!1,isDisabled:W=(i=m?.isDisabled)!=null?i:!1,disableAnimation:G=(a=(s=m?.disableAnimation)!=null?s:h?.disableAnimation)!=null?a:!1,validationState:ee,isInvalid:H=ee?ee==="invalid":(c=m?.isInvalid)!=null?c:!1,isIndeterminate:le=!1,validationBehavior:J=b?m.validationBehavior:(d=g??h?.validationBehavior)!=null?d:"native",defaultSelected:X,classNames:V,className:ae,onValueChange:D,validate:U,...oe}=e,z=x||"label",me=S.useRef(null),Ce=S.useRef(null);let ye=e.onChange;b&&(ye=el(()=>{m.groupState.resetValidation()},ye));const Oe=S.useId(),Ne=S.useMemo(()=>({name:A,value:P,children:T,autoFocus:j,defaultSelected:X,isIndeterminate:le,isRequired:M,isInvalid:H,isSelected:$,isDisabled:W,isReadOnly:O,"aria-label":CE(oe["aria-label"],T),"aria-labelledby":oe["aria-labelledby"]||Oe,onChange:D}),[A,P,T,j,X,le,M,H,$,W,O,oe["aria-label"],oe["aria-labelledby"],Oe,D]),_e=a2(Ne),Qe={isInvalid:H,isRequired:M,validate:U,validationState:ee,validationBehavior:J},{inputProps:at,isSelected:Ie,isDisabled:mt,isReadOnly:pt,isPressed:Kt,isInvalid:Ue}=b?W6({...Ne,...Qe},m.groupState,Ce):o2({...Ne,...Qe},_e,Ce),it=mt||pt,Wt=ee==="invalid"||H||Ue,tr=it?!1:Kt,{hoverProps:ln,isHovered:_t}=Eu({isDisabled:at.disabled}),{focusProps:Rt,isFocused:_n,isFocusVisible:Er}=Pu({autoFocus:at.autoFocus}),Nt=S.useMemo(()=>VO({color:te,size:Y,radius:ie,isInvalid:Wt,lineThrough:B,isDisabled:mt,disableAnimation:G}),[te,Y,ie,Wt,B,mt,G]);Sh(()=>{if(!Ce.current)return;const Pt=!!Ce.current.checked;_e.setSelected(Pt)},[Ce.current]);const pe=Db(ye),Se=S.useCallback(Pt=>{if(pt||mt){Pt.preventDefault();return}pe?.(Pt)},[pt,mt,pe]),ze=Vt(V?.base,ae),nt=S.useCallback(()=>({ref:me,className:Nt.base({class:ze}),"data-disabled":Ae(mt),"data-selected":Ae(Ie||le),"data-invalid":Ae(Wt),"data-hover":Ae(_t),"data-focus":Ae(_n),"data-pressed":Ae(tr),"data-readonly":Ae(at.readOnly),"data-focus-visible":Ae(Er),"data-indeterminate":Ae(le),...rn(ln,oe)}),[Nt,ze,mt,Ie,le,Wt,_t,_n,tr,at.readOnly,Er,ln,oe]),lt=S.useCallback((Pt={})=>({...Pt,"aria-hidden":!0,className:Vt(Nt.wrapper({class:Vt(V?.wrapper,Pt?.className)}))}),[Nt,V?.wrapper]),Ht=S.useCallback(()=>({ref:PE(Ce,k),...rn(at,Rt),className:Nt.hiddenInput({class:V?.hiddenInput}),onChange:el(at.onChange,Se)}),[at,Rt,Se,V?.hiddenInput]),Vn=S.useCallback(()=>({id:Oe,className:Nt.label({class:V?.label})}),[Nt,V?.label,mt,Ie,Wt]),Zt=S.useCallback(()=>({isSelected:Ie,isIndeterminate:le,disableAnimation:G,className:Nt.icon({class:V?.icon})}),[Nt,V?.icon,Ie,le,G]);return{Component:z,icon:_,children:T,isSelected:Ie,isDisabled:mt,isInvalid:Wt,isFocused:_n,isHovered:_t,isFocusVisible:Er,getBaseProps:nt,getWrapperProps:lt,getInputProps:Ht,getLabelProps:Vn,getIconProps:Zt}}var l2=jr((e,t)=>{const{Component:n,children:r,icon:i=R.jsx(Z6,{}),getBaseProps:s,getWrapperProps:a,getInputProps:c,getIconProps:d,getLabelProps:h}=ez({...e,ref:t}),m=typeof i=="function"?i(d()):S.cloneElement(i,d());return R.jsxs(n,{...s(),children:[R.jsx("input",{...c()}),R.jsx("span",{...a(),children:m}),r&&R.jsx("span",{...h(),children:r})]})});l2.displayName="HeroUI.Checkbox";var u2=l2;function c2(e){let[t,n]=Au(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const r=S.useCallback(()=>{n(!0)},[n]),i=S.useCallback(()=>{n(!1)},[n]),s=S.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:i,toggle:s}}const tz=1500,Nk=500;let cu={},nz=0,xp=!1,Gs=null,fu=null;function rz(e={}){let{delay:t=tz,closeDelay:n=Nk}=e,{isOpen:r,open:i,close:s}=c2(e),a=S.useMemo(()=>`${++nz}`,[]),c=S.useRef(null),d=S.useRef(s),h=()=>{cu[a]=b},m=()=>{for(let k in cu)k!==a&&(cu[k](!0),delete cu[k])},g=()=>{c.current&&clearTimeout(c.current),c.current=null,m(),h(),xp=!0,i(),Gs&&(clearTimeout(Gs),Gs=null),fu&&(clearTimeout(fu),fu=null)},b=k=>{k||n<=0?(c.current&&clearTimeout(c.current),c.current=null,d.current()):c.current||(c.current=setTimeout(()=>{c.current=null,d.current()},n)),Gs&&(clearTimeout(Gs),Gs=null),xp&&(fu&&clearTimeout(fu),fu=setTimeout(()=>{delete cu[a],fu=null,xp=!1},Math.max(Nk,n)))},x=()=>{m(),h(),!r&&!Gs&&!xp?Gs=setTimeout(()=>{Gs=null,xp=!0,g()},t):r||g()};return S.useEffect(()=>{d.current=s},[s]),S.useEffect(()=>()=>{c.current&&clearTimeout(c.current),cu[a]&&delete cu[a]},[a]),{isOpen:r,open:k=>{!k&&t>0&&!c.current?x():g()},close:b}}function iz(e,t){let n=$u(e,{labelable:!0}),{hoverProps:r}=Eu({onHoverStart:()=>t?.open(!0),onHoverEnd:()=>t?.close()});return{tooltipProps:Tn(n,r,{role:"tooltip"})}}function oz(e,t,n){let{isDisabled:r,trigger:i}=e,s=Pf(),a=S.useRef(!1),c=S.useRef(!1),d=()=>{(a.current||c.current)&&t.open(c.current)},h=_=>{!a.current&&!c.current&&t.close(_)};S.useEffect(()=>{let _=A=>{n&&n.current&&A.key==="Escape"&&(A.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener("keydown",_,!0),()=>{document.removeEventListener("keydown",_,!0)}},[n,t]);let m=()=>{i!=="focus"&&(oh()==="pointer"?a.current=!0:a.current=!1,d())},g=()=>{i!=="focus"&&(c.current=!1,a.current=!1,h())},b=()=>{c.current=!1,a.current=!1,h(!0)},x=()=>{Jx()&&(c.current=!0,d())},k=()=>{c.current=!1,a.current=!1,h(!0)},{hoverProps:P}=Eu({isDisabled:r,onHoverStart:m,onHoverEnd:g}),{focusableProps:T}=xh({isDisabled:r,onFocus:x,onBlur:k},n);return{triggerProps:{"aria-describedby":t.isOpen?s:void 0,...Tn(T,P,{onPointerDown:b,onKeyDown:b,tabIndex:void 0})},tooltipProps:{id:s}}}var qs=[];function f2(e,t){const{disableOutsideEvents:n=!0,isDismissable:r=!1,isKeyboardDismissDisabled:i=!1,isOpen:s,onClose:a,shouldCloseOnBlur:c,shouldCloseOnInteractOutside:d}=e;S.useEffect(()=>(s&&qs.push(t),()=>{const P=qs.indexOf(t);P>=0&&qs.splice(P,1)}),[s,t]);const h=()=>{qs[qs.length-1]===t&&a&&a()},m=P=>{(!d||d(P.target))&&(qs[qs.length-1]===t&&n&&(P.stopPropagation(),P.preventDefault()),P.pointerType!=="touch"&&h())},g=P=>{P.pointerType==="touch"&&(!d||d(P.target))&&(qs[qs.length-1]===t&&n&&(P.stopPropagation(),P.preventDefault()),h())},b=P=>{P.key==="Escape"&&!i&&!P.nativeEvent.isComposing&&(P.stopPropagation(),P.preventDefault(),h())};oF({isDisabled:!(r&&s),onInteractOutside:r&&s?g:void 0,onInteractOutsideStart:m,ref:t});const{focusWithinProps:x}=Ev({isDisabled:!c,onBlurWithin:P=>{!P.relatedTarget||uF(P.relatedTarget)||(!d||d(P.relatedTarget))&&h()}}),k=P=>{P.target===P.currentTarget&&P.preventDefault()};return{overlayProps:{onKeyDown:b,...x},underlayProps:{onPointerDown:k}}}function sz(e){var t,n;const r=fi(),[i,s]=ia(e,gk.variantKeys),{ref:a,as:c,isOpen:d,content:h,children:m,defaultOpen:g,onOpenChange:b,isDisabled:x,trigger:k,shouldFlip:P=!0,containerPadding:T=12,placement:_="top",delay:A=0,closeDelay:M=500,showArrow:O=!1,offset:j=7,crossOffset:$=0,isDismissable:Y,shouldCloseOnBlur:te=!0,portalContainer:ie,isKeyboardDismissDisabled:B=!1,updatePositionDeps:W=[],shouldCloseOnInteractOutside:G,className:ee,onClose:H,motionProps:le,classNames:J,...X}=i,V=c||"div",ae=(n=(t=e?.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,D=rz({delay:A,closeDelay:M,isDisabled:x,defaultOpen:g,isOpen:d,onOpenChange:Ue=>{b?.(Ue),Ue||H?.()}}),U=S.useRef(null),oe=S.useRef(null),z=S.useId(),me=D.isOpen&&!x;S.useImperativeHandle(a,()=>vL(oe));const{triggerProps:Ce,tooltipProps:ye}=oz({isDisabled:x,trigger:k},D,U),{tooltipProps:Oe}=iz({isOpen:me,...rn(i,ye)},D),{overlayProps:Ne,placement:_e,updatePosition:Qe}=L5({isOpen:me,targetRef:U,placement:P6(_),overlayRef:oe,offset:O?j+3:j,crossOffset:$,shouldFlip:P,containerPadding:T});Sh(()=>{W.length&&Qe()},W);const{overlayProps:at}=f2({isOpen:me,onClose:D.close,isDismissable:Y,shouldCloseOnBlur:te,isKeyboardDismissDisabled:B,shouldCloseOnInteractOutside:G},oe),Ie=S.useMemo(()=>{var Ue,it,Wt;return gk({...s,disableAnimation:ae,radius:(Ue=e?.radius)!=null?Ue:"md",size:(it=e?.size)!=null?it:"md",shadow:(Wt=e?.shadow)!=null?Wt:"sm"})},[ds(s),ae,e?.radius,e?.size,e?.shadow]),mt=S.useCallback((Ue={},it=null)=>({...rn(Ce,Ue),ref:PE(it,U),"aria-describedby":me?z:void 0}),[Ce,me,z,D]),pt=S.useCallback(()=>({ref:oe,"data-slot":"base","data-open":Ae(me),"data-arrow":Ae(O),"data-disabled":Ae(x),"data-placement":Lk(_e||"top",_),...rn(Oe,at,X),style:rn(Ne.style,X.style,i.style),className:Ie.base({class:J?.base}),id:z}),[Ie,me,O,x,_e,_,Oe,at,X,Ne,i,z]),Kt=S.useCallback(()=>({"data-slot":"content","data-open":Ae(me),"data-arrow":Ae(O),"data-disabled":Ae(x),"data-placement":Lk(_e||"top",_),className:Ie.content({class:Vt(J?.content,ee)})}),[Ie,me,O,x,_e,_,J]);return{Component:V,content:h,children:m,isOpen:me,triggerRef:U,showArrow:O,portalContainer:ie,placement:_,disableAnimation:ae,isDisabled:x,motionProps:le,getTooltipContentProps:Kt,getTriggerProps:mt,getTooltipProps:pt}}var az=()=>Br(()=>import("./index-B-4qdttP.js"),[]).then(e=>e.default),d2=jr((e,t)=>{var n;const{Component:r,children:i,content:s,isOpen:a,portalContainer:c,placement:d,disableAnimation:h,motionProps:m,getTriggerProps:g,getTooltipProps:b,getTooltipContentProps:x}=sz({...e,ref:t});let k;try{if(S.Children.count(i)!==1)throw new Error;if(!S.isValidElement(i))k=R.jsx("p",{...g(),children:i});else{const j=i,$=(n=j.props.ref)!=null?n:j.ref;k=S.cloneElement(j,g(j.props,$))}}catch{k=R.jsx("span",{}),PL("Tooltip must have only one child node. Please, check your code.")}const{ref:P,id:T,style:_,...A}=b(),M=R.jsx("div",{ref:P,id:T,style:_,children:R.jsx(Af.div,{animate:"enter",exit:"exit",initial:"exit",variants:ev.scaleSpring,...rn(m,A),style:{...E6(d)},children:R.jsx(r,{...x(),children:s})},`${T}-tooltip-inner`)},`${T}-tooltip-content`);return R.jsxs(R.Fragment,{children:[k,h?a&&R.jsx(sk,{portalContainer:c,children:R.jsx("div",{ref:P,id:T,style:_,...A,children:R.jsx(r,{...x(),children:s})})}):R.jsx($f,{features:az,children:R.jsx(ol,{children:a&&R.jsx(sk,{portalContainer:c,children:M})})})]})});d2.displayName="HeroUI.Tooltip";var lz=d2;function uz(e={}){const{rerender:t=!1,delay:n=0}=e,r=S.useRef(!1),[i,s]=S.useState(!1);return S.useEffect(()=>{r.current=!0;let a=null;return t&&(n>0?a=setTimeout(()=>{s(!0)},n):s(!0)),()=>{r.current=!1,t&&s(!1),a&&clearTimeout(a)}},[t]),[S.useCallback(()=>r.current,[]),i]}function cz(e){let{value:t=0,minValue:n=0,maxValue:r=100,valueLabel:i,isIndeterminate:s,formatOptions:a={style:"percent"}}=e,c=$u(e,{labelable:!0}),{labelProps:d,fieldProps:h}=s2({...e,labelElementType:"span"});t=Vg(t,n,r);let m=(t-n)/(r-n),g=FM(a);if(!s&&!i){let b=a.style==="percent"?m:t;i=g.format(b)}return{progressBarProps:Tn(c,{...h,"aria-valuenow":s?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":s?void 0:i,role:"progressbar"}),labelProps:d}}function fz(e){var t,n,r;const i=fi(),[s,a]=ia(e,vk.variantKeys),{ref:c,as:d,id:h,className:m,classNames:g,label:b,valueLabel:x,value:k=void 0,minValue:P=0,maxValue:T=100,strokeWidth:_,showValueLabel:A=!1,formatOptions:M={style:"percent"},...O}=s,j=d||"div",$=$i(c),Y=Vt(g?.base,m),[,te]=uz({rerender:!0,delay:100}),ie=((t=e.isIndeterminate)!=null?t:!0)&&k===void 0,B=(r=(n=e.disableAnimation)!=null?n:i?.disableAnimation)!=null?r:!1,{progressBarProps:W,labelProps:G}=cz({id:h,label:b,value:k,minValue:P,maxValue:T,valueLabel:x,formatOptions:M,isIndeterminate:ie,"aria-labelledby":e["aria-labelledby"],"aria-label":e["aria-label"]}),ee=S.useMemo(()=>vk({...a,disableAnimation:B,isIndeterminate:ie}),[ds(a),B,ie]),H=B?!0:te,le=16,J=_||(e.size==="sm"?2:3),X=16-J,V=2*X*Math.PI,ae=S.useMemo(()=>H?ie?.25:k?EL((k-P)/(T-P),1):0:0,[H,k,P,T,ie]),D=V-ae*V,U=S.useCallback((ye={})=>({ref:$,"data-indeterminate":Ae(ie),"data-disabled":Ae(e.isDisabled),className:ee.base({class:Y}),...rn(W,O,ye)}),[$,ee,ie,e.isDisabled,Y,W,O]),oe=S.useCallback((ye={})=>({className:ee.label({class:g?.label}),...rn(G,ye)}),[ee,g,G]),z=S.useCallback((ye={})=>({viewBox:"0 0 32 32",fill:"none",strokeWidth:J,className:ee.svg({class:g?.svg}),...ye}),[J,ee,g]),me=S.useCallback((ye={})=>({cx:le,cy:le,r:X,role:"presentation",strokeDasharray:`${V} ${V}`,strokeDashoffset:D,transform:"rotate(-90 16 16)",strokeLinecap:"round",className:ee.indicator({class:g?.indicator}),...ye}),[ee,g,D,V,X]),Ce=S.useCallback((ye={})=>({cx:le,cy:le,r:X,role:"presentation",strokeDasharray:`${V} ${V}`,strokeDashoffset:0,transform:"rotate(-90 16 16)",strokeLinecap:"round",className:ee.track({class:g?.track}),...ye}),[ee,g,V,X]);return{Component:j,domRef:$,slots:ee,classNames:g,label:b,showValueLabel:A,getProgressBarProps:U,getLabelProps:oe,getSvgProps:z,getIndicatorProps:me,getTrackProps:Ce}}var p2=jr((e,t)=>{const{Component:n,slots:r,classNames:i,label:s,showValueLabel:a,getProgressBarProps:c,getLabelProps:d,getSvgProps:h,getIndicatorProps:m,getTrackProps:g}=fz({ref:t,...e}),b=c();return R.jsxs(n,{...b,children:[R.jsxs("div",{className:r.svgWrapper({class:i?.svgWrapper}),children:[R.jsxs("svg",{...h(),children:[R.jsx("circle",{...g()}),R.jsx("circle",{...m()})]}),a&&R.jsx("span",{className:r.value({class:i?.value}),children:b["aria-valuetext"]})]}),s&&R.jsx("span",{...d(),children:s})]})});p2.displayName="HeroUI.CircularProgress";var h2=p2;function dz(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:s=!1,type:a="text",validationBehavior:c="aria"}=e,[d,h]=Au(e.value,e.defaultValue||"",e.onChange),{focusableProps:m}=xh(e,t),g=rw({...e,value:d}),{isInvalid:b,validationErrors:x,validationDetails:k}=g.displayValidation,{labelProps:P,fieldProps:T,descriptionProps:_,errorMessageProps:A}=K6({...e,isInvalid:b,errorMessage:e.errorMessage||x}),M=$u(e,{labelable:!0});const O={type:a,pattern:e.pattern};return WE(t,d,h),i2(e,g,t),S.useEffect(()=>{if(t.current instanceof no(t.current).HTMLTextAreaElement){let j=t.current;Object.defineProperty(j,"defaultValue",{get:()=>j.value,set:()=>{},configurable:!0})}},[t]),{labelProps:P,inputProps:Tn(M,n==="input"?O:void 0,{disabled:r,readOnly:s,required:i&&c==="native","aria-required":i&&c==="aria"||void 0,"aria-invalid":b||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:d,onChange:j=>h(j.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(He.version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...m,...T}),descriptionProps:_,errorMessageProps:A,isInvalid:b,validationErrors:x,validationDetails:k}}function pz(e){var t,n,r,i,s,a,c;const d=fi(),{validationBehavior:h}=iw(nv)||{},[m,g]=ia(e,xk.variantKeys),{ref:b,as:x,type:k,label:P,baseRef:T,wrapperRef:_,description:A,className:M,classNames:O,autoFocus:j,startContent:$,endContent:Y,onClear:te,onChange:ie,validationState:B,validationBehavior:W=(t=h??d?.validationBehavior)!=null?t:"native",innerWrapperRef:G,onValueChange:ee=()=>{},...H}=m,le=S.useCallback(Xe=>{ee(Xe??"")},[ee]),[J,X]=S.useState(!1),V=x||"div",ae=(r=(n=e.disableAnimation)!=null?n:d?.disableAnimation)!=null?r:!1,D=$i(b),U=$i(T),oe=$i(_),z=$i(G),[me,Ce]=Au(m.value,(i=m.defaultValue)!=null?i:"",le),ye=k==="file",Oe=((c=(a=(s=D?.current)==null?void 0:s.files)==null?void 0:a.length)!=null?c:0)>0,Ne=["date","time","month","week","range"].includes(k),_e=!xL(me)||Ne||Oe,Qe=_e||J,at=k==="hidden",Ie=e.isMultiline,mt=Vt(O?.base,M,_e?"is-filled":""),pt=S.useCallback(()=>{var Xe;ye?D.current.value="":Ce(""),te?.(),(Xe=D.current)==null||Xe.focus()},[Ce,te,ye]);Sh(()=>{D.current&&Ce(D.current.value)},[D.current]);const{labelProps:Kt,inputProps:Ue,isInvalid:it,validationErrors:Wt,validationDetails:tr,descriptionProps:ln,errorMessageProps:_t}=dz({...e,validationBehavior:W,autoCapitalize:e.autoCapitalize,value:me,"aria-label":e.label?e["aria-label"]:CE(e["aria-label"],e.placeholder),inputElementType:Ie?"textarea":"input",onChange:Ce},D);ye&&(delete Ue.value,delete Ue.onChange);const{isFocusVisible:Rt,isFocused:_n,focusProps:Er}=Pu({autoFocus:j,isTextInput:!0}),{isHovered:Nt,hoverProps:pe}=Eu({isDisabled:!!e?.isDisabled}),{isHovered:Se,hoverProps:ze}=Eu({isDisabled:!!e?.isDisabled}),{focusProps:nt,isFocusVisible:lt}=Pu(),{focusWithinProps:Ht}=Ev({onFocusWithinChange:X}),{pressProps:Vn}=il({isDisabled:!!e?.isDisabled||!!e?.isReadOnly,onPress:pt}),Zt=B==="invalid"||it,Pt=RF({labelPlacement:e.labelPlacement,label:P}),Pr=typeof m.errorMessage=="function"?m.errorMessage({isInvalid:Zt,validationErrors:Wt,validationDetails:tr}):m.errorMessage||Wt?.join(" "),Ft=!!te||e.isClearable,nr=!!P||!!A||!!Pr,un=!!m.placeholder,aa=!!P,hs=!!A||!!Pr,pi=Pt==="outside-left",hi=Pt==="outside-top",ul=Pt==="outside"||pi||hi,Du=Pt==="inside",ms=D.current?(!D.current.value||D.current.value===""||!me||me==="")&&un:!1,Ur=!!$,cl=ul?pi||hi||un||Pt==="outside"&&Ur:!1,fl=Pt==="outside"&&!un&&!Ur,en=S.useMemo(()=>xk({...g,isInvalid:Zt,labelPlacement:Pt,isClearable:Ft,disableAnimation:ae}),[ds(g),Zt,Pt,Ft,Ur,ae]),gs=S.useCallback((Xe={})=>({ref:U,className:en.base({class:mt}),"data-slot":"base","data-filled":Ae(_e||un||Ur||ms||ye),"data-filled-within":Ae(Qe||un||Ur||ms||ye),"data-focus-within":Ae(J),"data-focus-visible":Ae(Rt),"data-readonly":Ae(e.isReadOnly),"data-focus":Ae(_n),"data-hover":Ae(Nt||Se),"data-required":Ae(e.isRequired),"data-invalid":Ae(Zt),"data-disabled":Ae(e.isDisabled),"data-has-elements":Ae(nr),"data-has-helper":Ae(hs),"data-has-label":Ae(aa),"data-has-value":Ae(!ms),"data-hidden":Ae(at),...Ht,...Xe}),[en,mt,_e,_n,Nt,Se,Zt,hs,aa,nr,ms,Ur,J,Rt,Qe,un,Ht,at,e.isReadOnly,e.isRequired,e.isDisabled]),vs=S.useCallback((Xe={})=>({"data-slot":"label",className:en.label({class:O?.label}),...rn(Kt,ze,Xe)}),[en,Se,Kt,O?.label]),Ro=S.useCallback(Xe=>{Xe.key==="Escape"&&me&&(Ft||te)&&!e.isReadOnly&&(Ce(""),te?.())},[me,Ce,te,Ft,e.isReadOnly]),dl=S.useCallback((Xe={})=>({"data-slot":"input","data-filled":Ae(_e),"data-filled-within":Ae(Qe),"data-has-start-content":Ae(Ur),"data-has-end-content":Ae(!!Y),"data-type":k,className:en.input({class:Vt(O?.input,_e?"is-filled":"",Ie?"pe-0":"",k==="password"?"[&::-ms-reveal]:hidden":"")}),...rn(Er,Ue,Ef(H,{enabled:!0,labelable:!0,omitEventNames:new Set(Object.keys(Ue))}),Xe),"aria-readonly":Ae(e.isReadOnly),onChange:el(Ue.onChange,ie),onKeyDown:el(Ue.onKeyDown,Xe.onKeyDown,Ro),ref:D}),[en,me,Er,Ue,H,_e,Qe,Ur,Y,O?.input,e.isReadOnly,e.isRequired,ie,Ro]),ys=S.useCallback((Xe={})=>({ref:oe,"data-slot":"input-wrapper","data-hover":Ae(Nt||Se),"data-focus-visible":Ae(Rt),"data-focus":Ae(_n),className:en.inputWrapper({class:Vt(O?.inputWrapper,_e?"is-filled":"")}),...rn(Xe,pe),onClick:so=>{D.current&&so.currentTarget===so.target&&D.current.focus()},style:{cursor:"text",...Xe.style}}),[en,Nt,Se,Rt,_n,me,O?.inputWrapper]),la=S.useCallback((Xe={})=>({...Xe,ref:z,"data-slot":"inner-wrapper",onClick:so=>{D.current&&so.currentTarget===so.target&&D.current.focus()},className:en.innerWrapper({class:Vt(O?.innerWrapper,Xe?.className)})}),[en,O?.innerWrapper]),ua=S.useCallback((Xe={})=>({...Xe,"data-slot":"main-wrapper",className:en.mainWrapper({class:Vt(O?.mainWrapper,Xe?.className)})}),[en,O?.mainWrapper]),pl=S.useCallback((Xe={})=>({...Xe,"data-slot":"helper-wrapper",className:en.helperWrapper({class:Vt(O?.helperWrapper,Xe?.className)})}),[en,O?.helperWrapper]),Kf=S.useCallback((Xe={})=>({...Xe,...ln,"data-slot":"description",className:en.description({class:Vt(O?.description,Xe?.className)})}),[en,O?.description]),Wf=S.useCallback((Xe={})=>({...Xe,..._t,"data-slot":"error-message",className:en.errorMessage({class:Vt(O?.errorMessage,Xe?.className)})}),[en,_t,O?.errorMessage]),Hf=S.useCallback((Xe={})=>({...Xe,type:"button",tabIndex:-1,disabled:e.isDisabled,"aria-label":"clear input","data-slot":"clear-button","data-focus-visible":Ae(lt),className:en.clearButton({class:Vt(O?.clearButton,Xe?.className)}),...rn(Vn,nt)}),[en,lt,Vn,nt,O?.clearButton]);return{Component:V,classNames:O,domRef:D,label:P,description:A,startContent:$,endContent:Y,labelPlacement:Pt,isClearable:Ft,hasHelper:hs,hasStartContent:Ur,isLabelOutside:cl,isOutsideLeft:pi,isOutsideTop:hi,isLabelOutsideAsPlaceholder:fl,shouldLabelBeOutside:ul,shouldLabelBeInside:Du,hasPlaceholder:un,isInvalid:Zt,errorMessage:Pr,getBaseProps:gs,getLabelProps:vs,getInputProps:dl,getMainWrapperProps:ua,getInputWrapperProps:ys,getInnerWrapperProps:la,getHelperWrapperProps:pl,getDescriptionProps:Kf,getErrorMessageProps:Wf,getClearButtonProps:Hf}}function Nb(){return Nb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nb.apply(null,arguments)}function hz(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var mz=S.useLayoutEffect,gz=function(t){var n=He.useRef(t);return mz(function(){n.current=t}),n},Fk=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},vz=function(t,n){var r=He.useRef();return He.useCallback(function(i){t.current=i,r.current&&Fk(r.current,null),r.current=n,n&&Fk(n,i)},[n])},Ok={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},yz=function(t){Object.keys(Ok).forEach(function(n){t.style.setProperty(n,Ok[n],"important")})},zk=yz,Dr=null,jk=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function bz(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),Dr||(Dr=document.createElement("textarea"),Dr.setAttribute("tabindex","-1"),Dr.setAttribute("aria-hidden","true"),zk(Dr)),Dr.parentNode===null&&document.body.appendChild(Dr);var i=e.paddingSize,s=e.borderSize,a=e.sizingStyle,c=a.boxSizing;Object.keys(a).forEach(function(b){var x=b;Dr.style[x]=a[x]}),zk(Dr),Dr.value=t;var d=jk(Dr,e);Dr.value=t,d=jk(Dr,e),Dr.value="x";var h=Dr.scrollHeight-i,m=h*n;c==="border-box"&&(m=m+i+s),d=Math.max(m,d);var g=h*r;return c==="border-box"&&(g=g+i+s),d=Math.min(g,d),[d,h]}var Bk=function(){},xz=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},wz=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Sz=!!document.documentElement.currentStyle,kz=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=xz(wz,n),i=r.boxSizing;if(i==="")return null;Sz&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var s=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),a=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:s,borderSize:a}},Cz=kz;function ow(e,t,n){var r=gz(n);S.useLayoutEffect(function(){var i=function(a){return r.current(a)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var Ez=function(t,n){ow(document.body,"reset",function(r){t.current.form===r.target&&n(r)})},Pz=function(t){ow(window,"resize",t)},Tz=function(t){ow(document.fonts,"loadingdone",t)},_z=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Iz=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,s=t.minRows,a=t.onChange,c=a===void 0?Bk:a,d=t.onHeightChange,h=d===void 0?Bk:d,m=hz(t,_z),g=m.value!==void 0,b=S.useRef(null),x=vz(b,n),k=S.useRef(0),P=S.useRef(),T=function(){var M=b.current,O=r&&P.current?P.current:Cz(M);if(O){P.current=O;var j=bz(O,M.value||M.placeholder||"x",s,i),$=j[0],Y=j[1];k.current!==$&&(k.current=$,M.style.setProperty("height",$+"px","important"),h($,{rowHeight:Y}))}},_=function(M){g||T(),c(M)};return S.useLayoutEffect(T),Ez(b,function(){if(!g){var A=b.current.value;requestAnimationFrame(function(){var M=b.current;M&&A!==M.value&&T()})}}),Pz(T),Tz(T),S.createElement("textarea",Nb({},m,{onChange:_,ref:x}))},$z=S.forwardRef(Iz),m2=jr(({style:e,minRows:t=3,maxRows:n=8,cacheMeasurements:r=!1,disableAutosize:i=!1,onHeightChange:s,...a},c)=>{const{Component:d,label:h,description:m,startContent:g,endContent:b,hasHelper:x,shouldLabelBeOutside:k,shouldLabelBeInside:P,isInvalid:T,errorMessage:_,getBaseProps:A,getLabelProps:M,getInputProps:O,getInnerWrapperProps:j,getInputWrapperProps:$,getHelperWrapperProps:Y,getDescriptionProps:te,getErrorMessageProps:ie,isClearable:B,getClearButtonProps:W}=pz({...a,ref:c,isMultiline:!0}),[G,ee]=S.useState(t>1),[H,le]=S.useState(!1),J=h?R.jsx("label",{...M(),children:h}):null,X=O(),V=(me,Ce)=>{if(t===1&&ee(me>=Ce.rowHeight*2),n>t){const ye=me>=n*Ce.rowHeight;le(ye)}s?.(me,Ce)},ae=i?R.jsx("textarea",{...X,style:rn(X.style,e??{})}):R.jsx($z,{...X,cacheMeasurements:r,"data-hide-scroll":Ae(!H),maxRows:n,minRows:t,style:rn(X.style,e??{}),onHeightChange:V}),D=S.useMemo(()=>B?R.jsx("button",{...W(),children:R.jsx(W_,{})}):null,[B,W]),U=S.useMemo(()=>g||b?R.jsxs("div",{...j(),children:[g,ae,b]}):R.jsx("div",{...j(),children:ae}),[g,X,b,j]),oe=T&&_,z=oe||m;return R.jsxs(d,{...A(),children:[k?J:null,R.jsxs("div",{...$(),"data-has-multiple-rows":Ae(G),children:[P?J:null,U,D]}),x&&z?R.jsx("div",{...Y(),children:oe?R.jsx("div",{...ie(),children:_}):R.jsx("div",{...te(),children:m})}):null]})});m2.displayName="HeroUI.Textarea";var Az=m2;function Rz(e,t){let{role:n="dialog"}=e,r=Y0();r=e["aria-label"]?void 0:r;let i=S.useRef(!1);return S.useEffect(()=>{if(t.current&&!t.current.contains(document.activeElement)){Cu(t.current);let s=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),Cu(t.current)),i.current=!1)},500);return()=>{clearTimeout(s)}}},[t]),P_(),{dialogProps:{...$u(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||r,onBlur:s=>{i.current&&s.stopPropagation()}},titleProps:{id:r}}}function Lz(e){var t,n;const r=fi(),[i,s]=ia(e,Sk.variantKeys),{ref:a,as:c,src:d,className:h,classNames:m,loading:g,isBlurred:b,fallbackSrc:x,isLoading:k,disableSkeleton:P=!!x,removeWrapper:T=!1,onError:_,onLoad:A,srcSet:M,sizes:O,crossOrigin:j,...$}=i,Y=_6({src:d,loading:g,onError:_,onLoad:A,ignoreFallback:!1,srcSet:M,sizes:O,crossOrigin:j,shouldBypassImageLoad:c!==void 0}),te=(n=(t=e.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,ie=Y==="loaded"&&!k,B=Y==="loading"||k,W=e.isZoomed,G=c||"img",ee=$i(a),{w:H,h:le}=S.useMemo(()=>({w:i.width?typeof i.width=="number"?`${i.width}px`:i.width:"fit-content",h:i.height?typeof i.height=="number"?`${i.height}px`:i.height:"auto"}),[i?.width,i?.height]),J=(!d||!ie)&&!!x,X=B&&!P,V=S.useMemo(()=>Sk({...s,disableAnimation:te,showSkeleton:X}),[ds(s),te,X]),ae=Vt(h,m?.img),D=(z={})=>{const me=Vt(ae,z?.className);return{src:d,ref:ee,"data-loaded":Ae(ie),className:V.img({class:me}),loading:g,srcSet:M,sizes:O,crossOrigin:j,...$,style:{...$?.height&&{height:le},...z.style,...$.style}}},U=S.useCallback(()=>{const z=J?{backgroundImage:`url(${x})`}:{};return{className:V.wrapper({class:m?.wrapper}),style:{...z,maxWidth:H}}},[V,J,x,m?.wrapper,H]),oe=S.useCallback(()=>({src:d,"aria-hidden":Ae(!0),className:V.blurredImg({class:m?.blurredImg})}),[V,d,m?.blurredImg]);return{Component:G,domRef:ee,slots:V,classNames:m,isBlurred:b,disableSkeleton:P,fallbackSrc:x,removeWrapper:T,isZoomed:W,isLoading:B,getImgProps:D,getWrapperProps:U,getBlurredImgProps:oe}}var g2=jr((e,t)=>{const{Component:n,domRef:r,slots:i,classNames:s,isBlurred:a,isZoomed:c,fallbackSrc:d,removeWrapper:h,disableSkeleton:m,getImgProps:g,getWrapperProps:b,getBlurredImgProps:x}=Lz({...e,ref:t}),k=R.jsx(n,{ref:r,...g()});if(h)return k;const P=R.jsx("div",{className:i.zoomedWrapper({class:s?.zoomedWrapper}),children:k});return a?R.jsxs("div",{...b(),children:[c?P:k,S.cloneElement(k,x())]}):c||!m||d?R.jsxs("div",{...b(),children:[" ",c?P:k]}):k});g2.displayName="HeroUI.Image";var S0=g2,[Mz,v2]=mv({name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Modal />`"}),y2=jr((e,t)=>{const{as:n,children:r,className:i,...s}=e,{slots:a,classNames:c,bodyId:d,setBodyMounted:h}=v2(),m=$i(t),g=n||"div";return S.useEffect(()=>(h(!0),()=>h(!1)),[h]),R.jsx(g,{ref:m,className:a.body({class:Vt(c?.body,i)}),id:d,...s,children:r})});y2.displayName="HeroUI.ModalBody";var Dz=y2,Nz={enter:{scale:"var(--scale-enter)",y:"var(--slide-enter)",opacity:1,willChange:"auto",transition:{scale:{duration:.4,ease:Bp.ease},opacity:{duration:.4,ease:Bp.ease},y:{type:"spring",bounce:0,duration:.6}}},exit:{scale:"var(--scale-exit)",y:"var(--slide-exit)",opacity:0,willChange:"transform",transition:{duration:.3,ease:Bp.ease}}},ss=typeof document<"u"&&window.visualViewport,Fz=He.createContext(!1);function Oz(){return!1}function zz(){return!0}function jz(e){return()=>{}}function Bz(){return typeof He.useSyncExternalStore=="function"?He.useSyncExternalStore(jz,Oz,zz):S.useContext(Fz)}function Vz(){let e=Bz(),[t,n]=S.useState(()=>e?{width:0,height:0}:Vk());return S.useEffect(()=>{let r=()=>{n(i=>{let s=Vk();return s.width===i.width&&s.height===i.height?i:s})};return ss?ss.addEventListener("resize",r):window.addEventListener("resize",r),()=>{ss?ss.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),t}function Vk(){return{width:ss&&ss?.width||window.innerWidth,height:ss&&ss?.height||window.innerHeight}}var Uk=()=>Br(()=>import("./index-B-4qdttP.js"),[]).then(e=>e.default),b2=e=>{const{as:t,children:n,role:r="dialog",...i}=e,{Component:s,domRef:a,slots:c,classNames:d,motionProps:h,backdrop:m,closeButton:g,hideCloseButton:b,disableAnimation:x,getDialogProps:k,getBackdropProps:P,getCloseButtonProps:T,onClose:_}=v2(),A=t||s||"div",M=Vz(),{dialogProps:O}=Rz({role:r},a),j=S.isValidElement(g)?S.cloneElement(g,T()):R.jsx("button",{...T(),children:R.jsx(s6,{})}),$=S.useCallback(G=>{G.key==="Tab"&&G.nativeEvent.isComposing&&(G.stopPropagation(),G.preventDefault())},[]),Y=k(rn(O,i)),te=R.jsxs(A,{...Y,onKeyDown:el(Y.onKeyDown,$),children:[R.jsx(lk,{onDismiss:_}),!b&&j,typeof n=="function"?n(_):n,R.jsx(lk,{onDismiss:_})]}),ie=S.useMemo(()=>m==="transparent"?null:x?R.jsx("div",{...P()}):R.jsx($f,{features:Uk,children:R.jsx(Af.div,{animate:"enter",exit:"exit",initial:"exit",variants:ev.fade,...P()})}),[m,x,P]),B={"--visual-viewport-height":M.height+"px"},W=x?R.jsx("div",{className:c.wrapper({class:d?.wrapper}),"data-slot":"wrapper",style:B,children:te}):R.jsx($f,{features:Uk,children:R.jsx(Af.div,{animate:"enter",className:c.wrapper({class:d?.wrapper}),"data-slot":"wrapper",exit:"exit",initial:"exit",variants:Nz,...h,style:B,children:te})});return R.jsxs("div",{tabIndex:-1,children:[ie,W]})};b2.displayName="HeroUI.ModalContent";var Uz=b2;function Kz(e={shouldBlockScroll:!0},t,n){let{overlayProps:r,underlayProps:i}=f2({...e,isOpen:t.isOpen,onClose:t.close},n);return yF({isDisabled:!t.isOpen||!e.shouldBlockScroll}),P_(),S.useEffect(()=>{if(t.isOpen&&n.current)return IF([n.current])},[t.isOpen,n]),{modalProps:Tn(r),underlayProps:i}}function Wz(e){var t,n,r;const i=fi(),[s,a]=ia(e,wk.variantKeys),{ref:c,as:d,className:h,classNames:m,isOpen:g,defaultOpen:b,onOpenChange:x,motionProps:k,closeButton:P,isDismissable:T=!0,hideCloseButton:_=!1,shouldBlockScroll:A=!0,portalContainer:M,isKeyboardDismissDisabled:O=!1,onClose:j,...$}=s,Y=d||"section",te=$i(c),ie=S.useRef(null),[B,W]=S.useState(!1),[G,ee]=S.useState(!1),H=(n=(t=e.disableAnimation)!=null?t:i?.disableAnimation)!=null?n:!1,le=S.useId(),J=S.useId(),X=S.useId(),V=c2({isOpen:g,defaultOpen:b,onOpenChange:_e=>{x?.(_e),_e||j?.()}}),{modalProps:ae,underlayProps:D}=Kz({isDismissable:T,shouldBlockScroll:A,isKeyboardDismissDisabled:O},V,te),{buttonProps:U}=X_({onPress:V.close},ie),{isFocusVisible:oe,focusProps:z}=Pu(),me=Vt(m?.base,h),Ce=S.useMemo(()=>wk({...a,disableAnimation:H}),[ds(a),H]),ye=(_e={},Qe=null)=>{var at;return{ref:EE(Qe,te),...rn(ae,$,_e),className:Ce.base({class:Vt(me,_e.className)}),id:le,"data-open":Ae(V.isOpen),"data-dismissable":Ae(T),"aria-modal":Ae(!0),"data-placement":(at=e?.placement)!=null?at:"right","aria-labelledby":B?J:void 0,"aria-describedby":G?X:void 0}},Oe=S.useCallback((_e={})=>({className:Ce.backdrop({class:m?.backdrop}),...D,..._e}),[Ce,m,D]),Ne=()=>({role:"button",tabIndex:0,"aria-label":"Close","data-focus-visible":Ae(oe),className:Ce.closeButton({class:m?.closeButton}),...rn(U,z)});return{Component:Y,slots:Ce,domRef:te,headerId:J,bodyId:X,motionProps:k,classNames:m,isDismissable:T,closeButton:P,hideCloseButton:_,portalContainer:M,shouldBlockScroll:A,backdrop:(r=e.backdrop)!=null?r:"opaque",isOpen:V.isOpen,onClose:V.close,disableAnimation:H,setBodyMounted:ee,setHeaderMounted:W,getDialogProps:ye,getBackdropProps:Oe,getCloseButtonProps:Ne}}var x2=jr((e,t)=>{const{children:n,...r}=e,i=Wz({...r,ref:t}),s=R.jsx($F,{portalContainer:i.portalContainer,children:n});return R.jsx(Mz,{value:i,children:i.disableAnimation&&i.isOpen?s:R.jsx(ol,{children:i.isOpen?s:null})})});x2.displayName="HeroUI.Modal";var Hz=x2;function Gz(e={}){const{id:t,defaultOpen:n,isOpen:r,onClose:i,onOpen:s,onChange:a=()=>{}}=e,c=Db(s),d=Db(i),[h,m]=Au(r,n||!1,a),g=S.useId(),b=t||g,x=r!==void 0,k=S.useCallback(()=>{x||m(!1),d?.()},[x,d]),P=S.useCallback(()=>{x||m(!0),c?.()},[x,c]),T=S.useCallback(()=>{(h?k:P)()},[h,P,k]);return{isOpen:!!h,onOpen:P,onClose:k,onOpenChange:T,isControlled:x,getButtonProps:(_={})=>({..._,"aria-expanded":h,"aria-controls":b,onClick:Tf(_.onClick,T)}),getDisclosureProps:(_={})=>({..._,hidden:!h,id:b})}}function qz(e){var t,n;const r=fi(),[i,s]=ia(e,bk.variantKeys),{as:a,children:c,isLoaded:d=!1,className:h,classNames:m,...g}=i,b=a||"div",x=(n=(t=e.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,k=S.useMemo(()=>bk({...s,disableAnimation:x}),[ds(s),x,c]),P=Vt(m?.base,h);return{Component:b,children:c,slots:k,classNames:m,getSkeletonProps:(A={})=>({"data-loaded":Ae(d),className:k.base({class:Vt(P,A?.className)}),...g}),getContentProps:(A={})=>({className:k.content({class:Vt(m?.content,A?.className)})})}}var w2=jr((e,t)=>{const{Component:n,children:r,getSkeletonProps:i,getContentProps:s}=qz({...e});return R.jsx(n,{ref:t,...i(),children:R.jsx("div",{...s(),children:r})})});w2.displayName="HeroUI.Skeleton";var S2=w2;function Yz(e={}){const{domRef:t,isEnabled:n=!0,overflowCheck:r="vertical",visibility:i="auto",offset:s=0,onVisibilityChange:a,updateDeps:c=[]}=e,d=S.useRef(i);S.useEffect(()=>{const h=t?.current;if(!h||!n)return;const m=(x,k,P,T,_)=>{if(i==="auto"){const A=`${T}${SL(_)}Scroll`;k&&P?(h.dataset[A]="true",h.removeAttribute(`data-${T}-scroll`),h.removeAttribute(`data-${_}-scroll`)):(h.dataset[`${T}Scroll`]=k.toString(),h.dataset[`${_}Scroll`]=P.toString(),h.removeAttribute(`data-${T}-${_}-scroll`))}else{const A=k&&P?"both":k?T:P?_:"none";A!==d.current&&(a?.(A),d.current=A)}},g=()=>{var x,k;const P=[{type:"vertical",prefix:"top",suffix:"bottom"},{type:"horizontal",prefix:"left",suffix:"right"}],T=h.querySelector('ul[data-slot="list"]'),_=+((x=T?.getAttribute("data-virtual-scroll-height"))!=null?x:h.scrollHeight),A=+((k=T?.getAttribute("data-virtual-scroll-top"))!=null?k:h.scrollTop);for(const{type:M,prefix:O,suffix:j}of P)if(r===M||r==="both"){const $=M==="vertical"?A>s:h.scrollLeft>s,Y=M==="vertical"?A+h.clientHeight+s<_:h.scrollLeft+h.clientWidth+s<h.scrollWidth;m(M,$,Y,O,j)}},b=()=>{["top","bottom","top-bottom","left","right","left-right"].forEach(x=>{h.removeAttribute(`data-${x}-scroll`)})};return g(),h.addEventListener("scroll",g,!0),i!=="auto"&&(b(),i==="both"?(h.dataset.topBottomScroll=String(r==="vertical"),h.dataset.leftRightScroll=String(r==="horizontal")):(h.dataset.topBottomScroll="false",h.dataset.leftRightScroll="false",["top","bottom","left","right"].forEach(x=>{h.dataset[`${x}Scroll`]=String(i===x)}))),()=>{h.removeEventListener("scroll",g,!0),b()}},[...c,n,i,r,a,t])}function Xz(e){var t;const[n,r]=ia(e,yk.variantKeys),{ref:i,as:s,children:a,className:c,style:d,size:h=40,offset:m=0,visibility:g="auto",isEnabled:b=!0,onVisibilityChange:x,...k}=n,P=s||"div",T=$i(i);Yz({domRef:T,offset:m,visibility:g,isEnabled:b,onVisibilityChange:x,updateDeps:[a],overflowCheck:(t=e.orientation)!=null?t:"vertical"});const _=S.useMemo(()=>yk({...r,className:c}),[ds(r),c]);return{Component:P,styles:_,domRef:T,children:a,getBaseProps:(M={})=>{var O;return{ref:T,className:_,"data-orientation":(O=e.orientation)!=null?O:"vertical",style:{"--scroll-shadow-size":`${h}px`,...d,...M.style},...k,...M}}}}var k2=jr((e,t)=>{const{Component:n,children:r,getBaseProps:i}=Xz({...e,ref:t});return R.jsx(n,{...i(),children:r})});k2.displayName="HeroUI.ScrollShadow";var C2=k2,To=(e=>(e.LIGHT="light",e.DARK="dark",e))(To||{});const E2=S.createContext(null),vq={Like:"like",Dislike:"dislike"},Qz={Start:"START"},kf={User:"user",Assistant:"assistant"},uf={Pending:"pending",InProgress:"in_progress",Completed:"completed"};class Jz{constructor(t={}){if(this.chunkQueue=new Map,this.baseUrl=t.baseUrl??"",this.auth=t.auth,this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.slice(0,-1)),!!this.baseUrl)try{new URL(this.baseUrl)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}. Please provide a valid URL.`)}}getBaseUrl(){return this.baseUrl}_buildApiUrl(t){return`${this.baseUrl}${t}`}async _makeRequest(t,n={}){const r={"Content-Type":"application/json"};n.body instanceof FormData&&delete r["Content-Type"];const i={...r,...this.normalizeHeaders(n.headers)};this.auth?.getToken&&(i.Authorization=`Bearer ${this.auth.getToken()}`);const s=await fetch(t,{...n,headers:i,...this.auth?.credentials?{credentials:this.auth?.credentials}:{}});if(s.status===401&&this.auth?.onUnauthorized?.(),!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return s}async makeRequest(t,...n){const r=n[0],{method:i="GET",body:s,pathParams:a,queryParams:c,headers:d={},...h}=r||{},m={method:i,headers:d,...h};s&&i!=="GET"&&(s instanceof FormData?(m.body=s,m.headers&&"Content-Type"in m.headers&&delete m.headers["Content-Type"]):m.body=typeof s=="string"?s:JSON.stringify(s));let g=t.toString();if(a&&typeof a=="object"&&(g=g.replace(/:([^/]+)/g,(x,k)=>{if(k in a){const P=a[k];return encodeURIComponent(String(P))}else throw new Error(`Path parameter ${k} is required`)})),c&&Object.keys(c).length>0){const x=new URLSearchParams;for(const[k,P]of Object.entries(c))P!=null&&x.append(k,String(P));g+=`?${x.toString()}`}return g=this._buildApiUrl(g),(await this._makeRequest(g,m)).json()}makeStreamRequest(t,n,r,i,s){let a=!1;const c=async h=>{const m=h.body?.pipeThrough(new TextDecoderStream).getReader();if(!m)throw new Error("Response body is null");let g="";for(;!a&&!i?.aborted;)try{const{value:b,done:x}=await m.read();if(x){r.onClose?.();break}g+=b;const k=g.split(`
24
24
  `);g=k.pop()??"";for(const P of k)if(P.startsWith("data: "))try{const T=P.replace("data: ","").trim(),_=JSON.parse(T);if(!this.isChatResponse(_)){console.warn("Received response that isn't ChatResponse, skipping.",_);continue}if(_.type==="chunked_content"){this.handleChunkedContent(_,r);continue}await r.onMessage(_),await new Promise(A=>setTimeout(A,0))}catch(T){console.error("Error parsing JSON:",T),await r.onError(new Error("Error processing server response"))}}catch(b){if(i?.aborted)return;console.error("Stream error:",b),await r.onError(new Error("Error reading stream"));break}},d=async()=>{try{const m={...{"Content-Type":"application/json",Accept:"text/event-stream"},...s};this.auth?.getToken&&(m.Authorization=`Bearer ${this.auth.getToken()}`);const g=await fetch(this._buildApiUrl(t.toString()),{method:"POST",headers:m,body:JSON.stringify(n),signal:i,...this.auth?.credentials?{credentials:this.auth?.credentials}:{}});if(g.status===401&&this.auth?.onUnauthorized?.(),!g.ok)throw new Error(`HTTP error! status: ${g.status}`);await c(g)}catch(h){if(i?.aborted)return;console.error("Request error:",h);const m=h instanceof Error?h.message:"Error connecting to server";await r.onError(new Error(m))}};try{d()}catch(h){const m=h instanceof Error?h.message:"Failed to start stream";r.onError(new Error(m))}return()=>{a=!0}}isChatResponse(t){return t!==null&&typeof t=="object"&&"type"in t&&"content"in t}normalizeHeaders(t){return t?t instanceof Headers?Object.fromEntries(t.entries()):Array.isArray(t)?Object.fromEntries(t):t:{}}async handleChunkedContent(t,n){const i=t.content,{content_type:s,id:a,chunk_index:c,total_chunks:d,mime_type:h,data:m}=i;this.chunkQueue.has(a)||this.chunkQueue.set(a,{chunks:new Map,totalChunks:d,mimeType:h});const g=this.chunkQueue.get(a);if(g.chunks.set(c,m),g.chunks.size!==d)return;const x=Array.from({length:d},(k,P)=>g.chunks.get(P)).join("");try{atob(x)}catch(k){this.chunkQueue.delete(a),console.error("❌ Invalid base64 data: ",k),await n.onError(new Error("Error reading stream"))}if(s==="image"){const k={type:"image",content:{id:a,url:`${g.mimeType},${x}`}};await n.onMessage(k)}this.chunkQueue.delete(a)}}const P2=S.createContext(null);function Zz({children:e,...t}){const n=S.useMemo(()=>new Jz(t),[t]),r=S.useMemo(()=>({client:n}),[n]);return R.jsx(P2.Provider,{value:r,children:e})}function Pv(){const e=S.useContext(P2);if(!e)throw new Error("useRagbitsContext must be used within a RagbitsProvider");return e}function e8(e,t){const{client:n}=Pv(),[r,i]=S.useState(null),[s,a]=S.useState(null),[c,d]=S.useState(!1),h=S.useRef(null),m=S.useCallback(()=>{if(!h.current)return null;h.current.abort(),h.current=null,d(!1)},[]),g=S.useCallback(async(...x)=>{const k=x[0];h.current&&c&&h.current.abort();const P=new AbortController;h.current=P,d(!0),a(null);try{const _={...{...t,...k||{},headers:{...t?.headers,...k?.headers||{}}},signal:P.signal},A=await n.makeRequest(e,_);return P.signal.aborted||(i(A),h.current=null),A}catch(T){if(!P.signal.aborted){const _=T instanceof Error?T:new Error("API call failed");throw a(_),h.current=null,_}throw T}finally{P.signal.aborted||d(!1)}},[n,e,t,c]),b=S.useCallback(()=>{m(),i(null),a(null),d(!1)},[m]);return{data:r,error:s,isLoading:c,call:g,reset:b,abort:m}}function t8(){return window.matchMedia("(prefers-color-scheme: dark)").matches?To.DARK:To.LIGHT}function Kk(){const e=window.localStorage.getItem("theme");return e===To.DARK||e===To.LIGHT?e:t8()}function n8(e){return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}const r8=({children:e})=>{const t=S.useSyncExternalStore(n8,Kk,Kk),n=S.useRef(!1),{client:r}=Pv();S.useEffect(()=>{if(n.current)return;(async()=>{try{const c=r.getBaseUrl(),d=await fetch(`${c}/api/theme`);if(d.ok){const h=await d.text(),m=document.getElementById("heroui-custom-theme");m&&m.remove();const g=document.createElement("style");g.id="heroui-custom-theme",g.textContent=h,document.head.appendChild(g),console.log("Custom HeroUI theme loaded successfully"),n.current=!0}}catch(c){console.warn("No custom theme available:",c),n.current=!0}})()},[]),S.useEffect(()=>{document.documentElement.classList.toggle("dark",t===To.DARK)},[t]);const i=S.useCallback(a=>{window.localStorage.setItem("theme",a),window.dispatchEvent(new Event("storage"))},[]),s=S.useMemo(()=>({theme:t,setTheme:i}),[t,i]);return R.jsx(E2.Provider,{value:s,children:e})},T2=Object.freeze({left:0,top:0,width:16,height:16}),rv=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),sw=Object.freeze({...T2,...rv}),Fb=Object.freeze({...sw,body:"",hidden:!1});function i8(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Wk(e,t){const n=i8(e,t);for(const r in Fb)r in rv?r in e&&!(r in n)&&(n[r]=rv[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function o8(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function s(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const c=r[a]&&r[a].parent,d=c&&s(c);d&&(i[a]=[c].concat(d))}return i[a]}return Object.keys(n).concat(Object.keys(r)).forEach(s),i}function s8(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let s={};function a(c){s=Wk(r[c]||i[c],s)}return a(t),n.forEach(a),Wk(e,s)}function _2(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=o8(e);for(const i in r){const s=r[i];s&&(t(i,s8(e,i,s)),n.push(i))}return n}const a8={provider:"",aliases:{},not_found:{},...T2};function k0(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function I2(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!k0(e,a8))return null;const n=t.icons;for(const i in n){const s=n[i];if(!i||typeof s.body!="string"||!k0(s,Fb))return null}const r=t.aliases||Object.create(null);for(const i in r){const s=r[i],a=s.parent;if(!i||typeof a!="string"||!n[a]&&!r[a]||!k0(s,Fb))return null}return t}const $2=/^[a-z0-9]+(-[a-z0-9]+)*$/,Tv=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const c=i.pop(),d=i.pop(),h={provider:i.length>0?i[0]:r,prefix:d,name:c};return t&&!Ng(h)?null:h}const s=i[0],a=s.split("-");if(a.length>1){const c={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!Ng(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:s};return t&&!Ng(c,n)?null:c}return null},Ng=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,Hk=Object.create(null);function l8(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Rf(e,t){const n=Hk[e]||(Hk[e]=Object.create(null));return n[t]||(n[t]=l8(e,t))}function A2(e,t){return I2(t)?_2(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function u8(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let ah=!1;function R2(e){return typeof e=="boolean"&&(ah=e),ah}function Gk(e){const t=typeof e=="string"?Tv(e,!0,ah):e;if(t){const n=Rf(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function c8(e,t){const n=Tv(e,!0,ah);if(!n)return!1;const r=Rf(n.provider,n.prefix);return t?u8(r,n.name,t):(r.missing.add(n.name),!0)}function f8(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),ah&&!t&&!e.prefix){let i=!1;return I2(e)&&(e.prefix="",_2(e,(s,a)=>{c8(s,a)&&(i=!0)})),i}const n=e.prefix;if(!Ng({prefix:n,name:"a"}))return!1;const r=Rf(t,n);return!!A2(r,e)}const L2=Object.freeze({width:null,height:null}),M2=Object.freeze({...L2,...rv}),d8=/(-?[0-9.]*[0-9]+[0-9.]*)/g,p8=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function qk(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(d8);if(r===null||!r.length)return e;const i=[];let s=r.shift(),a=p8.test(s);for(;;){if(a){const c=parseFloat(s);isNaN(c)?i.push(s):i.push(Math.ceil(c*t*n)/n)}else i.push(s);if(s=r.shift(),s===void 0)return i.join("");a=!a}}function h8(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),s=e.indexOf("</"+t);if(i===-1||s===-1)break;const a=e.indexOf(">",s);if(a===-1)break;n+=e.slice(i+1,s).trim(),e=e.slice(0,r).trim()+e.slice(a+1)}return{defs:n,content:e}}function m8(e,t){return e?"<defs>"+e+"</defs>"+t:t}function g8(e,t,n){const r=h8(e);return m8(r.defs,t+r.content+n)}const v8=e=>e==="unset"||e==="undefined"||e==="none";function y8(e,t){const n={...sw,...e},r={...M2,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(P=>{const T=[],_=P.hFlip,A=P.vFlip;let M=P.rotate;_?A?M+=2:(T.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),T.push("scale(-1 1)"),i.top=i.left=0):A&&(T.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),T.push("scale(1 -1)"),i.top=i.left=0);let O;switch(M<0&&(M-=Math.floor(M/4)*4),M=M%4,M){case 1:O=i.height/2+i.top,T.unshift("rotate(90 "+O.toString()+" "+O.toString()+")");break;case 2:T.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:O=i.width/2+i.left,T.unshift("rotate(-90 "+O.toString()+" "+O.toString()+")");break}M%2===1&&(i.left!==i.top&&(O=i.left,i.left=i.top,i.top=O),i.width!==i.height&&(O=i.width,i.width=i.height,i.height=O)),T.length&&(s=g8(s,'<g transform="'+T.join(" ")+'">',"</g>"))});const a=r.width,c=r.height,d=i.width,h=i.height;let m,g;a===null?(g=c===null?"1em":c==="auto"?h:c,m=qk(g,d/h)):(m=a==="auto"?d:a,g=c===null?qk(m,h/d):c==="auto"?h:c);const b={},x=(P,T)=>{v8(T)||(b[P]=T.toString())};x("width",m),x("height",g);const k=[i.left,i.top,d,h];return b.viewBox=k.join(" "),{attributes:b,viewBox:k,body:s}}const b8=/\sid="(\S+)"/g,x8="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let w8=0;function S8(e,t=x8){const n=[];let r;for(;r=b8.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const a=typeof t=="function"?t(s):t+(w8++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const Ob=Object.create(null);function k8(e,t){Ob[e]=t}function zb(e){return Ob[e]||Ob[""]}function aw(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const lw=Object.create(null),wp=["https://api.simplesvg.com","https://api.unisvg.com"],Fg=[];for(;wp.length>0;)wp.length===1||Math.random()>.5?Fg.push(wp.shift()):Fg.push(wp.pop());lw[""]=aw({resources:["https://api.iconify.design"].concat(Fg)});function C8(e,t){const n=aw(t);return n===null?!1:(lw[e]=n,!0)}function uw(e){return lw[e]}const E8=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Yk=E8();function P8(e,t){const n=uw(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const s=t+".json?icons=";r=n.maxURL-i-n.path.length-s.length}return r}function T8(e){return e===404}const _8=(e,t,n)=>{const r=[],i=P8(e,t),s="icons";let a={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((d,h)=>{c+=d.length+1,c>=i&&h>0&&(r.push(a),a={type:s,provider:e,prefix:t,icons:[]},c=d.length),a.icons.push(d)}),r.push(a),r};function I8(e){if(typeof e=="string"){const t=uw(e);if(t)return t.path}return"/"}const $8=(e,t,n)=>{if(!Yk){n("abort",424);return}let r=I8(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),d=new URLSearchParams({icons:c});r+=s+".json?"+d.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let i=503;Yk(e+r).then(s=>{const a=s.status;if(a!==200){setTimeout(()=>{n(T8(a)?"abort":"next",a)});return}return i=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",i)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",i)})},A8={prepare:_8,send:$8};function R8(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,s)=>i.provider!==s.provider?i.provider.localeCompare(s.provider):i.prefix!==s.prefix?i.prefix.localeCompare(s.prefix):i.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const s=i.provider,a=i.prefix,c=i.name,d=n[s]||(n[s]=Object.create(null)),h=d[a]||(d[a]=Rf(s,a));let m;c in h.icons?m=t.loaded:a===""||h.missing.has(c)?m=t.missing:m=t.pending;const g={provider:s,prefix:a,name:c};m.push(g)}),t}function D2(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function L8(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(s=>{const a=s.icons,c=a.pending.length;a.pending=a.pending.filter(d=>{if(d.prefix!==i)return!0;const h=d.name;if(e.icons[h])a.loaded.push({provider:r,prefix:i,name:h});else if(e.missing.has(h))a.missing.push({provider:r,prefix:i,name:h});else return n=!0,!0;return!1}),a.pending.length!==c&&(n||D2([e],s.id),s.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),s.abort))})}))}let M8=0;function D8(e,t,n){const r=M8++,i=D2.bind(null,n,r);if(!t.pending.length)return i;const s={id:r,icons:t,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(s)}),i}function N8(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const s=typeof i=="string"?Tv(i,t,n):i;s&&r.push(s)}),r}var F8={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function O8(e,t,n,r){const i=e.resources.length,s=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let $=e.resources.slice(0);for(a=[];$.length>1;){const Y=Math.floor(Math.random()*$.length);a.push($[Y]),$=$.slice(0,Y).concat($.slice(Y+1))}a=a.concat($)}else a=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let d="pending",h=0,m,g=null,b=[],x=[];typeof r=="function"&&x.push(r);function k(){g&&(clearTimeout(g),g=null)}function P(){d==="pending"&&(d="aborted"),k(),b.forEach($=>{$.status==="pending"&&($.status="aborted")}),b=[]}function T($,Y){Y&&(x=[]),typeof $=="function"&&x.push($)}function _(){return{startTime:c,payload:t,status:d,queriesSent:h,queriesPending:b.length,subscribe:T,abort:P}}function A(){d="failed",x.forEach($=>{$(void 0,m)})}function M(){b.forEach($=>{$.status==="pending"&&($.status="aborted")}),b=[]}function O($,Y,te){const ie=Y!=="success";switch(b=b.filter(B=>B!==$),d){case"pending":break;case"failed":if(ie||!e.dataAfterTimeout)return;break;default:return}if(Y==="abort"){m=te,A();return}if(ie){m=te,b.length||(a.length?j():A());return}if(k(),M(),!e.random){const B=e.resources.indexOf($.resource);B!==-1&&B!==e.index&&(e.index=B)}d="completed",x.forEach(B=>{B(te)})}function j(){if(d!=="pending")return;k();const $=a.shift();if($===void 0){if(b.length){g=setTimeout(()=>{k(),d==="pending"&&(M(),A())},e.timeout);return}A();return}const Y={status:"pending",resource:$,callback:(te,ie)=>{O(Y,te,ie)}};b.push(Y),h++,g=setTimeout(j,e.rotate),n($,t,Y.callback)}return setTimeout(j),_}function N2(e){const t={...F8,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function i(c,d,h){const m=O8(t,c,d,(g,b)=>{r(),h&&h(g,b)});return n.push(m),m}function s(c){return n.find(d=>c(d))||null}return{query:i,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Xk(){}const C0=Object.create(null);function z8(e){if(!C0[e]){const t=uw(e);if(!t)return;const n=N2(t),r={config:t,redundancy:n};C0[e]=r}return C0[e]}function j8(e,t,n){let r,i;if(typeof e=="string"){const s=zb(e);if(!s)return n(void 0,424),Xk;i=s.send;const a=z8(e);a&&(r=a.redundancy)}else{const s=aw(e);if(s){r=N2(s);const a=e.resources?e.resources[0]:"",c=zb(a);c&&(i=c.send)}}return!r||!i?(n(void 0,424),Xk):r.query(t,i,n)().abort}function Qk(){}function B8(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,L8(e)}))}function V8(e){const t=[],n=[];return e.forEach(r=>{(r.match($2)?t:n).push(r)}),{valid:t,invalid:n}}function Sp(e,t,n){function r(){const i=e.pendingIcons;t.forEach(s=>{i&&i.delete(s),e.icons[s]||e.missing.add(s)})}if(n&&typeof n=="object")try{if(!A2(e,n).length){r();return}}catch(i){console.error(i)}r(),B8(e)}function Jk(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function U8(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;if(delete e.iconsToLoad,!i||!i.length)return;const s=e.loadIcon;if(e.loadIcons&&(i.length>1||!s)){Jk(e.loadIcons(i,r,n),m=>{Sp(e,i,m)});return}if(s){i.forEach(m=>{const g=s(m,r,n);Jk(g,b=>{const x=b?{prefix:r,icons:{[m]:b}}:null;Sp(e,[m],x)})});return}const{valid:a,invalid:c}=V8(i);if(c.length&&Sp(e,c,null),!a.length)return;const d=r.match($2)?zb(n):null;if(!d){Sp(e,a,null);return}d.prepare(n,r,a).forEach(m=>{j8(n,m,g=>{Sp(e,m.icons,g)})})}))}const F2=(e,t)=>{const n=N8(e,!0,R2()),r=R8(n);if(!r.pending.length){let d=!0;return t&&setTimeout(()=>{d&&t(r.loaded,r.missing,r.pending,Qk)}),()=>{d=!1}}const i=Object.create(null),s=[];let a,c;return r.pending.forEach(d=>{const{provider:h,prefix:m}=d;if(m===c&&h===a)return;a=h,c=m,s.push(Rf(h,m));const g=i[h]||(i[h]=Object.create(null));g[m]||(g[m]=[])}),r.pending.forEach(d=>{const{provider:h,prefix:m,name:g}=d,b=Rf(h,m),x=b.pendingIcons||(b.pendingIcons=new Set);x.has(g)||(x.add(g),i[h][m].push(g))}),s.forEach(d=>{const h=i[d.provider][d.prefix];h.length&&U8(d,h)}),t?D8(t,r,s):Qk};function K8(e,t){const n={...e};for(const r in t){const i=t[r],s=typeof i;r in L2?(i===null||i&&(s==="string"||s==="number"))&&(n[r]=i):s===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const W8=/[\s,]+/;function H8(e,t){t.split(W8).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function G8(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/i,s%1===0?r(s):0)}}return t}function q8(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Y8(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function X8(e){return"data:image/svg+xml,"+Y8(e)}function Q8(e){return'url("'+X8(e)+'")'}let Vp;function J8(){try{Vp=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Vp=null}}function Z8(e){return Vp===void 0&&J8(),Vp?Vp.createHTML(e):e}const O2={...M2,inline:!1},e7={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},t7={display:"inline-block"},jb={backgroundColor:"currentColor"},z2={backgroundColor:"transparent"},Zk={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},eC={WebkitMask:jb,mask:jb,background:z2};for(const e in eC){const t=eC[e];for(const n in Zk)t[e+n]=Zk[n]}const n7={...O2,inline:!0};function tC(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const r7=(e,t,n)=>{const r=t.inline?n7:O2,i=K8(r,t),s=t.mode||"svg",a={},c=t.style||{},d={...s==="svg"?e7:{}};if(n){const T=Tv(n,!1,!0);if(T){const _=["iconify"],A=["provider","prefix"];for(const M of A)T[M]&&_.push("iconify--"+T[M]);d.className=_.join(" ")}}for(let T in t){const _=t[T];if(_!==void 0)switch(T){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":d.ref=_;break;case"className":d[T]=(d[T]?d[T]+" ":"")+_;break;case"inline":case"hFlip":case"vFlip":i[T]=_===!0||_==="true"||_===1;break;case"flip":typeof _=="string"&&H8(i,_);break;case"color":a.color=_;break;case"rotate":typeof _=="string"?i[T]=G8(_):typeof _=="number"&&(i[T]=_);break;case"ariaHidden":case"aria-hidden":_!==!0&&_!=="true"&&delete d["aria-hidden"];break;default:r[T]===void 0&&(d[T]=_)}}const h=y8(e,i),m=h.attributes;if(i.inline&&(a.verticalAlign="-0.125em"),s==="svg"){d.style={...a,...c},Object.assign(d,m);let T=0,_=t.id;return typeof _=="string"&&(_=_.replace(/-/g,"_")),d.dangerouslySetInnerHTML={__html:Z8(S8(h.body,_?()=>_+"ID"+T++:"iconifyReact"))},S.createElement("svg",d)}const{body:g,width:b,height:x}=e,k=s==="mask"||(s==="bg"?!1:g.indexOf("currentColor")!==-1),P=q8(g,{...m,width:b+"",height:x+""});return d.style={...a,"--svg":Q8(P),width:tC(m.width),height:tC(m.height),...t7,...k?jb:z2,...c},S.createElement("span",d)};R2(!0);k8("",A8);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!f8(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;C8(n,i)||console.error(r)}catch{console.error(r)}}}}function j2(e){const[t,n]=S.useState(!!e.ssr),[r,i]=S.useState({});function s(x){if(x){const k=e.icon;if(typeof k=="object")return{name:"",data:k};const P=Gk(k);if(P)return{name:k,data:P}}return{name:""}}const[a,c]=S.useState(s(!!e.ssr));function d(){const x=r.callback;x&&(x(),i({}))}function h(x){if(JSON.stringify(a)!==JSON.stringify(x))return d(),c(x),!0}function m(){var x;const k=e.icon;if(typeof k=="object"){h({name:"",data:k});return}const P=Gk(k);if(h({name:k,data:P}))if(P===void 0){const T=F2([k],m);i({callback:T})}else P&&((x=e.onLoad)===null||x===void 0||x.call(e,k))}S.useEffect(()=>(n(!0),d),[]),S.useEffect(()=>{t&&m()},[e.icon,t]);const{name:g,data:b}=a;return b?r7({...sw,...b},e,g):e.children?e.children:e.fallback?e.fallback:S.createElement("span",{})}const ci=S.forwardRef((e,t)=>j2({...e,_ref:t}));S.forwardRef((e,t)=>j2({inline:!0,...e,_ref:t}));var Lp={exports:{}};var i7=Lp.exports,nC;function o7(){return nC||(nC=1,(function(e,t){(function(){var n,r="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",c="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",h=500,m="__lodash_placeholder__",g=1,b=2,x=4,k=1,P=2,T=1,_=2,A=4,M=8,O=16,j=32,$=64,Y=128,te=256,ie=512,B=30,W="...",G=800,ee=16,H=1,le=2,J=3,X=1/0,V=9007199254740991,ae=17976931348623157e292,D=NaN,U=4294967295,oe=U-1,z=U>>>1,me=[["ary",Y],["bind",T],["bindKey",_],["curry",M],["curryRight",O],["flip",ie],["partial",j],["partialRight",$],["rearg",te]],Ce="[object Arguments]",ye="[object Array]",Oe="[object AsyncFunction]",Ne="[object Boolean]",_e="[object Date]",Qe="[object DOMException]",at="[object Error]",Ie="[object Function]",mt="[object GeneratorFunction]",pt="[object Map]",Kt="[object Number]",Ue="[object Null]",it="[object Object]",Wt="[object Promise]",tr="[object Proxy]",ln="[object RegExp]",_t="[object Set]",Rt="[object String]",_n="[object Symbol]",Er="[object Undefined]",Nt="[object WeakMap]",pe="[object WeakSet]",Se="[object ArrayBuffer]",ze="[object DataView]",nt="[object Float32Array]",lt="[object Float64Array]",Ht="[object Int8Array]",Vn="[object Int16Array]",Zt="[object Int32Array]",Pt="[object Uint8Array]",Pr="[object Uint8ClampedArray]",Ft="[object Uint16Array]",nr="[object Uint32Array]",un=/\b__p \+= '';/g,aa=/\b(__p \+=) '' \+/g,hs=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pi=/&(?:amp|lt|gt|quot|#39);/g,hi=/[&<>"']/g,ul=RegExp(pi.source),Du=RegExp(hi.source),ms=/<%-([\s\S]+?)%>/g,Ur=/<%([\s\S]+?)%>/g,cl=/<%=([\s\S]+?)%>/g,fl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,en=/^\w*$/,gs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vs=/[\\^$.*+?()[\]{}|]/g,Ro=RegExp(vs.source),dl=/^\s+/,ys=/\s/,la=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ua=/\{\n\/\* \[wrapped with (.+)\] \*/,pl=/,? & /,Kf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Wf=/[()=,{}\[\]\/\s]/,Hf=/\\(\\)?/g,Xe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,so=/\w*$/,Ah=/^[-+]0x[0-9a-f]+$/i,Vv=/^0b[01]+$/i,Rh=/^\[object .+?Constructor\]$/,Lh=/^0o[0-7]+$/i,Mh=/^(?:0|[1-9]\d*)$/,Dh=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Nu=/($^)/,Uv=/['\n\r\u2028\u2029\\]/g,Gt="\\ud800-\\udfff",Kv="\\u0300-\\u036f",Gf="\\ufe20-\\ufe2f",Nh="\\u20d0-\\u20ff",hl=Kv+Gf+Nh,Fh="\\u2700-\\u27bf",qf="a-z\\xdf-\\xf6\\xf8-\\xff",Fu="\\xac\\xb1\\xd7\\xf7",Mi="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Wv="\\u2000-\\u206f",mi=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oh="A-Z\\xc0-\\xd6\\xd8-\\xde",zh="\\ufe0e\\ufe0f",jh=Fu+Mi+Wv+mi,ca="['’]",Ou="["+Gt+"]",fa="["+jh+"]",bs="["+hl+"]",Bh="\\d+",Hv="["+Fh+"]",zu="["+qf+"]",Yf="[^"+Gt+jh+Bh+Fh+qf+Oh+"]",ml="\\ud83c[\\udffb-\\udfff]",gl="(?:"+bs+"|"+ml+")",Vh="[^"+Gt+"]",vl="(?:\\ud83c[\\udde6-\\uddff]){2}",Et="[\\ud800-\\udbff][\\udc00-\\udfff]",xs="["+Oh+"]",Xf="\\u200d",ju="(?:"+zu+"|"+Yf+")",Uh="(?:"+xs+"|"+Yf+")",Qf="(?:"+ca+"(?:d|ll|m|re|s|t|ve))?",Jf="(?:"+ca+"(?:D|LL|M|RE|S|T|VE))?",Bu=gl+"?",yl="["+zh+"]?",Lo="(?:"+Xf+"(?:"+[Vh,vl,Et].join("|")+")"+yl+Bu+")*",Mo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Do="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",da=yl+Bu+Lo,bl="(?:"+[Hv,vl,Et].join("|")+")"+da,No="(?:"+[Vh+bs+"?",bs,vl,Et,Ou].join("|")+")",Gv=RegExp(ca,"g"),Kh=RegExp(bs,"g"),ws=RegExp(ml+"(?="+ml+")|"+No+da,"g"),qv=RegExp([xs+"?"+zu+"+"+Qf+"(?="+[fa,xs,"$"].join("|")+")",Uh+"+"+Jf+"(?="+[fa,xs+ju,"$"].join("|")+")",xs+"?"+ju+"+"+Qf,xs+"+"+Jf,Do,Mo,Bh,bl].join("|"),"g"),Wh=RegExp("["+Xf+Gt+hl+zh+"]"),Vu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Hh=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Yv=-1,It={};It[nt]=It[lt]=It[Ht]=It[Vn]=It[Zt]=It[Pt]=It[Pr]=It[Ft]=It[nr]=!0,It[Ce]=It[ye]=It[Se]=It[Ne]=It[ze]=It[_e]=It[at]=It[Ie]=It[pt]=It[Kt]=It[it]=It[ln]=It[_t]=It[Rt]=It[Nt]=!1;var Tt={};Tt[Ce]=Tt[ye]=Tt[Se]=Tt[ze]=Tt[Ne]=Tt[_e]=Tt[nt]=Tt[lt]=Tt[Ht]=Tt[Vn]=Tt[Zt]=Tt[pt]=Tt[Kt]=Tt[it]=Tt[ln]=Tt[_t]=Tt[Rt]=Tt[_n]=Tt[Pt]=Tt[Pr]=Tt[Ft]=Tt[nr]=!0,Tt[at]=Tt[Ie]=Tt[Nt]=!1;var pa={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Uu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Xv={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Qv={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Zf=parseFloat,Ku=parseInt,Wu=typeof og=="object"&&og&&og.Object===Object&&og,Gh=typeof self=="object"&&self&&self.Object===Object&&self,qt=Wu||Gh||Function("return this")(),xl=t&&!t.nodeType&&t,Di=xl&&!0&&e&&!e.nodeType&&e,ed=Di&&Di.exports===xl,ha=ed&&Wu.process,rr=(function(){try{var re=Di&&Di.require&&Di.require("util").types;return re||ha&&ha.binding&&ha.binding("util")}catch{}})(),td=rr&&rr.isArrayBuffer,pr=rr&&rr.isDate,Ss=rr&&rr.isMap,Hu=rr&&rr.isRegExp,ma=rr&&rr.isSet,qh=rr&&rr.isTypedArray;function ir(re,he,fe){switch(fe.length){case 0:return re.call(he);case 1:return re.call(he,fe[0]);case 2:return re.call(he,fe[0],fe[1]);case 3:return re.call(he,fe[0],fe[1],fe[2])}return re.apply(he,fe)}function nd(re,he,fe,Re){for(var rt=-1,wt=re==null?0:re.length;++rt<wt;){var hn=re[rt];he(Re,hn,fe(hn),re)}return Re}function Un(re,he){for(var fe=-1,Re=re==null?0:re.length;++fe<Re&&he(re[fe],fe,re)!==!1;);return re}function Gu(re,he){for(var fe=re==null?0:re.length;fe--&&he(re[fe],fe,re)!==!1;);return re}function rd(re,he){for(var fe=-1,Re=re==null?0:re.length;++fe<Re;)if(!he(re[fe],fe,re))return!1;return!0}function Fo(re,he){for(var fe=-1,Re=re==null?0:re.length,rt=0,wt=[];++fe<Re;){var hn=re[fe];he(hn,fe,re)&&(wt[rt++]=hn)}return wt}function qu(re,he){var fe=re==null?0:re.length;return!!fe&&ga(re,he,0)>-1}function id(re,he,fe){for(var Re=-1,rt=re==null?0:re.length;++Re<rt;)if(fe(he,re[Re]))return!0;return!1}function Lt(re,he){for(var fe=-1,Re=re==null?0:re.length,rt=Array(Re);++fe<Re;)rt[fe]=he(re[fe],fe,re);return rt}function Oo(re,he){for(var fe=-1,Re=he.length,rt=re.length;++fe<Re;)re[rt+fe]=he[fe];return re}function od(re,he,fe,Re){var rt=-1,wt=re==null?0:re.length;for(Re&&wt&&(fe=re[++rt]);++rt<wt;)fe=he(fe,re[rt],rt,re);return fe}function Jv(re,he,fe,Re){var rt=re==null?0:re.length;for(Re&&rt&&(fe=re[--rt]);rt--;)fe=he(fe,re[rt],rt,re);return fe}function sd(re,he){for(var fe=-1,Re=re==null?0:re.length;++fe<Re;)if(he(re[fe],fe,re))return!0;return!1}var Zv=ld("length");function Yh(re){return re.split("")}function ey(re){return re.match(Kf)||[]}function Xh(re,he,fe){var Re;return fe(re,function(rt,wt,hn){if(he(rt,wt,hn))return Re=wt,!1}),Re}function Yu(re,he,fe,Re){for(var rt=re.length,wt=fe+(Re?1:-1);Re?wt--:++wt<rt;)if(he(re[wt],wt,re))return wt;return-1}function ga(re,he,fe){return he===he?Ju(re,he,fe):Yu(re,Qh,fe)}function ad(re,he,fe,Re){for(var rt=fe-1,wt=re.length;++rt<wt;)if(Re(re[rt],he))return rt;return-1}function Qh(re){return re!==re}function Jh(re,he){var fe=re==null?0:re.length;return fe?ud(re,he)/fe:D}function ld(re){return function(he){return he==null?n:he[re]}}function Xu(re){return function(he){return re==null?n:re[he]}}function Zh(re,he,fe,Re,rt){return rt(re,function(wt,hn,$t){fe=Re?(Re=!1,wt):he(fe,wt,hn,$t)}),fe}function ty(re,he){var fe=re.length;for(re.sort(he);fe--;)re[fe]=re[fe].value;return re}function ud(re,he){for(var fe,Re=-1,rt=re.length;++Re<rt;){var wt=he(re[Re]);wt!==n&&(fe=fe===n?wt:fe+wt)}return fe}function cd(re,he){for(var fe=-1,Re=Array(re);++fe<re;)Re[fe]=he(fe);return Re}function ny(re,he){return Lt(he,function(fe){return[fe,re[fe]]})}function em(re){return re&&re.slice(0,Zu(re)+1).replace(dl,"")}function Tr(re){return function(he){return re(he)}}function wl(re,he){return Lt(he,function(fe){return re[fe]})}function ao(re,he){return re.has(he)}function tm(re,he){for(var fe=-1,Re=re.length;++fe<Re&&ga(he,re[fe],0)>-1;);return fe}function fd(re,he){for(var fe=re.length;fe--&&ga(he,re[fe],0)>-1;);return fe}function nm(re,he){for(var fe=re.length,Re=0;fe--;)re[fe]===he&&++Re;return Re}var rm=Xu(pa),im=Xu(Uu);function om(re){return"\\"+Qv[re]}function va(re,he){return re==null?n:re[he]}function ya(re){return Wh.test(re)}function ry(re){return Vu.test(re)}function iy(re){for(var he,fe=[];!(he=re.next()).done;)fe.push(he.value);return fe}function Qu(re){var he=-1,fe=Array(re.size);return re.forEach(function(Re,rt){fe[++he]=[rt,Re]}),fe}function dd(re,he){return function(fe){return re(he(fe))}}function Kr(re,he){for(var fe=-1,Re=re.length,rt=0,wt=[];++fe<Re;){var hn=re[fe];(hn===he||hn===m)&&(re[fe]=m,wt[rt++]=fe)}return wt}function zo(re){var he=-1,fe=Array(re.size);return re.forEach(function(Re){fe[++he]=Re}),fe}function oy(re){var he=-1,fe=Array(re.size);return re.forEach(function(Re){fe[++he]=[Re,Re]}),fe}function Ju(re,he,fe){for(var Re=fe-1,rt=re.length;++Re<rt;)if(re[Re]===he)return Re;return-1}function sy(re,he,fe){for(var Re=fe+1;Re--;)if(re[Re]===he)return Re;return Re}function ks(re){return ya(re)?am(re):Zv(re)}function _r(re){return ya(re)?lm(re):Yh(re)}function Zu(re){for(var he=re.length;he--&&ys.test(re.charAt(he)););return he}var sm=Xu(Xv);function am(re){for(var he=ws.lastIndex=0;ws.test(re);)++he;return he}function lm(re){return re.match(ws)||[]}function ay(re){return re.match(qv)||[]}var ly=(function re(he){he=he==null?qt:ba.defaults(qt.Object(),he,ba.pick(qt,Hh));var fe=he.Array,Re=he.Date,rt=he.Error,wt=he.Function,hn=he.Math,$t=he.Object,Sl=he.RegExp,uy=he.String,Wr=he.TypeError,lo=fe.prototype,pd=wt.prototype,Ni=$t.prototype,xa=he["__core-js_shared__"],kl=pd.toString,St=Ni.hasOwnProperty,wa=0,ec=(function(){var u=/[^.]+$/.exec(xa&&xa.keys&&xa.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""})(),Cl=Ni.toString,tc=kl.call($t),um=qt._,cm=Sl("^"+kl.call(St).replace(vs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),El=ed?he.Buffer:n,uo=he.Symbol,Pl=he.Uint8Array,hd=El?El.allocUnsafe:n,gi=dd($t.getPrototypeOf,$t),nc=$t.create,rc=Ni.propertyIsEnumerable,ic=lo.splice,fm=uo?uo.isConcatSpreadable:n,co=uo?uo.iterator:n,Cs=uo?uo.toStringTag:n,Tl=(function(){try{var u=Xo($t,"defineProperty");return u({},"",{}),u}catch{}})(),dm=he.clearTimeout!==qt.clearTimeout&&he.clearTimeout,Ot=Re&&Re.now!==qt.Date.now&&Re.now,md=he.setTimeout!==qt.setTimeout&&he.setTimeout,Es=hn.ceil,jo=hn.floor,oc=$t.getOwnPropertySymbols,gd=El?El.isBuffer:n,Sa=he.isFinite,sc=lo.join,ka=dd($t.keys,$t),mn=hn.max,Kn=hn.min,cy=Re.now,pm=he.parseInt,_l=hn.random,ac=lo.reverse,Il=Xo(he,"DataView"),Ps=Xo(he,"Map"),$l=Xo(he,"Promise"),Bo=Xo(he,"Set"),Al=Xo(he,"WeakMap"),Ca=Xo($t,"create"),lc=Al&&new Al,Ea={},vd=Qo(Il),Vo=Qo(Ps),hm=Qo($l),Pa=Qo(Bo),Fi=Qo(Al),Uo=uo?uo.prototype:n,Ir=Uo?Uo.valueOf:n,uc=Uo?Uo.toString:n;function N(u){if(vn(u)&&!st(u)&&!(u instanceof ot)){if(u instanceof Wn)return u;if(St.call(u,"__wrapped__"))return Vm(u)}return new Wn(u)}var Ta=(function(){function u(){}return function(f){if(!dn(f))return{};if(nc)return nc(f);u.prototype=f;var y=new u;return u.prototype=n,y}})();function Oi(){}function Wn(u,f){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=n}N.templateSettings={escape:ms,evaluate:Ur,interpolate:cl,variable:"",imports:{_:N}},N.prototype=Oi.prototype,N.prototype.constructor=N,Wn.prototype=Ta(Oi.prototype),Wn.prototype.constructor=Wn;function ot(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=U,this.__views__=[]}function cc(){var u=new ot(this.__wrapped__);return u.__actions__=sr(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=sr(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=sr(this.__views__),u}function yd(){if(this.__filtered__){var u=new ot(this);u.__dir__=-1,u.__filtered__=!0}else u=this.clone(),u.__dir__*=-1;return u}function _a(){var u=this.__wrapped__.value(),f=this.__dir__,y=st(u),E=f<0,I=y?u.length:0,F=Hd(0,I,this.__views__),q=F.start,Z=F.end,se=Z-q,ge=E?Z:q-1,ve=this.__iteratees__,we=ve.length,$e=0,Ke=Kn(se,this.__takeCount__);if(!y||!E&&I==se&&Ke==se)return Na(u,this.__actions__);var Ze=[];e:for(;se--&&$e<Ke;){ge+=f;for(var dt=-1,et=u[ge];++dt<we;){var gt=ve[dt],xt=gt.iteratee,Pi=gt.type,Mr=xt(et);if(Pi==le)et=Mr;else if(!Mr){if(Pi==H)continue e;break e}}Ze[$e++]=et}return Ze}ot.prototype=Ta(Oi.prototype),ot.prototype.constructor=ot;function hr(u){var f=-1,y=u==null?0:u.length;for(this.clear();++f<y;){var E=u[f];this.set(E[0],E[1])}}function zt(){this.__data__=Ca?Ca(null):{},this.size=0}function Mt(u){var f=this.has(u)&&delete this.__data__[u];return this.size-=f?1:0,f}function Ko(u){var f=this.__data__;if(Ca){var y=f[u];return y===d?n:y}return St.call(f,u)?f[u]:n}function Hn(u){var f=this.__data__;return Ca?f[u]!==n:St.call(f,u)}function mr(u,f){var y=this.__data__;return this.size+=this.has(u)?0:1,y[u]=Ca&&f===n?d:f,this}hr.prototype.clear=zt,hr.prototype.delete=Mt,hr.prototype.get=Ko,hr.prototype.has=Hn,hr.prototype.set=mr;function or(u){var f=-1,y=u==null?0:u.length;for(this.clear();++f<y;){var E=u[f];this.set(E[0],E[1])}}function Ia(){this.__data__=[],this.size=0}function gr(u){var f=this.__data__,y=qn(f,u);if(y<0)return!1;var E=f.length-1;return y==E?f.pop():ic.call(f,y,1),--this.size,!0}function fc(u){var f=this.__data__,y=qn(f,u);return y<0?n:f[y][1]}function mm(u){return qn(this.__data__,u)>-1}function gm(u,f){var y=this.__data__,E=qn(y,u);return E<0?(++this.size,y.push([u,f])):y[E][1]=f,this}or.prototype.clear=Ia,or.prototype.delete=gr,or.prototype.get=fc,or.prototype.has=mm,or.prototype.set=gm;function Hr(u){var f=-1,y=u==null?0:u.length;for(this.clear();++f<y;){var E=u[f];this.set(E[0],E[1])}}function vm(){this.size=0,this.__data__={hash:new hr,map:new(Ps||or),string:new hr}}function fo(u){var f=Gl(this,u).delete(u);return this.size-=f?1:0,f}function dc(u){return Gl(this,u).get(u)}function bd(u){return Gl(this,u).has(u)}function ym(u,f){var y=Gl(this,u),E=y.size;return y.set(u,f),this.size+=y.size==E?0:1,this}Hr.prototype.clear=vm,Hr.prototype.delete=fo,Hr.prototype.get=dc,Hr.prototype.has=bd,Hr.prototype.set=ym;function Ts(u){var f=-1,y=u==null?0:u.length;for(this.__data__=new Hr;++f<y;)this.add(u[f])}function Wo(u){return this.__data__.set(u,d),this}function $a(u){return this.__data__.has(u)}Ts.prototype.add=Ts.prototype.push=Wo,Ts.prototype.has=$a;function Gn(u){var f=this.__data__=new or(u);this.size=f.size}function pc(){this.__data__=new or,this.size=0}function hc(u){var f=this.__data__,y=f.delete(u);return this.size=f.size,y}function Gr(u){return this.__data__.get(u)}function qr(u){return this.__data__.has(u)}function _s(u,f){var y=this.__data__;if(y instanceof or){var E=y.__data__;if(!Ps||E.length<i-1)return E.push([u,f]),this.size=++y.size,this;y=this.__data__=new Hr(E)}return y.set(u,f),this.size=y.size,this}Gn.prototype.clear=pc,Gn.prototype.delete=hc,Gn.prototype.get=Gr,Gn.prototype.has=qr,Gn.prototype.set=_s;function zi(u,f){var y=st(u),E=!y&&ou(u),I=!y&&!E&&Ha(u),F=!y&&!E&&!I&&rf(u),q=y||E||I||F,Z=q?cd(u.length,uy):[],se=Z.length;for(var ge in u)(f||St.call(u,ge))&&!(q&&(ge=="length"||I&&(ge=="offset"||ge=="parent")||F&&(ge=="buffer"||ge=="byteLength"||ge=="byteOffset")||Xt(ge,se)))&&Z.push(ge);return Z}function ji(u){var f=u.length;return f?u[Ma(0,f-1)]:n}function Is(u,f){return jc(sr(u),po(f,0,u.length))}function bm(u){return jc(sr(u))}function Rl(u,f,y){(y!==n&&!ko(u[f],y)||y===n&&!(f in u))&&Bi(u,f,y)}function $s(u,f,y){var E=u[f];(!(St.call(u,f)&&ko(E,y))||y===n&&!(f in u))&&Bi(u,f,y)}function qn(u,f){for(var y=u.length;y--;)if(ko(u[y][0],f))return y;return-1}function $r(u,f,y,E){return Ui(u,function(I,F,q){f(E,I,y(I),q)}),E}function jt(u,f){return u&&yi(f,Qn(f),u)}function vi(u,f){return u&&yi(f,ri(f),u)}function Bi(u,f,y){f=="__proto__"&&Tl?Tl(u,f,{configurable:!0,enumerable:!0,value:y,writable:!0}):u[f]=y}function mc(u,f){for(var y=-1,E=f.length,I=fe(E),F=u==null;++y<E;)I[y]=F?n:My(u,f[y]);return I}function po(u,f,y){return u===u&&(y!==n&&(u=u<=y?u:y),f!==n&&(u=u>=f?u:f)),u}function vr(u,f,y,E,I,F){var q,Z=f&g,se=f&b,ge=f&x;if(y&&(q=I?y(u,E,I,F):y(u)),q!==n)return q;if(!dn(u))return u;var ve=st(u);if(ve){if(q=Yl(u),!Z)return sr(u,q)}else{var we=On(u),$e=we==Ie||we==mt;if(Ha(u))return Md(u,Z);if(we==it||we==Ce||$e&&!I){if(q=se||$e?{}:zn(u),!Z)return se?dy(u,vi(q,u)):_c(u,jt(q,u))}else{if(!Tt[we])return I?u:{};q=py(u,we,Z)}}F||(F=new Gn);var Ke=F.get(u);if(Ke)return Ke;F.set(u,q),Uw(u)?u.forEach(function(et){q.add(vr(et,f,y,et,u,F))}):Bw(u)&&u.forEach(function(et,gt){q.set(gt,vr(et,f,y,gt,u,F))});var Ze=ge?se?Hl:Wl:se?ri:Qn,dt=ve?n:Ze(u);return Un(dt||u,function(et,gt){dt&&(gt=et,et=u[gt]),$s(q,gt,vr(et,f,y,gt,u,F))}),q}function xm(u){var f=Qn(u);return function(y){return Ll(y,u,f)}}function Ll(u,f,y){var E=y.length;if(u==null)return!E;for(u=$t(u);E--;){var I=y[E],F=f[I],q=u[I];if(q===n&&!(I in u)||!F(q))return!1}return!0}function xd(u,f,y){if(typeof u!="function")throw new Wr(a);return Ua(function(){u.apply(n,y)},f)}function Vi(u,f,y,E){var I=-1,F=qu,q=!0,Z=u.length,se=[],ge=f.length;if(!Z)return se;y&&(f=Lt(f,Tr(y))),E?(F=id,q=!1):f.length>=i&&(F=ao,q=!1,f=new Ts(f));e:for(;++I<Z;){var ve=u[I],we=y==null?ve:y(ve);if(ve=E||ve!==0?ve:0,q&&we===we){for(var $e=ge;$e--;)if(f[$e]===we)continue e;se.push(ve)}else F(f,we,E)||se.push(ve)}return se}var Ui=Zr(Ar),wm=Zr(Ho,!0);function Ml(u,f){var y=!0;return Ui(u,function(E,I,F){return y=!!f(E,I,F),y}),y}function As(u,f,y){for(var E=-1,I=u.length;++E<I;){var F=u[E],q=f(F);if(q!=null&&(Z===n?q===q&&!Ei(q):y(q,Z)))var Z=q,se=F}return se}function Sm(u,f,y,E){var I=u.length;for(y=ct(y),y<0&&(y=-y>I?0:I+y),E=E===n||E>I?I:ct(E),E<0&&(E+=I),E=y>E?0:Ww(E);y<E;)u[y++]=f;return u}function wd(u,f){var y=[];return Ui(u,function(E,I,F){f(E,I,F)&&y.push(E)}),y}function sn(u,f,y,E,I){var F=-1,q=u.length;for(y||(y=Fc),I||(I=[]);++F<q;){var Z=u[F];f>0&&y(Z)?f>1?sn(Z,f-1,y,E,I):Oo(I,Z):E||(I[I.length]=Z)}return I}var gc=$c(),Dl=$c(!0);function Ar(u,f){return u&&gc(u,f,Qn)}function Ho(u,f){return u&&Dl(u,f,Qn)}function Aa(u,f){return Fo(f,function(y){return Ks(u[y])})}function ho(u,f){f=Hi(f,u);for(var y=0,E=f.length;u!=null&&y<E;)u=u[Si(f[y++])];return y&&y==E?u:n}function vc(u,f,y){var E=f(u);return st(u)?E:Oo(E,y(u))}function Nn(u){return u==null?u===n?Er:Ue:Cs&&Cs in $t(u)?Nc(u):qd(u)}function Go(u,f){return u>f}function Yr(u,f){return u!=null&&St.call(u,f)}function Rs(u,f){return u!=null&&f in $t(u)}function Sd(u,f,y){return u>=Kn(f,y)&&u<mn(f,y)}function yc(u,f,y){for(var E=y?id:qu,I=u[0].length,F=u.length,q=F,Z=fe(F),se=1/0,ge=[];q--;){var ve=u[q];q&&f&&(ve=Lt(ve,Tr(f))),se=Kn(ve.length,se),Z[q]=!y&&(f||I>=120&&ve.length>=120)?new Ts(q&&ve):n}ve=u[0];var we=-1,$e=Z[0];e:for(;++we<I&&ge.length<se;){var Ke=ve[we],Ze=f?f(Ke):Ke;if(Ke=y||Ke!==0?Ke:0,!($e?ao($e,Ze):E(ge,Ze,y))){for(q=F;--q;){var dt=Z[q];if(!(dt?ao(dt,Ze):E(u[q],Ze,y)))continue e}$e&&$e.push(Ze),ge.push(Ke)}}return ge}function mo(u,f,y,E){return Ar(u,function(I,F,q){f(E,y(I),F,q)}),E}function Xr(u,f,y){f=Hi(f,u),u=In(u,f);var E=u==null?u:u[Si(ur(f))];return E==null?n:ir(E,u,y)}function bc(u){return vn(u)&&Nn(u)==Ce}function km(u){return vn(u)&&Nn(u)==Se}function go(u){return vn(u)&&Nn(u)==_e}function Qr(u,f,y,E,I){return u===f?!0:u==null||f==null||!vn(u)&&!vn(f)?u!==u&&f!==f:xc(u,f,y,E,Qr,I)}function xc(u,f,y,E,I,F){var q=st(u),Z=st(f),se=q?ye:On(u),ge=Z?ye:On(f);se=se==Ce?it:se,ge=ge==Ce?it:ge;var ve=se==it,we=ge==it,$e=se==ge;if($e&&Ha(u)){if(!Ha(f))return!1;q=!0,ve=!1}if($e&&!ve)return F||(F=new Gn),q||rf(u)?Kd(u,f,y,E,I,F):Wd(u,f,se,y,E,I,F);if(!(y&k)){var Ke=ve&&St.call(u,"__wrapped__"),Ze=we&&St.call(f,"__wrapped__");if(Ke||Ze){var dt=Ke?u.value():u,et=Ze?f.value():f;return F||(F=new Gn),I(dt,et,y,E,F)}}return $e?(F||(F=new Gn),Mm(u,f,y,E,I,F)):!1}function Cm(u){return vn(u)&&On(u)==pt}function Ra(u,f,y,E){var I=y.length,F=I,q=!E;if(u==null)return!F;for(u=$t(u);I--;){var Z=y[I];if(q&&Z[2]?Z[1]!==u[Z[0]]:!(Z[0]in u))return!1}for(;++I<F;){Z=y[I];var se=Z[0],ge=u[se],ve=Z[1];if(q&&Z[2]){if(ge===n&&!(se in u))return!1}else{var we=new Gn;if(E)var $e=E(ge,ve,se,u,f,we);if(!($e===n?Qr(ve,ge,k|P,E,we):$e))return!1}}return!0}function kd(u){if(!dn(u)||Fm(u))return!1;var f=Ks(u)?cm:Rh;return f.test(Qo(u))}function Nl(u){return vn(u)&&Nn(u)==ln}function Ki(u){return vn(u)&&On(u)==_t}function Fl(u){return vn(u)&&ng(u.length)&&!!It[Nn(u)]}function La(u){return typeof u=="function"?u:u==null?ii:typeof u=="object"?st(u)?Yt(u[0],u[1]):wc(u):n1(u)}function vo(u){if(!wo(u))return ka(u);var f=[];for(var y in $t(u))St.call(u,y)&&y!="constructor"&&f.push(y);return f}function Cd(u){if(!dn(u))return jm(u);var f=wo(u),y=[];for(var E in u)E=="constructor"&&(f||!St.call(u,E))||y.push(E);return y}function qo(u,f){return u<f}function Ed(u,f){var y=-1,E=ni(u)?fe(u.length):[];return Ui(u,function(I,F,q){E[++y]=f(I,F,q)}),E}function wc(u){var f=ql(u);return f.length==1&&f[0][2]?Oc(f[0][0],f[0][1]):function(y){return y===u||Ra(y,u,f)}}function Yt(u,f){return Me(u)&&Ql(f)?Oc(Si(u),f):function(y){var E=My(y,u);return E===n&&E===f?Dy(y,u):Qr(f,E,k|P)}}function Ls(u,f,y,E,I){u!==f&&gc(f,function(F,q){if(I||(I=new Gn),dn(F))Pd(u,f,q,y,Ls,E,I);else{var Z=E?E(Yi(u,q),F,q+"",u,f,I):n;Z===n&&(Z=F),Rl(u,q,Z)}},ri)}function Pd(u,f,y,E,I,F,q){var Z=Yi(u,y),se=Yi(f,y),ge=q.get(se);if(ge){Rl(u,y,ge);return}var ve=F?F(Z,se,y+"",u,f,q):n,we=ve===n;if(we){var $e=st(se),Ke=!$e&&Ha(se),Ze=!$e&&!Ke&&rf(se);ve=se,$e||Ke||Ze?st(Z)?ve=Z:Sn(Z)?ve=sr(Z):Ke?(we=!1,ve=Md(se,!0)):Ze?(we=!1,ve=Im(se,!0)):ve=[]:dp(se)||ou(se)?(ve=Z,ou(Z)?ve=Hw(Z):(!dn(Z)||Ks(Z))&&(ve=zn(se))):we=!1}we&&(q.set(se,ve),I(ve,se,E,F,q),q.delete(se)),Rl(u,y,ve)}function Sc(u,f){var y=u.length;if(y)return f+=f<0?y:0,Xt(f,y)?u[f]:n}function Ol(u,f,y){f.length?f=Lt(f,function(F){return st(F)?function(q){return ho(q,F.length===1?F[0]:F)}:F}):f=[ii];var E=-1;f=Lt(f,Tr(qe()));var I=Ed(u,function(F,q,Z){var se=Lt(f,function(ge){return ge(F)});return{criteria:se,index:++E,value:F}});return ty(I,function(F,q){return fy(F,q,y)})}function Td(u,f){return Yo(u,f,function(y,E){return Dy(u,E)})}function Yo(u,f,y){for(var E=-1,I=f.length,F={};++E<I;){var q=f[E],Z=ho(u,q);y(Z,q)&&Ds(F,Hi(q,u),Z)}return F}function tn(u){return function(f){return ho(f,u)}}function cn(u,f,y,E){var I=E?ad:ga,F=-1,q=f.length,Z=u;for(u===f&&(f=sr(f)),y&&(Z=Lt(u,Tr(y)));++F<q;)for(var se=0,ge=f[F],ve=y?y(ge):ge;(se=I(Z,ve,se,E))>-1;)Z!==u&&ic.call(Z,se,1),ic.call(u,se,1);return u}function xn(u,f){for(var y=u?f.length:0,E=y-1;y--;){var I=f[y];if(y==E||I!==F){var F=I;Xt(I)?ic.call(u,I,1):Ec(u,I)}}return u}function Ma(u,f){return u+jo(_l()*(f-u+1))}function zl(u,f,y,E){for(var I=-1,F=mn(Es((f-u)/(y||1)),0),q=fe(F);F--;)q[E?F:++I]=u,u+=y;return q}function Ms(u,f){var y="";if(!u||f<1||f>V)return y;do f%2&&(y+=u),f=jo(f/2),f&&(u+=u);while(f);return y}function ut(u,f){return Rr(zc(u,f,ii),u+"")}function Yn(u){return ji(of(u))}function _d(u,f){var y=of(u);return jc(y,po(f,0,y.length))}function Ds(u,f,y,E){if(!dn(u))return u;f=Hi(f,u);for(var I=-1,F=f.length,q=F-1,Z=u;Z!=null&&++I<F;){var se=Si(f[I]),ge=y;if(se==="__proto__"||se==="constructor"||se==="prototype")return u;if(I!=q){var ve=Z[se];ge=E?E(ve,se,Z):n,ge===n&&(ge=dn(ve)?ve:Xt(f[I+1])?[]:{})}$s(Z,se,ge),Z=Z[se]}return u}var kc=lc?function(u,f){return lc.set(u,f),u}:ii,Wi=Tl?function(u,f){return Tl(u,"toString",{configurable:!0,enumerable:!1,value:Fy(f),writable:!0})}:ii;function Jr(u){return jc(of(u))}function Xn(u,f,y){var E=-1,I=u.length;f<0&&(f=-f>I?0:I+f),y=y>I?I:y,y<0&&(y+=I),I=f>y?0:y-f>>>0,f>>>=0;for(var F=fe(I);++E<I;)F[E]=u[E+f];return F}function Id(u,f){var y;return Ui(u,function(E,I,F){return y=f(E,I,F),!y}),!!y}function Da(u,f,y){var E=0,I=u==null?E:u.length;if(typeof f=="number"&&f===f&&I<=z){for(;E<I;){var F=E+I>>>1,q=u[F];q!==null&&!Ei(q)&&(y?q<=f:q<f)?E=F+1:I=F}return I}return Cc(u,f,ii,y)}function Cc(u,f,y,E){var I=0,F=u==null?0:u.length;if(F===0)return 0;f=y(f);for(var q=f!==f,Z=f===null,se=Ei(f),ge=f===n;I<F;){var ve=jo((I+F)/2),we=y(u[ve]),$e=we!==n,Ke=we===null,Ze=we===we,dt=Ei(we);if(q)var et=E||Ze;else ge?et=Ze&&(E||$e):Z?et=Ze&&$e&&(E||!Ke):se?et=Ze&&$e&&!Ke&&(E||!dt):Ke||dt?et=!1:et=E?we<=f:we<f;et?I=ve+1:F=ve}return Kn(F,oe)}function $d(u,f){for(var y=-1,E=u.length,I=0,F=[];++y<E;){var q=u[y],Z=f?f(q):q;if(!y||!ko(Z,se)){var se=Z;F[I++]=q===0?0:q}}return F}function Ad(u){return typeof u=="number"?u:Ei(u)?D:+u}function yr(u){if(typeof u=="string")return u;if(st(u))return Lt(u,yr)+"";if(Ei(u))return uc?uc.call(u):"";var f=u+"";return f=="0"&&1/u==-X?"-0":f}function yo(u,f,y){var E=-1,I=qu,F=u.length,q=!0,Z=[],se=Z;if(y)q=!1,I=id;else if(F>=i){var ge=f?null:Lm(u);if(ge)return zo(ge);q=!1,I=ao,se=new Ts}else se=f?[]:Z;e:for(;++E<F;){var ve=u[E],we=f?f(ve):ve;if(ve=y||ve!==0?ve:0,q&&we===we){for(var $e=se.length;$e--;)if(se[$e]===we)continue e;f&&se.push(we),Z.push(ve)}else I(se,we,y)||(se!==Z&&se.push(we),Z.push(ve))}return Z}function Ec(u,f){return f=Hi(f,u),u=In(u,f),u==null||delete u[Si(ur(f))]}function Rd(u,f,y,E){return Ds(u,f,y(ho(u,f)),E)}function jl(u,f,y,E){for(var I=u.length,F=E?I:-1;(E?F--:++F<I)&&f(u[F],F,u););return y?Xn(u,E?0:F,E?F+1:I):Xn(u,E?F+1:0,E?I:F)}function Na(u,f){var y=u;return y instanceof ot&&(y=y.value()),od(f,function(E,I){return I.func.apply(I.thisArg,Oo([E],I.args))},y)}function Pc(u,f,y){var E=u.length;if(E<2)return E?yo(u[0]):[];for(var I=-1,F=fe(E);++I<E;)for(var q=u[I],Z=-1;++Z<E;)Z!=I&&(F[I]=Vi(F[I]||q,u[Z],f,y));return yo(sn(F,1),f,y)}function Bl(u,f,y){for(var E=-1,I=u.length,F=f.length,q={};++E<I;){var Z=E<F?f[E]:n;y(q,u[E],Z)}return q}function Fa(u){return Sn(u)?u:[]}function Tc(u){return typeof u=="function"?u:ii}function Hi(u,f){return st(u)?u:Me(u,f)?[u]:Qd(At(u))}var Em=ut;function bo(u,f,y){var E=u.length;return y=y===n?E:y,!f&&y>=E?u:Xn(u,f,y)}var Ld=dm||function(u){return qt.clearTimeout(u)};function Md(u,f){if(f)return u.slice();var y=u.length,E=hd?hd(y):new u.constructor(y);return u.copy(E),E}function Vl(u){var f=new u.constructor(u.byteLength);return new Pl(f).set(new Pl(u)),f}function Pm(u,f){var y=f?Vl(u.buffer):u.buffer;return new u.constructor(y,u.byteOffset,u.byteLength)}function Tm(u){var f=new u.constructor(u.source,so.exec(u));return f.lastIndex=u.lastIndex,f}function _m(u){return Ir?$t(Ir.call(u)):{}}function Im(u,f){var y=f?Vl(u.buffer):u.buffer;return new u.constructor(y,u.byteOffset,u.length)}function Dd(u,f){if(u!==f){var y=u!==n,E=u===null,I=u===u,F=Ei(u),q=f!==n,Z=f===null,se=f===f,ge=Ei(f);if(!Z&&!ge&&!F&&u>f||F&&q&&se&&!Z&&!ge||E&&q&&se||!y&&se||!I)return 1;if(!E&&!F&&!ge&&u<f||ge&&y&&I&&!E&&!F||Z&&y&&I||!q&&I||!se)return-1}return 0}function fy(u,f,y){for(var E=-1,I=u.criteria,F=f.criteria,q=I.length,Z=y.length;++E<q;){var se=Dd(I[E],F[E]);if(se){if(E>=Z)return se;var ge=y[E];return se*(ge=="desc"?-1:1)}}return u.index-f.index}function $m(u,f,y,E){for(var I=-1,F=u.length,q=y.length,Z=-1,se=f.length,ge=mn(F-q,0),ve=fe(se+ge),we=!E;++Z<se;)ve[Z]=f[Z];for(;++I<q;)(we||I<F)&&(ve[y[I]]=u[I]);for(;ge--;)ve[Z++]=u[I++];return ve}function Nd(u,f,y,E){for(var I=-1,F=u.length,q=-1,Z=y.length,se=-1,ge=f.length,ve=mn(F-Z,0),we=fe(ve+ge),$e=!E;++I<ve;)we[I]=u[I];for(var Ke=I;++se<ge;)we[Ke+se]=f[se];for(;++q<Z;)($e||I<F)&&(we[Ke+y[q]]=u[I++]);return we}function sr(u,f){var y=-1,E=u.length;for(f||(f=fe(E));++y<E;)f[y]=u[y];return f}function yi(u,f,y,E){var I=!y;y||(y={});for(var F=-1,q=f.length;++F<q;){var Z=f[F],se=E?E(y[Z],u[Z],Z,y,u):n;se===n&&(se=u[Z]),I?Bi(y,Z,se):$s(y,Z,se)}return y}function _c(u,f){return yi(u,bi(u),f)}function dy(u,f){return yi(u,Dm(u),f)}function Ic(u,f){return function(y,E){var I=st(y)?nd:$r,F=f?f():{};return I(y,u,qe(E,2),F)}}function Oa(u){return ut(function(f,y){var E=-1,I=y.length,F=I>1?y[I-1]:n,q=I>2?y[2]:n;for(F=u.length>3&&typeof F=="function"?(I--,F):n,q&&lr(y[0],y[1],q)&&(F=I<3?n:F,I=1),f=$t(f);++E<I;){var Z=y[E];Z&&u(f,Z,E,F)}return f})}function Zr(u,f){return function(y,E){if(y==null)return y;if(!ni(y))return u(y,E);for(var I=y.length,F=f?I:-1,q=$t(y);(f?F--:++F<I)&&E(q[F],F,q)!==!1;);return y}}function $c(u){return function(f,y,E){for(var I=-1,F=$t(f),q=E(f),Z=q.length;Z--;){var se=q[u?Z:++I];if(y(F[se],se,F)===!1)break}return f}}function Ac(u,f,y){var E=f&T,I=za(u);function F(){var q=this&&this!==qt&&this instanceof F?I:u;return q.apply(E?y:this,arguments)}return F}function Fd(u){return function(f){f=At(f);var y=ya(f)?_r(f):n,E=y?y[0]:f.charAt(0),I=y?bo(y,1).join(""):f.slice(1);return E[u]()+I}}function Ns(u){return function(f){return od(e1(Zw(f).replace(Gv,"")),u,"")}}function za(u){return function(){var f=arguments;switch(f.length){case 0:return new u;case 1:return new u(f[0]);case 2:return new u(f[0],f[1]);case 3:return new u(f[0],f[1],f[2]);case 4:return new u(f[0],f[1],f[2],f[3]);case 5:return new u(f[0],f[1],f[2],f[3],f[4]);case 6:return new u(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new u(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var y=Ta(u.prototype),E=u.apply(y,f);return dn(E)?E:y}}function Od(u,f,y){var E=za(u);function I(){for(var F=arguments.length,q=fe(F),Z=F,se=xo(I);Z--;)q[Z]=arguments[Z];var ge=F<3&&q[0]!==se&&q[F-1]!==se?[]:Kr(q,se);if(F-=ge.length,F<y)return ar(u,f,ja,I.placeholder,n,q,ge,n,n,y-F);var ve=this&&this!==qt&&this instanceof I?E:u;return ir(ve,this,q)}return I}function Fs(u){return function(f,y,E){var I=$t(f);if(!ni(f)){var F=qe(y,3);f=Qn(f),y=function(Z){return F(I[Z],Z,I)}}var q=u(f,y,E);return q>-1?I[F?f[q]:q]:n}}function Rc(u){return qi(function(f){var y=f.length,E=y,I=Wn.prototype.thru;for(u&&f.reverse();E--;){var F=f[E];if(typeof F!="function")throw new Wr(a);if(I&&!q&&Ba(F)=="wrapper")var q=new Wn([],!0)}for(E=q?E:y;++E<y;){F=f[E];var Z=Ba(F),se=Z=="wrapper"?Dc(F):n;se&&Xl(se[0])&&se[1]==(Y|M|j|te)&&!se[4].length&&se[9]==1?q=q[Ba(se[0])].apply(q,se[3]):q=F.length==1&&Xl(F)?q[Z]():q.thru(F)}return function(){var ge=arguments,ve=ge[0];if(q&&ge.length==1&&st(ve))return q.plant(ve).value();for(var we=0,$e=y?f[we].apply(this,ge):ve;++we<y;)$e=f[we].call(this,$e);return $e}})}function ja(u,f,y,E,I,F,q,Z,se,ge){var ve=f&Y,we=f&T,$e=f&_,Ke=f&(M|O),Ze=f&ie,dt=$e?n:za(u);function et(){for(var gt=arguments.length,xt=fe(gt),Pi=gt;Pi--;)xt[Pi]=arguments[Pi];if(Ke)var Mr=xo(et),Ti=nm(xt,Mr);if(E&&(xt=$m(xt,E,I,Ke)),F&&(xt=Nd(xt,F,q,Ke)),gt-=Ti,Ke&&gt<ge){var kn=Kr(xt,Mr);return ar(u,f,ja,et.placeholder,y,xt,kn,Z,se,ge-gt)}var Co=we?y:this,Hs=$e?Co[u]:u;return gt=xt.length,Z?xt=xi(xt,Z):Ze&&gt>1&&xt.reverse(),ve&&se<gt&&(xt.length=se),this&&this!==qt&&this instanceof et&&(Hs=dt||za(Hs)),Hs.apply(Co,xt)}return et}function Am(u,f){return function(y,E){return mo(y,u,f(E),{})}}function Ul(u,f){return function(y,E){var I;if(y===n&&E===n)return f;if(y!==n&&(I=y),E!==n){if(I===n)return E;typeof y=="string"||typeof E=="string"?(y=yr(y),E=yr(E)):(y=Ad(y),E=Ad(E)),I=u(y,E)}return I}}function Lc(u){return qi(function(f){return f=Lt(f,Tr(qe())),ut(function(y){var E=this;return u(f,function(I){return ir(I,E,y)})})})}function Kl(u,f){f=f===n?" ":yr(f);var y=f.length;if(y<2)return y?Ms(f,u):f;var E=Ms(f,Es(u/ks(f)));return ya(f)?bo(_r(E),0,u).join(""):E.slice(0,u)}function Rm(u,f,y,E){var I=f&T,F=za(u);function q(){for(var Z=-1,se=arguments.length,ge=-1,ve=E.length,we=fe(ve+se),$e=this&&this!==qt&&this instanceof q?F:u;++ge<ve;)we[ge]=E[ge];for(;se--;)we[ge++]=arguments[++Z];return ir($e,I?y:this,we)}return q}function zd(u){return function(f,y,E){return E&&typeof E!="number"&&lr(f,y,E)&&(y=E=n),f=Ws(f),y===n?(y=f,f=0):y=Ws(y),E=E===n?f<y?1:-1:Ws(E),zl(f,y,E,u)}}function Mc(u){return function(f,y){return typeof f=="string"&&typeof y=="string"||(f=Xi(f),y=Xi(y)),u(f,y)}}function ar(u,f,y,E,I,F,q,Z,se,ge){var ve=f&M,we=ve?q:n,$e=ve?n:q,Ke=ve?F:n,Ze=ve?n:F;f|=ve?j:$,f&=~(ve?$:j),f&A||(f&=-4);var dt=[u,f,I,Ke,we,Ze,$e,Z,se,ge],et=y.apply(n,dt);return Xl(u)&&Yd(et,dt),et.placeholder=E,Xd(et,u,f)}function Fn(u){var f=hn[u];return function(y,E){if(y=Xi(y),E=E==null?0:Kn(ct(E),292),E&&Sa(y)){var I=(At(y)+"e").split("e"),F=f(I[0]+"e"+(+I[1]+E));return I=(At(F)+"e").split("e"),+(I[0]+"e"+(+I[1]-E))}return f(y)}}var Lm=Bo&&1/zo(new Bo([,-0]))[1]==X?function(u){return new Bo(u)}:jy;function jd(u){return function(f){var y=On(f);return y==pt?Qu(f):y==_t?oy(f):ny(f,u(f))}}function Gi(u,f,y,E,I,F,q,Z){var se=f&_;if(!se&&typeof u!="function")throw new Wr(a);var ge=E?E.length:0;if(ge||(f&=-97,E=I=n),q=q===n?q:mn(ct(q),0),Z=Z===n?Z:ct(Z),ge-=I?I.length:0,f&$){var ve=E,we=I;E=I=n}var $e=se?n:Dc(u),Ke=[u,f,y,E,I,ve,we,F,q,Z];if($e&&zm(Ke,$e),u=Ke[0],f=Ke[1],y=Ke[2],E=Ke[3],I=Ke[4],Z=Ke[9]=Ke[9]===n?se?0:u.length:mn(Ke[9]-ge,0),!Z&&f&(M|O)&&(f&=-25),!f||f==T)var Ze=Ac(u,f,y);else f==M||f==O?Ze=Od(u,f,Z):(f==j||f==(T|j))&&!I.length?Ze=Rm(u,f,y,E):Ze=ja.apply(n,Ke);var dt=$e?kc:Yd;return Xd(dt(Ze,Ke),u,f)}function Bd(u,f,y,E){return u===n||ko(u,Ni[y])&&!St.call(E,y)?f:u}function Vd(u,f,y,E,I,F){return dn(u)&&dn(f)&&(F.set(f,u),Ls(u,f,n,Vd,F),F.delete(f)),u}function Ud(u){return dp(u)?n:u}function Kd(u,f,y,E,I,F){var q=y&k,Z=u.length,se=f.length;if(Z!=se&&!(q&&se>Z))return!1;var ge=F.get(u),ve=F.get(f);if(ge&&ve)return ge==f&&ve==u;var we=-1,$e=!0,Ke=y&P?new Ts:n;for(F.set(u,f),F.set(f,u);++we<Z;){var Ze=u[we],dt=f[we];if(E)var et=q?E(dt,Ze,we,f,u,F):E(Ze,dt,we,u,f,F);if(et!==n){if(et)continue;$e=!1;break}if(Ke){if(!sd(f,function(gt,xt){if(!ao(Ke,xt)&&(Ze===gt||I(Ze,gt,y,E,F)))return Ke.push(xt)})){$e=!1;break}}else if(!(Ze===dt||I(Ze,dt,y,E,F))){$e=!1;break}}return F.delete(u),F.delete(f),$e}function Wd(u,f,y,E,I,F,q){switch(y){case ze:if(u.byteLength!=f.byteLength||u.byteOffset!=f.byteOffset)return!1;u=u.buffer,f=f.buffer;case Se:return!(u.byteLength!=f.byteLength||!F(new Pl(u),new Pl(f)));case Ne:case _e:case Kt:return ko(+u,+f);case at:return u.name==f.name&&u.message==f.message;case ln:case Rt:return u==f+"";case pt:var Z=Qu;case _t:var se=E&k;if(Z||(Z=zo),u.size!=f.size&&!se)return!1;var ge=q.get(u);if(ge)return ge==f;E|=P,q.set(u,f);var ve=Kd(Z(u),Z(f),E,I,F,q);return q.delete(u),ve;case _n:if(Ir)return Ir.call(u)==Ir.call(f)}return!1}function Mm(u,f,y,E,I,F){var q=y&k,Z=Wl(u),se=Z.length,ge=Wl(f),ve=ge.length;if(se!=ve&&!q)return!1;for(var we=se;we--;){var $e=Z[we];if(!(q?$e in f:St.call(f,$e)))return!1}var Ke=F.get(u),Ze=F.get(f);if(Ke&&Ze)return Ke==f&&Ze==u;var dt=!0;F.set(u,f),F.set(f,u);for(var et=q;++we<se;){$e=Z[we];var gt=u[$e],xt=f[$e];if(E)var Pi=q?E(xt,gt,$e,f,u,F):E(gt,xt,$e,u,f,F);if(!(Pi===n?gt===xt||I(gt,xt,y,E,F):Pi)){dt=!1;break}et||(et=$e=="constructor")}if(dt&&!et){var Mr=u.constructor,Ti=f.constructor;Mr!=Ti&&"constructor"in u&&"constructor"in f&&!(typeof Mr=="function"&&Mr instanceof Mr&&typeof Ti=="function"&&Ti instanceof Ti)&&(dt=!1)}return F.delete(u),F.delete(f),dt}function qi(u){return Rr(zc(u,n,Vc),u+"")}function Wl(u){return vc(u,Qn,bi)}function Hl(u){return vc(u,ri,Dm)}var Dc=lc?function(u){return lc.get(u)}:jy;function Ba(u){for(var f=u.name+"",y=Ea[f],E=St.call(Ea,f)?y.length:0;E--;){var I=y[E],F=I.func;if(F==null||F==u)return I.name}return f}function xo(u){var f=St.call(N,"placeholder")?N:u;return f.placeholder}function qe(){var u=N.iteratee||Oy;return u=u===Oy?La:u,arguments.length?u(arguments[0],arguments[1]):u}function Gl(u,f){var y=u.__data__;return Va(f)?y[typeof f=="string"?"string":"hash"]:y.map}function ql(u){for(var f=Qn(u),y=f.length;y--;){var E=f[y],I=u[E];f[y]=[E,I,Ql(I)]}return f}function Xo(u,f){var y=va(u,f);return kd(y)?y:n}function Nc(u){var f=St.call(u,Cs),y=u[Cs];try{u[Cs]=n;var E=!0}catch{}var I=Cl.call(u);return E&&(f?u[Cs]=y:delete u[Cs]),I}var bi=oc?function(u){return u==null?[]:(u=$t(u),Fo(oc(u),function(f){return rc.call(u,f)}))}:By,Dm=oc?function(u){for(var f=[];u;)Oo(f,bi(u)),u=gi(u);return f}:By,On=Nn;(Il&&On(new Il(new ArrayBuffer(1)))!=ze||Ps&&On(new Ps)!=pt||$l&&On($l.resolve())!=Wt||Bo&&On(new Bo)!=_t||Al&&On(new Al)!=Nt)&&(On=function(u){var f=Nn(u),y=f==it?u.constructor:n,E=y?Qo(y):"";if(E)switch(E){case vd:return ze;case Vo:return pt;case hm:return Wt;case Pa:return _t;case Fi:return Nt}return f});function Hd(u,f,y){for(var E=-1,I=y.length;++E<I;){var F=y[E],q=F.size;switch(F.type){case"drop":u+=q;break;case"dropRight":f-=q;break;case"take":f=Kn(f,u+q);break;case"takeRight":u=mn(u,f-q);break}}return{start:u,end:f}}function Nm(u){var f=u.match(ua);return f?f[1].split(pl):[]}function Gd(u,f,y){f=Hi(f,u);for(var E=-1,I=f.length,F=!1;++E<I;){var q=Si(f[E]);if(!(F=u!=null&&y(u,q)))break;u=u[q]}return F||++E!=I?F:(I=u==null?0:u.length,!!I&&ng(I)&&Xt(q,I)&&(st(u)||ou(u)))}function Yl(u){var f=u.length,y=new u.constructor(f);return f&&typeof u[0]=="string"&&St.call(u,"index")&&(y.index=u.index,y.input=u.input),y}function zn(u){return typeof u.constructor=="function"&&!wo(u)?Ta(gi(u)):{}}function py(u,f,y){var E=u.constructor;switch(f){case Se:return Vl(u);case Ne:case _e:return new E(+u);case ze:return Pm(u,y);case nt:case lt:case Ht:case Vn:case Zt:case Pt:case Pr:case Ft:case nr:return Im(u,y);case pt:return new E;case Kt:case Rt:return new E(u);case ln:return Tm(u);case _t:return new E;case _n:return _m(u)}}function hy(u,f){var y=f.length;if(!y)return u;var E=y-1;return f[E]=(y>1?"& ":"")+f[E],f=f.join(y>2?", ":" "),u.replace(la,`{
25
25
  /* [wrapped with `+f+`] */
26
26
  `)}function Fc(u){return st(u)||ou(u)||!!(fm&&u&&u[fm])}function Xt(u,f){var y=typeof u;return f=f??V,!!f&&(y=="number"||y!="symbol"&&Mh.test(u))&&u>-1&&u%1==0&&u<f}function lr(u,f,y){if(!dn(y))return!1;var E=typeof f;return(E=="number"?ni(y)&&Xt(f,y.length):E=="string"&&f in y)?ko(y[f],u):!1}function Me(u,f){if(st(u))return!1;var y=typeof u;return y=="number"||y=="symbol"||y=="boolean"||u==null||Ei(u)?!0:en.test(u)||!fl.test(u)||f!=null&&u in $t(f)}function Va(u){var f=typeof u;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?u!=="__proto__":u===null}function Xl(u){var f=Ba(u),y=N[f];if(typeof y!="function"||!(f in ot.prototype))return!1;if(u===y)return!0;var E=Dc(y);return!!E&&u===E[0]}function Fm(u){return!!ec&&ec in u}var my=xa?Ks:Vy;function wo(u){var f=u&&u.constructor,y=typeof f=="function"&&f.prototype||Ni;return u===y}function Ql(u){return u===u&&!dn(u)}function Oc(u,f){return function(y){return y==null?!1:y[u]===f&&(f!==n||u in $t(y))}}function Om(u){var f=ce(u,function(E){return y.size===h&&y.clear(),E}),y=f.cache;return f}function zm(u,f){var y=u[1],E=f[1],I=y|E,F=I<(T|_|Y),q=E==Y&&y==M||E==Y&&y==te&&u[7].length<=f[8]||E==(Y|te)&&f[7].length<=f[8]&&y==M;if(!(F||q))return u;E&T&&(u[2]=f[2],I|=y&T?0:A);var Z=f[3];if(Z){var se=u[3];u[3]=se?$m(se,Z,f[4]):Z,u[4]=se?Kr(u[3],m):f[4]}return Z=f[5],Z&&(se=u[5],u[5]=se?Nd(se,Z,f[6]):Z,u[6]=se?Kr(u[5],m):f[6]),Z=f[7],Z&&(u[7]=Z),E&Y&&(u[8]=u[8]==null?f[8]:Kn(u[8],f[8])),u[9]==null&&(u[9]=f[9]),u[0]=f[0],u[1]=I,u}function jm(u){var f=[];if(u!=null)for(var y in $t(u))f.push(y);return f}function qd(u){return Cl.call(u)}function zc(u,f,y){return f=mn(f===n?u.length-1:f,0),function(){for(var E=arguments,I=-1,F=mn(E.length-f,0),q=fe(F);++I<F;)q[I]=E[f+I];I=-1;for(var Z=fe(f+1);++I<f;)Z[I]=E[I];return Z[f]=y(q),ir(u,this,Z)}}function In(u,f){return f.length<2?u:ho(u,Xn(f,0,-1))}function xi(u,f){for(var y=u.length,E=Kn(f.length,y),I=sr(u);E--;){var F=f[E];u[E]=Xt(F,y)?I[F]:n}return u}function Yi(u,f){if(!(f==="constructor"&&typeof u[f]=="function")&&f!="__proto__")return u[f]}var Yd=wi(kc),Ua=md||function(u,f){return qt.setTimeout(u,f)},Rr=wi(Wi);function Xd(u,f,y){var E=f+"";return Rr(u,hy(E,Bm(Nm(E),y)))}function wi(u){var f=0,y=0;return function(){var E=cy(),I=ee-(E-y);if(y=E,I>0){if(++f>=G)return arguments[0]}else f=0;return u.apply(n,arguments)}}function jc(u,f){var y=-1,E=u.length,I=E-1;for(f=f===n?E:f;++y<f;){var F=Ma(y,I),q=u[F];u[F]=u[y],u[y]=q}return u.length=f,u}var Qd=Om(function(u){var f=[];return u.charCodeAt(0)===46&&f.push(""),u.replace(gs,function(y,E,I,F){f.push(I?F.replace(Hf,"$1"):E||y)}),f});function Si(u){if(typeof u=="string"||Ei(u))return u;var f=u+"";return f=="0"&&1/u==-X?"-0":f}function Qo(u){if(u!=null){try{return kl.call(u)}catch{}try{return u+""}catch{}}return""}function Bm(u,f){return Un(me,function(y){var E="_."+y[0];f&y[1]&&!qu(u,E)&&u.push(E)}),u.sort()}function Vm(u){if(u instanceof ot)return u.clone();var f=new Wn(u.__wrapped__,u.__chain__);return f.__actions__=sr(u.__actions__),f.__index__=u.__index__,f.__values__=u.__values__,f}function Bc(u,f,y){(y?lr(u,f,y):f===n)?f=1:f=mn(ct(f),0);var E=u==null?0:u.length;if(!E||f<1)return[];for(var I=0,F=0,q=fe(Es(E/f));I<E;)q[F++]=Xn(u,I,I+=f);return q}function Jd(u){for(var f=-1,y=u==null?0:u.length,E=0,I=[];++f<y;){var F=u[f];F&&(I[E++]=F)}return I}function ei(){var u=arguments.length;if(!u)return[];for(var f=fe(u-1),y=arguments[0],E=u;E--;)f[E-1]=arguments[E];return Oo(st(y)?sr(y):[y],sn(f,1))}var bt=ut(function(u,f){return Sn(u)?Vi(u,sn(f,1,Sn,!0)):[]}),$n=ut(function(u,f){var y=ur(f);return Sn(y)&&(y=n),Sn(u)?Vi(u,sn(f,1,Sn,!0),qe(y,2)):[]}),gn=ut(function(u,f){var y=ur(f);return Sn(y)&&(y=n),Sn(u)?Vi(u,sn(f,1,Sn,!0),n,y):[]});function jn(u,f,y){var E=u==null?0:u.length;return E?(f=y||f===n?1:ct(f),Xn(u,f<0?0:f,E)):[]}function Lr(u,f,y){var E=u==null?0:u.length;return E?(f=y||f===n?1:ct(f),f=E-f,Xn(u,0,f<0?0:f)):[]}function Ka(u,f){return u&&u.length?jl(u,qe(f,3),!0,!0):[]}function wn(u,f){return u&&u.length?jl(u,qe(f,3),!0):[]}function Jl(u,f,y,E){var I=u==null?0:u.length;return I?(y&&typeof y!="number"&&lr(u,f,y)&&(y=0,E=I),Sm(u,f,y,E)):[]}function Jo(u,f,y){var E=u==null?0:u.length;if(!E)return-1;var I=y==null?0:ct(y);return I<0&&(I=mn(E+I,0)),Yu(u,qe(f,3),I)}function Zl(u,f,y){var E=u==null?0:u.length;if(!E)return-1;var I=E-1;return y!==n&&(I=ct(y),I=y<0?mn(E+I,0):Kn(I,E-1)),Yu(u,qe(f,3),I,!0)}function Vc(u){var f=u==null?0:u.length;return f?sn(u,1):[]}function eu(u){var f=u==null?0:u.length;return f?sn(u,X):[]}function br(u,f){var y=u==null?0:u.length;return y?(f=f===n?1:ct(f),sn(u,f)):[]}function Zd(u){for(var f=-1,y=u==null?0:u.length,E={};++f<y;){var I=u[f];E[I[0]]=I[1]}return E}function Os(u){return u&&u.length?u[0]:n}function So(u,f,y){var E=u==null?0:u.length;if(!E)return-1;var I=y==null?0:ct(y);return I<0&&(I=mn(E+I,0)),ga(u,f,I)}function Uc(u){var f=u==null?0:u.length;return f?Xn(u,0,-1):[]}var ep=ut(function(u){var f=Lt(u,Fa);return f.length&&f[0]===u[0]?yc(f):[]}),Zo=ut(function(u){var f=ur(u),y=Lt(u,Fa);return f===ur(y)?f=n:y.pop(),y.length&&y[0]===u[0]?yc(y,qe(f,2)):[]}),Kc=ut(function(u){var f=ur(u),y=Lt(u,Fa);return f=typeof f=="function"?f:n,f&&y.pop(),y.length&&y[0]===u[0]?yc(y,n,f):[]});function es(u,f){return u==null?"":sc.call(u,f)}function ur(u){var f=u==null?0:u.length;return f?u[f-1]:n}function tu(u,f,y){var E=u==null?0:u.length;if(!E)return-1;var I=E;return y!==n&&(I=ct(y),I=I<0?mn(E+I,0):Kn(I,E-1)),f===f?sy(u,f,I):Yu(u,Qh,I,!0)}function tp(u,f){return u&&u.length?Sc(u,ct(f)):n}var Wc=ut(nu);function nu(u,f){return u&&u.length&&f&&f.length?cn(u,f):u}function cr(u,f,y){return u&&u.length&&f&&f.length?cn(u,f,qe(y,2)):u}function ts(u,f,y){return u&&u.length&&f&&f.length?cn(u,f,n,y):u}var ki=qi(function(u,f){var y=u==null?0:u.length,E=mc(u,f);return xn(u,Lt(f,function(I){return Xt(I,y)?+I:I}).sort(Dd)),E});function xr(u,f){var y=[];if(!(u&&u.length))return y;var E=-1,I=[],F=u.length;for(f=qe(f,3);++E<F;){var q=u[E];f(q,E,u)&&(y.push(q),I.push(E))}return xn(u,I),y}function Hc(u){return u==null?u:ac.call(u)}function np(u,f,y){var E=u==null?0:u.length;return E?(y&&typeof y!="number"&&lr(u,f,y)?(f=0,y=E):(f=f==null?0:ct(f),y=y===n?E:ct(y)),Xn(u,f,y)):[]}function rp(u,f){return Da(u,f)}function gy(u,f,y){return Cc(u,f,qe(y,2))}function ns(u,f){var y=u==null?0:u.length;if(y){var E=Da(u,f);if(E<y&&ko(u[E],f))return E}return-1}function Um(u,f){return Da(u,f,!0)}function ip(u,f,y){return Cc(u,f,qe(y,2),!0)}function zs(u,f){var y=u==null?0:u.length;if(y){var E=Da(u,f,!0)-1;if(ko(u[E],f))return E}return-1}function op(u){return u&&u.length?$d(u):[]}function js(u,f){return u&&u.length?$d(u,qe(f,2)):[]}function Km(u){var f=u==null?0:u.length;return f?Xn(u,1,f):[]}function Wm(u,f,y){return u&&u.length?(f=y||f===n?1:ct(f),Xn(u,0,f<0?0:f)):[]}function sp(u,f,y){var E=u==null?0:u.length;return E?(f=y||f===n?1:ct(f),f=E-f,Xn(u,f<0?0:f,E)):[]}function Gc(u,f){return u&&u.length?jl(u,qe(f,3),!1,!0):[]}function vy(u,f){return u&&u.length?jl(u,qe(f,3)):[]}var yy=ut(function(u){return yo(sn(u,1,Sn,!0))}),Hm=ut(function(u){var f=ur(u);return Sn(f)&&(f=n),yo(sn(u,1,Sn,!0),qe(f,2))}),Gm=ut(function(u){var f=ur(u);return f=typeof f=="function"?f:n,yo(sn(u,1,Sn,!0),n,f)});function Bs(u){return u&&u.length?yo(u):[]}function by(u,f){return u&&u.length?yo(u,qe(f,2)):[]}function Wa(u,f){return f=typeof f=="function"?f:n,u&&u.length?yo(u,n,f):[]}function qc(u){if(!(u&&u.length))return[];var f=0;return u=Fo(u,function(y){if(Sn(y))return f=mn(y.length,f),!0}),cd(f,function(y){return Lt(u,ld(y))})}function nn(u,f){if(!(u&&u.length))return[];var y=qc(u);return f==null?y:Lt(y,function(E){return ir(f,n,E)})}var xy=ut(function(u,f){return Sn(u)?Vi(u,f):[]}),qm=ut(function(u){return Pc(Fo(u,Sn))}),wy=ut(function(u){var f=ur(u);return Sn(f)&&(f=n),Pc(Fo(u,Sn),qe(f,2))}),Sy=ut(function(u){var f=ur(u);return f=typeof f=="function"?f:n,Pc(Fo(u,Sn),n,f)}),Ym=ut(qc);function Xm(u,f){return Bl(u||[],f||[],$s)}function ky(u,f){return Bl(u||[],f||[],Ds)}var ti=ut(function(u){var f=u.length,y=f>1?u[f-1]:n;return y=typeof y=="function"?(u.pop(),y):n,nn(u,y)});function Yc(u){var f=N(u);return f.__chain__=!0,f}function Cy(u,f){return f(u),u}function Ci(u,f){return f(u)}var Xc=qi(function(u){var f=u.length,y=f?u[0]:0,E=this.__wrapped__,I=function(F){return mc(F,u)};return f>1||this.__actions__.length||!(E instanceof ot)||!Xt(y)?this.thru(I):(E=E.slice(y,+y+(f?1:0)),E.__actions__.push({func:Ci,args:[I],thisArg:n}),new Wn(E,this.__chain__).thru(function(F){return f&&!F.length&&F.push(n),F}))});function Vs(){return Yc(this)}function Qc(){return new Wn(this.value(),this.__chain__)}function ap(){this.__values__===n&&(this.__values__=Kw(this.value()));var u=this.__index__>=this.__values__.length,f=u?n:this.__values__[this.__index__++];return{done:u,value:f}}function lp(){return this}function Ey(u){for(var f,y=this;y instanceof Oi;){var E=Vm(y);E.__index__=0,E.__values__=n,f?I.__wrapped__=E:f=E;var I=E;y=y.__wrapped__}return I.__wrapped__=u,f}function up(){var u=this.__wrapped__;if(u instanceof ot){var f=u;return this.__actions__.length&&(f=new ot(this)),f=f.reverse(),f.__actions__.push({func:Ci,args:[Hc],thisArg:n}),new Wn(f,this.__chain__)}return this.thru(Hc)}function Py(){return Na(this.__wrapped__,this.__actions__)}var Qm=Ic(function(u,f,y){St.call(u,y)?++u[y]:Bi(u,y,1)});function Jm(u,f,y){var E=st(u)?rd:Ml;return y&&lr(u,f,y)&&(f=n),E(u,qe(f,3))}function Jc(u,f){var y=st(u)?Fo:wd;return y(u,qe(f,3))}var Zc=Fs(Jo),Zm=Fs(Zl);function cp(u,f){return sn(Us(u,f),1)}function Ty(u,f){return sn(Us(u,f),X)}function eg(u,f,y){return y=y===n?1:ct(y),sn(Us(u,f),y)}function ef(u,f){var y=st(u)?Un:Ui;return y(u,qe(f,3))}function ru(u,f){var y=st(u)?Gu:wm;return y(u,qe(f,3))}var fp=Ic(function(u,f,y){St.call(u,y)?u[y].push(f):Bi(u,y,[f])});function tf(u,f,y,E){u=ni(u)?u:of(u),y=y&&!E?ct(y):0;var I=u.length;return y<0&&(y=mn(I+y,0)),rg(u)?y<=I&&u.indexOf(f,y)>-1:!!I&&ga(u,f,y)>-1}var tg=ut(function(u,f,y){var E=-1,I=typeof f=="function",F=ni(u)?fe(u.length):[];return Ui(u,function(q){F[++E]=I?ir(f,q,y):Xr(q,f,y)}),F}),_y=Ic(function(u,f,y){Bi(u,y,f)});function Us(u,f){var y=st(u)?Lt:Ed;return y(u,qe(f,3))}function Iy(u,f,y,E){return u==null?[]:(st(f)||(f=f==null?[]:[f]),y=E?n:y,st(y)||(y=y==null?[]:[y]),Ol(u,f,y))}var iu=Ic(function(u,f,y){u[y?0:1].push(f)},function(){return[[],[]]});function $y(u,f,y){var E=st(u)?od:Zh,I=arguments.length<3;return E(u,qe(f,4),y,I,Ui)}function nf(u,f,y){var E=st(u)?Jv:Zh,I=arguments.length<3;return E(u,qe(f,4),y,I,wm)}function o(u,f){var y=st(u)?Fo:wd;return y(u,Ee(qe(f,3)))}function l(u){var f=st(u)?ji:Yn;return f(u)}function p(u,f,y){(y?lr(u,f,y):f===n)?f=1:f=ct(f);var E=st(u)?Is:_d;return E(u,f)}function v(u){var f=st(u)?bm:Jr;return f(u)}function w(u){if(u==null)return 0;if(ni(u))return rg(u)?ks(u):u.length;var f=On(u);return f==pt||f==_t?u.size:vo(u).length}function C(u,f,y){var E=st(u)?sd:Id;return y&&lr(u,f,y)&&(f=n),E(u,qe(f,3))}var L=ut(function(u,f){if(u==null)return[];var y=f.length;return y>1&&lr(u,f[0],f[1])?f=[]:y>2&&lr(f[0],f[1],f[2])&&(f=[f[0]]),Ol(u,sn(f,1),[])}),K=Ot||function(){return qt.Date.now()};function Q(u,f){if(typeof f!="function")throw new Wr(a);return u=ct(u),function(){if(--u<1)return f.apply(this,arguments)}}function de(u,f,y){return f=y?n:f,f=u&&f==null?u.length:f,Gi(u,Y,n,n,n,n,f)}function xe(u,f){var y;if(typeof f!="function")throw new Wr(a);return u=ct(u),function(){return--u>0&&(y=f.apply(this,arguments)),u<=1&&(f=n),y}}var ke=ut(function(u,f,y){var E=T;if(y.length){var I=Kr(y,xo(ke));E|=j}return Gi(u,E,f,y,I)}),be=ut(function(u,f,y){var E=T|_;if(y.length){var I=Kr(y,xo(be));E|=j}return Gi(f,E,u,y,I)});function Le(u,f,y){f=y?n:f;var E=Gi(u,M,n,n,n,n,n,f);return E.placeholder=Le.placeholder,E}function De(u,f,y){f=y?n:f;var E=Gi(u,O,n,n,n,n,n,f);return E.placeholder=De.placeholder,E}function Fe(u,f,y){var E,I,F,q,Z,se,ge=0,ve=!1,we=!1,$e=!0;if(typeof u!="function")throw new Wr(a);f=Xi(f)||0,dn(y)&&(ve=!!y.leading,we="maxWait"in y,F=we?mn(Xi(y.maxWait)||0,f):F,$e="trailing"in y?!!y.trailing:$e);function Ke(kn){var Co=E,Hs=I;return E=I=n,ge=kn,q=u.apply(Hs,Co),q}function Ze(kn){return ge=kn,Z=Ua(gt,f),ve?Ke(kn):q}function dt(kn){var Co=kn-se,Hs=kn-ge,r1=f-Co;return we?Kn(r1,F-Hs):r1}function et(kn){var Co=kn-se,Hs=kn-ge;return se===n||Co>=f||Co<0||we&&Hs>=F}function gt(){var kn=K();if(et(kn))return xt(kn);Z=Ua(gt,dt(kn))}function xt(kn){return Z=n,$e&&E?Ke(kn):(E=I=n,q)}function Pi(){Z!==n&&Ld(Z),ge=0,E=se=I=Z=n}function Mr(){return Z===n?q:xt(K())}function Ti(){var kn=K(),Co=et(kn);if(E=arguments,I=this,se=kn,Co){if(Z===n)return Ze(se);if(we)return Ld(Z),Z=Ua(gt,f),Ke(se)}return Z===n&&(Z=Ua(gt,f)),q}return Ti.cancel=Pi,Ti.flush=Mr,Ti}var fn=ut(function(u,f){return xd(u,1,f)}),ue=ut(function(u,f,y){return xd(u,Xi(f)||0,y)});function ne(u){return Gi(u,ie)}function ce(u,f){if(typeof u!="function"||f!=null&&typeof f!="function")throw new Wr(a);var y=function(){var E=arguments,I=f?f.apply(this,E):E[0],F=y.cache;if(F.has(I))return F.get(I);var q=u.apply(this,E);return y.cache=F.set(I,q)||F,q};return y.cache=new(ce.Cache||Hr),y}ce.Cache=Hr;function Ee(u){if(typeof u!="function")throw new Wr(a);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}function Ve(u){return xe(2,u)}var Ge=Em(function(u,f){f=f.length==1&&st(f[0])?Lt(f[0],Tr(qe())):Lt(sn(f,1),Tr(qe()));var y=f.length;return ut(function(E){for(var I=-1,F=Kn(E.length,y);++I<F;)E[I]=f[I].call(this,E[I]);return ir(u,this,E)})}),We=ut(function(u,f){var y=Kr(f,xo(We));return Gi(u,j,n,f,y)}),Je=ut(function(u,f){var y=Kr(f,xo(Je));return Gi(u,$,n,f,y)}),An=qi(function(u,f){return Gi(u,te,n,n,n,f)});function kt(u,f){if(typeof u!="function")throw new Wr(a);return f=f===n?f:ct(f),ut(u,f)}function rs(u,f){if(typeof u!="function")throw new Wr(a);return f=f==null?0:mn(ct(f),0),ut(function(y){var E=y[f],I=bo(y,0,f);return E&&Oo(I,E),ir(u,this,I)})}function Ay(u,f,y){var E=!0,I=!0;if(typeof u!="function")throw new Wr(a);return dn(y)&&(E="leading"in y?!!y.leading:E,I="trailing"in y?!!y.trailing:I),Fe(u,f,{leading:E,maxWait:f,trailing:I})}function j$(u){return de(u,1)}function B$(u,f){return We(Tc(f),u)}function V$(){if(!arguments.length)return[];var u=arguments[0];return st(u)?u:[u]}function U$(u){return vr(u,x)}function K$(u,f){return f=typeof f=="function"?f:n,vr(u,x,f)}function W$(u){return vr(u,g|x)}function H$(u,f){return f=typeof f=="function"?f:n,vr(u,g|x,f)}function G$(u,f){return f==null||Ll(u,f,Qn(f))}function ko(u,f){return u===f||u!==u&&f!==f}var q$=Mc(Go),Y$=Mc(function(u,f){return u>=f}),ou=bc((function(){return arguments})())?bc:function(u){return vn(u)&&St.call(u,"callee")&&!rc.call(u,"callee")},st=fe.isArray,X$=td?Tr(td):km;function ni(u){return u!=null&&ng(u.length)&&!Ks(u)}function Sn(u){return vn(u)&&ni(u)}function Q$(u){return u===!0||u===!1||vn(u)&&Nn(u)==Ne}var Ha=gd||Vy,J$=pr?Tr(pr):go;function Z$(u){return vn(u)&&u.nodeType===1&&!dp(u)}function eA(u){if(u==null)return!0;if(ni(u)&&(st(u)||typeof u=="string"||typeof u.splice=="function"||Ha(u)||rf(u)||ou(u)))return!u.length;var f=On(u);if(f==pt||f==_t)return!u.size;if(wo(u))return!vo(u).length;for(var y in u)if(St.call(u,y))return!1;return!0}function tA(u,f){return Qr(u,f)}function nA(u,f,y){y=typeof y=="function"?y:n;var E=y?y(u,f):n;return E===n?Qr(u,f,n,y):!!E}function Ry(u){if(!vn(u))return!1;var f=Nn(u);return f==at||f==Qe||typeof u.message=="string"&&typeof u.name=="string"&&!dp(u)}function rA(u){return typeof u=="number"&&Sa(u)}function Ks(u){if(!dn(u))return!1;var f=Nn(u);return f==Ie||f==mt||f==Oe||f==tr}function jw(u){return typeof u=="number"&&u==ct(u)}function ng(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=V}function dn(u){var f=typeof u;return u!=null&&(f=="object"||f=="function")}function vn(u){return u!=null&&typeof u=="object"}var Bw=Ss?Tr(Ss):Cm;function iA(u,f){return u===f||Ra(u,f,ql(f))}function oA(u,f,y){return y=typeof y=="function"?y:n,Ra(u,f,ql(f),y)}function sA(u){return Vw(u)&&u!=+u}function aA(u){if(my(u))throw new rt(s);return kd(u)}function lA(u){return u===null}function uA(u){return u==null}function Vw(u){return typeof u=="number"||vn(u)&&Nn(u)==Kt}function dp(u){if(!vn(u)||Nn(u)!=it)return!1;var f=gi(u);if(f===null)return!0;var y=St.call(f,"constructor")&&f.constructor;return typeof y=="function"&&y instanceof y&&kl.call(y)==tc}var Ly=Hu?Tr(Hu):Nl;function cA(u){return jw(u)&&u>=-V&&u<=V}var Uw=ma?Tr(ma):Ki;function rg(u){return typeof u=="string"||!st(u)&&vn(u)&&Nn(u)==Rt}function Ei(u){return typeof u=="symbol"||vn(u)&&Nn(u)==_n}var rf=qh?Tr(qh):Fl;function fA(u){return u===n}function dA(u){return vn(u)&&On(u)==Nt}function pA(u){return vn(u)&&Nn(u)==pe}var hA=Mc(qo),mA=Mc(function(u,f){return u<=f});function Kw(u){if(!u)return[];if(ni(u))return rg(u)?_r(u):sr(u);if(co&&u[co])return iy(u[co]());var f=On(u),y=f==pt?Qu:f==_t?zo:of;return y(u)}function Ws(u){if(!u)return u===0?u:0;if(u=Xi(u),u===X||u===-X){var f=u<0?-1:1;return f*ae}return u===u?u:0}function ct(u){var f=Ws(u),y=f%1;return f===f?y?f-y:f:0}function Ww(u){return u?po(ct(u),0,U):0}function Xi(u){if(typeof u=="number")return u;if(Ei(u))return D;if(dn(u)){var f=typeof u.valueOf=="function"?u.valueOf():u;u=dn(f)?f+"":f}if(typeof u!="string")return u===0?u:+u;u=em(u);var y=Vv.test(u);return y||Lh.test(u)?Ku(u.slice(2),y?2:8):Ah.test(u)?D:+u}function Hw(u){return yi(u,ri(u))}function gA(u){return u?po(ct(u),-V,V):u===0?u:0}function At(u){return u==null?"":yr(u)}var vA=Oa(function(u,f){if(wo(f)||ni(f)){yi(f,Qn(f),u);return}for(var y in f)St.call(f,y)&&$s(u,y,f[y])}),Gw=Oa(function(u,f){yi(f,ri(f),u)}),ig=Oa(function(u,f,y,E){yi(f,ri(f),u,E)}),yA=Oa(function(u,f,y,E){yi(f,Qn(f),u,E)}),bA=qi(mc);function xA(u,f){var y=Ta(u);return f==null?y:jt(y,f)}var wA=ut(function(u,f){u=$t(u);var y=-1,E=f.length,I=E>2?f[2]:n;for(I&&lr(f[0],f[1],I)&&(E=1);++y<E;)for(var F=f[y],q=ri(F),Z=-1,se=q.length;++Z<se;){var ge=q[Z],ve=u[ge];(ve===n||ko(ve,Ni[ge])&&!St.call(u,ge))&&(u[ge]=F[ge])}return u}),SA=ut(function(u){return u.push(n,Vd),ir(qw,n,u)});function kA(u,f){return Xh(u,qe(f,3),Ar)}function CA(u,f){return Xh(u,qe(f,3),Ho)}function EA(u,f){return u==null?u:gc(u,qe(f,3),ri)}function PA(u,f){return u==null?u:Dl(u,qe(f,3),ri)}function TA(u,f){return u&&Ar(u,qe(f,3))}function _A(u,f){return u&&Ho(u,qe(f,3))}function IA(u){return u==null?[]:Aa(u,Qn(u))}function $A(u){return u==null?[]:Aa(u,ri(u))}function My(u,f,y){var E=u==null?n:ho(u,f);return E===n?y:E}function AA(u,f){return u!=null&&Gd(u,f,Yr)}function Dy(u,f){return u!=null&&Gd(u,f,Rs)}var RA=Am(function(u,f,y){f!=null&&typeof f.toString!="function"&&(f=Cl.call(f)),u[f]=y},Fy(ii)),LA=Am(function(u,f,y){f!=null&&typeof f.toString!="function"&&(f=Cl.call(f)),St.call(u,f)?u[f].push(y):u[f]=[y]},qe),MA=ut(Xr);function Qn(u){return ni(u)?zi(u):vo(u)}function ri(u){return ni(u)?zi(u,!0):Cd(u)}function DA(u,f){var y={};return f=qe(f,3),Ar(u,function(E,I,F){Bi(y,f(E,I,F),E)}),y}function NA(u,f){var y={};return f=qe(f,3),Ar(u,function(E,I,F){Bi(y,I,f(E,I,F))}),y}var FA=Oa(function(u,f,y){Ls(u,f,y)}),qw=Oa(function(u,f,y,E){Ls(u,f,y,E)}),OA=qi(function(u,f){var y={};if(u==null)return y;var E=!1;f=Lt(f,function(F){return F=Hi(F,u),E||(E=F.length>1),F}),yi(u,Hl(u),y),E&&(y=vr(y,g|b|x,Ud));for(var I=f.length;I--;)Ec(y,f[I]);return y});function zA(u,f){return Yw(u,Ee(qe(f)))}var jA=qi(function(u,f){return u==null?{}:Td(u,f)});function Yw(u,f){if(u==null)return{};var y=Lt(Hl(u),function(E){return[E]});return f=qe(f),Yo(u,y,function(E,I){return f(E,I[0])})}function BA(u,f,y){f=Hi(f,u);var E=-1,I=f.length;for(I||(I=1,u=n);++E<I;){var F=u==null?n:u[Si(f[E])];F===n&&(E=I,F=y),u=Ks(F)?F.call(u):F}return u}function VA(u,f,y){return u==null?u:Ds(u,f,y)}function UA(u,f,y,E){return E=typeof E=="function"?E:n,u==null?u:Ds(u,f,y,E)}var Xw=jd(Qn),Qw=jd(ri);function KA(u,f,y){var E=st(u),I=E||Ha(u)||rf(u);if(f=qe(f,4),y==null){var F=u&&u.constructor;I?y=E?new F:[]:dn(u)?y=Ks(F)?Ta(gi(u)):{}:y={}}return(I?Un:Ar)(u,function(q,Z,se){return f(y,q,Z,se)}),y}function WA(u,f){return u==null?!0:Ec(u,f)}function HA(u,f,y){return u==null?u:Rd(u,f,Tc(y))}function GA(u,f,y,E){return E=typeof E=="function"?E:n,u==null?u:Rd(u,f,Tc(y),E)}function of(u){return u==null?[]:wl(u,Qn(u))}function qA(u){return u==null?[]:wl(u,ri(u))}function YA(u,f,y){return y===n&&(y=f,f=n),y!==n&&(y=Xi(y),y=y===y?y:0),f!==n&&(f=Xi(f),f=f===f?f:0),po(Xi(u),f,y)}function XA(u,f,y){return f=Ws(f),y===n?(y=f,f=0):y=Ws(y),u=Xi(u),Sd(u,f,y)}function QA(u,f,y){if(y&&typeof y!="boolean"&&lr(u,f,y)&&(f=y=n),y===n&&(typeof f=="boolean"?(y=f,f=n):typeof u=="boolean"&&(y=u,u=n)),u===n&&f===n?(u=0,f=1):(u=Ws(u),f===n?(f=u,u=0):f=Ws(f)),u>f){var E=u;u=f,f=E}if(y||u%1||f%1){var I=_l();return Kn(u+I*(f-u+Zf("1e-"+((I+"").length-1))),f)}return Ma(u,f)}var JA=Ns(function(u,f,y){return f=f.toLowerCase(),u+(y?Jw(f):f)});function Jw(u){return Ny(At(u).toLowerCase())}function Zw(u){return u=At(u),u&&u.replace(Dh,rm).replace(Kh,"")}function ZA(u,f,y){u=At(u),f=yr(f);var E=u.length;y=y===n?E:po(ct(y),0,E);var I=y;return y-=f.length,y>=0&&u.slice(y,I)==f}function eR(u){return u=At(u),u&&Du.test(u)?u.replace(hi,im):u}function tR(u){return u=At(u),u&&Ro.test(u)?u.replace(vs,"\\$&"):u}var nR=Ns(function(u,f,y){return u+(y?"-":"")+f.toLowerCase()}),rR=Ns(function(u,f,y){return u+(y?" ":"")+f.toLowerCase()}),iR=Fd("toLowerCase");function oR(u,f,y){u=At(u),f=ct(f);var E=f?ks(u):0;if(!f||E>=f)return u;var I=(f-E)/2;return Kl(jo(I),y)+u+Kl(Es(I),y)}function sR(u,f,y){u=At(u),f=ct(f);var E=f?ks(u):0;return f&&E<f?u+Kl(f-E,y):u}function aR(u,f,y){u=At(u),f=ct(f);var E=f?ks(u):0;return f&&E<f?Kl(f-E,y)+u:u}function lR(u,f,y){return y||f==null?f=0:f&&(f=+f),pm(At(u).replace(dl,""),f||0)}function uR(u,f,y){return(y?lr(u,f,y):f===n)?f=1:f=ct(f),Ms(At(u),f)}function cR(){var u=arguments,f=At(u[0]);return u.length<3?f:f.replace(u[1],u[2])}var fR=Ns(function(u,f,y){return u+(y?"_":"")+f.toLowerCase()});function dR(u,f,y){return y&&typeof y!="number"&&lr(u,f,y)&&(f=y=n),y=y===n?U:y>>>0,y?(u=At(u),u&&(typeof f=="string"||f!=null&&!Ly(f))&&(f=yr(f),!f&&ya(u))?bo(_r(u),0,y):u.split(f,y)):[]}var pR=Ns(function(u,f,y){return u+(y?" ":"")+Ny(f)});function hR(u,f,y){return u=At(u),y=y==null?0:po(ct(y),0,u.length),f=yr(f),u.slice(y,y+f.length)==f}function mR(u,f,y){var E=N.templateSettings;y&&lr(u,f,y)&&(f=n),u=At(u),f=ig({},f,E,Bd);var I=ig({},f.imports,E.imports,Bd),F=Qn(I),q=wl(I,F),Z,se,ge=0,ve=f.interpolate||Nu,we="__p += '",$e=Sl((f.escape||Nu).source+"|"+ve.source+"|"+(ve===cl?Xe:Nu).source+"|"+(f.evaluate||Nu).source+"|$","g"),Ke="//# sourceURL="+(St.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Yv+"]")+`
@@ -40,7 +40,7 @@ __p += '`),xt&&(we+=`' +
40
40
  function print() { __p += __j.call(arguments, '') }
41
41
  `:`;
42
42
  `)+we+`return __p
43
- }`;var dt=t1(function(){return wt(F,Ke+"return "+we).apply(n,q)});if(dt.source=we,Ry(dt))throw dt;return dt}function gR(u){return At(u).toLowerCase()}function vR(u){return At(u).toUpperCase()}function yR(u,f,y){if(u=At(u),u&&(y||f===n))return em(u);if(!u||!(f=yr(f)))return u;var E=_r(u),I=_r(f),F=tm(E,I),q=fd(E,I)+1;return bo(E,F,q).join("")}function bR(u,f,y){if(u=At(u),u&&(y||f===n))return u.slice(0,Zu(u)+1);if(!u||!(f=yr(f)))return u;var E=_r(u),I=fd(E,_r(f))+1;return bo(E,0,I).join("")}function xR(u,f,y){if(u=At(u),u&&(y||f===n))return u.replace(dl,"");if(!u||!(f=yr(f)))return u;var E=_r(u),I=tm(E,_r(f));return bo(E,I).join("")}function wR(u,f){var y=B,E=W;if(dn(f)){var I="separator"in f?f.separator:I;y="length"in f?ct(f.length):y,E="omission"in f?yr(f.omission):E}u=At(u);var F=u.length;if(ya(u)){var q=_r(u);F=q.length}if(y>=F)return u;var Z=y-ks(E);if(Z<1)return E;var se=q?bo(q,0,Z).join(""):u.slice(0,Z);if(I===n)return se+E;if(q&&(Z+=se.length-Z),Ly(I)){if(u.slice(Z).search(I)){var ge,ve=se;for(I.global||(I=Sl(I.source,At(so.exec(I))+"g")),I.lastIndex=0;ge=I.exec(ve);)var we=ge.index;se=se.slice(0,we===n?Z:we)}}else if(u.indexOf(yr(I),Z)!=Z){var $e=se.lastIndexOf(I);$e>-1&&(se=se.slice(0,$e))}return se+E}function SR(u){return u=At(u),u&&ul.test(u)?u.replace(pi,sm):u}var kR=Ns(function(u,f,y){return u+(y?" ":"")+f.toUpperCase()}),Ny=Fd("toUpperCase");function e1(u,f,y){return u=At(u),f=y?n:f,f===n?ry(u)?ay(u):ey(u):u.match(f)||[]}var t1=ut(function(u,f){try{return ir(u,n,f)}catch(y){return Ry(y)?y:new rt(y)}}),CR=qi(function(u,f){return Un(f,function(y){y=Si(y),Bi(u,y,ke(u[y],u))}),u});function ER(u){var f=u==null?0:u.length,y=qe();return u=f?Lt(u,function(E){if(typeof E[1]!="function")throw new Wr(a);return[y(E[0]),E[1]]}):[],ut(function(E){for(var I=-1;++I<f;){var F=u[I];if(ir(F[0],this,E))return ir(F[1],this,E)}})}function PR(u){return xm(vr(u,g))}function Fy(u){return function(){return u}}function TR(u,f){return u==null||u!==u?f:u}var _R=Rc(),IR=Rc(!0);function ii(u){return u}function Oy(u){return La(typeof u=="function"?u:vr(u,g))}function $R(u){return wc(vr(u,g))}function AR(u,f){return Yt(u,vr(f,g))}var RR=ut(function(u,f){return function(y){return Xr(y,u,f)}}),LR=ut(function(u,f){return function(y){return Xr(u,y,f)}});function zy(u,f,y){var E=Qn(f),I=Aa(f,E);y==null&&!(dn(f)&&(I.length||!E.length))&&(y=f,f=u,u=this,I=Aa(f,Qn(f)));var F=!(dn(y)&&"chain"in y)||!!y.chain,q=Ks(u);return Un(I,function(Z){var se=f[Z];u[Z]=se,q&&(u.prototype[Z]=function(){var ge=this.__chain__;if(F||ge){var ve=u(this.__wrapped__),we=ve.__actions__=sr(this.__actions__);return we.push({func:se,args:arguments,thisArg:u}),ve.__chain__=ge,ve}return se.apply(u,Oo([this.value()],arguments))})}),u}function MR(){return qt._===this&&(qt._=um),this}function jy(){}function DR(u){return u=ct(u),ut(function(f){return Sc(f,u)})}var NR=Lc(Lt),FR=Lc(rd),OR=Lc(sd);function n1(u){return Me(u)?ld(Si(u)):tn(u)}function zR(u){return function(f){return u==null?n:ho(u,f)}}var jR=zd(),BR=zd(!0);function By(){return[]}function Vy(){return!1}function VR(){return{}}function UR(){return""}function KR(){return!0}function WR(u,f){if(u=ct(u),u<1||u>V)return[];var y=U,E=Kn(u,U);f=qe(f),u-=U;for(var I=cd(E,f);++y<u;)f(y);return I}function HR(u){return st(u)?Lt(u,Si):Ei(u)?[u]:sr(Qd(At(u)))}function GR(u){var f=++wa;return At(u)+f}var qR=Ul(function(u,f){return u+f},0),YR=Fn("ceil"),XR=Ul(function(u,f){return u/f},1),QR=Fn("floor");function JR(u){return u&&u.length?As(u,ii,Go):n}function ZR(u,f){return u&&u.length?As(u,qe(f,2),Go):n}function eL(u){return Jh(u,ii)}function tL(u,f){return Jh(u,qe(f,2))}function nL(u){return u&&u.length?As(u,ii,qo):n}function rL(u,f){return u&&u.length?As(u,qe(f,2),qo):n}var iL=Ul(function(u,f){return u*f},1),oL=Fn("round"),sL=Ul(function(u,f){return u-f},0);function aL(u){return u&&u.length?ud(u,ii):0}function lL(u,f){return u&&u.length?ud(u,qe(f,2)):0}return N.after=Q,N.ary=de,N.assign=vA,N.assignIn=Gw,N.assignInWith=ig,N.assignWith=yA,N.at=bA,N.before=xe,N.bind=ke,N.bindAll=CR,N.bindKey=be,N.castArray=V$,N.chain=Yc,N.chunk=Bc,N.compact=Jd,N.concat=ei,N.cond=ER,N.conforms=PR,N.constant=Fy,N.countBy=Qm,N.create=xA,N.curry=Le,N.curryRight=De,N.debounce=Fe,N.defaults=wA,N.defaultsDeep=SA,N.defer=fn,N.delay=ue,N.difference=bt,N.differenceBy=$n,N.differenceWith=gn,N.drop=jn,N.dropRight=Lr,N.dropRightWhile=Ka,N.dropWhile=wn,N.fill=Jl,N.filter=Jc,N.flatMap=cp,N.flatMapDeep=Ty,N.flatMapDepth=eg,N.flatten=Vc,N.flattenDeep=eu,N.flattenDepth=br,N.flip=ne,N.flow=_R,N.flowRight=IR,N.fromPairs=Zd,N.functions=IA,N.functionsIn=$A,N.groupBy=fp,N.initial=Uc,N.intersection=ep,N.intersectionBy=Zo,N.intersectionWith=Kc,N.invert=RA,N.invertBy=LA,N.invokeMap=tg,N.iteratee=Oy,N.keyBy=_y,N.keys=Qn,N.keysIn=ri,N.map=Us,N.mapKeys=DA,N.mapValues=NA,N.matches=$R,N.matchesProperty=AR,N.memoize=ce,N.merge=FA,N.mergeWith=qw,N.method=RR,N.methodOf=LR,N.mixin=zy,N.negate=Ee,N.nthArg=DR,N.omit=OA,N.omitBy=zA,N.once=Ve,N.orderBy=Iy,N.over=NR,N.overArgs=Ge,N.overEvery=FR,N.overSome=OR,N.partial=We,N.partialRight=Je,N.partition=iu,N.pick=jA,N.pickBy=Yw,N.property=n1,N.propertyOf=zR,N.pull=Wc,N.pullAll=nu,N.pullAllBy=cr,N.pullAllWith=ts,N.pullAt=ki,N.range=jR,N.rangeRight=BR,N.rearg=An,N.reject=o,N.remove=xr,N.rest=kt,N.reverse=Hc,N.sampleSize=p,N.set=VA,N.setWith=UA,N.shuffle=v,N.slice=np,N.sortBy=L,N.sortedUniq=op,N.sortedUniqBy=js,N.split=dR,N.spread=rs,N.tail=Km,N.take=Wm,N.takeRight=sp,N.takeRightWhile=Gc,N.takeWhile=vy,N.tap=Cy,N.throttle=Ay,N.thru=Ci,N.toArray=Kw,N.toPairs=Xw,N.toPairsIn=Qw,N.toPath=HR,N.toPlainObject=Hw,N.transform=KA,N.unary=j$,N.union=yy,N.unionBy=Hm,N.unionWith=Gm,N.uniq=Bs,N.uniqBy=by,N.uniqWith=Wa,N.unset=WA,N.unzip=qc,N.unzipWith=nn,N.update=HA,N.updateWith=GA,N.values=of,N.valuesIn=qA,N.without=xy,N.words=e1,N.wrap=B$,N.xor=qm,N.xorBy=wy,N.xorWith=Sy,N.zip=Ym,N.zipObject=Xm,N.zipObjectDeep=ky,N.zipWith=ti,N.entries=Xw,N.entriesIn=Qw,N.extend=Gw,N.extendWith=ig,zy(N,N),N.add=qR,N.attempt=t1,N.camelCase=JA,N.capitalize=Jw,N.ceil=YR,N.clamp=YA,N.clone=U$,N.cloneDeep=W$,N.cloneDeepWith=H$,N.cloneWith=K$,N.conformsTo=G$,N.deburr=Zw,N.defaultTo=TR,N.divide=XR,N.endsWith=ZA,N.eq=ko,N.escape=eR,N.escapeRegExp=tR,N.every=Jm,N.find=Zc,N.findIndex=Jo,N.findKey=kA,N.findLast=Zm,N.findLastIndex=Zl,N.findLastKey=CA,N.floor=QR,N.forEach=ef,N.forEachRight=ru,N.forIn=EA,N.forInRight=PA,N.forOwn=TA,N.forOwnRight=_A,N.get=My,N.gt=q$,N.gte=Y$,N.has=AA,N.hasIn=Dy,N.head=Os,N.identity=ii,N.includes=tf,N.indexOf=So,N.inRange=XA,N.invoke=MA,N.isArguments=ou,N.isArray=st,N.isArrayBuffer=X$,N.isArrayLike=ni,N.isArrayLikeObject=Sn,N.isBoolean=Q$,N.isBuffer=Ha,N.isDate=J$,N.isElement=Z$,N.isEmpty=eA,N.isEqual=tA,N.isEqualWith=nA,N.isError=Ry,N.isFinite=rA,N.isFunction=Ks,N.isInteger=jw,N.isLength=ng,N.isMap=Bw,N.isMatch=iA,N.isMatchWith=oA,N.isNaN=sA,N.isNative=aA,N.isNil=uA,N.isNull=lA,N.isNumber=Vw,N.isObject=dn,N.isObjectLike=vn,N.isPlainObject=dp,N.isRegExp=Ly,N.isSafeInteger=cA,N.isSet=Uw,N.isString=rg,N.isSymbol=Ei,N.isTypedArray=rf,N.isUndefined=fA,N.isWeakMap=dA,N.isWeakSet=pA,N.join=es,N.kebabCase=nR,N.last=ur,N.lastIndexOf=tu,N.lowerCase=rR,N.lowerFirst=iR,N.lt=hA,N.lte=mA,N.max=JR,N.maxBy=ZR,N.mean=eL,N.meanBy=tL,N.min=nL,N.minBy=rL,N.stubArray=By,N.stubFalse=Vy,N.stubObject=VR,N.stubString=UR,N.stubTrue=KR,N.multiply=iL,N.nth=tp,N.noConflict=MR,N.noop=jy,N.now=K,N.pad=oR,N.padEnd=sR,N.padStart=aR,N.parseInt=lR,N.random=QA,N.reduce=$y,N.reduceRight=nf,N.repeat=uR,N.replace=cR,N.result=BA,N.round=oL,N.runInContext=re,N.sample=l,N.size=w,N.snakeCase=fR,N.some=C,N.sortedIndex=rp,N.sortedIndexBy=gy,N.sortedIndexOf=ns,N.sortedLastIndex=Um,N.sortedLastIndexBy=ip,N.sortedLastIndexOf=zs,N.startCase=pR,N.startsWith=hR,N.subtract=sL,N.sum=aL,N.sumBy=lL,N.template=mR,N.times=WR,N.toFinite=Ws,N.toInteger=ct,N.toLength=Ww,N.toLower=gR,N.toNumber=Xi,N.toSafeInteger=gA,N.toString=At,N.toUpper=vR,N.trim=yR,N.trimEnd=bR,N.trimStart=xR,N.truncate=wR,N.unescape=SR,N.uniqueId=GR,N.upperCase=kR,N.upperFirst=Ny,N.each=ef,N.eachRight=ru,N.first=Os,zy(N,(function(){var u={};return Ar(N,function(f,y){St.call(N.prototype,y)||(u[y]=f)}),u})(),{chain:!1}),N.VERSION=r,Un(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){N[u].placeholder=N}),Un(["drop","take"],function(u,f){ot.prototype[u]=function(y){y=y===n?1:mn(ct(y),0);var E=this.__filtered__&&!f?new ot(this):this.clone();return E.__filtered__?E.__takeCount__=Kn(y,E.__takeCount__):E.__views__.push({size:Kn(y,U),type:u+(E.__dir__<0?"Right":"")}),E},ot.prototype[u+"Right"]=function(y){return this.reverse()[u](y).reverse()}}),Un(["filter","map","takeWhile"],function(u,f){var y=f+1,E=y==H||y==J;ot.prototype[u]=function(I){var F=this.clone();return F.__iteratees__.push({iteratee:qe(I,3),type:y}),F.__filtered__=F.__filtered__||E,F}}),Un(["head","last"],function(u,f){var y="take"+(f?"Right":"");ot.prototype[u]=function(){return this[y](1).value()[0]}}),Un(["initial","tail"],function(u,f){var y="drop"+(f?"":"Right");ot.prototype[u]=function(){return this.__filtered__?new ot(this):this[y](1)}}),ot.prototype.compact=function(){return this.filter(ii)},ot.prototype.find=function(u){return this.filter(u).head()},ot.prototype.findLast=function(u){return this.reverse().find(u)},ot.prototype.invokeMap=ut(function(u,f){return typeof u=="function"?new ot(this):this.map(function(y){return Xr(y,u,f)})}),ot.prototype.reject=function(u){return this.filter(Ee(qe(u)))},ot.prototype.slice=function(u,f){u=ct(u);var y=this;return y.__filtered__&&(u>0||f<0)?new ot(y):(u<0?y=y.takeRight(-u):u&&(y=y.drop(u)),f!==n&&(f=ct(f),y=f<0?y.dropRight(-f):y.take(f-u)),y)},ot.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},ot.prototype.toArray=function(){return this.take(U)},Ar(ot.prototype,function(u,f){var y=/^(?:filter|find|map|reject)|While$/.test(f),E=/^(?:head|last)$/.test(f),I=N[E?"take"+(f=="last"?"Right":""):f],F=E||/^find/.test(f);I&&(N.prototype[f]=function(){var q=this.__wrapped__,Z=E?[1]:arguments,se=q instanceof ot,ge=Z[0],ve=se||st(q),we=function(gt){var xt=I.apply(N,Oo([gt],Z));return E&&$e?xt[0]:xt};ve&&y&&typeof ge=="function"&&ge.length!=1&&(se=ve=!1);var $e=this.__chain__,Ke=!!this.__actions__.length,Ze=F&&!$e,dt=se&&!Ke;if(!F&&ve){q=dt?q:new ot(this);var et=u.apply(q,Z);return et.__actions__.push({func:Ci,args:[we],thisArg:n}),new Wn(et,$e)}return Ze&&dt?u.apply(this,Z):(et=this.thru(we),Ze?E?et.value()[0]:et.value():et)})}),Un(["pop","push","shift","sort","splice","unshift"],function(u){var f=lo[u],y=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",E=/^(?:pop|shift)$/.test(u);N.prototype[u]=function(){var I=arguments;if(E&&!this.__chain__){var F=this.value();return f.apply(st(F)?F:[],I)}return this[y](function(q){return f.apply(st(q)?q:[],I)})}}),Ar(ot.prototype,function(u,f){var y=N[f];if(y){var E=y.name+"";St.call(Ea,E)||(Ea[E]=[]),Ea[E].push({name:f,func:y})}}),Ea[ja(n,_).name]=[{name:"wrapper",func:n}],ot.prototype.clone=cc,ot.prototype.reverse=yd,ot.prototype.value=_a,N.prototype.at=Xc,N.prototype.chain=Vs,N.prototype.commit=Qc,N.prototype.next=ap,N.prototype.plant=Ey,N.prototype.reverse=up,N.prototype.toJSON=N.prototype.valueOf=N.prototype.value=Py,N.prototype.first=N.prototype.head,co&&(N.prototype[co]=lp),N}),ba=ly();Di?((Di.exports=ba)._=ba,xl._=ba):qt._=ba}).call(i7)})(Lp,Lp.exports)),Lp.exports}var B2=o7();class s7{plugins={};activePlugins=[];slotFillers=new Map;listeners=new Set;slotFillersCache=new Map;hasSlotFillersCache=new Map;register(t){this.plugins[t.name]={isActivated:!1,config:t},this.notify()}activate(t){const n=this.plugins[t];if(!(!n||n.isActivated)){if(n.isActivated=!0,n.config.slots)for(const r of n.config.slots)this.registerSlot(t,r);n.config.onActivate&&n.config.onActivate(),this.produceActivePlugins(),this.notify()}}deactivate(t){const n=this.plugins[t];!n||!n.isActivated||(n.isActivated=!1,this.unregisterPluginSlots(t),n.config.onDeactivate&&n.config.onDeactivate(),this.produceActivePlugins(),this.notify())}isPluginActivated(t){const n=this.plugins[t];return!!n&&n.isActivated}getPlugin(t){const n=this.plugins[t];return!n||!n.isActivated?null:n}getActivePlugins(){return this.activePlugins}getSlotFillers(t){const n=this.slotFillers.get(t)??[],r=this.slotFillersCache.get(t);return r&&r.length===n.length&&r.every((i,s)=>i===n[s])?r:(this.slotFillersCache.set(t,n),n)}hasSlotFillers(t){const n=(this.slotFillers.get(t)?.length??0)>0,r=this.hasSlotFillersCache.get(t);return r===n?r:(this.hasSlotFillersCache.set(t,n),n)}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}registerSlot(t,n){const r=this.slotFillers.get(n.slot)??[],i={slot:n.slot,component:n.component,priority:n.priority,condition:n.condition,pluginName:t};r.push(i),r.sort((s,a)=>(a.priority??0)-(s.priority??0)),this.slotFillers.set(n.slot,r)}unregisterPluginSlots(t){for(const[n,r]of this.slotFillers.entries()){const i=r.filter(s=>s.pluginName!==t);this.slotFillers.set(n,i)}}notify(){this.listeners.forEach(t=>t())}produceActivePlugins(){this.activePlugins=B2.transform(this.plugins,(t,n)=>{n.isActivated&&t.push(n.config)},[])}}const Bt=new s7;function Lu(e,t,n,r){return{slot:e,component:t,priority:n,condition:r}}const rC=S.lazy(()=>Br(()=>import("./FeedbackForm-BLuzDSTy.js"),__vite__mapDeps([0,1,2,3,4,5,6]))),V2="FeedbackFormPlugin",a7={name:V2,components:{FeedbackForm:rC},slots:[Lu("message.actions",rC,5)]},iC=S.lazy(()=>Br(()=>import("./ChatOptionsForm-C7AySsjS.js"),__vite__mapDeps([7,1,2,3,4,5,6]))),U2="ChatOptionsPlugin",l7={name:U2,components:{ChatOptionsForm:iC},slots:[Lu("prompt.beforeSend",iC,10)]},u7={config:{feedback:{like:{enabled:!1,form:null},dislike:{enabled:!1,form:null}},user_settings:{form:null},conversation_history:!1,authentication:{enabled:!1,auth_types:[],oauth2_providers:[]},show_usage:!1,debug_mode:!1,customization:null,supports_upload:!1}},kh=()=>S.useContext(K2)??u7,K2=S.createContext(void 0),c7="🐰",f7="Ragbits Chat",d7="by deepsense.ai",p7="Loading...",h7="";function W2(){return R.jsx("div",{className:bn("bg-background flex h-screen w-screen items-start justify-center"),children:R.jsxs("div",{className:"text-default-900 m-auto flex flex-col items-center gap-4",children:[R.jsx(h2,{size:"lg","aria-label":"Progress indicator"}),R.jsx("p",{children:"Initializing..."})]})})}function m7(){return R.jsx("div",{className:bn("bg-background flex h-screen w-screen items-start justify-center"),children:R.jsxs("div",{className:"text-default-900 m-auto flex flex-col items-center gap-4",children:[R.jsx("p",{className:"text-large",children:"Something went wrong during chat initialization."}),R.jsx("p",{className:"text-small text-default-500",children:"Try refreshing the page."})]})})}function g7({children:e}){const{call:t,...n}=e8("/api/config"),r=S.useMemo(()=>n.data?{config:n.data}:null,[n.data]);return!n.data&&!n.error&&!n.isLoading&&t(),S.useEffect(()=>{document.title=p7},[]),n.isLoading?R.jsx(W2,{}):n.error||!r?R.jsx(m7,{}):R.jsx(K2.Provider,{value:r,children:e})}const oC=S.lazy(()=>Br(()=>import("./ShareButton-Cc7tfnmL.js"),__vite__mapDeps([8,6]))),H2="SharePluginName",v7={name:H2,components:{ShareButton:oC},slots:[Lu("layout.headerActions",oC,5)]};var sC="popstate";function y7(e={}){function t(r,i){let{pathname:s,search:a,hash:c}=r.location;return Bb("",{pathname:s,search:a,hash:c},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:lh(i)}return x7(t,n,null,e)}function Dn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function $o(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function b7(){return Math.random().toString(36).substring(2,10)}function aC(e,t){return{usr:e.state,key:e.key,idx:t}}function Bb(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ch(t):t,state:n,key:t&&t.key||r||b7()}}function lh({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ch(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function x7(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,a=i.history,c="POP",d=null,h=m();h==null&&(h=0,a.replaceState({...a.state,idx:h},""));function m(){return(a.state||{idx:null}).idx}function g(){c="POP";let T=m(),_=T==null?null:T-h;h=T,d&&d({action:c,location:P.location,delta:_})}function b(T,_){c="PUSH";let A=Bb(P.location,T,_);h=m()+1;let M=aC(A,h),O=P.createHref(A);try{a.pushState(M,"",O)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;i.location.assign(O)}s&&d&&d({action:c,location:P.location,delta:1})}function x(T,_){c="REPLACE";let A=Bb(P.location,T,_);h=m();let M=aC(A,h),O=P.createHref(A);a.replaceState(M,"",O),s&&d&&d({action:c,location:P.location,delta:0})}function k(T){return w7(T)}let P={get action(){return c},get location(){return e(i,a)},listen(T){if(d)throw new Error("A history only accepts one active listener");return i.addEventListener(sC,g),d=T,()=>{i.removeEventListener(sC,g),d=null}},createHref(T){return t(i,T)},createURL:k,encodeLocation(T){let _=k(T);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:b,replace:x,go(T){return a.go(T)}};return P}function w7(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Dn(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:lh(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function G2(e,t,n="/"){return S7(e,t,n,!1)}function S7(e,t,n,r){let i=typeof t=="string"?Ch(t):t,s=na(i.pathname||"/",n);if(s==null)return null;let a=q2(e);k7(a);let c=null;for(let d=0;c==null&&d<a.length;++d){let h=M7(s);c=R7(a[d],h,r)}return c}function q2(e,t=[],n=[],r=""){let i=(s,a,c)=>{let d={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};d.relativePath.startsWith("/")&&(Dn(d.relativePath.startsWith(r),`Absolute route path "${d.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(r.length));let h=Zs([r,d.relativePath]),m=n.concat(d);s.children&&s.children.length>0&&(Dn(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),q2(s.children,t,m,h)),!(s.path==null&&!s.index)&&t.push({path:h,score:$7(h,s.index),routesMeta:m})};return e.forEach((s,a)=>{if(s.path===""||!s.path?.includes("?"))i(s,a);else for(let c of Y2(s.path))i(s,a,c)}),t}function Y2(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let a=Y2(r.join("/")),c=[];return c.push(...a.map(d=>d===""?s:[s,d].join("/"))),i&&c.push(...a),c.map(d=>e.startsWith("/")&&d===""?"/":d)}function k7(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:A7(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var C7=/^:[\w-]+$/,E7=3,P7=2,T7=1,_7=10,I7=-2,lC=e=>e==="*";function $7(e,t){let n=e.split("/"),r=n.length;return n.some(lC)&&(r+=I7),t&&(r+=P7),n.filter(i=>!lC(i)).reduce((i,s)=>i+(C7.test(s)?E7:s===""?T7:_7),r)}function A7(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function R7(e,t,n=!1){let{routesMeta:r}=e,i={},s="/",a=[];for(let c=0;c<r.length;++c){let d=r[c],h=c===r.length-1,m=s==="/"?t:t.slice(s.length)||"/",g=iv({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},m),b=d.route;if(!g&&h&&n&&!r[r.length-1].route.index&&(g=iv({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!g)return null;Object.assign(i,g.params),a.push({params:i,pathname:Zs([s,g.pathname]),pathnameBase:O7(Zs([s,g.pathnameBase])),route:b}),g.pathnameBase!=="/"&&(s=Zs([s,g.pathnameBase]))}return a}function iv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=L7(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],a=s.replace(/(.)\/+$/,"$1"),c=i.slice(1);return{params:r.reduce((h,{paramName:m,isOptional:g},b)=>{if(m==="*"){let k=c[b]||"";a=s.slice(0,s.length-k.length).replace(/(.)\/+$/,"$1")}const x=c[b];return g&&!x?h[m]=void 0:h[m]=(x||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:a,pattern:e}}function L7(e,t=!1,n=!0){$o(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,c,d)=>(r.push({paramName:c,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function M7(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return $o(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function na(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function D7(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Ch(e):e;return{pathname:n?n.startsWith("/")?n:N7(n,t):t,search:z7(r),hash:j7(i)}}function N7(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function E0(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function F7(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function cw(e){let t=F7(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function fw(e,t,n,r=!1){let i;typeof e=="string"?i=Ch(e):(i={...e},Dn(!i.pathname||!i.pathname.includes("?"),E0("?","pathname","search",i)),Dn(!i.pathname||!i.pathname.includes("#"),E0("#","pathname","hash",i)),Dn(!i.search||!i.search.includes("#"),E0("#","search","hash",i)));let s=e===""||i.pathname==="",a=s?"/":i.pathname,c;if(a==null)c=n;else{let g=t.length-1;if(!r&&a.startsWith("..")){let b=a.split("/");for(;b[0]==="..";)b.shift(),g-=1;i.pathname=b.join("/")}c=g>=0?t[g]:"/"}let d=D7(i,c),h=a&&a!=="/"&&a.endsWith("/"),m=(s||a===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(h||m)&&(d.pathname+="/"),d}var Zs=e=>e.join("/").replace(/\/\/+/g,"/"),O7=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),z7=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,j7=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function B7(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var X2=["POST","PUT","PATCH","DELETE"];new Set(X2);var V7=["GET",...X2];new Set(V7);var jf=S.createContext(null);jf.displayName="DataRouter";var _v=S.createContext(null);_v.displayName="DataRouterState";S.createContext(!1);var Q2=S.createContext({isTransitioning:!1});Q2.displayName="ViewTransition";var U7=S.createContext(new Map);U7.displayName="Fetchers";var K7=S.createContext(null);K7.displayName="Await";var Ao=S.createContext(null);Ao.displayName="Navigation";var Iv=S.createContext(null);Iv.displayName="Location";var oo=S.createContext({outlet:null,matches:[],isDataRoute:!1});oo.displayName="Route";var dw=S.createContext(null);dw.displayName="RouteError";function W7(e,{relative:t}={}){Dn(Bf(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=S.useContext(Ao),{hash:i,pathname:s,search:a}=Eh(e,{relative:t}),c=s;return n!=="/"&&(c=s==="/"?n:Zs([n,s])),r.createHref({pathname:c,search:a,hash:i})}function Bf(){return S.useContext(Iv)!=null}function al(){return Dn(Bf(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(Iv).location}var J2="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Z2(e){S.useContext(Ao).static||S.useLayoutEffect(e)}function pw(){let{isDataRoute:e}=S.useContext(oo);return e?sj():H7()}function H7(){Dn(Bf(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(jf),{basename:t,navigator:n}=S.useContext(Ao),{matches:r}=S.useContext(oo),{pathname:i}=al(),s=JSON.stringify(cw(r)),a=S.useRef(!1);return Z2(()=>{a.current=!0}),S.useCallback((d,h={})=>{if($o(a.current,J2),!a.current)return;if(typeof d=="number"){n.go(d);return}let m=fw(d,JSON.parse(s),i,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Zs([t,m.pathname])),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,s,i,e])}var G7=S.createContext(null);function q7(e){let t=S.useContext(oo).outlet;return t&&S.createElement(G7.Provider,{value:e},t)}function eI(){let{matches:e}=S.useContext(oo),t=e[e.length-1];return t?t.params:{}}function Eh(e,{relative:t}={}){let{matches:n}=S.useContext(oo),{pathname:r}=al(),i=JSON.stringify(cw(n));return S.useMemo(()=>fw(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function Y7(e,t){return tI(e)}function tI(e,t,n,r){Dn(Bf(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=S.useContext(Ao),{matches:s}=S.useContext(oo),a=s[s.length-1],c=a?a.params:{},d=a?a.pathname:"/",h=a?a.pathnameBase:"/",m=a&&a.route;{let _=m&&m.path||"";nI(d,!m||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${_}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
43
+ }`;var dt=t1(function(){return wt(F,Ke+"return "+we).apply(n,q)});if(dt.source=we,Ry(dt))throw dt;return dt}function gR(u){return At(u).toLowerCase()}function vR(u){return At(u).toUpperCase()}function yR(u,f,y){if(u=At(u),u&&(y||f===n))return em(u);if(!u||!(f=yr(f)))return u;var E=_r(u),I=_r(f),F=tm(E,I),q=fd(E,I)+1;return bo(E,F,q).join("")}function bR(u,f,y){if(u=At(u),u&&(y||f===n))return u.slice(0,Zu(u)+1);if(!u||!(f=yr(f)))return u;var E=_r(u),I=fd(E,_r(f))+1;return bo(E,0,I).join("")}function xR(u,f,y){if(u=At(u),u&&(y||f===n))return u.replace(dl,"");if(!u||!(f=yr(f)))return u;var E=_r(u),I=tm(E,_r(f));return bo(E,I).join("")}function wR(u,f){var y=B,E=W;if(dn(f)){var I="separator"in f?f.separator:I;y="length"in f?ct(f.length):y,E="omission"in f?yr(f.omission):E}u=At(u);var F=u.length;if(ya(u)){var q=_r(u);F=q.length}if(y>=F)return u;var Z=y-ks(E);if(Z<1)return E;var se=q?bo(q,0,Z).join(""):u.slice(0,Z);if(I===n)return se+E;if(q&&(Z+=se.length-Z),Ly(I)){if(u.slice(Z).search(I)){var ge,ve=se;for(I.global||(I=Sl(I.source,At(so.exec(I))+"g")),I.lastIndex=0;ge=I.exec(ve);)var we=ge.index;se=se.slice(0,we===n?Z:we)}}else if(u.indexOf(yr(I),Z)!=Z){var $e=se.lastIndexOf(I);$e>-1&&(se=se.slice(0,$e))}return se+E}function SR(u){return u=At(u),u&&ul.test(u)?u.replace(pi,sm):u}var kR=Ns(function(u,f,y){return u+(y?" ":"")+f.toUpperCase()}),Ny=Fd("toUpperCase");function e1(u,f,y){return u=At(u),f=y?n:f,f===n?ry(u)?ay(u):ey(u):u.match(f)||[]}var t1=ut(function(u,f){try{return ir(u,n,f)}catch(y){return Ry(y)?y:new rt(y)}}),CR=qi(function(u,f){return Un(f,function(y){y=Si(y),Bi(u,y,ke(u[y],u))}),u});function ER(u){var f=u==null?0:u.length,y=qe();return u=f?Lt(u,function(E){if(typeof E[1]!="function")throw new Wr(a);return[y(E[0]),E[1]]}):[],ut(function(E){for(var I=-1;++I<f;){var F=u[I];if(ir(F[0],this,E))return ir(F[1],this,E)}})}function PR(u){return xm(vr(u,g))}function Fy(u){return function(){return u}}function TR(u,f){return u==null||u!==u?f:u}var _R=Rc(),IR=Rc(!0);function ii(u){return u}function Oy(u){return La(typeof u=="function"?u:vr(u,g))}function $R(u){return wc(vr(u,g))}function AR(u,f){return Yt(u,vr(f,g))}var RR=ut(function(u,f){return function(y){return Xr(y,u,f)}}),LR=ut(function(u,f){return function(y){return Xr(u,y,f)}});function zy(u,f,y){var E=Qn(f),I=Aa(f,E);y==null&&!(dn(f)&&(I.length||!E.length))&&(y=f,f=u,u=this,I=Aa(f,Qn(f)));var F=!(dn(y)&&"chain"in y)||!!y.chain,q=Ks(u);return Un(I,function(Z){var se=f[Z];u[Z]=se,q&&(u.prototype[Z]=function(){var ge=this.__chain__;if(F||ge){var ve=u(this.__wrapped__),we=ve.__actions__=sr(this.__actions__);return we.push({func:se,args:arguments,thisArg:u}),ve.__chain__=ge,ve}return se.apply(u,Oo([this.value()],arguments))})}),u}function MR(){return qt._===this&&(qt._=um),this}function jy(){}function DR(u){return u=ct(u),ut(function(f){return Sc(f,u)})}var NR=Lc(Lt),FR=Lc(rd),OR=Lc(sd);function n1(u){return Me(u)?ld(Si(u)):tn(u)}function zR(u){return function(f){return u==null?n:ho(u,f)}}var jR=zd(),BR=zd(!0);function By(){return[]}function Vy(){return!1}function VR(){return{}}function UR(){return""}function KR(){return!0}function WR(u,f){if(u=ct(u),u<1||u>V)return[];var y=U,E=Kn(u,U);f=qe(f),u-=U;for(var I=cd(E,f);++y<u;)f(y);return I}function HR(u){return st(u)?Lt(u,Si):Ei(u)?[u]:sr(Qd(At(u)))}function GR(u){var f=++wa;return At(u)+f}var qR=Ul(function(u,f){return u+f},0),YR=Fn("ceil"),XR=Ul(function(u,f){return u/f},1),QR=Fn("floor");function JR(u){return u&&u.length?As(u,ii,Go):n}function ZR(u,f){return u&&u.length?As(u,qe(f,2),Go):n}function eL(u){return Jh(u,ii)}function tL(u,f){return Jh(u,qe(f,2))}function nL(u){return u&&u.length?As(u,ii,qo):n}function rL(u,f){return u&&u.length?As(u,qe(f,2),qo):n}var iL=Ul(function(u,f){return u*f},1),oL=Fn("round"),sL=Ul(function(u,f){return u-f},0);function aL(u){return u&&u.length?ud(u,ii):0}function lL(u,f){return u&&u.length?ud(u,qe(f,2)):0}return N.after=Q,N.ary=de,N.assign=vA,N.assignIn=Gw,N.assignInWith=ig,N.assignWith=yA,N.at=bA,N.before=xe,N.bind=ke,N.bindAll=CR,N.bindKey=be,N.castArray=V$,N.chain=Yc,N.chunk=Bc,N.compact=Jd,N.concat=ei,N.cond=ER,N.conforms=PR,N.constant=Fy,N.countBy=Qm,N.create=xA,N.curry=Le,N.curryRight=De,N.debounce=Fe,N.defaults=wA,N.defaultsDeep=SA,N.defer=fn,N.delay=ue,N.difference=bt,N.differenceBy=$n,N.differenceWith=gn,N.drop=jn,N.dropRight=Lr,N.dropRightWhile=Ka,N.dropWhile=wn,N.fill=Jl,N.filter=Jc,N.flatMap=cp,N.flatMapDeep=Ty,N.flatMapDepth=eg,N.flatten=Vc,N.flattenDeep=eu,N.flattenDepth=br,N.flip=ne,N.flow=_R,N.flowRight=IR,N.fromPairs=Zd,N.functions=IA,N.functionsIn=$A,N.groupBy=fp,N.initial=Uc,N.intersection=ep,N.intersectionBy=Zo,N.intersectionWith=Kc,N.invert=RA,N.invertBy=LA,N.invokeMap=tg,N.iteratee=Oy,N.keyBy=_y,N.keys=Qn,N.keysIn=ri,N.map=Us,N.mapKeys=DA,N.mapValues=NA,N.matches=$R,N.matchesProperty=AR,N.memoize=ce,N.merge=FA,N.mergeWith=qw,N.method=RR,N.methodOf=LR,N.mixin=zy,N.negate=Ee,N.nthArg=DR,N.omit=OA,N.omitBy=zA,N.once=Ve,N.orderBy=Iy,N.over=NR,N.overArgs=Ge,N.overEvery=FR,N.overSome=OR,N.partial=We,N.partialRight=Je,N.partition=iu,N.pick=jA,N.pickBy=Yw,N.property=n1,N.propertyOf=zR,N.pull=Wc,N.pullAll=nu,N.pullAllBy=cr,N.pullAllWith=ts,N.pullAt=ki,N.range=jR,N.rangeRight=BR,N.rearg=An,N.reject=o,N.remove=xr,N.rest=kt,N.reverse=Hc,N.sampleSize=p,N.set=VA,N.setWith=UA,N.shuffle=v,N.slice=np,N.sortBy=L,N.sortedUniq=op,N.sortedUniqBy=js,N.split=dR,N.spread=rs,N.tail=Km,N.take=Wm,N.takeRight=sp,N.takeRightWhile=Gc,N.takeWhile=vy,N.tap=Cy,N.throttle=Ay,N.thru=Ci,N.toArray=Kw,N.toPairs=Xw,N.toPairsIn=Qw,N.toPath=HR,N.toPlainObject=Hw,N.transform=KA,N.unary=j$,N.union=yy,N.unionBy=Hm,N.unionWith=Gm,N.uniq=Bs,N.uniqBy=by,N.uniqWith=Wa,N.unset=WA,N.unzip=qc,N.unzipWith=nn,N.update=HA,N.updateWith=GA,N.values=of,N.valuesIn=qA,N.without=xy,N.words=e1,N.wrap=B$,N.xor=qm,N.xorBy=wy,N.xorWith=Sy,N.zip=Ym,N.zipObject=Xm,N.zipObjectDeep=ky,N.zipWith=ti,N.entries=Xw,N.entriesIn=Qw,N.extend=Gw,N.extendWith=ig,zy(N,N),N.add=qR,N.attempt=t1,N.camelCase=JA,N.capitalize=Jw,N.ceil=YR,N.clamp=YA,N.clone=U$,N.cloneDeep=W$,N.cloneDeepWith=H$,N.cloneWith=K$,N.conformsTo=G$,N.deburr=Zw,N.defaultTo=TR,N.divide=XR,N.endsWith=ZA,N.eq=ko,N.escape=eR,N.escapeRegExp=tR,N.every=Jm,N.find=Zc,N.findIndex=Jo,N.findKey=kA,N.findLast=Zm,N.findLastIndex=Zl,N.findLastKey=CA,N.floor=QR,N.forEach=ef,N.forEachRight=ru,N.forIn=EA,N.forInRight=PA,N.forOwn=TA,N.forOwnRight=_A,N.get=My,N.gt=q$,N.gte=Y$,N.has=AA,N.hasIn=Dy,N.head=Os,N.identity=ii,N.includes=tf,N.indexOf=So,N.inRange=XA,N.invoke=MA,N.isArguments=ou,N.isArray=st,N.isArrayBuffer=X$,N.isArrayLike=ni,N.isArrayLikeObject=Sn,N.isBoolean=Q$,N.isBuffer=Ha,N.isDate=J$,N.isElement=Z$,N.isEmpty=eA,N.isEqual=tA,N.isEqualWith=nA,N.isError=Ry,N.isFinite=rA,N.isFunction=Ks,N.isInteger=jw,N.isLength=ng,N.isMap=Bw,N.isMatch=iA,N.isMatchWith=oA,N.isNaN=sA,N.isNative=aA,N.isNil=uA,N.isNull=lA,N.isNumber=Vw,N.isObject=dn,N.isObjectLike=vn,N.isPlainObject=dp,N.isRegExp=Ly,N.isSafeInteger=cA,N.isSet=Uw,N.isString=rg,N.isSymbol=Ei,N.isTypedArray=rf,N.isUndefined=fA,N.isWeakMap=dA,N.isWeakSet=pA,N.join=es,N.kebabCase=nR,N.last=ur,N.lastIndexOf=tu,N.lowerCase=rR,N.lowerFirst=iR,N.lt=hA,N.lte=mA,N.max=JR,N.maxBy=ZR,N.mean=eL,N.meanBy=tL,N.min=nL,N.minBy=rL,N.stubArray=By,N.stubFalse=Vy,N.stubObject=VR,N.stubString=UR,N.stubTrue=KR,N.multiply=iL,N.nth=tp,N.noConflict=MR,N.noop=jy,N.now=K,N.pad=oR,N.padEnd=sR,N.padStart=aR,N.parseInt=lR,N.random=QA,N.reduce=$y,N.reduceRight=nf,N.repeat=uR,N.replace=cR,N.result=BA,N.round=oL,N.runInContext=re,N.sample=l,N.size=w,N.snakeCase=fR,N.some=C,N.sortedIndex=rp,N.sortedIndexBy=gy,N.sortedIndexOf=ns,N.sortedLastIndex=Um,N.sortedLastIndexBy=ip,N.sortedLastIndexOf=zs,N.startCase=pR,N.startsWith=hR,N.subtract=sL,N.sum=aL,N.sumBy=lL,N.template=mR,N.times=WR,N.toFinite=Ws,N.toInteger=ct,N.toLength=Ww,N.toLower=gR,N.toNumber=Xi,N.toSafeInteger=gA,N.toString=At,N.toUpper=vR,N.trim=yR,N.trimEnd=bR,N.trimStart=xR,N.truncate=wR,N.unescape=SR,N.uniqueId=GR,N.upperCase=kR,N.upperFirst=Ny,N.each=ef,N.eachRight=ru,N.first=Os,zy(N,(function(){var u={};return Ar(N,function(f,y){St.call(N.prototype,y)||(u[y]=f)}),u})(),{chain:!1}),N.VERSION=r,Un(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){N[u].placeholder=N}),Un(["drop","take"],function(u,f){ot.prototype[u]=function(y){y=y===n?1:mn(ct(y),0);var E=this.__filtered__&&!f?new ot(this):this.clone();return E.__filtered__?E.__takeCount__=Kn(y,E.__takeCount__):E.__views__.push({size:Kn(y,U),type:u+(E.__dir__<0?"Right":"")}),E},ot.prototype[u+"Right"]=function(y){return this.reverse()[u](y).reverse()}}),Un(["filter","map","takeWhile"],function(u,f){var y=f+1,E=y==H||y==J;ot.prototype[u]=function(I){var F=this.clone();return F.__iteratees__.push({iteratee:qe(I,3),type:y}),F.__filtered__=F.__filtered__||E,F}}),Un(["head","last"],function(u,f){var y="take"+(f?"Right":"");ot.prototype[u]=function(){return this[y](1).value()[0]}}),Un(["initial","tail"],function(u,f){var y="drop"+(f?"":"Right");ot.prototype[u]=function(){return this.__filtered__?new ot(this):this[y](1)}}),ot.prototype.compact=function(){return this.filter(ii)},ot.prototype.find=function(u){return this.filter(u).head()},ot.prototype.findLast=function(u){return this.reverse().find(u)},ot.prototype.invokeMap=ut(function(u,f){return typeof u=="function"?new ot(this):this.map(function(y){return Xr(y,u,f)})}),ot.prototype.reject=function(u){return this.filter(Ee(qe(u)))},ot.prototype.slice=function(u,f){u=ct(u);var y=this;return y.__filtered__&&(u>0||f<0)?new ot(y):(u<0?y=y.takeRight(-u):u&&(y=y.drop(u)),f!==n&&(f=ct(f),y=f<0?y.dropRight(-f):y.take(f-u)),y)},ot.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},ot.prototype.toArray=function(){return this.take(U)},Ar(ot.prototype,function(u,f){var y=/^(?:filter|find|map|reject)|While$/.test(f),E=/^(?:head|last)$/.test(f),I=N[E?"take"+(f=="last"?"Right":""):f],F=E||/^find/.test(f);I&&(N.prototype[f]=function(){var q=this.__wrapped__,Z=E?[1]:arguments,se=q instanceof ot,ge=Z[0],ve=se||st(q),we=function(gt){var xt=I.apply(N,Oo([gt],Z));return E&&$e?xt[0]:xt};ve&&y&&typeof ge=="function"&&ge.length!=1&&(se=ve=!1);var $e=this.__chain__,Ke=!!this.__actions__.length,Ze=F&&!$e,dt=se&&!Ke;if(!F&&ve){q=dt?q:new ot(this);var et=u.apply(q,Z);return et.__actions__.push({func:Ci,args:[we],thisArg:n}),new Wn(et,$e)}return Ze&&dt?u.apply(this,Z):(et=this.thru(we),Ze?E?et.value()[0]:et.value():et)})}),Un(["pop","push","shift","sort","splice","unshift"],function(u){var f=lo[u],y=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",E=/^(?:pop|shift)$/.test(u);N.prototype[u]=function(){var I=arguments;if(E&&!this.__chain__){var F=this.value();return f.apply(st(F)?F:[],I)}return this[y](function(q){return f.apply(st(q)?q:[],I)})}}),Ar(ot.prototype,function(u,f){var y=N[f];if(y){var E=y.name+"";St.call(Ea,E)||(Ea[E]=[]),Ea[E].push({name:f,func:y})}}),Ea[ja(n,_).name]=[{name:"wrapper",func:n}],ot.prototype.clone=cc,ot.prototype.reverse=yd,ot.prototype.value=_a,N.prototype.at=Xc,N.prototype.chain=Vs,N.prototype.commit=Qc,N.prototype.next=ap,N.prototype.plant=Ey,N.prototype.reverse=up,N.prototype.toJSON=N.prototype.valueOf=N.prototype.value=Py,N.prototype.first=N.prototype.head,co&&(N.prototype[co]=lp),N}),ba=ly();Di?((Di.exports=ba)._=ba,xl._=ba):qt._=ba}).call(i7)})(Lp,Lp.exports)),Lp.exports}var B2=o7();class s7{plugins={};activePlugins=[];slotFillers=new Map;listeners=new Set;slotFillersCache=new Map;hasSlotFillersCache=new Map;register(t){this.plugins[t.name]={isActivated:!1,config:t},this.notify()}activate(t){const n=this.plugins[t];if(!(!n||n.isActivated)){if(n.isActivated=!0,n.config.slots)for(const r of n.config.slots)this.registerSlot(t,r);n.config.onActivate&&n.config.onActivate(),this.produceActivePlugins(),this.notify()}}deactivate(t){const n=this.plugins[t];!n||!n.isActivated||(n.isActivated=!1,this.unregisterPluginSlots(t),n.config.onDeactivate&&n.config.onDeactivate(),this.produceActivePlugins(),this.notify())}isPluginActivated(t){const n=this.plugins[t];return!!n&&n.isActivated}getPlugin(t){const n=this.plugins[t];return!n||!n.isActivated?null:n}getActivePlugins(){return this.activePlugins}getSlotFillers(t){const n=this.slotFillers.get(t)??[],r=this.slotFillersCache.get(t);return r&&r.length===n.length&&r.every((i,s)=>i===n[s])?r:(this.slotFillersCache.set(t,n),n)}hasSlotFillers(t){const n=(this.slotFillers.get(t)?.length??0)>0,r=this.hasSlotFillersCache.get(t);return r===n?r:(this.hasSlotFillersCache.set(t,n),n)}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}registerSlot(t,n){const r=this.slotFillers.get(n.slot)??[],i={slot:n.slot,component:n.component,priority:n.priority,condition:n.condition,pluginName:t};r.push(i),r.sort((s,a)=>(a.priority??0)-(s.priority??0)),this.slotFillers.set(n.slot,r)}unregisterPluginSlots(t){for(const[n,r]of this.slotFillers.entries()){const i=r.filter(s=>s.pluginName!==t);this.slotFillers.set(n,i)}}notify(){this.listeners.forEach(t=>t())}produceActivePlugins(){this.activePlugins=B2.transform(this.plugins,(t,n)=>{n.isActivated&&t.push(n.config)},[])}}const Bt=new s7;function Lu(e,t,n,r){return{slot:e,component:t,priority:n,condition:r}}const rC=S.lazy(()=>Br(()=>import("./FeedbackForm-CihcDF7p.js"),__vite__mapDeps([0,1,2,3,4,5,6]))),V2="FeedbackFormPlugin",a7={name:V2,components:{FeedbackForm:rC},slots:[Lu("message.actions",rC,5)]},iC=S.lazy(()=>Br(()=>import("./ChatOptionsForm-D2BdUqMs.js"),__vite__mapDeps([7,1,2,3,4,5,6]))),U2="ChatOptionsPlugin",l7={name:U2,components:{ChatOptionsForm:iC},slots:[Lu("prompt.beforeSend",iC,10)]},u7={config:{feedback:{like:{enabled:!1,form:null},dislike:{enabled:!1,form:null}},user_settings:{form:null},conversation_history:!1,authentication:{enabled:!1,auth_types:[],oauth2_providers:[]},show_usage:!1,debug_mode:!1,customization:null,supports_upload:!1}},kh=()=>S.useContext(K2)??u7,K2=S.createContext(void 0),c7="🐰",f7="Ragbits Chat",d7="by deepsense.ai",p7="Loading...",h7="";function W2(){return R.jsx("div",{className:bn("bg-background flex h-screen w-screen items-start justify-center"),children:R.jsxs("div",{className:"text-default-900 m-auto flex flex-col items-center gap-4",children:[R.jsx(h2,{size:"lg","aria-label":"Progress indicator"}),R.jsx("p",{children:"Initializing..."})]})})}function m7(){return R.jsx("div",{className:bn("bg-background flex h-screen w-screen items-start justify-center"),children:R.jsxs("div",{className:"text-default-900 m-auto flex flex-col items-center gap-4",children:[R.jsx("p",{className:"text-large",children:"Something went wrong during chat initialization."}),R.jsx("p",{className:"text-small text-default-500",children:"Try refreshing the page."})]})})}function g7({children:e}){const{call:t,...n}=e8("/api/config"),r=S.useMemo(()=>n.data?{config:n.data}:null,[n.data]);return!n.data&&!n.error&&!n.isLoading&&t(),S.useEffect(()=>{document.title=p7},[]),n.isLoading?R.jsx(W2,{}):n.error||!r?R.jsx(m7,{}):R.jsx(K2.Provider,{value:r,children:e})}const oC=S.lazy(()=>Br(()=>import("./ShareButton-BzNoTpD6.js"),__vite__mapDeps([8,6]))),H2="SharePluginName",v7={name:H2,components:{ShareButton:oC},slots:[Lu("layout.headerActions",oC,5)]};var sC="popstate";function y7(e={}){function t(r,i){let{pathname:s,search:a,hash:c}=r.location;return Bb("",{pathname:s,search:a,hash:c},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:lh(i)}return x7(t,n,null,e)}function Dn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function $o(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function b7(){return Math.random().toString(36).substring(2,10)}function aC(e,t){return{usr:e.state,key:e.key,idx:t}}function Bb(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ch(t):t,state:n,key:t&&t.key||r||b7()}}function lh({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ch(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function x7(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,a=i.history,c="POP",d=null,h=m();h==null&&(h=0,a.replaceState({...a.state,idx:h},""));function m(){return(a.state||{idx:null}).idx}function g(){c="POP";let T=m(),_=T==null?null:T-h;h=T,d&&d({action:c,location:P.location,delta:_})}function b(T,_){c="PUSH";let A=Bb(P.location,T,_);h=m()+1;let M=aC(A,h),O=P.createHref(A);try{a.pushState(M,"",O)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;i.location.assign(O)}s&&d&&d({action:c,location:P.location,delta:1})}function x(T,_){c="REPLACE";let A=Bb(P.location,T,_);h=m();let M=aC(A,h),O=P.createHref(A);a.replaceState(M,"",O),s&&d&&d({action:c,location:P.location,delta:0})}function k(T){return w7(T)}let P={get action(){return c},get location(){return e(i,a)},listen(T){if(d)throw new Error("A history only accepts one active listener");return i.addEventListener(sC,g),d=T,()=>{i.removeEventListener(sC,g),d=null}},createHref(T){return t(i,T)},createURL:k,encodeLocation(T){let _=k(T);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:b,replace:x,go(T){return a.go(T)}};return P}function w7(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Dn(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:lh(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function G2(e,t,n="/"){return S7(e,t,n,!1)}function S7(e,t,n,r){let i=typeof t=="string"?Ch(t):t,s=na(i.pathname||"/",n);if(s==null)return null;let a=q2(e);k7(a);let c=null;for(let d=0;c==null&&d<a.length;++d){let h=M7(s);c=R7(a[d],h,r)}return c}function q2(e,t=[],n=[],r=""){let i=(s,a,c)=>{let d={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};d.relativePath.startsWith("/")&&(Dn(d.relativePath.startsWith(r),`Absolute route path "${d.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(r.length));let h=Zs([r,d.relativePath]),m=n.concat(d);s.children&&s.children.length>0&&(Dn(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),q2(s.children,t,m,h)),!(s.path==null&&!s.index)&&t.push({path:h,score:$7(h,s.index),routesMeta:m})};return e.forEach((s,a)=>{if(s.path===""||!s.path?.includes("?"))i(s,a);else for(let c of Y2(s.path))i(s,a,c)}),t}function Y2(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let a=Y2(r.join("/")),c=[];return c.push(...a.map(d=>d===""?s:[s,d].join("/"))),i&&c.push(...a),c.map(d=>e.startsWith("/")&&d===""?"/":d)}function k7(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:A7(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var C7=/^:[\w-]+$/,E7=3,P7=2,T7=1,_7=10,I7=-2,lC=e=>e==="*";function $7(e,t){let n=e.split("/"),r=n.length;return n.some(lC)&&(r+=I7),t&&(r+=P7),n.filter(i=>!lC(i)).reduce((i,s)=>i+(C7.test(s)?E7:s===""?T7:_7),r)}function A7(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function R7(e,t,n=!1){let{routesMeta:r}=e,i={},s="/",a=[];for(let c=0;c<r.length;++c){let d=r[c],h=c===r.length-1,m=s==="/"?t:t.slice(s.length)||"/",g=iv({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},m),b=d.route;if(!g&&h&&n&&!r[r.length-1].route.index&&(g=iv({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!g)return null;Object.assign(i,g.params),a.push({params:i,pathname:Zs([s,g.pathname]),pathnameBase:O7(Zs([s,g.pathnameBase])),route:b}),g.pathnameBase!=="/"&&(s=Zs([s,g.pathnameBase]))}return a}function iv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=L7(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],a=s.replace(/(.)\/+$/,"$1"),c=i.slice(1);return{params:r.reduce((h,{paramName:m,isOptional:g},b)=>{if(m==="*"){let k=c[b]||"";a=s.slice(0,s.length-k.length).replace(/(.)\/+$/,"$1")}const x=c[b];return g&&!x?h[m]=void 0:h[m]=(x||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:a,pattern:e}}function L7(e,t=!1,n=!0){$o(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,c,d)=>(r.push({paramName:c,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function M7(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return $o(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function na(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function D7(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Ch(e):e;return{pathname:n?n.startsWith("/")?n:N7(n,t):t,search:z7(r),hash:j7(i)}}function N7(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function E0(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function F7(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function cw(e){let t=F7(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function fw(e,t,n,r=!1){let i;typeof e=="string"?i=Ch(e):(i={...e},Dn(!i.pathname||!i.pathname.includes("?"),E0("?","pathname","search",i)),Dn(!i.pathname||!i.pathname.includes("#"),E0("#","pathname","hash",i)),Dn(!i.search||!i.search.includes("#"),E0("#","search","hash",i)));let s=e===""||i.pathname==="",a=s?"/":i.pathname,c;if(a==null)c=n;else{let g=t.length-1;if(!r&&a.startsWith("..")){let b=a.split("/");for(;b[0]==="..";)b.shift(),g-=1;i.pathname=b.join("/")}c=g>=0?t[g]:"/"}let d=D7(i,c),h=a&&a!=="/"&&a.endsWith("/"),m=(s||a===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(h||m)&&(d.pathname+="/"),d}var Zs=e=>e.join("/").replace(/\/\/+/g,"/"),O7=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),z7=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,j7=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function B7(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var X2=["POST","PUT","PATCH","DELETE"];new Set(X2);var V7=["GET",...X2];new Set(V7);var jf=S.createContext(null);jf.displayName="DataRouter";var _v=S.createContext(null);_v.displayName="DataRouterState";S.createContext(!1);var Q2=S.createContext({isTransitioning:!1});Q2.displayName="ViewTransition";var U7=S.createContext(new Map);U7.displayName="Fetchers";var K7=S.createContext(null);K7.displayName="Await";var Ao=S.createContext(null);Ao.displayName="Navigation";var Iv=S.createContext(null);Iv.displayName="Location";var oo=S.createContext({outlet:null,matches:[],isDataRoute:!1});oo.displayName="Route";var dw=S.createContext(null);dw.displayName="RouteError";function W7(e,{relative:t}={}){Dn(Bf(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=S.useContext(Ao),{hash:i,pathname:s,search:a}=Eh(e,{relative:t}),c=s;return n!=="/"&&(c=s==="/"?n:Zs([n,s])),r.createHref({pathname:c,search:a,hash:i})}function Bf(){return S.useContext(Iv)!=null}function al(){return Dn(Bf(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(Iv).location}var J2="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Z2(e){S.useContext(Ao).static||S.useLayoutEffect(e)}function pw(){let{isDataRoute:e}=S.useContext(oo);return e?sj():H7()}function H7(){Dn(Bf(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(jf),{basename:t,navigator:n}=S.useContext(Ao),{matches:r}=S.useContext(oo),{pathname:i}=al(),s=JSON.stringify(cw(r)),a=S.useRef(!1);return Z2(()=>{a.current=!0}),S.useCallback((d,h={})=>{if($o(a.current,J2),!a.current)return;if(typeof d=="number"){n.go(d);return}let m=fw(d,JSON.parse(s),i,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Zs([t,m.pathname])),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,s,i,e])}var G7=S.createContext(null);function q7(e){let t=S.useContext(oo).outlet;return t&&S.createElement(G7.Provider,{value:e},t)}function eI(){let{matches:e}=S.useContext(oo),t=e[e.length-1];return t?t.params:{}}function Eh(e,{relative:t}={}){let{matches:n}=S.useContext(oo),{pathname:r}=al(),i=JSON.stringify(cw(n));return S.useMemo(()=>fw(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function Y7(e,t){return tI(e)}function tI(e,t,n,r){Dn(Bf(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=S.useContext(Ao),{matches:s}=S.useContext(oo),a=s[s.length-1],c=a?a.params:{},d=a?a.pathname:"/",h=a?a.pathnameBase:"/",m=a&&a.route;{let _=m&&m.path||"";nI(d,!m||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${_}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
44
44
 
45
45
  Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let g=al(),b;b=g;let x=b.pathname||"/",k=x;if(h!=="/"){let _=h.replace(/^\//,"").split("/");k="/"+x.replace(/^\//,"").split("/").slice(_.length).join("/")}let P=G2(e,{pathname:k});return $o(m||P!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),$o(P==null||P[P.length-1].route.element!==void 0||P[P.length-1].route.Component!==void 0||P[P.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),ej(P&&P.map(_=>Object.assign({},_,{params:Object.assign({},c,_.params),pathname:Zs([h,i.encodeLocation?i.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?h:Zs([h,i.encodeLocation?i.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),s,n,r)}function X7(){let e=oj(),t=B7(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:s},"ErrorBoundary")," or"," ",S.createElement("code",{style:s},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),n?S.createElement("pre",{style:i},n):null,a)}var Q7=S.createElement(X7,null),J7=class extends S.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?S.createElement(oo.Provider,{value:this.props.routeContext},S.createElement(dw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Z7({routeContext:e,match:t,children:n}){let r=S.useContext(jf);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(oo.Provider,{value:e},n)}function ej(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,s=n?.errors;if(s!=null){let d=i.findIndex(h=>h.route.id&&s?.[h.route.id]!==void 0);Dn(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,d+1))}let a=!1,c=-1;if(n)for(let d=0;d<i.length;d++){let h=i[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=d),h.route.id){let{loaderData:m,errors:g}=n,b=h.route.loader&&!m.hasOwnProperty(h.route.id)&&(!g||g[h.route.id]===void 0);if(h.route.lazy||b){a=!0,c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}return i.reduceRight((d,h,m)=>{let g,b=!1,x=null,k=null;n&&(g=s&&h.route.id?s[h.route.id]:void 0,x=h.route.errorElement||Q7,a&&(c<0&&m===0?(nI("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,k=null):c===m&&(b=!0,k=h.route.hydrateFallbackElement||null)));let P=t.concat(i.slice(0,m+1)),T=()=>{let _;return g?_=x:b?_=k:h.route.Component?_=S.createElement(h.route.Component,null):h.route.element?_=h.route.element:_=d,S.createElement(Z7,{match:h,routeContext:{outlet:d,matches:P,isDataRoute:n!=null},children:_})};return n&&(h.route.ErrorBoundary||h.route.errorElement||m===0)?S.createElement(J7,{location:n.location,revalidation:n.revalidation,component:x,error:g,children:T(),routeContext:{outlet:null,matches:P,isDataRoute:!0}}):T()},null)}function hw(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function tj(e){let t=S.useContext(jf);return Dn(t,hw(e)),t}function nj(e){let t=S.useContext(_v);return Dn(t,hw(e)),t}function rj(e){let t=S.useContext(oo);return Dn(t,hw(e)),t}function mw(e){let t=rj(e),n=t.matches[t.matches.length-1];return Dn(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function ij(){return mw("useRouteId")}function oj(){let e=S.useContext(dw),t=nj("useRouteError"),n=mw("useRouteError");return e!==void 0?e:t.errors?.[n]}function sj(){let{router:e}=tj("useNavigate"),t=mw("useNavigate"),n=S.useRef(!1);return Z2(()=>{n.current=!0}),S.useCallback(async(i,s={})=>{$o(n.current,J2),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...s}))},[e,t])}var uC={};function nI(e,t,n){!t&&!uC[e]&&(uC[e]=!0,$o(!1,n))}S.memo(aj);function aj({routes:e,future:t,state:n}){return tI(e,void 0,n,t)}function yq({to:e,replace:t,state:n,relative:r}){Dn(Bf(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=S.useContext(Ao);$o(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=S.useContext(oo),{pathname:a}=al(),c=pw(),d=fw(e,cw(s),a,r==="path"),h=JSON.stringify(d);return S.useEffect(()=>{c(JSON.parse(h),{replace:t,state:n,relative:r})},[c,h,r,t,n]),null}function lj(e){return q7(e.context)}function uj({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:s=!1}){Dn(!Bf(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),c=S.useMemo(()=>({basename:a,navigator:i,static:s,future:{}}),[a,i,s]);typeof n=="string"&&(n=Ch(n));let{pathname:d="/",search:h="",hash:m="",state:g=null,key:b="default"}=n,x=S.useMemo(()=>{let k=na(d,a);return k==null?null:{location:{pathname:k,search:h,hash:m,state:g,key:b},navigationType:r}},[a,d,h,m,g,b,r]);return $o(x!=null,`<Router basename="${a}"> is not able to match the URL "${d}${h}${m}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:S.createElement(Ao.Provider,{value:c},S.createElement(Iv.Provider,{children:t,value:x}))}var Og="get",zg="application/x-www-form-urlencoded";function $v(e){return e!=null&&typeof e.tagName=="string"}function cj(e){return $v(e)&&e.tagName.toLowerCase()==="button"}function fj(e){return $v(e)&&e.tagName.toLowerCase()==="form"}function dj(e){return $v(e)&&e.tagName.toLowerCase()==="input"}function pj(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function hj(e,t){return e.button===0&&(!t||t==="_self")&&!pj(e)}var kg=null;function mj(){if(kg===null)try{new FormData(document.createElement("form"),0),kg=!1}catch{kg=!0}return kg}var gj=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function P0(e){return e!=null&&!gj.has(e)?($o(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${zg}"`),null):e}function vj(e,t){let n,r,i,s,a;if(fj(e)){let c=e.getAttribute("action");r=c?na(c,t):null,n=e.getAttribute("method")||Og,i=P0(e.getAttribute("enctype"))||zg,s=new FormData(e)}else if(cj(e)||dj(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||c.getAttribute("action");if(r=d?na(d,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||Og,i=P0(e.getAttribute("formenctype"))||P0(c.getAttribute("enctype"))||zg,s=new FormData(c,e),!mj()){let{name:h,type:m,value:g}=e;if(m==="image"){let b=h?`${h}.`:"";s.append(`${b}x`,"0"),s.append(`${b}y`,"0")}else h&&s.append(h,g)}}else{if($v(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Og,r=null,i=zg,a=e}return s&&i==="text/plain"&&(a=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function gw(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function yj(e,t,n){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname=`_root.${n}`:t&&na(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}async function bj(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function xj(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function wj(e,t,n){let r=await Promise.all(e.map(async i=>{let s=t.routes[i.route.id];if(s){let a=await bj(s,n);return a.links?a.links():[]}return[]}));return Ej(r.flat(1).filter(xj).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function cC(e,t,n,r,i,s){let a=(d,h)=>n[h]?d.route.id!==n[h].route.id:!0,c=(d,h)=>n[h].pathname!==d.pathname||n[h].route.path?.endsWith("*")&&n[h].params["*"]!==d.params["*"];return s==="assets"?t.filter((d,h)=>a(d,h)||c(d,h)):s==="data"?t.filter((d,h)=>{let m=r.routes[d.route.id];if(!m||!m.hasLoader)return!1;if(a(d,h)||c(d,h))return!0;if(d.route.shouldRevalidate){let g=d.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function Sj(e,t,{includeHydrateFallback:n}={}){return kj(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function kj(e){return[...new Set(e)]}function Cj(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Ej(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let s=JSON.stringify(Cj(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}function rI(){let e=S.useContext(jf);return gw(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Pj(){let e=S.useContext(_v);return gw(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var vw=S.createContext(void 0);vw.displayName="FrameworkContext";function iI(){let e=S.useContext(vw);return gw(e,"You must render this element inside a <HydratedRouter> element"),e}function Tj(e,t){let n=S.useContext(vw),[r,i]=S.useState(!1),[s,a]=S.useState(!1),{onFocus:c,onBlur:d,onMouseEnter:h,onMouseLeave:m,onTouchStart:g}=t,b=S.useRef(null);S.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let P=_=>{_.forEach(A=>{a(A.isIntersecting)})},T=new IntersectionObserver(P,{threshold:.5});return b.current&&T.observe(b.current),()=>{T.disconnect()}}},[e]),S.useEffect(()=>{if(r){let P=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(P)}}},[r]);let x=()=>{i(!0)},k=()=>{i(!1),a(!1)};return n?e!=="intent"?[s,b,{}]:[s,b,{onFocus:kp(c,x),onBlur:kp(d,k),onMouseEnter:kp(h,x),onMouseLeave:kp(m,k),onTouchStart:kp(g,x)}]:[!1,b,{}]}function kp(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function _j({page:e,...t}){let{router:n}=rI(),r=S.useMemo(()=>G2(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?S.createElement($j,{page:e,matches:r,...t}):null}function Ij(e){let{manifest:t,routeModules:n}=iI(),[r,i]=S.useState([]);return S.useEffect(()=>{let s=!1;return wj(e,t,n).then(a=>{s||i(a)}),()=>{s=!0}},[e,t,n]),r}function $j({page:e,matches:t,...n}){let r=al(),{manifest:i,routeModules:s}=iI(),{basename:a}=rI(),{loaderData:c,matches:d}=Pj(),h=S.useMemo(()=>cC(e,t,d,i,r,"data"),[e,t,d,i,r]),m=S.useMemo(()=>cC(e,t,d,i,r,"assets"),[e,t,d,i,r]),g=S.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let k=new Set,P=!1;if(t.forEach(_=>{let A=i.routes[_.route.id];!A||!A.hasLoader||(!h.some(M=>M.route.id===_.route.id)&&_.route.id in c&&s[_.route.id]?.shouldRevalidate||A.hasClientLoader?P=!0:k.add(_.route.id))}),k.size===0)return[];let T=yj(e,a,"data");return P&&k.size>0&&T.searchParams.set("_routes",t.filter(_=>k.has(_.route.id)).map(_=>_.route.id).join(",")),[T.pathname+T.search]},[a,c,r,i,h,t,e,s]),b=S.useMemo(()=>Sj(m,i),[m,i]),x=Ij(m);return S.createElement(S.Fragment,null,g.map(k=>S.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...n})),b.map(k=>S.createElement("link",{key:k,rel:"modulepreload",href:k,...n})),x.map(({key:k,link:P})=>S.createElement("link",{key:k,...P})))}function Aj(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var oI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{oI&&(window.__reactRouterVersion="7.7.1")}catch{}function Rj({basename:e,children:t,window:n}){let r=S.useRef();r.current==null&&(r.current=y7({window:n,v5Compat:!0}));let i=r.current,[s,a]=S.useState({action:i.action,location:i.location}),c=S.useCallback(d=>{S.startTransition(()=>a(d))},[a]);return S.useLayoutEffect(()=>i.listen(c),[i,c]),S.createElement(uj,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i})}var sI=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,aI=S.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:a,state:c,target:d,to:h,preventScrollReset:m,viewTransition:g,...b},x){let{basename:k}=S.useContext(Ao),P=typeof h=="string"&&sI.test(h),T,_=!1;if(typeof h=="string"&&P&&(T=h,oI))try{let ie=new URL(window.location.href),B=h.startsWith("//")?new URL(ie.protocol+h):new URL(h),W=na(B.pathname,k);B.origin===ie.origin&&W!=null?h=W+B.search+B.hash:_=!0}catch{$o(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let A=W7(h,{relative:i}),[M,O,j]=Tj(r,b),$=Nj(h,{replace:a,state:c,target:d,preventScrollReset:m,relative:i,viewTransition:g});function Y(ie){t&&t(ie),ie.defaultPrevented||$(ie)}let te=S.createElement("a",{...b,...j,href:T||A,onClick:_||s?t:Y,ref:Aj(x,O),target:d,"data-discover":!P&&n==="render"?"true":void 0});return M&&!P?S.createElement(S.Fragment,null,te,S.createElement(_j,{page:A})):te});aI.displayName="Link";var Lj=S.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:a,viewTransition:c,children:d,...h},m){let g=Eh(a,{relative:h.relative}),b=al(),x=S.useContext(_v),{navigator:k,basename:P}=S.useContext(Ao),T=x!=null&&Bj(g)&&c===!0,_=k.encodeLocation?k.encodeLocation(g).pathname:g.pathname,A=b.pathname,M=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;n||(A=A.toLowerCase(),M=M?M.toLowerCase():null,_=_.toLowerCase()),M&&P&&(M=na(M,P)||M);const O=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let j=A===_||!i&&A.startsWith(_)&&A.charAt(O)==="/",$=M!=null&&(M===_||!i&&M.startsWith(_)&&M.charAt(_.length)==="/"),Y={isActive:j,isPending:$,isTransitioning:T},te=j?t:void 0,ie;typeof r=="function"?ie=r(Y):ie=[r,j?"active":null,$?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let B=typeof s=="function"?s(Y):s;return S.createElement(aI,{...h,"aria-current":te,className:ie,ref:m,style:B,to:a,viewTransition:c},typeof d=="function"?d(Y):d)});Lj.displayName="NavLink";var Mj=S.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:s,method:a=Og,action:c,onSubmit:d,relative:h,preventScrollReset:m,viewTransition:g,...b},x)=>{let k=zj(),P=jj(c,{relative:h}),T=a.toLowerCase()==="get"?"get":"post",_=typeof c=="string"&&sI.test(c),A=M=>{if(d&&d(M),M.defaultPrevented)return;M.preventDefault();let O=M.nativeEvent.submitter,j=O?.getAttribute("formmethod")||a;k(O||M.currentTarget,{fetcherKey:t,method:j,navigate:n,replace:i,state:s,relative:h,preventScrollReset:m,viewTransition:g})};return S.createElement("form",{ref:x,method:T,action:P,onSubmit:r?d:A,...b,"data-discover":!_&&e==="render"?"true":void 0})});Mj.displayName="Form";function Dj(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lI(e){let t=S.useContext(jf);return Dn(t,Dj(e)),t}function Nj(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:s,viewTransition:a}={}){let c=pw(),d=al(),h=Eh(e,{relative:s});return S.useCallback(m=>{if(hj(m,t)){m.preventDefault();let g=n!==void 0?n:lh(d)===lh(h);c(e,{replace:g,state:r,preventScrollReset:i,relative:s,viewTransition:a})}},[d,c,h,n,r,t,e,i,s,a])}var Fj=0,Oj=()=>`__${String(++Fj)}__`;function zj(){let{router:e}=lI("useSubmit"),{basename:t}=S.useContext(Ao),n=ij();return S.useCallback(async(r,i={})=>{let{action:s,method:a,encType:c,formData:d,body:h}=vj(r,t);if(i.navigate===!1){let m=i.fetcherKey||Oj();await e.fetch(m,n,i.action||s,{preventScrollReset:i.preventScrollReset,formData:d,body:h,formMethod:i.method||a,formEncType:i.encType||c,flushSync:i.flushSync})}else await e.navigate(i.action||s,{preventScrollReset:i.preventScrollReset,formData:d,body:h,formMethod:i.method||a,formEncType:i.encType||c,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}function jj(e,{relative:t}={}){let{basename:n}=S.useContext(Ao),r=S.useContext(oo);Dn(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...Eh(e||".",{relative:t})},a=al();if(e==null){s.search=a.search;let c=new URLSearchParams(s.search),d=c.getAll("index");if(d.some(m=>m==="")){c.delete("index"),d.filter(g=>g).forEach(g=>c.append("index",g));let m=c.toString();s.search=m?`?${m}`:""}}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:Zs([n,s.pathname])),lh(s)}function Bj(e,{relative:t}={}){let n=S.useContext(Q2);Dn(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=lI("useViewTransitionState"),i=Eh(e,{relative:t});if(!n.isTransitioning)return!1;let s=na(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=na(n.nextLocation.pathname,r)||n.nextLocation.pathname;return iv(i.pathname,a)!=null||iv(i.pathname,s)!=null}function Vj(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Uj=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Kj=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wj={};function fC(e,t){return(Wj.jsx?Kj:Uj).test(e)}const Hj=/[ \t\n\f\r]/g;function Gj(e){return typeof e=="object"?e.type==="text"?dC(e.value):!1:dC(e)}function dC(e){return e.replace(Hj,"")===""}class Ph{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ph.prototype.normal={};Ph.prototype.property={};Ph.prototype.space=void 0;function uI(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ph(n,r,t)}function Vb(e){return e.toLowerCase()}class di{constructor(t,n){this.attribute=n,this.property=t}}di.prototype.attribute="";di.prototype.booleanish=!1;di.prototype.boolean=!1;di.prototype.commaOrSpaceSeparated=!1;di.prototype.commaSeparated=!1;di.prototype.defined=!1;di.prototype.mustUseProperty=!1;di.prototype.number=!1;di.prototype.overloadedBoolean=!1;di.prototype.property="";di.prototype.spaceSeparated=!1;di.prototype.space=void 0;let qj=0;const ft=Mu(),Rn=Mu(),Ub=Mu(),Pe=Mu(),Qt=Mu(),Cf=Mu(),Ii=Mu();function Mu(){return 2**++qj}const Kb=Object.freeze(Object.defineProperty({__proto__:null,boolean:ft,booleanish:Rn,commaOrSpaceSeparated:Ii,commaSeparated:Cf,number:Pe,overloadedBoolean:Ub,spaceSeparated:Qt},Symbol.toStringTag,{value:"Module"})),T0=Object.keys(Kb);class yw extends di{constructor(t,n,r,i){let s=-1;if(super(t,n),pC(this,"space",i),typeof r=="number")for(;++s<T0.length;){const a=T0[s];pC(this,T0[s],(r&Kb[a])===Kb[a])}}}yw.prototype.defined=!0;function pC(e,t,n){n&&(e[t]=n)}function Vf(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new yw(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Vb(r)]=r,n[Vb(s.attribute)]=r}return new Ph(t,n,e.space)}const cI=Vf({properties:{ariaActiveDescendant:null,ariaAtomic:Rn,ariaAutoComplete:null,ariaBusy:Rn,ariaChecked:Rn,ariaColCount:Pe,ariaColIndex:Pe,ariaColSpan:Pe,ariaControls:Qt,ariaCurrent:null,ariaDescribedBy:Qt,ariaDetails:null,ariaDisabled:Rn,ariaDropEffect:Qt,ariaErrorMessage:null,ariaExpanded:Rn,ariaFlowTo:Qt,ariaGrabbed:Rn,ariaHasPopup:null,ariaHidden:Rn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Qt,ariaLevel:Pe,ariaLive:null,ariaModal:Rn,ariaMultiLine:Rn,ariaMultiSelectable:Rn,ariaOrientation:null,ariaOwns:Qt,ariaPlaceholder:null,ariaPosInSet:Pe,ariaPressed:Rn,ariaReadOnly:Rn,ariaRelevant:null,ariaRequired:Rn,ariaRoleDescription:Qt,ariaRowCount:Pe,ariaRowIndex:Pe,ariaRowSpan:Pe,ariaSelected:Rn,ariaSetSize:Pe,ariaSort:null,ariaValueMax:Pe,ariaValueMin:Pe,ariaValueNow:Pe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function fI(e,t){return t in e?e[t]:t}function dI(e,t){return fI(e,t.toLowerCase())}const Yj=Vf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Cf,acceptCharset:Qt,accessKey:Qt,action:null,allow:null,allowFullScreen:ft,allowPaymentRequest:ft,allowUserMedia:ft,alt:null,as:null,async:ft,autoCapitalize:null,autoComplete:Qt,autoFocus:ft,autoPlay:ft,blocking:Qt,capture:null,charSet:null,checked:ft,cite:null,className:Qt,cols:Pe,colSpan:null,content:null,contentEditable:Rn,controls:ft,controlsList:Qt,coords:Pe|Cf,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ft,defer:ft,dir:null,dirName:null,disabled:ft,download:Ub,draggable:Rn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ft,formTarget:null,headers:Qt,height:Pe,hidden:Ub,high:Pe,href:null,hrefLang:null,htmlFor:Qt,httpEquiv:Qt,id:null,imageSizes:null,imageSrcSet:null,inert:ft,inputMode:null,integrity:null,is:null,isMap:ft,itemId:null,itemProp:Qt,itemRef:Qt,itemScope:ft,itemType:Qt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ft,low:Pe,manifest:null,max:null,maxLength:Pe,media:null,method:null,min:null,minLength:Pe,multiple:ft,muted:ft,name:null,nonce:null,noModule:ft,noValidate:ft,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ft,optimum:Pe,pattern:null,ping:Qt,placeholder:null,playsInline:ft,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ft,referrerPolicy:null,rel:Qt,required:ft,reversed:ft,rows:Pe,rowSpan:Pe,sandbox:Qt,scope:null,scoped:ft,seamless:ft,selected:ft,shadowRootClonable:ft,shadowRootDelegatesFocus:ft,shadowRootMode:null,shape:null,size:Pe,sizes:null,slot:null,span:Pe,spellCheck:Rn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Pe,step:null,style:null,tabIndex:Pe,target:null,title:null,translate:null,type:null,typeMustMatch:ft,useMap:null,value:Rn,width:Pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Qt,axis:null,background:null,bgColor:null,border:Pe,borderColor:null,bottomMargin:Pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ft,declare:ft,event:null,face:null,frame:null,frameBorder:null,hSpace:Pe,leftMargin:Pe,link:null,longDesc:null,lowSrc:null,marginHeight:Pe,marginWidth:Pe,noResize:ft,noHref:ft,noShade:ft,noWrap:ft,object:null,profile:null,prompt:null,rev:null,rightMargin:Pe,rules:null,scheme:null,scrolling:Rn,standby:null,summary:null,text:null,topMargin:Pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Pe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ft,disableRemotePlayback:ft,prefix:null,property:null,results:Pe,security:null,unselectable:null},space:"html",transform:dI}),Xj=Vf({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ii,accentHeight:Pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Pe,amplitude:Pe,arabicForm:null,ascent:Pe,attributeName:null,attributeType:null,azimuth:Pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Pe,by:null,calcMode:null,capHeight:Pe,className:Qt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Pe,diffuseConstant:Pe,direction:null,display:null,dur:null,divisor:Pe,dominantBaseline:null,download:ft,dx:null,dy:null,edgeMode:null,editable:null,elevation:Pe,enableBackground:null,end:null,event:null,exponent:Pe,externalResourcesRequired:null,fill:null,fillOpacity:Pe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Cf,g2:Cf,glyphName:Cf,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Pe,horizOriginX:Pe,horizOriginY:Pe,id:null,ideographic:Pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Pe,k:Pe,k1:Pe,k2:Pe,k3:Pe,k4:Pe,kernelMatrix:Ii,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Pe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Pe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Pe,overlineThickness:Pe,paintOrder:null,panose1:null,path:null,pathLength:Pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Qt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Pe,pointsAtY:Pe,pointsAtZ:Pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ii,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ii,rev:Ii,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ii,requiredFeatures:Ii,requiredFonts:Ii,requiredFormats:Ii,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Pe,specularExponent:Pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Pe,strikethroughThickness:Pe,string:null,stroke:null,strokeDashArray:Ii,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Pe,strokeOpacity:Pe,strokeWidth:null,style:null,surfaceScale:Pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ii,tabIndex:Pe,tableValues:null,target:null,targetX:Pe,targetY:Pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ii,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Pe,underlineThickness:Pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Pe,values:null,vAlphabetic:Pe,vMathematical:Pe,vectorEffect:null,vHanging:Pe,vIdeographic:Pe,version:null,vertAdvY:Pe,vertOriginX:Pe,vertOriginY:Pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:fI}),pI=Vf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),hI=Vf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:dI}),mI=Vf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Qj={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Jj=/[A-Z]/g,hC=/-[a-z]/g,Zj=/^data[-\w.:]+$/i;function eB(e,t){const n=Vb(t);let r=t,i=di;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Zj.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(hC,nB);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!hC.test(s)){let a=s.replace(Jj,tB);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=yw}return new i(r,t)}function tB(e){return"-"+e.toLowerCase()}function nB(e){return e.charAt(1).toUpperCase()}const rB=uI([cI,Yj,pI,hI,mI],"html"),bw=uI([cI,Xj,pI,hI,mI],"svg");function iB(e){return e.join(" ").trim()}var cf={},_0,mC;function oB(){if(mC)return _0;mC=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
46
46
  `,h="/",m="*",g="",b="comment",x="declaration";_0=function(P,T){if(typeof P!="string")throw new TypeError("First argument must be a string");if(!P)return[];T=T||{};var _=1,A=1;function M(ee){var H=ee.match(t);H&&(_+=H.length);var le=ee.lastIndexOf(d);A=~le?ee.length-le:A+ee.length}function O(){var ee={line:_,column:A};return function(H){return H.position=new j(ee),te(),H}}function j(ee){this.start=ee,this.end={line:_,column:A},this.source=T.source}j.prototype.content=P;function $(ee){var H=new Error(T.source+":"+_+":"+A+": "+ee);if(H.reason=ee,H.filename=T.source,H.line=_,H.column=A,H.source=P,!T.silent)throw H}function Y(ee){var H=ee.exec(P);if(H){var le=H[0];return M(le),P=P.slice(le.length),H}}function te(){Y(n)}function ie(ee){var H;for(ee=ee||[];H=B();)H!==!1&&ee.push(H);return ee}function B(){var ee=O();if(!(h!=P.charAt(0)||m!=P.charAt(1))){for(var H=2;g!=P.charAt(H)&&(m!=P.charAt(H)||h!=P.charAt(H+1));)++H;if(H+=2,g===P.charAt(H-1))return $("End of comment missing");var le=P.slice(2,H-2);return A+=2,M(le),P=P.slice(H),A+=2,ee({type:b,comment:le})}}function W(){var ee=O(),H=Y(r);if(H){if(B(),!Y(i))return $("property missing ':'");var le=Y(s),J=ee({type:x,property:k(H[0].replace(e,g)),value:le?k(le[0].replace(e,g)):g});return Y(a),J}}function G(){var ee=[];ie(ee);for(var H;H=W();)H!==!1&&(ee.push(H),ie(ee));return ee}return te(),G()};function k(P){return P?P.replace(c,g):g}return _0}var gC;function sB(){if(gC)return cf;gC=1;var e=cf&&cf.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cf,"__esModule",{value:!0}),cf.default=n;var t=e(oB());function n(r,i){var s=null;if(!r||typeof r!="string")return s;var a=(0,t.default)(r),c=typeof i=="function";return a.forEach(function(d){if(d.type==="declaration"){var h=d.property,m=d.value;c?i(h,m,d):m&&(s=s||{},s[h]=m)}}),s}return cf}var Cp={},vC;function aB(){if(vC)return Cp;vC=1,Object.defineProperty(Cp,"__esModule",{value:!0}),Cp.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(h){return!h||n.test(h)||e.test(h)},a=function(h,m){return m.toUpperCase()},c=function(h,m){return"".concat(m,"-")},d=function(h,m){return m===void 0&&(m={}),s(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(i,c):h=h.replace(r,c),h.replace(t,a))};return Cp.camelCase=d,Cp}var Ep,yC;function lB(){if(yC)return Ep;yC=1;var e=Ep&&Ep.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(sB()),n=aB();function r(i,s){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(c,d){c&&d&&(a[(0,n.camelCase)(c,s)]=d)}),a}return r.default=r,Ep=r,Ep}var uB=lB();const cB=hv(uB),gI=vI("end"),xw=vI("start");function vI(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function fB(e){const t=xw(e),n=gI(e);if(t&&n)return{start:t,end:n}}function Up(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?bC(e.position):"start"in e||"end"in e?bC(e):"line"in e||"column"in e?Wb(e):""}function Wb(e){return xC(e&&e.line)+":"+xC(e&&e.column)}function bC(e){return Wb(e&&e.start)+"-"+Wb(e&&e.end)}function xC(e){return e&&typeof e=="number"?e:1}class Cr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?s.ruleId=r:(s.source=r.slice(0,d),s.ruleId=r.slice(d+1))}if(!s.place&&s.ancestors&&s.ancestors){const d=s.ancestors[s.ancestors.length-1];d&&(s.place=d.position)}const c=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=c?c.line:void 0,this.name=Up(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual,this.expected,this.note,this.url}}Cr.prototype.file="";Cr.prototype.name="";Cr.prototype.reason="";Cr.prototype.message="";Cr.prototype.stack="";Cr.prototype.column=void 0;Cr.prototype.line=void 0;Cr.prototype.ancestors=void 0;Cr.prototype.cause=void 0;Cr.prototype.fatal=void 0;Cr.prototype.place=void 0;Cr.prototype.ruleId=void 0;Cr.prototype.source=void 0;const ww={}.hasOwnProperty,dB=new Map,pB=/[A-Z]/g,hB=new Set(["table","tbody","thead","tfoot","tr"]),mB=new Set(["td","th"]),yI="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function gB(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=CB(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=kB(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?bw:rB,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=bI(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function bI(e,t,n){if(t.type==="element")return vB(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return yB(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return xB(e,t,n);if(t.type==="mdxjsEsm")return bB(e,t);if(t.type==="root")return wB(e,t,n);if(t.type==="text")return SB(e,t)}function vB(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=bw,e.schema=i),e.ancestors.push(t);const s=wI(e,t.tagName,!1),a=EB(e,t);let c=kw(e,t);return hB.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!Gj(d):!0})),xI(e,a,s,t),Sw(a,c),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function yB(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}uh(e,t.position)}function bB(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);uh(e,t.position)}function xB(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=bw,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:wI(e,t.name,!0),a=PB(e,t),c=kw(e,t);return xI(e,a,s,t),Sw(a,c),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function wB(e,t,n){const r={};return Sw(r,kw(e,t)),e.create(t,e.Fragment,r,n)}function SB(e,t){return t.value}function xI(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Sw(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function kB(e,t,n){return r;function r(i,s,a,c){const h=Array.isArray(a.children)?n:t;return c?h(s,a,c):h(s,a)}}function CB(e,t){return n;function n(r,i,s,a){const c=Array.isArray(s.children),d=xw(r);return t(i,s,a,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function EB(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&ww.call(t.properties,i)){const s=TB(e,i,t.properties[i]);if(s){const[a,c]=s;e.tableCellAlignToStyle&&a==="align"&&typeof c=="string"&&mB.has(t.tagName)?r=c:n[a]=c}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function PB(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const c=a.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else uh(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,s=e.evaluater.evaluateExpression(c.expression)}else uh(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function kw(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:dB;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const d=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(d){const h=i.get(d)||0;a=d+"-"+h,i.set(d,h+1)}}const c=bI(e,s,a);c!==void 0&&n.push(c)}return n}function TB(e,t,n){const r=eB(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Vj(n):iB(n)),r.property==="style"){let i=typeof n=="object"?n:_B(e,String(n));return e.stylePropertyNameCase==="css"&&(i=IB(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Qj[r.property]||r.property:r.attribute,n]}}function _B(e,t){try{return cB(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Cr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=yI+"#cannot-parse-style-attribute",i}}function wI(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const c=fC(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:c,computed:!!(s&&c.type==="Literal"),optional:!1}:c}r=a}else r=fC(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return ww.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);uh(e)}function uh(e,t){const n=new Cr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=yI+"#cannot-handle-mdx-estrees-without-createevaluater",n}function IB(e){const t={};let n;for(n in e)ww.call(e,n)&&(t[$B(n)]=e[n]);return t}function $B(e){let t=e.replace(pB,AB);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function AB(e){return"-"+e.toLowerCase()}const I0={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},RB={};function Cw(e,t){const n=RB,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return SI(e,r,i)}function SI(e,t,n){if(LB(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return wC(e.children,t,n)}return Array.isArray(e)?wC(e,t,n):""}function wC(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=SI(e[i],t,n);return r.join("")}function LB(e){return!!(e&&typeof e=="object")}const SC=document.createElement("i");function Ew(e){const t="&"+e+";";SC.innerHTML=t;const n=SC.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ai(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function to(e,t){return e.length>0?(Ai(e,e.length,0,t),e):t}const kC={}.hasOwnProperty;function kI(e){const t={};let n=-1;for(;++n<e.length;)MB(t,e[n]);return t}function MB(e,t){let n;for(n in t){const i=(kC.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){kC.call(i,a)||(i[a]=[]);const c=s[a];DB(i[a],Array.isArray(c)?c:c?[c]:[])}}}function DB(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ai(e,0,0,r)}function CI(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Io(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Fr=ll(/[A-Za-z]/),kr=ll(/[\dA-Za-z]/),NB=ll(/[#-'*+\--9=?A-Z^-~]/);function ov(e){return e!==null&&(e<32||e===127)}const Hb=ll(/\d/),FB=ll(/[\dA-Fa-f]/),OB=ll(/[!-/:-@[-`{-~]/);function Ye(e){return e!==null&&e<-2}function Ut(e){return e!==null&&(e<0||e===32)}function vt(e){return e===-2||e===-1||e===32}const Av=ll(new RegExp("\\p{P}|\\p{S}","u")),Tu=ll(/\s/);function ll(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Uf(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&kr(e.charCodeAt(n+1))&&kr(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const c=e.charCodeAt(n+1);s<56320&&c>56319&&c<57344?(a=String.fromCharCode(s,c),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ct(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(d){return vt(d)?(e.enter(n),c(d)):t(d)}function c(d){return vt(d)&&s++<i?(e.consume(d),c):(e.exit(n),t(d))}}const zB={tokenize:jB};function jB(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ct(e,t,"linePrefix")}function i(c){return e.enter("paragraph"),s(c)}function s(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,a(c)}function a(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Ye(c)?(e.consume(c),e.exit("chunkText"),s):(e.consume(c),a)}}const BB={tokenize:VB},CC={tokenize:UB};function VB(e){const t=this,n=[];let r=0,i,s,a;return c;function c(M){if(r<n.length){const O=n[r];return t.containerState=O[1],e.attempt(O[0].continuation,d,h)(M)}return h(M)}function d(M){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&A();const O=t.events.length;let j=O,$;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){$=t.events[j][1].end;break}_(r);let Y=O;for(;Y<t.events.length;)t.events[Y][1].end={...$},Y++;return Ai(t.events,j+1,0,t.events.slice(O)),t.events.length=Y,h(M)}return c(M)}function h(M){if(r===n.length){if(!i)return b(M);if(i.currentConstruct&&i.currentConstruct.concrete)return k(M);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(CC,m,g)(M)}function m(M){return i&&A(),_(r),b(M)}function g(M){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,k(M)}function b(M){return t.containerState={},e.attempt(CC,x,k)(M)}function x(M){return r++,n.push([t.currentConstruct,t.containerState]),b(M)}function k(M){if(M===null){i&&A(),_(0),e.consume(M);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),P(M)}function P(M){if(M===null){T(e.exit("chunkFlow"),!0),_(0),e.consume(M);return}return Ye(M)?(e.consume(M),T(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(M),P)}function T(M,O){const j=t.sliceStream(M);if(O&&j.push(null),M.previous=s,s&&(s.next=M),s=M,i.defineSkip(M.start),i.write(j),t.parser.lazy[M.start.line]){let $=i.events.length;for(;$--;)if(i.events[$][1].start.offset<a&&(!i.events[$][1].end||i.events[$][1].end.offset>a))return;const Y=t.events.length;let te=Y,ie,B;for(;te--;)if(t.events[te][0]==="exit"&&t.events[te][1].type==="chunkFlow"){if(ie){B=t.events[te][1].end;break}ie=!0}for(_(r),$=Y;$<t.events.length;)t.events[$][1].end={...B},$++;Ai(t.events,te+1,0,t.events.slice(Y)),t.events.length=$}}function _(M){let O=n.length;for(;O-- >M;){const j=n[O];t.containerState=j[1],j[0].exit.call(t,e)}n.length=M}function A(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function UB(e,t,n){return Ct(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Lf(e){if(e===null||Ut(e)||Tu(e))return 1;if(Av(e))return 2}function Rv(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Gb={name:"attention",resolveAll:KB,tokenize:WB};function KB(e,t){let n=-1,r,i,s,a,c,d,h,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const g={...e[r][1].end},b={...e[n][1].start};EC(g,-d),EC(b,d),a={type:d>1?"strongSequence":"emphasisSequence",start:g,end:{...e[r][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},s={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:d>1?"strong":"emphasis",start:{...a.start},end:{...c.end}},e[r][1].end={...a.start},e[n][1].start={...c.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=to(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=to(h,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),h=to(h,Rv(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=to(h,[["exit",s,t],["enter",c,t],["exit",c,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=to(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Ai(e,r-1,n-r+3,h),n=r+h.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function WB(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Lf(r);let s;return a;function a(d){return s=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===s)return e.consume(d),c;const h=e.exit("attentionSequence"),m=Lf(d),g=!m||m===2&&i||n.includes(d),b=!i||i===2&&m||n.includes(r);return h._open=!!(s===42?g:g&&(i||!b)),h._close=!!(s===42?b:b&&(m||!g)),t(d)}}function EC(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const HB={name:"autolink",tokenize:GB};function GB(e,t,n){let r=0;return i;function i(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(x){return Fr(x)?(e.consume(x),a):x===64?n(x):h(x)}function a(x){return x===43||x===45||x===46||kr(x)?(r=1,c(x)):h(x)}function c(x){return x===58?(e.consume(x),r=0,d):(x===43||x===45||x===46||kr(x))&&r++<32?(e.consume(x),c):(r=0,h(x))}function d(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||ov(x)?n(x):(e.consume(x),d)}function h(x){return x===64?(e.consume(x),m):NB(x)?(e.consume(x),h):n(x)}function m(x){return kr(x)?g(x):n(x)}function g(x){return x===46?(e.consume(x),r=0,m):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):b(x)}function b(x){if((x===45||kr(x))&&r++<63){const k=x===45?b:g;return e.consume(x),k}return n(x)}}const Th={partial:!0,tokenize:qB};function qB(e,t,n){return r;function r(s){return vt(s)?Ct(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||Ye(s)?t(s):n(s)}}const EI={continuation:{tokenize:XB},exit:QB,name:"blockQuote",tokenize:YB};function YB(e,t,n){const r=this;return i;function i(a){if(a===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return vt(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function XB(e,t,n){const r=this;return i;function i(a){return vt(a)?Ct(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(EI,t,n)(a)}}function QB(e){e.exit("blockQuote")}const PI={name:"characterEscape",tokenize:JB};function JB(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return OB(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const TI={name:"characterReference",tokenize:ZB};function ZB(e,t,n){const r=this;let i=0,s,a;return c;function c(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),d}function d(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),s=31,a=kr,m(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=FB,m):(e.enter("characterReferenceValue"),s=7,a=Hb,m(g))}function m(g){if(g===59&&i){const b=e.exit("characterReferenceValue");return a===kr&&!Ew(r.sliceSerialize(b))?n(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(g)&&i++<s?(e.consume(g),m):n(g)}}const PC={partial:!0,tokenize:t9},TC={concrete:!0,name:"codeFenced",tokenize:e9};function e9(e,t,n){const r=this,i={partial:!0,tokenize:j};let s=0,a=0,c;return d;function d($){return h($)}function h($){const Y=r.events[r.events.length-1];return s=Y&&Y[1].type==="linePrefix"?Y[2].sliceSerialize(Y[1],!0).length:0,c=$,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m($)}function m($){return $===c?(a++,e.consume($),m):a<3?n($):(e.exit("codeFencedFenceSequence"),vt($)?Ct(e,g,"whitespace")($):g($))}function g($){return $===null||Ye($)?(e.exit("codeFencedFence"),r.interrupt?t($):e.check(PC,P,O)($)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b($))}function b($){return $===null||Ye($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g($)):vt($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ct(e,x,"whitespace")($)):$===96&&$===c?n($):(e.consume($),b)}function x($){return $===null||Ye($)?g($):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k($))}function k($){return $===null||Ye($)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g($)):$===96&&$===c?n($):(e.consume($),k)}function P($){return e.attempt(i,O,T)($)}function T($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),_}function _($){return s>0&&vt($)?Ct(e,A,"linePrefix",s+1)($):A($)}function A($){return $===null||Ye($)?e.check(PC,P,O)($):(e.enter("codeFlowValue"),M($))}function M($){return $===null||Ye($)?(e.exit("codeFlowValue"),A($)):(e.consume($),M)}function O($){return e.exit("codeFenced"),t($)}function j($,Y,te){let ie=0;return B;function B(le){return $.enter("lineEnding"),$.consume(le),$.exit("lineEnding"),W}function W(le){return $.enter("codeFencedFence"),vt(le)?Ct($,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(le):G(le)}function G(le){return le===c?($.enter("codeFencedFenceSequence"),ee(le)):te(le)}function ee(le){return le===c?(ie++,$.consume(le),ee):ie>=a?($.exit("codeFencedFenceSequence"),vt(le)?Ct($,H,"whitespace")(le):H(le)):te(le)}function H(le){return le===null||Ye(le)?($.exit("codeFencedFence"),Y(le)):te(le)}}}function t9(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const $0={name:"codeIndented",tokenize:r9},n9={partial:!0,tokenize:i9};function r9(e,t,n){const r=this;return i;function i(h){return e.enter("codeIndented"),Ct(e,s,"linePrefix",5)(h)}function s(h){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?a(h):n(h)}function a(h){return h===null?d(h):Ye(h)?e.attempt(n9,a,d)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Ye(h)?(e.exit("codeFlowValue"),a(h)):(e.consume(h),c)}function d(h){return e.exit("codeIndented"),t(h)}}function i9(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Ye(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Ct(e,s,"linePrefix",5)(a)}function s(a){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):Ye(a)?i(a):n(a)}}const o9={name:"codeText",previous:a9,resolve:s9,tokenize:l9};function s9(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function a9(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function l9(e,t,n){let r=0,i,s;return a;function a(g){return e.enter("codeText"),e.enter("codeTextSequence"),c(g)}function c(g){return g===96?(e.consume(g),r++,c):(e.exit("codeTextSequence"),d(g))}function d(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),d):g===96?(s=e.enter("codeTextSequence"),i=0,m(g)):Ye(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||Ye(g)?(e.exit("codeTextData"),d(g)):(e.consume(g),h)}function m(g){return g===96?(e.consume(g),i++,m):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(s.type="codeTextData",h(g))}}class u9{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Pp(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Pp(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Pp(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Pp(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Pp(this.left,n.reverse())}}}function Pp(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function _I(e){const t={};let n=-1,r,i,s,a,c,d,h;const m=new u9(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,s=0,s<d.length&&d[s][1].type==="lineEndingBlank"&&(s+=2),s<d.length&&d[s][1].type==="content"))for(;++s<d.length&&d[s][1].type!=="content";)d[s][1].type==="chunkText"&&(d[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,c9(m,n)),n=t[n],h=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=m.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(m.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...m.get(i)[1].start},c=m.slice(i,n),c.unshift(r),m.splice(i,n-i+1,c))}}return Ai(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function c9(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const c=a.events,d=[],h={};let m,g,b=-1,x=n,k=0,P=0;const T=[P];for(;x;){for(;e.get(++i)[1]!==x;);s.push(i),x._tokenizer||(m=r.sliceStream(x),x.next||m.push(null),g&&a.defineSkip(x.start),x._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(m),x._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),g=x,x=x.next}for(x=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(P=b+1,T.push(P),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(a.events=[],x?(x._tokenizer=void 0,x.previous=void 0):T.pop(),b=T.length;b--;){const _=c.slice(T[b],T[b+1]),A=s.pop();d.push([A,A+_.length-1]),e.splice(A,2,_)}for(d.reverse(),b=-1;++b<d.length;)h[k+d[b][0]]=k+d[b][1],k+=d[b][1]-d[b][0]-1;return h}const f9={resolve:p9,tokenize:h9},d9={partial:!0,tokenize:m9};function p9(e){return _I(e),e}function h9(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(c)}function i(c){return c===null?s(c):Ye(c)?e.check(d9,a,s)(c):(e.consume(c),i)}function s(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function a(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function m9(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ct(e,s,"linePrefix")}function s(a){if(a===null||Ye(a))return n(a);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function II(e,t,n,r,i,s,a,c,d){const h=d||Number.POSITIVE_INFINITY;let m=0;return g;function g(_){return _===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(_),e.exit(s),b):_===null||_===32||_===41||ov(_)?n(_):(e.enter(r),e.enter(a),e.enter(c),e.enter("chunkString",{contentType:"string"}),P(_))}function b(_){return _===62?(e.enter(s),e.consume(_),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),x(_))}function x(_){return _===62?(e.exit("chunkString"),e.exit(c),b(_)):_===null||_===60||Ye(_)?n(_):(e.consume(_),_===92?k:x)}function k(_){return _===60||_===62||_===92?(e.consume(_),x):x(_)}function P(_){return!m&&(_===null||_===41||Ut(_))?(e.exit("chunkString"),e.exit(c),e.exit(a),e.exit(r),t(_)):m<h&&_===40?(e.consume(_),m++,P):_===41?(e.consume(_),m--,P):_===null||_===32||_===40||ov(_)?n(_):(e.consume(_),_===92?T:P)}function T(_){return _===40||_===41||_===92?(e.consume(_),P):P(_)}}function $I(e,t,n,r,i,s){const a=this;let c=0,d;return h;function h(x){return e.enter(r),e.enter(i),e.consume(x),e.exit(i),e.enter(s),m}function m(x){return c>999||x===null||x===91||x===93&&!d||x===94&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs?n(x):x===93?(e.exit(s),e.enter(i),e.consume(x),e.exit(i),e.exit(r),t):Ye(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||x===91||x===93||Ye(x)||c++>999?(e.exit("chunkString"),m(x)):(e.consume(x),d||(d=!vt(x)),x===92?b:g)}function b(x){return x===91||x===92||x===93?(e.consume(x),c++,g):g(x)}}function AI(e,t,n,r,i,s){let a;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(i),e.consume(b),e.exit(i),a=b===40?41:b,d):n(b)}function d(b){return b===a?(e.enter(i),e.consume(b),e.exit(i),e.exit(r),t):(e.enter(s),h(b))}function h(b){return b===a?(e.exit(s),d(a)):b===null?n(b):Ye(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Ct(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===a||b===null||Ye(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?g:m)}function g(b){return b===a||b===92?(e.consume(b),m):m(b)}}function Kp(e,t){let n;return r;function r(i){return Ye(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):vt(i)?Ct(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const g9={name:"definition",tokenize:y9},v9={partial:!0,tokenize:b9};function y9(e,t,n){const r=this;let i;return s;function s(x){return e.enter("definition"),a(x)}function a(x){return $I.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function c(x){return i=Io(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),d):n(x)}function d(x){return Ut(x)?Kp(e,h)(x):h(x)}function h(x){return II(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function m(x){return e.attempt(v9,g,g)(x)}function g(x){return vt(x)?Ct(e,b,"whitespace")(x):b(x)}function b(x){return x===null||Ye(x)?(e.exit("definition"),r.parser.defined.push(i),t(x)):n(x)}}function b9(e,t,n){return r;function r(c){return Ut(c)?Kp(e,i)(c):n(c)}function i(c){return AI(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function s(c){return vt(c)?Ct(e,a,"whitespace")(c):a(c)}function a(c){return c===null||Ye(c)?t(c):n(c)}}const x9={name:"hardBreakEscape",tokenize:w9};function w9(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return Ye(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const S9={name:"headingAtx",resolve:k9,tokenize:C9};function k9(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ai(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function C9(e,t,n){let r=0;return i;function i(m){return e.enter("atxHeading"),s(m)}function s(m){return e.enter("atxHeadingSequence"),a(m)}function a(m){return m===35&&r++<6?(e.consume(m),a):m===null||Ut(m)?(e.exit("atxHeadingSequence"),c(m)):n(m)}function c(m){return m===35?(e.enter("atxHeadingSequence"),d(m)):m===null||Ye(m)?(e.exit("atxHeading"),t(m)):vt(m)?Ct(e,c,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function d(m){return m===35?(e.consume(m),d):(e.exit("atxHeadingSequence"),c(m))}function h(m){return m===null||m===35||Ut(m)?(e.exit("atxHeadingText"),c(m)):(e.consume(m),h)}}const E9=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],_C=["pre","script","style","textarea"],P9={concrete:!0,name:"htmlFlow",resolveTo:I9,tokenize:$9},T9={partial:!0,tokenize:R9},_9={partial:!0,tokenize:A9};function I9(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function $9(e,t,n){const r=this;let i,s,a,c,d;return h;function h(z){return m(z)}function m(z){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(z),g}function g(z){return z===33?(e.consume(z),b):z===47?(e.consume(z),s=!0,P):z===63?(e.consume(z),i=3,r.interrupt?t:D):Fr(z)?(e.consume(z),a=String.fromCharCode(z),T):n(z)}function b(z){return z===45?(e.consume(z),i=2,x):z===91?(e.consume(z),i=5,c=0,k):Fr(z)?(e.consume(z),i=4,r.interrupt?t:D):n(z)}function x(z){return z===45?(e.consume(z),r.interrupt?t:D):n(z)}function k(z){const me="CDATA[";return z===me.charCodeAt(c++)?(e.consume(z),c===me.length?r.interrupt?t:G:k):n(z)}function P(z){return Fr(z)?(e.consume(z),a=String.fromCharCode(z),T):n(z)}function T(z){if(z===null||z===47||z===62||Ut(z)){const me=z===47,Ce=a.toLowerCase();return!me&&!s&&_C.includes(Ce)?(i=1,r.interrupt?t(z):G(z)):E9.includes(a.toLowerCase())?(i=6,me?(e.consume(z),_):r.interrupt?t(z):G(z)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(z):s?A(z):M(z))}return z===45||kr(z)?(e.consume(z),a+=String.fromCharCode(z),T):n(z)}function _(z){return z===62?(e.consume(z),r.interrupt?t:G):n(z)}function A(z){return vt(z)?(e.consume(z),A):B(z)}function M(z){return z===47?(e.consume(z),B):z===58||z===95||Fr(z)?(e.consume(z),O):vt(z)?(e.consume(z),M):B(z)}function O(z){return z===45||z===46||z===58||z===95||kr(z)?(e.consume(z),O):j(z)}function j(z){return z===61?(e.consume(z),$):vt(z)?(e.consume(z),j):M(z)}function $(z){return z===null||z===60||z===61||z===62||z===96?n(z):z===34||z===39?(e.consume(z),d=z,Y):vt(z)?(e.consume(z),$):te(z)}function Y(z){return z===d?(e.consume(z),d=null,ie):z===null||Ye(z)?n(z):(e.consume(z),Y)}function te(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||Ut(z)?j(z):(e.consume(z),te)}function ie(z){return z===47||z===62||vt(z)?M(z):n(z)}function B(z){return z===62?(e.consume(z),W):n(z)}function W(z){return z===null||Ye(z)?G(z):vt(z)?(e.consume(z),W):n(z)}function G(z){return z===45&&i===2?(e.consume(z),J):z===60&&i===1?(e.consume(z),X):z===62&&i===4?(e.consume(z),U):z===63&&i===3?(e.consume(z),D):z===93&&i===5?(e.consume(z),ae):Ye(z)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(T9,oe,ee)(z)):z===null||Ye(z)?(e.exit("htmlFlowData"),ee(z)):(e.consume(z),G)}function ee(z){return e.check(_9,H,oe)(z)}function H(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),le}function le(z){return z===null||Ye(z)?ee(z):(e.enter("htmlFlowData"),G(z))}function J(z){return z===45?(e.consume(z),D):G(z)}function X(z){return z===47?(e.consume(z),a="",V):G(z)}function V(z){if(z===62){const me=a.toLowerCase();return _C.includes(me)?(e.consume(z),U):G(z)}return Fr(z)&&a.length<8?(e.consume(z),a+=String.fromCharCode(z),V):G(z)}function ae(z){return z===93?(e.consume(z),D):G(z)}function D(z){return z===62?(e.consume(z),U):z===45&&i===2?(e.consume(z),D):G(z)}function U(z){return z===null||Ye(z)?(e.exit("htmlFlowData"),oe(z)):(e.consume(z),U)}function oe(z){return e.exit("htmlFlow"),t(z)}}function A9(e,t,n){const r=this;return i;function i(a){return Ye(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function R9(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Th,t,n)}}const L9={name:"htmlText",tokenize:M9};function M9(e,t,n){const r=this;let i,s,a;return c;function c(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),d}function d(D){return D===33?(e.consume(D),h):D===47?(e.consume(D),j):D===63?(e.consume(D),M):Fr(D)?(e.consume(D),te):n(D)}function h(D){return D===45?(e.consume(D),m):D===91?(e.consume(D),s=0,k):Fr(D)?(e.consume(D),A):n(D)}function m(D){return D===45?(e.consume(D),x):n(D)}function g(D){return D===null?n(D):D===45?(e.consume(D),b):Ye(D)?(a=g,X(D)):(e.consume(D),g)}function b(D){return D===45?(e.consume(D),x):g(D)}function x(D){return D===62?J(D):D===45?b(D):g(D)}function k(D){const U="CDATA[";return D===U.charCodeAt(s++)?(e.consume(D),s===U.length?P:k):n(D)}function P(D){return D===null?n(D):D===93?(e.consume(D),T):Ye(D)?(a=P,X(D)):(e.consume(D),P)}function T(D){return D===93?(e.consume(D),_):P(D)}function _(D){return D===62?J(D):D===93?(e.consume(D),_):P(D)}function A(D){return D===null||D===62?J(D):Ye(D)?(a=A,X(D)):(e.consume(D),A)}function M(D){return D===null?n(D):D===63?(e.consume(D),O):Ye(D)?(a=M,X(D)):(e.consume(D),M)}function O(D){return D===62?J(D):M(D)}function j(D){return Fr(D)?(e.consume(D),$):n(D)}function $(D){return D===45||kr(D)?(e.consume(D),$):Y(D)}function Y(D){return Ye(D)?(a=Y,X(D)):vt(D)?(e.consume(D),Y):J(D)}function te(D){return D===45||kr(D)?(e.consume(D),te):D===47||D===62||Ut(D)?ie(D):n(D)}function ie(D){return D===47?(e.consume(D),J):D===58||D===95||Fr(D)?(e.consume(D),B):Ye(D)?(a=ie,X(D)):vt(D)?(e.consume(D),ie):J(D)}function B(D){return D===45||D===46||D===58||D===95||kr(D)?(e.consume(D),B):W(D)}function W(D){return D===61?(e.consume(D),G):Ye(D)?(a=W,X(D)):vt(D)?(e.consume(D),W):ie(D)}function G(D){return D===null||D===60||D===61||D===62||D===96?n(D):D===34||D===39?(e.consume(D),i=D,ee):Ye(D)?(a=G,X(D)):vt(D)?(e.consume(D),G):(e.consume(D),H)}function ee(D){return D===i?(e.consume(D),i=void 0,le):D===null?n(D):Ye(D)?(a=ee,X(D)):(e.consume(D),ee)}function H(D){return D===null||D===34||D===39||D===60||D===61||D===96?n(D):D===47||D===62||Ut(D)?ie(D):(e.consume(D),H)}function le(D){return D===47||D===62||Ut(D)?ie(D):n(D)}function J(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),t):n(D)}function X(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),V}function V(D){return vt(D)?Ct(e,ae,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):ae(D)}function ae(D){return e.enter("htmlTextData"),a(D)}}const Pw={name:"labelEnd",resolveAll:O9,resolveTo:z9,tokenize:j9},D9={tokenize:B9},N9={tokenize:V9},F9={tokenize:U9};function O9(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Ai(e,0,e.length,n),e}function z9(e,t){let n=e.length,r=0,i,s,a,c;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const d={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},m={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return c=[["enter",d,t],["enter",h,t]],c=to(c,e.slice(s+1,s+r+3)),c=to(c,[["enter",m,t]]),c=to(c,Rv(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),c=to(c,[["exit",m,t],e[a-2],e[a-1],["exit",h,t]]),c=to(c,e.slice(a+1)),c=to(c,[["exit",d,t]]),Ai(e,s,e.length,c),e}function j9(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return c;function c(b){return s?s._inactive?g(b):(a=r.parser.defined.includes(Io(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(D9,m,a?m:g)(b):b===91?e.attempt(N9,m,a?h:g)(b):a?m(b):g(b)}function h(b){return e.attempt(F9,m,g)(b)}function m(b){return t(b)}function g(b){return s._balanced=!0,n(b)}}function B9(e,t,n){return r;function r(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),i}function i(g){return Ut(g)?Kp(e,s)(g):s(g)}function s(g){return g===41?m(g):II(e,a,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function a(g){return Ut(g)?Kp(e,d)(g):m(g)}function c(g){return n(g)}function d(g){return g===34||g===39||g===40?AI(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):m(g)}function h(g){return Ut(g)?Kp(e,m)(g):m(g)}function m(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function V9(e,t,n){const r=this;return i;function i(c){return $I.call(r,e,s,a,"reference","referenceMarker","referenceString")(c)}function s(c){return r.parser.defined.includes(Io(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function a(c){return n(c)}}function U9(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const K9={name:"labelStartImage",resolveAll:Pw.resolveAll,tokenize:W9};function W9(e,t,n){const r=this;return i;function i(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),s}function s(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),a):n(c)}function a(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const H9={name:"labelStartLink",resolveAll:Pw.resolveAll,tokenize:G9};function G9(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const A0={name:"lineEnding",tokenize:q9};function q9(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ct(e,t,"linePrefix")}}const jg={name:"thematicBreak",tokenize:Y9};function Y9(e,t,n){let r=0,i;return s;function s(h){return e.enter("thematicBreak"),a(h)}function a(h){return i=h,c(h)}function c(h){return h===i?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Ye(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===i?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),vt(h)?Ct(e,c,"whitespace")(h):c(h))}}const ai={continuation:{tokenize:Z9},exit:tV,name:"list",tokenize:J9},X9={partial:!0,tokenize:nV},Q9={partial:!0,tokenize:eV};function J9(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return c;function c(x){const k=r.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!r.containerState.marker||x===r.containerState.marker:Hb(x)){if(r.containerState.type||(r.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(jg,n,h)(x):h(x);if(!r.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(x)}return n(x)}function d(x){return Hb(x)&&++a<10?(e.consume(x),d):(!r.interrupt||a<2)&&(r.containerState.marker?x===r.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),h(x)):n(x)}function h(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||x,e.check(Th,r.interrupt?n:m,e.attempt(X9,b,g))}function m(x){return r.containerState.initialBlankLine=!0,s++,b(x)}function g(x){return vt(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),b):n(x)}function b(x){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function Z9(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Th,i,s);function i(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ct(e,t,"listItemIndent",r.containerState.size+1)(c)}function s(c){return r.containerState.furtherBlankLines||!vt(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Q9,t,a)(c))}function a(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ct(e,e.attempt(ai,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function eV(e,t,n){const r=this;return Ct(e,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function tV(e){e.exit(this.containerState.type)}function nV(e,t,n){const r=this;return Ct(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!vt(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const IC={name:"setextUnderline",resolveTo:rV,tokenize:iV};function rV(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function iV(e,t,n){const r=this;let i;return s;function s(h){let m=r.events.length,g;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){g=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||g)?(e.enter("setextHeadingLine"),i=h,a(h)):n(h)}function a(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===i?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),vt(h)?Ct(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Ye(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const oV={tokenize:sV};function sV(e){const t=this,n=e.attempt(Th,r,e.attempt(this.parser.constructs.flowInitial,i,Ct(e,e.attempt(this.parser.constructs.flow,i,e.attempt(f9,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const aV={resolveAll:LI()},lV=RI("string"),uV=RI("text");function RI(e){return{resolveAll:LI(e==="text"?cV:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,c);return a;function a(m){return h(m)?s(m):c(m)}function c(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),d}function d(m){return h(m)?(n.exit("data"),s(m)):(n.consume(m),d)}function h(m){if(m===null)return!0;const g=i[m];let b=-1;if(g)for(;++b<g.length;){const x=g[b];if(!x.previous||x.previous.call(r,r.previous))return!0}return!1}}}function LI(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function cV(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,a=-1,c=0,d;for(;s--;){const h=i[s];if(typeof h=="string"){for(a=h.length;h.charCodeAt(a-1)===32;)c++,a--;if(a)break;a=-1}else if(h===-2)d=!0,c++;else if(h!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const fV={42:ai,43:ai,45:ai,48:ai,49:ai,50:ai,51:ai,52:ai,53:ai,54:ai,55:ai,56:ai,57:ai,62:EI},dV={91:g9},pV={[-2]:$0,[-1]:$0,32:$0},hV={35:S9,42:jg,45:[IC,jg],60:P9,61:IC,95:jg,96:TC,126:TC},mV={38:TI,92:PI},gV={[-5]:A0,[-4]:A0,[-3]:A0,33:K9,38:TI,42:Gb,60:[HB,L9],91:H9,92:[x9,PI],93:Pw,95:Gb,96:o9},vV={null:[Gb,aV]},yV={null:[42,95]},bV={null:[]},xV=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:yV,contentInitial:dV,disable:bV,document:fV,flow:hV,flowInitial:pV,insideSpan:vV,string:mV,text:gV},Symbol.toStringTag,{value:"Module"}));function wV(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let a=[],c=[];const d={attempt:Y(j),check:Y($),consume:A,enter:M,exit:O,interrupt:Y($,{interrupt:!0})},h={code:null,containerState:{},defineSkip:P,events:[],now:k,parser:e,previous:null,sliceSerialize:b,sliceStream:x,write:g};let m=t.tokenize.call(h,d);return t.resolveAll&&s.push(t),h;function g(W){return a=to(a,W),T(),a[a.length-1]!==null?[]:(te(t,0),h.events=Rv(s,h.events,h),h.events)}function b(W,G){return kV(x(W),G)}function x(W){return SV(a,W)}function k(){const{_bufferIndex:W,_index:G,line:ee,column:H,offset:le}=r;return{_bufferIndex:W,_index:G,line:ee,column:H,offset:le}}function P(W){i[W.line]=W.column,B()}function T(){let W;for(;r._index<a.length;){const G=a[r._index];if(typeof G=="string")for(W=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===W&&r._bufferIndex<G.length;)_(G.charCodeAt(r._bufferIndex));else _(G)}}function _(W){m=m(W)}function A(W){Ye(W)?(r.line++,r.column=1,r.offset+=W===-3?2:1,B()):W!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=W}function M(W,G){const ee=G||{};return ee.type=W,ee.start=k(),h.events.push(["enter",ee,h]),c.push(ee),ee}function O(W){const G=c.pop();return G.end=k(),h.events.push(["exit",G,h]),G}function j(W,G){te(W,G.from)}function $(W,G){G.restore()}function Y(W,G){return ee;function ee(H,le,J){let X,V,ae,D;return Array.isArray(H)?oe(H):"tokenize"in H?oe([H]):U(H);function U(ye){return Oe;function Oe(Ne){const _e=Ne!==null&&ye[Ne],Qe=Ne!==null&&ye.null,at=[...Array.isArray(_e)?_e:_e?[_e]:[],...Array.isArray(Qe)?Qe:Qe?[Qe]:[]];return oe(at)(Ne)}}function oe(ye){return X=ye,V=0,ye.length===0?J:z(ye[V])}function z(ye){return Oe;function Oe(Ne){return D=ie(),ae=ye,ye.partial||(h.currentConstruct=ye),ye.name&&h.parser.constructs.disable.null.includes(ye.name)?Ce():ye.tokenize.call(G?Object.assign(Object.create(h),G):h,d,me,Ce)(Ne)}}function me(ye){return W(ae,D),le}function Ce(ye){return D.restore(),++V<X.length?z(X[V]):J}}}function te(W,G){W.resolveAll&&!s.includes(W)&&s.push(W),W.resolve&&Ai(h.events,G,h.events.length-G,W.resolve(h.events.slice(G),h)),W.resolveTo&&(h.events=W.resolveTo(h.events,h))}function ie(){const W=k(),G=h.previous,ee=h.currentConstruct,H=h.events.length,le=Array.from(c);return{from:H,restore:J};function J(){r=W,h.previous=G,h.currentConstruct=ee,h.events.length=H,c=le,B()}}function B(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function SV(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const c=a[0];typeof c=="string"?a[0]=c.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function kV(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
@@ -71,7 +71,7 @@ Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}
71
71
  `,...s.current()});return/^[\t ]/.test(h)&&(h=ch(h.charCodeAt(0))+h.slice(1)),h=h?a+" "+h:a,n.options.closeAtx&&(h+=" "+a),d(),c(),h}YI.peek=ZK;function YI(e){return e.value||""}function ZK(){return"<"}XI.peek=eW;function XI(e,t,n,r){const i=Lw(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let h=d.move("![");return h+=d.move(n.safe(e.alt,{before:h,after:"]",...d.current()})),h+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),c(),e.title&&(c=n.enter(`title${s}`),h+=d.move(" "+i),h+=d.move(n.safe(e.title,{before:h,after:i,...d.current()})),h+=d.move(i),c()),h+=d.move(")"),a(),h}function eW(){return"!"}QI.peek=tW;function QI(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const h=n.safe(e.alt,{before:d,after:"]",...c.current()});d+=c.move(h+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const g=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return a(),n.stack=m,s(),i==="full"||!h||h!==g?d+=c.move(g+"]"):i==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function tW(){return"!"}JI.peek=nW;function JI(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const a=n.unsafe[s],c=n.compilePattern(a);let d;if(a.atBreak)for(;d=c.exec(r);){let h=d.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(d.index+1)}}return i+r+i}function nW(){return"`"}function ZI(e,t){const n=Cw(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}e$.peek=rW;function e$(e,t,n,r){const i=Lw(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let c,d;if(ZI(e,n)){const m=n.stack;n.stack=[],c=n.enter("autolink");let g=a.move("<");return g+=a.move(n.containerPhrasing(e,{before:g,after:">",...a.current()})),g+=a.move(">"),c(),n.stack=m,g}c=n.enter("link"),d=n.enter("label");let h=a.move("[");return h+=a.move(n.containerPhrasing(e,{before:h,after:"](",...a.current()})),h+=a.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=a.move("<"),h+=a.move(n.safe(e.url,{before:h,after:">",...a.current()})),h+=a.move(">")):(d=n.enter("destinationRaw"),h+=a.move(n.safe(e.url,{before:h,after:e.title?" ":")",...a.current()}))),d(),e.title&&(d=n.enter(`title${s}`),h+=a.move(" "+i),h+=a.move(n.safe(e.title,{before:h,after:i,...a.current()})),h+=a.move(i),d()),h+=a.move(")"),c(),h}function rW(e,t,n){return ZI(e,n)?"<":"["}t$.peek=iW;function t$(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const h=n.containerPhrasing(e,{before:d,after:"]",...c.current()});d+=c.move(h+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const g=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return a(),n.stack=m,s(),i==="full"||!h||h!==g?d+=c.move(g+"]"):i==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function iW(){return"["}function Mw(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function oW(e){const t=Mw(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function sW(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function n$(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function aW(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?sW(n):Mw(n);const c=e.ordered?a==="."?")":".":oW(n);let d=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),n$(n)===a&&m){let g=-1;for(;++g<e.children.length;){const b=e.children[g];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(a=c),n.bulletCurrent=a;const h=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),h}function lW(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function uW(e,t,n,r){const i=lW(n);let s=n.bulletCurrent||Mw(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const c=n.createTracker(r);c.move(s+" ".repeat(a-s.length)),c.shift(a);const d=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),m);return d(),h;function m(g,b,x){return b?(x?"":" ".repeat(a))+g:(x?s:s+" ".repeat(a-s.length))+g}}function cW(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const fW=Mv(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function dW(e,t,n,r){return(e.children.some(function(a){return fW(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function pW(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}r$.peek=hW;function r$(e,t,n,r){const i=pW(n),s=n.enter("strong"),a=n.createTracker(r),c=a.move(i+i);let d=a.move(n.containerPhrasing(e,{after:i,before:c,...a.current()}));const h=d.charCodeAt(0),m=lv(r.before.charCodeAt(r.before.length-1),h,i);m.inside&&(d=ch(h)+d.slice(1));const g=d.charCodeAt(d.length-1),b=lv(r.after.charCodeAt(0),g,i);b.inside&&(d=d.slice(0,-1)+ch(g));const x=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},c+d+x}function hW(e,t,n){return n.options.strong||"*"}function mW(e,t,n,r){return n.safe(e.value,r)}function gW(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function vW(e,t,n){const r=(n$(n)+(n.options.ruleSpaces?" ":"")).repeat(gW(n));return n.options.ruleSpaces?r.slice(0,-1):r}const i$={blockquote:jK,break:XC,code:HK,definition:qK,emphasis:qI,hardBreak:XC,heading:JK,html:YI,image:XI,imageReference:QI,inlineCode:JI,link:e$,linkReference:t$,list:aW,listItem:uW,paragraph:cW,root:dW,strong:r$,text:mW,thematicBreak:vW};function yW(){return{enter:{table:bW,tableData:QC,tableHeader:QC,tableRow:wW},exit:{codeText:SW,table:xW,tableData:U0,tableHeader:U0,tableRow:U0}}}function bW(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function xW(e){this.exit(e),this.data.inTable=void 0}function wW(e){this.enter({type:"tableRow",children:[]},e)}function U0(e){this.exit(e)}function QC(e){this.enter({type:"tableCell",children:[]},e)}function SW(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,kW));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function kW(e,t){return t==="|"?t:e}function CW(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
72
72
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:a,tableCell:d,tableRow:c}};function a(x,k,P,T){return h(m(x,P,T),x.align)}function c(x,k,P,T){const _=g(x,P,T),A=h([_]);return A.slice(0,A.indexOf(`
73
73
  `))}function d(x,k,P,T){const _=P.enter("tableCell"),A=P.enter("phrasing"),M=P.containerPhrasing(x,{...T,before:s,after:s});return A(),_(),M}function h(x,k){return OK(x,{align:k,alignDelimiters:r,padding:n,stringLength:i})}function m(x,k,P){const T=x.children;let _=-1;const A=[],M=k.enter("table");for(;++_<T.length;)A[_]=g(T[_],k,P);return M(),A}function g(x,k,P){const T=x.children;let _=-1;const A=[],M=k.enter("tableRow");for(;++_<T.length;)A[_]=d(T[_],x,k,P);return M(),A}function b(x,k,P){let T=i$.inlineCode(x,k,P);return P.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function EW(){return{exit:{taskListCheckValueChecked:JC,taskListCheckValueUnchecked:JC,paragraph:TW}}}function PW(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:_W}}}function JC(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function TW(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,a;for(;++s<i.length;){const c=i[s];if(c.type==="paragraph"){a=c;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function _W(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);s&&c.move(a);let d=i$.listItem(e,t,n,{...r,...c.current()});return s&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(m){return m+a}}function IW(){return[aK(),_K(),RK(),yW(),EW()]}function $W(e){return{extensions:[lK(),IK(e),LK(),CW(e),PW()]}}const AW={tokenize:FW,partial:!0},o$={tokenize:OW,partial:!0},s$={tokenize:zW,partial:!0},a$={tokenize:jW,partial:!0},RW={tokenize:BW,partial:!0},l$={name:"wwwAutolink",tokenize:DW,previous:c$},u$={name:"protocolAutolink",tokenize:NW,previous:f$},oa={name:"emailAutolink",tokenize:MW,previous:d$},ps={};function LW(){return{text:ps}}let du=48;for(;du<123;)ps[du]=oa,du++,du===58?du=65:du===91&&(du=97);ps[43]=oa;ps[45]=oa;ps[46]=oa;ps[95]=oa;ps[72]=[oa,u$];ps[104]=[oa,u$];ps[87]=[oa,l$];ps[119]=[oa,l$];function MW(e,t,n){const r=this;let i,s;return a;function a(g){return!Jb(g)||!d$.call(r,r.previous)||Dw(r.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(g))}function c(g){return Jb(g)?(e.consume(g),c):g===64?(e.consume(g),d):n(g)}function d(g){return g===46?e.check(RW,m,h)(g):g===45||g===95||kr(g)?(s=!0,e.consume(g),d):m(g)}function h(g){return e.consume(g),i=!0,d}function m(g){return s&&i&&Fr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function DW(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!c$.call(r,r.previous)||Dw(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(AW,e.attempt(o$,e.attempt(s$,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function NW(e,t,n){const r=this;let i="",s=!1;return a;function a(g){return(g===72||g===104)&&f$.call(r,r.previous)&&!Dw(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(g),e.consume(g),c):n(g)}function c(g){if(Fr(g)&&i.length<5)return i+=String.fromCodePoint(g),e.consume(g),c;if(g===58){const b=i.toLowerCase();if(b==="http"||b==="https")return e.consume(g),d}return n(g)}function d(g){return g===47?(e.consume(g),s?h:(s=!0,d)):n(g)}function h(g){return g===null||ov(g)||Ut(g)||Tu(g)||Av(g)?n(g):e.attempt(o$,e.attempt(s$,m),n)(g)}function m(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function FW(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function OW(e,t,n){let r,i,s;return a;function a(h){return h===46||h===95?e.check(a$,d,c)(h):h===null||Ut(h)||Tu(h)||h!==45&&Av(h)?d(h):(s=!0,e.consume(h),a)}function c(h){return h===95?r=!0:(i=r,r=void 0),e.consume(h),a}function d(h){return i||r||!s?n(h):t(h)}}function zW(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(a$,t,s)(a):a===null||Ut(a)||Tu(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function jW(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),s):c===93?(e.consume(c),i):c===60||c===null||Ut(c)||Tu(c)?t(c):n(c)}function i(c){return c===null||c===40||c===91||Ut(c)||Tu(c)?t(c):r(c)}function s(c){return Fr(c)?a(c):n(c)}function a(c){return c===59?(e.consume(c),r):Fr(c)?(e.consume(c),a):n(c)}}function BW(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return kr(s)?n(s):t(s)}}function c$(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ut(e)}function f$(e){return!Fr(e)}function d$(e){return!(e===47||Jb(e))}function Jb(e){return e===43||e===45||e===46||e===95||kr(e)}function Dw(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const VW={tokenize:XW,partial:!0};function UW(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:GW,continuation:{tokenize:qW},exit:YW}},text:{91:{name:"gfmFootnoteCall",tokenize:HW},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:KW,resolveTo:WW}}}}function KW(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const d=r.events[i][1];if(d.type==="labelImage"){a=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!a||!a._balanced)return n(d);const h=Io(r.sliceSerialize({start:a.end,end:r.now()}));return h.codePointAt(0)!==94||!s.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function WW(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function HW(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return c;function c(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),d}function d(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(s>999||g===93&&!a||g===null||g===91||Ut(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return i.includes(Io(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return Ut(g)||(a=!0),s++,e.consume(g),g===92?m:h}function m(g){return g===91||g===92||g===93?(e.consume(g),s++,h):h(g)}}function GW(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,c;return d;function d(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(k)}function m(k){if(a>999||k===93&&!c||k===null||k===91||Ut(k))return n(k);if(k===93){e.exit("chunkString");const P=e.exit("gfmFootnoteDefinitionLabelString");return s=Io(r.sliceSerialize(P)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return Ut(k)||(c=!0),a++,e.consume(k),k===92?g:m}function g(k){return k===91||k===92||k===93?(e.consume(k),a++,m):m(k)}function b(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),i.includes(s)||i.push(s),Ct(e,x,"gfmFootnoteDefinitionWhitespace")):n(k)}function x(k){return t(k)}}function qW(e,t,n){return e.check(Th,t,e.attempt(VW,t,n))}function YW(e){e.exit("gfmFootnoteDefinition")}function XW(e,t,n){const r=this;return Ct(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function QW(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,c){let d=-1;for(;++d<a.length;)if(a[d][0]==="enter"&&a[d][1].type==="strikethroughSequenceTemporary"&&a[d][1]._close){let h=d;for(;h--;)if(a[h][0]==="exit"&&a[h][1].type==="strikethroughSequenceTemporary"&&a[h][1]._open&&a[d][1].end.offset-a[d][1].start.offset===a[h][1].end.offset-a[h][1].start.offset){a[d][1].type="strikethroughSequence",a[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},a[h][1].start),end:Object.assign({},a[d][1].end)},g={type:"strikethroughText",start:Object.assign({},a[h][1].end),end:Object.assign({},a[d][1].start)},b=[["enter",m,c],["enter",a[h][1],c],["exit",a[h][1],c],["enter",g,c]],x=c.parser.constructs.insideSpan.null;x&&Ai(b,b.length,0,Rv(x,a.slice(h+1,d),c)),Ai(b,b.length,0,[["exit",g,c],["enter",a[d][1],c],["exit",a[d][1],c],["exit",m,c]]),Ai(a,h-1,d-h+3,b),d=h+b.length-2;break}}for(d=-1;++d<a.length;)a[d][1].type==="strikethroughSequenceTemporary"&&(a[d][1].type="data");return a}function s(a,c,d){const h=this.previous,m=this.events;let g=0;return b;function b(k){return h===126&&m[m.length-1][1].type!=="characterEscape"?d(k):(a.enter("strikethroughSequenceTemporary"),x(k))}function x(k){const P=Lf(h);if(k===126)return g>1?d(k):(a.consume(k),g++,x);if(g<2&&!n)return d(k);const T=a.exit("strikethroughSequenceTemporary"),_=Lf(k);return T._open=!_||_===2&&!!P,T._close=!P||P===2&&!!_,c(k)}}}class JW{constructor(){this.map=[]}add(t,n,r){ZW(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function ZW(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function eH(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function tH(){return{flow:{null:{name:"table",tokenize:nH,resolveAll:rH}}}}function nH(e,t,n){const r=this;let i=0,s=0,a;return c;function c(B){let W=r.events.length-1;for(;W>-1;){const H=r.events[W][1].type;if(H==="lineEnding"||H==="linePrefix")W--;else break}const G=W>-1?r.events[W][1].type:null,ee=G==="tableHead"||G==="tableRow"?$:d;return ee===$&&r.parser.lazy[r.now().line]?n(B):ee(B)}function d(B){return e.enter("tableHead"),e.enter("tableRow"),h(B)}function h(B){return B===124||(a=!0,s+=1),m(B)}function m(B){return B===null?n(B):Ye(B)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),x):n(B):vt(B)?Ct(e,m,"whitespace")(B):(s+=1,a&&(a=!1,i+=1),B===124?(e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),a=!0,m):(e.enter("data"),g(B)))}function g(B){return B===null||B===124||Ut(B)?(e.exit("data"),m(B)):(e.consume(B),B===92?b:g)}function b(B){return B===92||B===124?(e.consume(B),g):g(B)}function x(B){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(B):(e.enter("tableDelimiterRow"),a=!1,vt(B)?Ct(e,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):k(B))}function k(B){return B===45||B===58?T(B):B===124?(a=!0,e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),P):j(B)}function P(B){return vt(B)?Ct(e,T,"whitespace")(B):T(B)}function T(B){return B===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(B),e.exit("tableDelimiterMarker"),_):B===45?(s+=1,_(B)):B===null||Ye(B)?O(B):j(B)}function _(B){return B===45?(e.enter("tableDelimiterFiller"),A(B)):j(B)}function A(B){return B===45?(e.consume(B),A):B===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(B),e.exit("tableDelimiterMarker"),M):(e.exit("tableDelimiterFiller"),M(B))}function M(B){return vt(B)?Ct(e,O,"whitespace")(B):O(B)}function O(B){return B===124?k(B):B===null||Ye(B)?!a||i!==s?j(B):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(B)):j(B)}function j(B){return n(B)}function $(B){return e.enter("tableRow"),Y(B)}function Y(B){return B===124?(e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),Y):B===null||Ye(B)?(e.exit("tableRow"),t(B)):vt(B)?Ct(e,Y,"whitespace")(B):(e.enter("data"),te(B))}function te(B){return B===null||B===124||Ut(B)?(e.exit("data"),Y(B)):(e.consume(B),B===92?ie:te)}function ie(B){return B===92||B===124?(e.consume(B),te):te(B)}}function rH(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],c=!1,d=0,h,m,g;const b=new JW;for(;++n<e.length;){const x=e[n],k=x[1];x[0]==="enter"?k.type==="tableHead"?(c=!1,d!==0&&(ZC(b,t,d,h,m),m=void 0,d=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(n,0,[["enter",h,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(r=!0,g=void 0,s=[0,0,0,0],a=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(n,0,[["enter",m,t]])),i=k.type==="tableDelimiterRow"?2:m?3:1):i&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],g=Tg(b,t,s,i,void 0,g),s=[0,0,0,0]),a[2]=n)):k.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],g=Tg(b,t,s,i,void 0,g)),s=a,a=[s[1],n,0,0])):k.type==="tableHead"?(c=!0,d=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(d=n,s[1]!==0?(a[0]=a[1],g=Tg(b,t,s,i,n,g)):a[1]!==0&&(g=Tg(b,t,a,i,n,g)),i=0):i&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(a[3]=n)}for(d!==0&&ZC(b,t,d,h,m),b.consume(t.events),n=-1;++n<t.events.length;){const x=t.events[n];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=eH(t.events,n))}return e}function Tg(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(s.end=Object.assign({},pf(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const d=pf(t.events,n[1]);if(s={type:a,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const h=pf(t.events,n[2]),m=pf(t.events,n[3]),g={type:c,start:Object.assign({},h),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",g,t]]),r!==2){const b=t.events[n[2]],x=t.events[n[3]];if(b[1].end=Object.assign({},x[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const k=n[2]+1,P=n[3]-n[2]-1;e.add(k,P,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return i!==void 0&&(s.end=Object.assign({},pf(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function ZC(e,t,n,r,i){const s=[],a=pf(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function pf(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const iH={name:"tasklistCheck",tokenize:sH};function oH(){return{text:{91:iH}}}function sH(e,t,n){const r=this;return i;function i(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),s)}function s(d){return Ut(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),a):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),a):n(d)}function a(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Ye(d)?t(d):vt(d)?e.check({tokenize:aH},t,n)(d):n(d)}}function aH(e,t,n){return Ct(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function lH(e){return kI([LW(),UW(),QW(e),tH(),oH()])}const uH={};function Gp(e){const t=this,n=e||uH,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(lH(n)),s.push(IW()),a.push($W(n))}const eE=e=>Symbol.iterator in e,tE=e=>"entries"in e,nE=(e,t)=>{const n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(const[i,s]of n)if(!Object.is(s,r.get(i)))return!1;return!0},cH=(e,t)=>{const n=e[Symbol.iterator](),r=t[Symbol.iterator]();let i=n.next(),s=r.next();for(;!i.done&&!s.done;){if(!Object.is(i.value,s.value))return!1;i=n.next(),s=r.next()}return!!i.done&&!!s.done};function fH(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:eE(e)&&eE(t)?tE(e)&&tE(t)?nE(e,t):cH(e,t):nE({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function Ih(e){const t=He.useRef(void 0);return n=>{const r=e(n);return fH(t.current,r)?t.current:t.current=r}}const rE=e=>{let t;const n=new Set,r=(h,m)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const b=t;t=m??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(x=>x(t,b))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h))},d=t=e(r,i,c);return c},iE=e=>e?rE(e):rE,dH=e=>e;function p$(e,t=dH){const n=He.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return He.useDebugValue(n),n}const h$=S.createContext(null),sa=e=>{const t=S.useContext(h$);if(!t||!t.store)throw new Error("useHistoryStore must be used within a HistoryStoreContextProvider");return p$(t.store,e)},Nv=()=>sa(e=>e.actions),bq=()=>sa(e=>e.primitives),Za=e=>sa(Ih(t=>e(t.primitives.getCurrentConversation()))),m$=e=>sa(t=>e?t.primitives.getCurrentConversation().history[e]:void 0),pH=()=>sa(Ih(e=>Object.keys(e.primitives.getCurrentConversation().history))),hH=()=>sa(Ih(e=>Object.values(e.primitives.getCurrentConversation().history))),mH=()=>sa(e=>{const t=e.primitives.getCurrentConversation().history;return Object.values(t).some(n=>n.confirmationStates&&Object.values(n.confirmationStates).some(r=>r==="pending"))}),oE=({content:e,classNames:t})=>R.jsx(Hp,{className:bn("markdown-container prose dark:prose-invert text-default-900 max-w-full",t),remarkPlugins:[Gp],components:{pre:({children:n})=>R.jsx("pre",{className:"bg-default text-default-900 mt-2 mb-2 max-w-full overflow-auto rounded p-2 font-mono text-[90%] font-normal",children:n}),code:({children:n})=>R.jsx("code",{className:"bg-default text-default-900 rounded px-1 py-0.5 font-mono text-[85%] font-normal",children:n})},children:e}),gH=2;function vH({duration:e,className:t,children:n}){return R.jsx(Js.div,{className:bn("from-default-600 via-default-200 to-default-600 relative inline-block bg-gradient-to-r bg-clip-text text-transparent",t),initial:{backgroundPosition:"200% 0%"},animate:{backgroundPosition:"-200% 0%"},transition:{duration:e??gH,repeat:1/0,ease:"linear"},style:{backgroundSize:"400% 100%"},children:n})}function yH({shouldShimmer:e,liveUpdates:t,classNames:n}){const[r,i]=S.useState(!1),s=Object.values(t),a=S.useCallback(()=>i(g=>!g),[]),c=s.length>1,d=s[s.length-1],h=s.slice(0,-1),m=Math.max((d.description??"").length,d.label.length)/10;return R.jsxs("div",{className:bn("flex flex-col",c&&"cursor-pointer"),onClick:a,children:[R.jsx(Js.div,{initial:!1,animate:{height:r?"auto":0,opacity:r?1:0,marginBottom:r?"0.5rem":0},transition:{duration:.3,ease:"easeInOut"},style:{overflow:"hidden"},children:R.jsx("div",{className:"flex flex-col gap-2",children:h.map((g,b)=>R.jsxs(Js.div,{initial:{opacity:0,y:-10},animate:{opacity:r?1:0,y:r?0:-10},transition:{duration:.3},style:{pointerEvents:r?"auto":"none"},children:[R.jsx("div",{className:"text-default-500",children:g.label}),R.jsx(Hp,{className:bn("markdown-container prose dark:prose-invert text-default-400 max-w-full text-sm",n?.liveUpdates),remarkPlugins:[Gp],children:g.description})]},b))})}),R.jsxs("div",{className:"flex items-center gap-4",children:[R.jsx("div",{className:"relative overflow-hidden bg-transparent",children:e?R.jsxs(vH,{duration:m,children:[R.jsx("div",{children:d.label}),R.jsx(Hp,{className:bn("markdown-container prose dark:prose-invert max-w-full text-sm",n?.liveUpdates),remarkPlugins:[Gp],children:d.description})]}):R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"text-default-500",children:d.label}),R.jsx(Hp,{className:bn("markdown-container prose dark:prose-invert text-default-400 max-w-full text-sm",n?.liveUpdates),remarkPlugins:[Gp],children:d.description})]})}),c&&R.jsx(wr,{variant:"light",isIconOnly:!0,onPress:a,"data-testid":"live-updates-expand",children:R.jsx(Js.div,{initial:{rotate:0},animate:{rotate:r?180:0},transition:{duration:.3},children:R.jsx(ci,{icon:"heroicons:chevron-down"})})})]})]})}const bH=({images:e})=>{const{isOpen:t,onOpen:n,onClose:r}=Gz(),[i,s]=S.useState(0),a=Object.entries(e).map(([m,g])=>({src:g,alt:m})),c=m=>{s(m),n()},d=S.useCallback(()=>{s(m=>m===0?a.length-1:m-1)},[a.length]),h=S.useCallback(()=>{s(m=>m===a.length-1?0:m+1)},[a.length]);return S.useEffect(()=>{if(!t)return;const m=g=>{switch(g.key){case"ArrowLeft":g.preventDefault(),d();break;case"ArrowRight":g.preventDefault(),h();break;case"Escape":g.preventDefault(),r();break}};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[t,d,h,r]),R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"xs:grid-cols-4 grid grid-cols-3 gap-2 sm:grid-cols-6 md:grid-cols-8 lg:grid-cols-12",children:a.map((m,g)=>R.jsx("div",{className:"relative aspect-square cursor-pointer overflow-hidden rounded-lg",onClick:()=>c(g),children:R.jsx(S0,{src:m.src,alt:m.alt,className:"h-full w-full rounded-lg object-cover transition-transform hover:scale-125",classNames:{wrapper:"h-full w-full",img:"h-full w-full object-cover"}})},m.alt))}),R.jsx(Hz,{isOpen:t,onClose:r,size:"full",hideCloseButton:!0,classNames:{backdrop:"bg-black/90",wrapper:"p-0",base:"bg-transparent shadow-none m-0",body:"p-0"},children:R.jsx(Uz,{children:R.jsxs(Dz,{className:"relative flex min-h-screen items-center justify-center p-4",children:[R.jsx(wr,{isIconOnly:!0,variant:"flat",className:"absolute top-4 right-4 z-50 bg-black/50 text-white",onPress:r,children:R.jsx(ci,{icon:"heroicons:x-mark",className:"h-6 w-6"})}),a.length>1&&R.jsxs(R.Fragment,{children:[R.jsx(wr,{isIconOnly:!0,variant:"flat",className:"absolute top-1/2 left-4 z-50 -translate-y-1/2 bg-black/50 text-white",onPress:d,children:R.jsx(ci,{icon:"heroicons:chevron-left",className:"h-6 w-6"})}),R.jsx(wr,{isIconOnly:!0,variant:"flat",className:"absolute top-1/2 right-4 z-50 -translate-y-1/2 bg-black/50 text-white",onPress:h,children:R.jsx(ci,{icon:"heroicons:chevron-right",className:"h-6 w-6"})})]}),R.jsx("div",{className:"relative flex max-h-[90vh] max-w-[90vw] items-center justify-center",children:R.jsx(S0,{src:a[i]?.src,alt:a[i]?.alt,className:"max-h-full max-w-full object-contain",classNames:{wrapper:"max-w-full max-h-full",img:"max-w-full max-h-full object-contain"}})}),a.length>1&&R.jsx("div",{className:"absolute bottom-16 left-1/2 flex max-w-[90vw] -translate-x-1/2 gap-2 overflow-x-auto rounded bg-black/30 p-2",children:a.map((m,g)=>R.jsx("button",{onClick:()=>s(g),className:bn("flex-shrink-0 overflow-hidden border-2 border-transparent transition-all",g===i?"z-10 scale-125":"hover:scale-110"),children:R.jsx(S0,{src:m.src,alt:m.alt,className:"h-12 w-12 rounded-lg object-cover",classNames:{wrapper:"w-12 h-12",img:"w-12 h-12 object-cover"}})},m.alt))}),a.length>1&&R.jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 rounded-full bg-black/50 px-4 py-2",children:R.jsxs("span",{className:"text-sm font-medium text-white",children:[i+1," / ",a.length]})})]})})})]})},xH=({references:e})=>R.jsx("div",{className:"text-default-500 text-xs italic",children:R.jsx("ul",{className:"list-disc pl-4",children:e.map((t,n)=>R.jsx("li",{children:R.jsx("a",{href:t.url??void 0,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:t.title})},n))})}),Bg=e=>R.jsx(lz,{delay:300,closeDelay:0,...e});function uv({name:e,fallback:t,skeletonSize:n,disableSkeleton:r,...i}){const s=S.useSyncExternalStore(h=>Bt.subscribe(h),()=>Bt.getSlotFillers(e)),a=S.useMemo(()=>s.filter(h=>!h.condition||h.condition()),[s]);if(a.length===0)return t??null;const c=r?null:R.jsx(S2,{className:"rounded-lg",style:n?{width:n.width,height:n.height}:void 0}),d="props"in i?i.props:void 0;return R.jsx(R.Fragment,{children:a.map((h,m)=>{const g=h.component;return R.jsx(S.Suspense,{fallback:c,children:R.jsx(g,{...d??{}})},m)})})}const wH=({content:e,serverId:t,message:n})=>{const[r,i]=S.useState("heroicons:clipboard"),s=S.useRef(null),a=async()=>{await navigator.clipboard.writeText(e),i("heroicons:check"),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{i("heroicons:clipboard")},2e3)};return R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx(uv,{name:"message.actions",props:{message:n,content:e,serverId:t},skeletonSize:{width:"88px",height:"40px"}}),R.jsx(Bg,{content:"Copy",placement:"bottom",children:R.jsx(wr,{isIconOnly:!0,variant:"ghost",className:"p-0","aria-label":"Copy message",onPress:a,children:R.jsx(ci,{icon:r,"data-testid":"chat-message-copy-icon","data-icon":r})})})]})},SH=()=>R.jsx("div",{className:"text-default-500 flex items-center gap-2",children:R.jsx(ci,{icon:"heroicons:arrow-path",className:"animate-spin","data-testid":"loading-indicator"})}),kH=({confirmationRequests:e,confirmationStates:t,onConfirm:n,onSkip:r,onBulkConfirm:i,onBulkSkip:s,isLoading:a})=>{const[c,d]=S.useState(new Set),h=Object.values(e),m=j=>{const $=Object.entries(j);return $.length===0?"":$.slice(0,3).map(([Y,te])=>{const ie=typeof te=="string"?te.length>30?`${te.substring(0,30)}...`:te:JSON.stringify(te);return`${Y}: ${ie}`}).join(", ")},g=j=>{if(j.tool_description)return j.tool_description;const $=j.arguments,Y=j.tool_name.replace(/_/g," "),te=$.email||$.to||$.name||$.id||$.event_id;return te?`${Y}: ${te}`:`Execute ${Y}`},b=h.filter(j=>t[j.confirmation_id]==="pending"),x=b.length>0,k=c.size>0,P=j=>{d($=>{const Y=new Set($);return Y.has(j)?Y.delete(j):Y.add(j),Y})},T=()=>{const j=b.map($=>$.confirmation_id);i(j),d(new Set)},_=()=>{const j=b.map($=>$.confirmation_id);s(j),d(new Set)},A=()=>{const j=Array.from(c).filter($=>t[$]==="pending");i(j),d(new Set)},M=j=>{n(j),d($=>{const Y=new Set($);return Y.delete(j),Y})},O=j=>{r(j),d($=>{const Y=new Set($);return Y.delete(j),Y})};return R.jsx(ol,{children:R.jsxs(Js.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:"my-2 flex flex-col gap-3",children:[x&&R.jsxs("div",{role:"status","aria-live":"polite",className:"sr-only",children:[b.length," confirmation",b.length>1?"s":""," pending"]}),x&&R.jsxs("div",{className:"flex flex-wrap gap-2",children:[R.jsxs(wr,{size:"sm",color:"success",variant:"solid",onPress:T,isDisabled:a,"aria-label":`Confirm all ${b.length} pending actions`,children:["✓ Confirm All (",b.length,")"]}),R.jsx(wr,{size:"sm",color:"default",variant:"bordered",onPress:_,isDisabled:a,"aria-label":`Skip all ${b.length} pending actions`,children:"⏭ Skip All"}),k&&R.jsxs(wr,{size:"sm",color:"success",variant:"flat",onPress:A,isDisabled:a,"aria-label":`Confirm ${c.size} selected actions`,children:["✓ Confirm Selected (",c.size,")"]})]}),R.jsx("div",{className:`flex flex-col gap-2 ${h.length>3?"max-h-[400px] overflow-y-auto pr-2":""}`,children:h.map(j=>{const $=t[j.confirmation_id]||"pending",Y=$==="pending",te=$==="skipped",ie=g(j),B=m(j.arguments),W=c.has(j.confirmation_id);return R.jsxs(Js.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.2},className:`rounded-medium border-small flex items-center gap-3 p-3 ${te?"border-default bg-default-100/50 opacity-60 grayscale":Y?"border-warning bg-warning-50/50":$==="confirmed"?"border-success bg-success-50/50":"border-danger bg-danger-50/50"}`,children:[Y&&R.jsx(u2,{isSelected:W,onValueChange:()=>P(j.confirmation_id),size:"sm",className:"shrink-0",isDisabled:a}),R.jsxs("div",{className:"min-w-0 flex-1",children:[R.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[$==="pending"&&R.jsx(Sg,{size:"sm",color:"warning",variant:"flat",children:"⚠️ Confirmation needed"}),$==="confirmed"&&R.jsx(Sg,{size:"sm",color:"success",variant:"flat",children:"✅ Confirmed"}),$==="declined"&&R.jsx(Sg,{size:"sm",color:"default",variant:"flat",children:"❌ Declined"}),$==="skipped"&&R.jsx(Sg,{size:"sm",color:"default",variant:"flat",children:"⏭️ Handled naturally"})]}),R.jsx("p",{className:"text-small text-default-700 font-medium",children:ie}),B&&Y&&R.jsx("p",{className:"text-tiny text-default-500 mt-1 truncate",id:`conf-args-${j.confirmation_id}`,children:B})]}),Y&&R.jsxs("div",{className:"flex shrink-0 gap-2",children:[R.jsx(wr,{size:"sm",color:"success",variant:"solid",onPress:()=>M(j.confirmation_id),isDisabled:a,"aria-label":`Confirm ${j.tool_name}: ${ie}`,"aria-describedby":B?`conf-args-${j.confirmation_id}`:void 0,children:"Do it"}),R.jsx(wr,{size:"sm",color:"default",variant:"bordered",onPress:()=>O(j.confirmation_id),isDisabled:a,"aria-label":`Skip ${j.tool_name}: ${ie}`,children:"Skip"})]})]},j.confirmation_id)})})]},"confirmation-dialogs")})};class CH{nodes=new Map;roots=[];constructor(t){this.buildTree(t)}buildTree(t){for(const n of t)this.nodes.set(n.id,{...n,children:[]});for(const n of this.nodes.values())if(n.parent_id){const r=this.nodes.get(n.parent_id);r?(r.children.push(n),r.children.sort((i,s)=>i.order-s.order)):(this.roots.push(n),this.roots.sort((i,s)=>i.order-s.order))}else this.roots.push(n),this.roots.sort((r,i)=>r.order-i.order)}*iterate(){function*t(n){for(const r of n)yield r,yield*t(r.children)}yield*t(this.roots)}get(t){return this.nodes.get(t)}update(t,n){const r=this.nodes.get(t);r&&(Object.assign(r,n),n.order!==void 0&&(r.parent_id?this.nodes.get(r.parent_id)?.children.sort((s,a)=>s.order-a.order):this.roots.sort((i,s)=>i.order-s.order)),n.status==="completed"&&this.completeChildren(r))}completeChildren(t){for(const n of t.children)n.status="completed",this.completeChildren(n)}getRoots(){return this.roots}}function g$({tasks:e,depth:t=0}){const n=new CH(e);return R.jsx("div",{className:"space-y-2","data-testid":`todo-list-root-${t}`,children:n.getRoots().map(({id:r,description:i,status:s,summary:a,children:c})=>{const d=R.jsx(h2,{size:"sm",color:"primary","aria-label":"Task is in progress",className:"m-0 p-0",classNames:{svg:"w-4 h-4"}});return R.jsxs("div",{"data-testid":`todo-task-${r}`,children:[R.jsx("div",{children:R.jsxs(u2,{isSelected:s===uf.Completed,disabled:!0,className:"block",icon:s===uf.InProgress?()=>d:void 0,classNames:{hiddenInput:"cursor-default",wrapper:bn(s===uf.InProgress&&"before:border-none"),base:"pointer-events-none hover:bg-transparent",label:bn("transition-colors",s===uf.Completed&&"line-through text-default-400",s===uf.InProgress&&"text-primary italic",s===uf.Pending&&"text-default-900")},children:[i,a&&R.jsx("p",{className:"ml-7",children:a})]})}),c.length>0&&R.jsx("div",{style:{marginLeft:`${(t+1)*.5}rem`},"data-testid":`todo-children-wrapper-${r}`,children:R.jsx(g$,{tasks:c,depth:t+1})})]},`${r}-${s}`)})})}const EH=S.forwardRef(({messageId:e,classNames:t},n)=>{const r=Za(le=>le.lastMessageId),i=Za(le=>le.isLoading),s=m$(e),{sendSilentConfirmation:a}=Nv(),{client:c}=Pv();if(!s)throw new Error("Tried to render non-existent message");const{serverId:d,content:h,role:m,references:g,liveUpdates:b,images:x,confirmationRequests:k,confirmationStates:P,error:T}=s,_=m===kf.User,A=i&&m===kf.Assistant&&e===r,[M,O]=S.useState(!1),j=A&&!b&&!h.length,$=!A,Y=!A&&x&&Object.keys(x).length>0,te=!A&&g&&g.length>0,ie=b&&Object.keys(b).length>0,B=k&&Object.keys(k).length>0,W=async le=>{try{await a(e,le,!0,c)}catch(J){console.error(J)}},G=async le=>{try{await a(e,le,!1,c)}catch(J){console.error(J)}},ee=async le=>{const J=k?Object.keys(k):[],X=J.reduce((V,ae)=>({...V,[ae]:le.includes(ae)}),{});try{await a(e,J,X,c)}catch(V){console.error(V)}},H=async le=>{const X=(k?Object.keys(k):[]).reduce((V,ae)=>({...V,[ae]:!1}),{});try{await a(e,le,X,c)}catch(V){console.error(V)}};return R.jsx("div",{ref:n,"data-testid":"chat-message-wrapper",className:bn("flex gap-3",{"flex-row-reverse":_},t?.wrapper),children:R.jsx("div",{className:bn(!M&&"motion-safe:animate-pop-in","flex flex-col gap-4",_&&"max-w-[75%]",!_&&"w-full"),onAnimationEnd:()=>O(!0),children:R.jsx("div",{className:bn("rounded-medium text-default relative px-4 py-3",_&&"bg-default-100",t?.innerWrapper),children:_?R.jsx(oE,{content:h,classNames:t?.content}):R.jsxs("div",{className:"flex flex-col gap-2",children:[j&&R.jsx(SH,{}),ie&&R.jsx(yH,{shouldShimmer:A,liveUpdates:b,classNames:{liveUpdates:t?.liveUpdates}}),s.tasks&&s.tasks.length>0&&R.jsx(ol,{children:R.jsxs(Js.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},className:"rounded-medium text-large text-default-900 border-default flex w-fit flex-col gap-2 border p-4",children:[R.jsx("p",{children:"Execution plan"}),R.jsx(g$,{tasks:s.tasks})]},`${s.id}-execution-plan`)}),B&&P&&R.jsx(kH,{confirmationRequests:k,confirmationStates:P,onConfirm:W,onSkip:G,onBulkConfirm:ee,onBulkSkip:H,isLoading:A}),s.hasConfirmationBreak&&R.jsx("div",{className:"border-divider my-2 border-t"}),R.jsx(oE,{content:h,classNames:t?.content}),T&&R.jsxs("div",{"data-testid":"message-error",className:"bg-danger-50 border-danger-200 text-danger-700 rounded-medium flex items-center gap-2 border px-3 py-2",role:"alert",children:[R.jsx(ci,{icon:"heroicons:exclamation-triangle",className:"text-danger h-5 w-5 flex-shrink-0"}),R.jsx("span",{className:"text-small",children:T})]}),Y&&R.jsx(bH,{images:x}),te&&R.jsx(xH,{references:g}),$&&R.jsx(wH,{content:h,serverId:d,message:s})]})})})})}),PH=S.forwardRef(({classNames:e={},...t},n)=>R.jsx(Az,{ref:n,className:"min-h-[50px]",classNames:e,...t}));function TH({isVisible:e,actions:t,sendMessage:n}){return R.jsx(ol,{children:e&&R.jsx(Js.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{overflow:"hidden",opacity:0,height:0},transition:{type:"tween",ease:"easeInOut",duration:.3},children:R.jsx(C2,{className:bn("flex flex-nowrap gap-2 py-2 transition-all"),orientation:"horizontal",role:"group","aria-label":"Predefined message actions","aria-roledescription":"Horizontal scrollable list","data-testid":"horizontal-actions",children:R.jsx("div",{className:"m-auto flex gap-2",children:t.map((r,i)=>R.jsx(wr,{className:"flex",variant:"flat",onPress:()=>n(r),"aria-label":`Send message: ${r}`,children:R.jsx("p",{children:r})},i))})})},"horizontal-actions")})}function _H(){const e=s=>{const a=window.getComputedStyle(s),c=document.createElement("div");return c.style.whiteSpace="pre-wrap",c.style.wordWrap="break-word",c.style.position="absolute",c.style.visibility="hidden",c.style.font=a.font,c.style.lineHeight=a.lineHeight,c.style.padding=a.padding,c.style.border=a.border,c.style.boxSizing=a.boxSizing,c.style.width=`${s.clientWidth}px`,c},t=S.useCallback(s=>{const a=s.value.slice(0,s.selectionStart),c=e(s),d=window.getComputedStyle(s),h=document.createElement("span");h.textContent="​",c.textContent=a,c.appendChild(h),document.body.appendChild(c);const m=h.offsetTop,g=parseFloat(d.lineHeight||"16"),b=Math.round(m/g);return document.body.removeChild(c),b},[]),n=S.useCallback(s=>{const a=e(s),c=window.getComputedStyle(s);let d=s.value;(d.endsWith(`
74
- `)||d==="")&&(d+="​"),a.textContent=d,document.body.appendChild(a);const h=a.offsetHeight,m=parseFloat(c.lineHeight||"16"),g=Math.round(h/m);return document.body.removeChild(a),g},[]),r=S.useCallback(s=>t(s)===0,[t]),i=S.useCallback(s=>{const a=t(s),c=n(s);return a===c-1},[t,n]);return{isCaretInFirstLine:r,isCaretInLastLine:i}}const IH=({followupMessages:e,submit:t,stopAnswering:n,isLoading:r,formProps:i,inputProps:s,sendButtonProps:a,customSendIcon:c,customStopIcon:d,history:h,isDisabled:m=!1})=>{const[g,b]=S.useState(""),[x,k]=S.useState([]),P=S.useRef(null),T=S.useRef(null),{isCaretInFirstLine:_,isCaretInLastLine:A}=_H(),M=S.useRef(Math.max(x.length-1,0)),O=S.useCallback(()=>{const G=x[M.current];b(G)},[x]),j=S.useCallback(()=>{M.current=Math.max(M.current-1,0),O()},[O]),$=S.useCallback(()=>{M.current=Math.min(x.length-1,M.current+1),O()},[x,O]),Y=S.useCallback(G=>{!g&&!G||m||(n(),t(G??g),k(ee=>{const H=ee.slice(0,-1);return H.push(G??g),H}),b(""),T?.current?.focus())},[g,n,t,m]),te=S.useCallback(G=>{G.target===P.current&&(G.preventDefault(),Y())},[Y]),ie=S.useCallback(G=>{if(T.current){if(G.key==="ArrowUp"){if(!_(T.current))return;G.preventDefault(),j()}if(G.key==="ArrowDown"){if(!A(T.current))return;G.preventDefault(),$()}G.key==="Enter"&&!G.shiftKey&&(G.preventDefault(),Y())}},[Y,_,A,$,j]),B=S.useCallback(()=>{n(),T?.current?.focus()},[n]),W=S.useCallback(G=>{k(ee=>{const H=[...ee];return H[M.current]=G,H}),b(G)},[]);return S.useEffect(()=>{const G=(h??[]).filter(ee=>ee.role===kf.User).map(ee=>ee.content);x.length-1!==G.length&&(G.push(""),M.current=Math.max(G.length-1,0),k(G))},[h,x.length]),R.jsxs("div",{className:"rounded-medium",children:[R.jsx(TH,{isVisible:!!e,actions:e??[],sendMessage:G=>Y(G)}),R.jsxs(Y6,{className:"rounded-medium bg-default-100 dark:bg-default-100 flex w-full flex-row items-center pr-2 pl-0",validationBehavior:"native",onSubmit:te,ref:P,...i,children:[R.jsx(PH,{ref:T,"aria-label":"Message to the chat",classNames:{input:"text-medium text-default-foreground",inputWrapper:"!bg-transparent shadow-none group-data-[focus-visible=true]:ring-0 group-data-[focus-visible=true]:ring-offset-0 py-4"},name:"message",placeholder:m?"Please respond to pending confirmation...":"Enter a message here",autoFocus:!0,maxRows:16,minRows:1,value:g,onKeyDown:ie,onValueChange:W,"data-testid":"prompt-input-input","data-value":g,isDisabled:m,...s}),R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx(uv,{name:"prompt.beforeSend",skeletonSize:{width:"40px",height:"40px"},props:{isInputDisabled:r||m}}),R.jsx(wr,{isIconOnly:!0,"aria-label":r?"Stop answering":"Send message to the chat",color:!r&&!g?"default":"primary",isDisabled:!r&&(!g||m),radius:"full",size:"sm",type:r?"button":"submit",onPress:r?B:void 0,"data-testid":"send-message",...a,children:R.jsxs(R.Fragment,{children:[!r&&(c??R.jsx(ci,{className:bn(g?"text-primary-foreground":"text-default-600"),icon:"heroicons:arrow-up","data-testid":"prompt-input-send-icon",width:20})),r&&(d??R.jsx(ci,{className:"text-primary-foreground",icon:"heroicons:stop","data-testid":"prompt-input-stop-icon",width:20}))]})})]})]})]})};function $H({...e}){const t=hH();return R.jsx(IH,{...e,history:t})}function Zb(){const{config:{customization:e}}=kh(),t=pH(),n=Za($=>$.lastMessageId),r=m$(n),i=Za($=>$.isLoading),s=Za($=>$.followupMessages),a=mH(),{sendMessage:c,stopAnswering:d}=Nv(),[h,m]=S.useState(!1),[g,b]=S.useState(!0),x=S.useRef(null),k=S.useMemo(()=>t.length>0,[t.length]),{client:P}=Pv(),T=$=>{c($,P)},_=S.useCallback(()=>{if(!x.current)return;const te=x.current,ie=te.scrollHeight-te.scrollTop-te.clientHeight;m(ie>100),b(!1),ie>25?b(!1):b(!0)},[]);S.useEffect(()=>{b(!0),t.length===0&&m(!1)},[t.length]),S.useEffect(()=>{if(x.current&&g){const $=x.current;$.scrollTop=$.scrollHeight}},[_,r,g]),S.useEffect(()=>{const $=x.current;return $?.addEventListener("scroll",_),()=>{$?.removeEventListener("scroll",_)}},[_,k]);const A=S.useCallback(()=>{x.current&&(x.current.scrollTo({top:x.current.scrollHeight,behavior:"smooth"}),b(!0))},[]),M=S.useMemo(()=>R.jsx(C2,{className:"relative flex h-full flex-col gap-6 pb-8",ref:x,children:t.map($=>R.jsx(EH,{messageId:$},$))}),[t]),O=R.jsx("div",{className:"flex h-full w-full items-center justify-center",children:R.jsxs("div",{className:"flex w-full max-w-[600px] flex-col gap-4",children:[e?.welcome_message&&R.jsx(Hp,{className:"text-large text-default-900 text-center",remarkPlugins:[Gp],children:e?.welcome_message}),R.jsx("div",{className:"text-small text-default-500 text-center",children:"You can start a conversation by typing in the input box below."})]})}),j=k?M:O;return R.jsxs("div",{className:"relative flex h-full flex-col overflow-y-auto p-6 pb-8",children:[j,R.jsxs("div",{className:"relative mt-auto flex max-w-full flex-col gap-2 px-6",children:[R.jsx(wr,{variant:"solid",onPress:A,className:bn("absolute -top-16 left-1/2 z-10 -translate-x-1/2 transition-all duration-200 ease-out",h&&k?"opacity-100":"pointer-events-none opacity-0"),tabIndex:-1,startContent:R.jsx(ci,{icon:"heroicons:arrow-down"}),children:"Scroll to bottom"}),R.jsx($H,{isLoading:i,submit:T,stopAnswering:d,followupMessages:s,isDisabled:a})]})]})}function AH(){const t=eI().conversationId;if(!t||typeof t!="string")throw new Error("HistoryRoute expects `conversationId` param to be present in the URL.");return R.jsx(Zb,{})}function RH(e){return`/conversation/${e}`}function LH({children:e}){const t=pw(),n=sa(Ih(c=>Object.keys(c.conversations))),{selectConversation:r}=Nv(),s=eI().conversationId,a=s&&typeof s=="string"&&n.includes(s);return S.useEffect(()=>{if(a){r(s);return}const c=n.at(-1);if(!c)throw new Error("No conversation to navigate to");r(c),t(RH(c),{replace:!0})},[n,a,t,r,s]),e}const sE=S.lazy(()=>Br(()=>import("./ChatHistory-LRndyrq0.js"),__vite__mapDeps([9,3,4,2]))),v$="ChatHistoryPlugin",MH={name:v$,components:{ChatHistory:sE},routes:[{target:"/",path:"/conversation/:conversationId",element:R.jsx(AH,{})}],routeWrappers:[{target:"/",wrapper:e=>R.jsx(LH,{children:e})}],slots:[Lu("layout.sidebar",sE,10)]};var y$=Symbol.for("immer-nothing"),aE=Symbol.for("immer-draftable"),Ri=Symbol.for("immer-state");function _o(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Mf=Object.getPrototypeOf;function Df(e){return!!e&&!!e[Ri]}function _u(e){return e?b$(e)||Array.isArray(e)||!!e[aE]||!!e.constructor?.[aE]||Ov(e)||zv(e):!1}var DH=Object.prototype.constructor.toString();function b$(e){if(!e||typeof e!="object")return!1;const t=Mf(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===DH}function cv(e,t){Fv(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Fv(e){const t=e[Ri];return t?t.type_:Array.isArray(e)?1:Ov(e)?2:zv(e)?3:0}function ex(e,t){return Fv(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function x$(e,t,n){const r=Fv(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function NH(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ov(e){return e instanceof Map}function zv(e){return e instanceof Set}function hu(e){return e.copy_||e.base_}function tx(e,t){if(Ov(e))return new Map(e);if(zv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=b$(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Ri];let i=Reflect.ownKeys(r);for(let s=0;s<i.length;s++){const a=i[s],c=r[a];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[a]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[a]})}return Object.create(Mf(e),r)}else{const r=Mf(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function Nw(e,t=!1){return jv(e)||Df(e)||!_u(e)||(Fv(e)>1&&(e.set=e.add=e.clear=e.delete=FH),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Nw(r,!0))),e}function FH(){_o(2)}function jv(e){return Object.isFrozen(e)}var OH={};function Iu(e){const t=OH[e];return t||_o(0,e),t}var fh;function w$(){return fh}function zH(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function lE(e,t){t&&(Iu("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function nx(e){rx(e),e.drafts_.forEach(jH),e.drafts_=null}function rx(e){e===fh&&(fh=e.parent_)}function uE(e){return fh=zH(fh,e)}function jH(e){const t=e[Ri];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function cE(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ri].modified_&&(nx(t),_o(4)),_u(e)&&(e=fv(t,e),t.parent_||dv(t,e)),t.patches_&&Iu("Patches").generateReplacementPatches_(n[Ri].base_,e,t.patches_,t.inversePatches_)):e=fv(t,n,[]),nx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==y$?e:void 0}function fv(e,t,n){if(jv(t))return t;const r=t[Ri];if(!r)return cv(t,(i,s)=>fE(e,r,t,i,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return dv(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let s=i,a=!1;r.type_===3&&(s=new Set(i),i.clear(),a=!0),cv(s,(c,d)=>fE(e,r,i,c,d,n,a)),dv(e,i,!1),n&&e.patches_&&Iu("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function fE(e,t,n,r,i,s,a){if(Df(i)){const c=s&&t&&t.type_!==3&&!ex(t.assigned_,r)?s.concat(r):void 0,d=fv(e,i,c);if(x$(n,r,d),Df(d))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(_u(i)&&!jv(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;fv(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&dv(e,i)}}function dv(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Nw(t,n)}function BH(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:w$(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,s=Fw;n&&(i=[r],s=dh);const{revoke:a,proxy:c}=Proxy.revocable(i,s);return r.draft_=c,r.revoke_=a,c}var Fw={get(e,t){if(t===Ri)return e;const n=hu(e);if(!ex(n,t))return VH(e,n,t);const r=n[t];return e.finalized_||!_u(r)?r:r===K0(e.base_,t)?(W0(e),e.copy_[t]=ox(r,e)):r},has(e,t){return t in hu(e)},ownKeys(e){return Reflect.ownKeys(hu(e))},set(e,t,n){const r=S$(hu(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=K0(hu(e),t),s=i?.[Ri];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(NH(n,i)&&(n!==void 0||ex(e.base_,t)))return!0;W0(e),ix(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return K0(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,W0(e),ix(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=hu(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){_o(11)},getPrototypeOf(e){return Mf(e.base_)},setPrototypeOf(){_o(12)}},dh={};cv(Fw,(e,t)=>{dh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});dh.deleteProperty=function(e,t){return dh.set.call(this,e,t,void 0)};dh.set=function(e,t,n){return Fw.set.call(this,e[0],t,n,e[0])};function K0(e,t){const n=e[Ri];return(n?hu(n):e)[t]}function VH(e,t,n){const r=S$(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function S$(e,t){if(!(t in e))return;let n=Mf(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Mf(n)}}function ix(e){e.modified_||(e.modified_=!0,e.parent_&&ix(e.parent_))}function W0(e){e.copy_||(e.copy_=tx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var UH=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const a=this;return function(d=s,...h){return a.produce(d,m=>n.call(this,m,...h))}}typeof n!="function"&&_o(6),r!==void 0&&typeof r!="function"&&_o(7);let i;if(_u(t)){const s=uE(this),a=ox(t,void 0);let c=!0;try{i=n(a),c=!1}finally{c?nx(s):rx(s)}return lE(s,r),cE(i,s)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===y$&&(i=void 0),this.autoFreeze_&&Nw(i,!0),r){const s=[],a=[];Iu("Patches").generateReplacementPatches_(t,i,s,a),r(s,a)}return i}else _o(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...c)=>this.produceWithPatches(a,d=>t(d,...c));let r,i;return[this.produce(t,n,(a,c)=>{r=a,i=c}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){_u(e)||_o(8),Df(e)&&(e=KH(e));const t=uE(this),n=ox(e,void 0);return n[Ri].isManual_=!0,rx(t),n}finishDraft(e,t){const n=e&&e[Ri];(!n||!n.isManual_)&&_o(9);const{scope_:r}=n;return lE(r,t),cE(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Iu("Patches").applyPatches_;return Df(e)?r(e,t):this.produce(e,i=>r(i,t))}};function ox(e,t){const n=Ov(e)?Iu("MapSet").proxyMap_(e,t):zv(e)?Iu("MapSet").proxySet_(e,t):BH(e,t);return(t?t.scope_:w$()).drafts_.push(n),n}function KH(e){return Df(e)||_o(10,e),k$(e)}function k$(e){if(!_u(e)||jv(e))return e;const t=e[Ri];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=tx(e,t.scope_.immer_.useStrictShallowCopy_)}else n=tx(e,!0);return cv(n,(r,i)=>{x$(n,r,k$(i))}),t&&(t.finalized_=!1),n}var Li=new UH,$h=Li.produce;Li.produceWithPatches.bind(Li);Li.setAutoFreeze.bind(Li);Li.setUseStrictShallowCopy.bind(Li);Li.applyPatches.bind(Li);Li.createDraft.bind(Li);Li.finishDraft.bind(Li);function WH(e,t){return $h(e,n=>{for(const r of t)for(const i of r.routes??[]){if(!i.target){n.push(i);continue}const s=C$(n,i.target);if(!s){console.warn(`Target route "${i.target}" not found`);continue}s.children||(s.children=[]),s.children.push({path:i.path,element:i.element,children:i.children})}})}function C$(e,t){for(const n of e){if(n.path===t)return n;if(n.children){const r=C$(n.children,t);if(r)return r}}}function HH(e,t){const n=r=>r.map(i=>{const s=i.path??"",a=t.filter(h=>h.target==="global"||h.target===s);let c=i.element;for(const{wrapper:h}of a)c=h(c);const d={...i,element:c};return i.children&&(d.children=n(i.children)),d});return n(e)}function GH(){const e=n=>Bt.subscribe(n),t=()=>Bt.getActivePlugins();return S.useSyncExternalStore(e,t)}function qH(){const e=S.useContext(E2);if(!e)throw new Error("useThemeContext must be used within a ThemeContextProvider");return e}const YH=e=>typeof e=="boolean"||e instanceof Boolean,XH=e=>typeof e=="number"||e instanceof Number,QH=e=>typeof e=="bigint"||e instanceof BigInt,E$=e=>!!e&&e instanceof Date,JH=e=>typeof e=="string"||e instanceof String,ZH=e=>Array.isArray(e),eG=e=>typeof e=="object"&&e!==null,P$=e=>!!e&&e instanceof Object&&typeof e=="function";function pv(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function tG(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function T$(e){let{field:t,value:n,data:r,lastElement:i,openBracket:s,closeBracket:a,level:c,style:d,shouldExpandNode:h,clickToExpandNode:m,outerRef:g,beforeExpandChange:b}=e;const x=S.useRef(!1),[k,P]=S.useState(()=>h(c,n,t)),T=S.useRef(null);S.useEffect(()=>{x.current?P(h(c,n,t)):x.current=!0},[h]);const _=S.useId();if(r.length===0)return nG({field:t,openBracket:s,closeBracket:a,lastElement:i,style:d});const A=k?d.collapseIcon:d.expandIcon,M=k?d.ariaLables.collapseJson:d.ariaLables.expandJson,O=c+1,j=r.length-1,$=ie=>{k!==ie&&(!b||b({level:c,value:n,field:t,newExpandValue:ie}))&&P(ie)},Y=ie=>{if(ie.key==="ArrowRight"||ie.key==="ArrowLeft")ie.preventDefault(),$(ie.key==="ArrowRight");else if(ie.key==="ArrowUp"||ie.key==="ArrowDown"){ie.preventDefault();const B=ie.key==="ArrowUp"?-1:1;if(!g.current)return;const W=g.current.querySelectorAll("[role=button]");let G=-1;for(let H=0;H<W.length;H++)if(W[H].tabIndex===0){G=H;break}if(G<0)return;const ee=(G+B+W.length)%W.length;W[G].tabIndex=-1,W[ee].tabIndex=0,W[ee].focus()}},te=()=>{var ie;$(!k);const B=T.current;if(!B)return;const W=(ie=g.current)===null||ie===void 0?void 0:ie.querySelector('[role=button][tabindex="0"]');W&&(W.tabIndex=-1),B.tabIndex=0,B.focus()};return S.createElement("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":k,"aria-selected":void 0},S.createElement("span",{className:A,onClick:te,onKeyDown:Y,role:"button","aria-label":M,"aria-expanded":k,"aria-controls":k?_:void 0,ref:T,tabIndex:c===0?0:-1}),(t||t==="")&&(m?S.createElement("span",{className:d.clickableLabel,onClick:te,onKeyDown:Y},pv(t,d.quotesForFieldNames),":"):S.createElement("span",{className:d.label},pv(t,d.quotesForFieldNames),":")),S.createElement("span",{className:d.punctuation},s),k?S.createElement("ul",{id:_,role:"group",className:d.childFieldsContainer},r.map((ie,B)=>S.createElement(_$,{key:ie[0]||B,field:ie[0],value:ie[1],style:d,lastElement:B===j,level:O,shouldExpandNode:h,clickToExpandNode:m,outerRef:g}))):S.createElement("span",{className:d.collapsedContent,onClick:te,onKeyDown:Y}),S.createElement("span",{className:d.punctuation},a),!i&&S.createElement("span",{className:d.punctuation},","))}function nG(e){let{field:t,openBracket:n,closeBracket:r,lastElement:i,style:s}=e;return S.createElement("div",{className:s.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&S.createElement("span",{className:s.label},pv(t,s.quotesForFieldNames),":"),S.createElement("span",{className:s.punctuation},n),S.createElement("span",{className:s.punctuation},r),!i&&S.createElement("span",{className:s.punctuation},","))}function rG(e){let{field:t,value:n,style:r,lastElement:i,shouldExpandNode:s,clickToExpandNode:a,level:c,outerRef:d,beforeExpandChange:h}=e;return T$({field:t,value:n,lastElement:i||!1,level:c,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:s,clickToExpandNode:a,data:Object.keys(n).map(m=>[m,n[m]]),outerRef:d,beforeExpandChange:h})}function iG(e){let{field:t,value:n,style:r,lastElement:i,level:s,shouldExpandNode:a,clickToExpandNode:c,outerRef:d,beforeExpandChange:h}=e;return T$({field:t,value:n,lastElement:i||!1,level:s,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:a,clickToExpandNode:c,data:n.map(m=>[void 0,m]),outerRef:d,beforeExpandChange:h})}function oG(e){let{field:t,value:n,style:r,lastElement:i}=e,s,a=r.otherValue;return n===null?(s="null",a=r.nullValue):n===void 0?(s="undefined",a=r.undefinedValue):JH(n)?(s=tG(n,!r.noQuotesForStringValues,r.stringifyStringValues),a=r.stringValue):YH(n)?(s=n?"true":"false",a=r.booleanValue):XH(n)?(s=n.toString(),a=r.numberValue):QH(n)?(s=`${n.toString()}n`,a=r.numberValue):E$(n)?s=n.toISOString():P$(n)?s="function() { }":s=n.toString(),S.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&S.createElement("span",{className:r.label},pv(t,r.quotesForFieldNames),":"),S.createElement("span",{className:a},s),!i&&S.createElement("span",{className:r.punctuation},","))}function _$(e){const t=e.value;return ZH(t)?S.createElement(iG,Object.assign({},e)):eG(t)&&!E$(t)&&!P$(t)?S.createElement(rG,Object.assign({},e)):S.createElement(oG,Object.assign({},e))}var Nr={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti"};const sG={collapseJson:"collapse JSON",expandJson:"expand JSON"},eo={container:Nr["container-light"],basicChildStyle:Nr["basic-element-style"],childFieldsContainer:Nr["child-fields-container"],label:Nr["label-light"],clickableLabel:Nr["clickable-label-light"],nullValue:Nr["value-null-light"],undefinedValue:Nr["value-undefined-light"],stringValue:Nr["value-string-light"],booleanValue:Nr["value-boolean-light"],numberValue:Nr["value-number-light"],otherValue:Nr["value-other-light"],punctuation:Nr["punctuation-light"],collapseIcon:Nr["collapse-icon-light"],expandIcon:Nr["expand-icon-light"],collapsedContent:Nr["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:sG,stringifyStringValues:!1},Mp=()=>!0,_g=e=>{let{data:t,style:n=eo,shouldExpandNode:r=Mp,clickToExpandNode:i=!1,beforeExpandChange:s,...a}=e;const c=S.useRef(null);return S.createElement("div",Object.assign({"aria-label":"JSON view"},a,{className:n.container,ref:c,role:"tree"}),S.createElement(_$,{value:t,style:{...eo,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:i,outerRef:c,beforeExpandChange:s}))};function aG(e){return typeof e=="string"?e:`map:${String(e)}`}function Ja(e,t=new WeakSet){if(e===null||typeof e!="object")return typeof e=="bigint"?e.toString():typeof e>"u"||typeof e=="function"?void 0:e;if(t.has(e))return"[Circular]";if(t.add(e),e instanceof Date)return e.toISOString();if(e instanceof Map){const r={};for(const[i,s]of e.entries())r[aG(i)]=Ja(s,t);return r}if(e instanceof Set)return Array.from(e).map(r=>Ja(r,t));if(Array.isArray(e))return e.map(r=>Ja(r,t));const n={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=Ja(e[r],t);i!==void 0&&(n[r]=i)}return n}const Ig={container:"max-w-full overflow-auto rounded bg-default p-2 font-mono font-normal",label:`${eo.label} !text-default-900`,collapseIcon:`${eo.collapseIcon} !text-default-900`,expandIcon:`${eo.expandIcon} !text-default-900`,collapsedContent:`${eo.collapsedContent} !text-default-900`,punctuation:"!text-default-900",stringValue:`${eo.stringValue} !text-green-600`,otherValue:`${eo.otherValue} !text-purple-500`,numberValue:`${eo.numberValue}`,nullValue:`${eo.nullValue}`,booleanValue:`${eo.booleanValue} !text-yellow-600`,undefinedValue:`${eo.undefinedValue}`};function lG({isOpen:e}){const t=Za(s=>s.history),n=Za(s=>s.followupMessages),r=Za(s=>s.eventsLog),i=sa(Ih(s=>s.computed.getContext()));return R.jsx(ol,{children:e&&R.jsx(Js.div,{initial:{scale:.6,opacity:0,width:0},animate:{scale:1,opacity:1,width:"100%"},exit:{scale:.6,opacity:0,width:0},className:"w-full max-w-[33%] overflow-hidden px-4",children:R.jsxs("div",{className:"rounded-medium border-small border-divider mr-4 h-full overflow-auto","data-testid":"debug-panel",children:[R.jsx("div",{className:"border-b-small border-divider min-h-16 p-4 text-lg font-bold",children:R.jsx("span",{children:"Debug"})}),R.jsxs(Rk,{className:"max-h-full",children:[R.jsx(bp,{"aria-label":"Context",title:"Context",children:R.jsx("div",{className:"max-h-[664px] overflow-auto",children:R.jsx(_g,{data:Ja(i)??{},shouldExpandNode:Mp,style:Ig})})},"context"),R.jsx(bp,{"aria-label":"History",title:"History",children:R.jsx("div",{className:"max-h-[664px] overflow-auto",children:R.jsx(_g,{data:Ja(t)??{},shouldExpandNode:Mp,style:Ig})})},"history"),R.jsx(bp,{"aria-label":"Followup messages",title:"Followup messages",children:R.jsx("div",{className:"max-h-[664px] overflow-auto",children:R.jsx(_g,{data:Ja(n)??{},shouldExpandNode:Mp,style:Ig})})},"folowup-messages"),R.jsx(bp,{"aria-label":"Events",title:"Events",children:r.length===0?R.jsx("p",{children:"No events in the log"}):R.jsx(Rk,{children:r.map((s,a)=>R.jsx(bp,{"aria-label":`Events for response number ${a+1}`,title:`Events for response number ${a+1}`,children:R.jsx(_g,{data:Ja(s)??{},shouldExpandNode:Mp,style:Ig})},`events-${a+1}`))})},"events")]})]})})})}function uG(e){return S.useSyncExternalStore(t=>Bt.subscribe(t),()=>Bt.hasSlotFillers(e))}function I$(e){return cG(e)?!0:dG(e)&&fG(e)}function cG(e){try{return new URL(e),!0}catch{return!1}}function fG(e){try{const t="http://base.local";return new URL(e,t),!0}catch{return!1}}function dG(e){return/^[./~\w%-][\w./~%-]*$/.test(e)}function pG({children:e,title:t,subTitle:n,logo:r,classNames:i}){const s=uG("layout.sidebar"),{config:a}=kh(),{newConversation:c,stopAnswering:d}=Nv(),{setTheme:h,theme:m}=qH(),[g,b]=S.useState(!1),x=()=>{h(m===To.DARK?To.LIGHT:To.DARK)},k=S.useCallback(()=>{d(),c()},[c,d]);return R.jsxs("div",{className:"flex h-full min-h-[48rem] justify-center py-4",children:[R.jsx(uv,{name:"layout.sidebar",disableSkeleton:!0}),R.jsxs("div",{className:bn("flex grow flex-col px-4 sm:max-w-[1200px]",s&&"pl-0"),children:[R.jsxs("header",{className:bn("border-small border-divider flex h-16 min-h-16 items-center justify-between gap-2 rounded-none px-4 py-3",i?.header,s?"rounded-tr-medium":"rounded-t-medium"),children:[R.jsxs("div",{className:"flex w-full items-center gap-2",children:[I$(r)?R.jsx("img",{src:r,className:"h-8 w-8",width:32,height:32}):R.jsx("div",{className:"bg-foreground flex h-8 w-8 items-center justify-center rounded-full",children:r}),R.jsxs("div",{className:"w-full min-w-[120px] sm:w-auto",children:[R.jsx("div",{className:bn("text-small text-foreground truncate leading-5 font-semibold",i?.title),children:t}),R.jsx("div",{className:bn("text-small text-default-500 truncate leading-5 font-normal",i?.subTitle),children:n})]})]}),R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx(uv,{name:"layout.headerActions",skeletonSize:{width:"40px",height:"40px"}}),!s&&R.jsx(Bg,{content:"Clear chat",placement:"bottom",children:R.jsx(wr,{isIconOnly:!0,"aria-label":"Clear chat",variant:"ghost",onPress:k,"data-testid":"layout-clear-chat-button",children:R.jsx(ci,{icon:"heroicons:arrow-path"})})}),R.jsx(Bg,{content:"Change theme",placement:"bottom",children:R.jsx(wr,{isIconOnly:!0,"aria-label":`Change theme to ${m===To.DARK?"light":"dark"}`,variant:"ghost",onPress:x,"data-testid":"layout-toggle-theme-button",children:m===To.DARK?R.jsx(ci,{icon:"heroicons:sun"}):R.jsx(ci,{icon:"heroicons:moon"})})}),a.debug_mode&&R.jsx(Bg,{content:"Toggle debug panel",placement:"bottom",children:R.jsxs(wr,{isIconOnly:!0,"aria-label":`${g?"Open":"Close"} debug panel`,variant:"ghost",onPress:()=>b(P=>!P),"data-testid":"layout-debug-button",children:[R.jsx(ci,{icon:"heroicons:bug-ant"}),g&&R.jsx("div",{className:"bg-default-500 absolute top-1/2 right-0 left-0 h-0.5 -rotate-45"})]})})]})]}),R.jsx("main",{className:"flex h-full overflow-hidden",children:R.jsx("div",{className:bn("border-divider flex h-full w-full flex-col gap-4 rounded-none border-0 border-r border-b border-l py-3",i?.container,s?"rounded-br-medium":"rounded-b-medium"),children:e})})]}),R.jsx(lG,{isOpen:g})]})}const $$=e=>{const t=r=>Bt.subscribe(r),n=()=>Bt.getPlugin(e);return S.useSyncExternalStore(t,n)},dE=({plugin:e,component:t,skeletonSize:n,disableSkeleton:r,componentProps:i})=>{const s=$$(e.name),a=n?{width:n.width,height:n.height}:{};if(!s)return null;const c=s.config.components[t];try{return R.jsx(S.Suspense,{fallback:r?null:R.jsx(S2,{className:"rounded-lg",style:a}),children:R.jsx(c,{...i||{}})})}catch(d){return console.error(d),null}},Ow="CredentialsLoginPlugin",A$={name:Ow,components:{CredentialsLogin:S.lazy(()=>Br(()=>import("./CredentialsLogin-CjWUo2_0.js"),__vite__mapDeps([10,11,12,2])))}},R$="OAuth2LoginPlugin",hG=(e,t,n)=>({name:`${R$}_${e}`,components:{OAuth2Login:S.lazy(()=>Br(()=>import("./OAuth2Login-CJdQ3WzG.js"),[]))},metadata:{provider:e,displayName:t,visualConfig:n}}),mG=S.lazy(()=>Br(()=>import("./Login-CGHnIvPP.js"),[]));function gG(){const e=$$(Ow),t=Bt.getActivePlugins().filter(r=>r.name.startsWith(R$)),n=e&&t.length>0;return R.jsx(S.Suspense,{children:R.jsxs(mG,{children:[R.jsx(dE,{plugin:A$,component:"CredentialsLogin",disableSkeleton:!0}),n&&R.jsxs("div",{className:"my-2 flex items-center gap-2",children:[R.jsx("div",{className:"border-divider flex-1 border-t"}),R.jsx("span",{className:"text-small text-default-500",children:"or"}),R.jsx("div",{className:"border-divider flex-1 border-t"})]}),t.map((r,i)=>{const s=r.metadata?.provider,a=r.metadata?.displayName,c=r.metadata?.visualConfig;return R.jsxs("div",{children:[i>0&&R.jsx("div",{className:"my-2"}),R.jsx(dE,{plugin:r,component:"OAuth2Login",componentProps:{provider:s,displayName:a,visualConfig:c},disableSkeleton:!0})]},r.name)})]})})}const vG=S.lazy(()=>Br(()=>import("./AuthGuard-FL2hbNSz.js"),__vite__mapDeps([13,11,12])));function yG({children:e}){return R.jsx(S.Suspense,{children:R.jsx(vG,{children:e})})}const pE=S.lazy(()=>Br(()=>import("./LogoutButton-C-wYL6PH.js"),__vite__mapDeps([14,11]))),L$="AuthPlugin",bG={name:L$,components:{LogoutButton:pE},routes:[{path:"/login",element:R.jsx(gG,{})}],routeWrappers:[{target:"global",wrapper:e=>R.jsx(yG,{children:e})}],slots:[Lu("layout.headerActions",pE,10)]},hE=S.lazy(()=>Br(()=>import("./UsageButton-CE7BRQcH.js"),__vite__mapDeps([15,4,5,6]))),M$="UsagePluginName",xG={name:M$,components:{UsageButton:hE},slots:[Lu("message.actions",hE,10)]},mE=S.lazy(()=>Br(()=>import("./UploadButton-_aV-toOW.js"),[])),D$="UploadPlugin",wG={name:D$,components:{UploadButton:mE},slots:[Lu("prompt.beforeSend",mE,5)]};function SG(){const{config:e}=kh();S.useEffect(()=>{if(!e)return;const{feedback:t,user_settings:n,conversation_history:r,authentication:i,show_usage:s,supports_upload:a}=e;(t.like.enabled||t.dislike.enabled)&&Bt.activate(V2),n.form&&Bt.activate(U2),r&&Bt.activate(v$),i.enabled&&(Bt.activate(L$),i.auth_types.includes("credentials")&&Bt.activate(Ow),i.auth_types.includes("oauth2")&&i.oauth2_providers&&i.oauth2_providers.forEach(c=>{const d=hG(c.name,c.display_name||c.name,{color:c.color,buttonColor:c.button_color,textColor:c.text_color,iconSvg:c.icon_svg});Bt.register(d),Bt.activate(d.name)})),s&&Bt.activate(M$),a&&Bt.activate(D$),Bt.activate(H2)},[e])}const gE="generated-favicon";function kG(){SG();const{config:{customization:e}}=kh(),t=S.useMemo(()=>e?.header?.logo??c7,[e?.header?.logo]),n=S.useMemo(()=>e?.header?.title??f7,[e?.header?.title]),r=S.useMemo(()=>e?.header?.subtitle??d7,[e?.header?.subtitle]),i=S.useMemo(()=>e?.meta?.favicon??t,[e?.meta?.favicon,t]),s=S.useMemo(()=>e?.meta?.page_title??n,[e?.meta?.page_title,n]);S.useLayoutEffect(()=>{document.title=s},[s]);const a=c=>{const d=document.createElement("link");d.rel="icon",d.href=c,d.id=gE,document.head.appendChild(d)};return S.useLayoutEffect(()=>{if(document.querySelectorAll("link[rel*='icon']").forEach(d=>d.remove()),I$(i))a(i);else{const d=`
74
+ `)||d==="")&&(d+="​"),a.textContent=d,document.body.appendChild(a);const h=a.offsetHeight,m=parseFloat(c.lineHeight||"16"),g=Math.round(h/m);return document.body.removeChild(a),g},[]),r=S.useCallback(s=>t(s)===0,[t]),i=S.useCallback(s=>{const a=t(s),c=n(s);return a===c-1},[t,n]);return{isCaretInFirstLine:r,isCaretInLastLine:i}}const IH=({followupMessages:e,submit:t,stopAnswering:n,isLoading:r,formProps:i,inputProps:s,sendButtonProps:a,customSendIcon:c,customStopIcon:d,history:h,isDisabled:m=!1})=>{const[g,b]=S.useState(""),[x,k]=S.useState([]),P=S.useRef(null),T=S.useRef(null),{isCaretInFirstLine:_,isCaretInLastLine:A}=_H(),M=S.useRef(Math.max(x.length-1,0)),O=S.useCallback(()=>{const G=x[M.current];b(G)},[x]),j=S.useCallback(()=>{M.current=Math.max(M.current-1,0),O()},[O]),$=S.useCallback(()=>{M.current=Math.min(x.length-1,M.current+1),O()},[x,O]),Y=S.useCallback(G=>{!g&&!G||m||(n(),t(G??g),k(ee=>{const H=ee.slice(0,-1);return H.push(G??g),H}),b(""),T?.current?.focus())},[g,n,t,m]),te=S.useCallback(G=>{G.target===P.current&&(G.preventDefault(),Y())},[Y]),ie=S.useCallback(G=>{if(T.current){if(G.key==="ArrowUp"){if(!_(T.current))return;G.preventDefault(),j()}if(G.key==="ArrowDown"){if(!A(T.current))return;G.preventDefault(),$()}G.key==="Enter"&&!G.shiftKey&&(G.preventDefault(),Y())}},[Y,_,A,$,j]),B=S.useCallback(()=>{n(),T?.current?.focus()},[n]),W=S.useCallback(G=>{k(ee=>{const H=[...ee];return H[M.current]=G,H}),b(G)},[]);return S.useEffect(()=>{const G=(h??[]).filter(ee=>ee.role===kf.User).map(ee=>ee.content);x.length-1!==G.length&&(G.push(""),M.current=Math.max(G.length-1,0),k(G))},[h,x.length]),R.jsxs("div",{className:"rounded-medium",children:[R.jsx(TH,{isVisible:!!e,actions:e??[],sendMessage:G=>Y(G)}),R.jsxs(Y6,{className:"rounded-medium bg-default-100 dark:bg-default-100 flex w-full flex-row items-center pr-2 pl-0",validationBehavior:"native",onSubmit:te,ref:P,...i,children:[R.jsx(PH,{ref:T,"aria-label":"Message to the chat",classNames:{input:"text-medium text-default-foreground",inputWrapper:"!bg-transparent shadow-none group-data-[focus-visible=true]:ring-0 group-data-[focus-visible=true]:ring-offset-0 py-4"},name:"message",placeholder:m?"Please respond to pending confirmation...":"Enter a message here",autoFocus:!0,maxRows:16,minRows:1,value:g,onKeyDown:ie,onValueChange:W,"data-testid":"prompt-input-input","data-value":g,isDisabled:m,...s}),R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx(uv,{name:"prompt.beforeSend",skeletonSize:{width:"40px",height:"40px"},props:{isInputDisabled:r||m}}),R.jsx(wr,{isIconOnly:!0,"aria-label":r?"Stop answering":"Send message to the chat",color:!r&&!g?"default":"primary",isDisabled:!r&&(!g||m),radius:"full",size:"sm",type:r?"button":"submit",onPress:r?B:void 0,"data-testid":"send-message",...a,children:R.jsxs(R.Fragment,{children:[!r&&(c??R.jsx(ci,{className:bn(g?"text-primary-foreground":"text-default-600"),icon:"heroicons:arrow-up","data-testid":"prompt-input-send-icon",width:20})),r&&(d??R.jsx(ci,{className:"text-primary-foreground",icon:"heroicons:stop","data-testid":"prompt-input-stop-icon",width:20}))]})})]})]})]})};function $H({...e}){const t=hH();return R.jsx(IH,{...e,history:t})}function Zb(){const{config:{customization:e}}=kh(),t=pH(),n=Za($=>$.lastMessageId),r=m$(n),i=Za($=>$.isLoading),s=Za($=>$.followupMessages),a=mH(),{sendMessage:c,stopAnswering:d}=Nv(),[h,m]=S.useState(!1),[g,b]=S.useState(!0),x=S.useRef(null),k=S.useMemo(()=>t.length>0,[t.length]),{client:P}=Pv(),T=$=>{c($,P)},_=S.useCallback(()=>{if(!x.current)return;const te=x.current,ie=te.scrollHeight-te.scrollTop-te.clientHeight;m(ie>100),b(!1),ie>25?b(!1):b(!0)},[]);S.useEffect(()=>{b(!0),t.length===0&&m(!1)},[t.length]),S.useEffect(()=>{if(x.current&&g){const $=x.current;$.scrollTop=$.scrollHeight}},[_,r,g]),S.useEffect(()=>{const $=x.current;return $?.addEventListener("scroll",_),()=>{$?.removeEventListener("scroll",_)}},[_,k]);const A=S.useCallback(()=>{x.current&&(x.current.scrollTo({top:x.current.scrollHeight,behavior:"smooth"}),b(!0))},[]),M=S.useMemo(()=>R.jsx(C2,{className:"relative flex h-full flex-col gap-6 pb-8",ref:x,children:t.map($=>R.jsx(EH,{messageId:$},$))}),[t]),O=R.jsx("div",{className:"flex h-full w-full items-center justify-center",children:R.jsxs("div",{className:"flex w-full max-w-[600px] flex-col gap-4",children:[e?.welcome_message&&R.jsx(Hp,{className:"text-large text-default-900 text-center",remarkPlugins:[Gp],children:e?.welcome_message}),R.jsx("div",{className:"text-small text-default-500 text-center",children:"You can start a conversation by typing in the input box below."})]})}),j=k?M:O;return R.jsxs("div",{className:"relative flex h-full flex-col overflow-y-auto p-6 pb-8",children:[j,R.jsxs("div",{className:"relative mt-auto flex max-w-full flex-col gap-2 px-6",children:[R.jsx(wr,{variant:"solid",onPress:A,className:bn("absolute -top-16 left-1/2 z-10 -translate-x-1/2 transition-all duration-200 ease-out",h&&k?"opacity-100":"pointer-events-none opacity-0"),tabIndex:-1,startContent:R.jsx(ci,{icon:"heroicons:arrow-down"}),children:"Scroll to bottom"}),R.jsx($H,{isLoading:i,submit:T,stopAnswering:d,followupMessages:s,isDisabled:a})]})]})}function AH(){const t=eI().conversationId;if(!t||typeof t!="string")throw new Error("HistoryRoute expects `conversationId` param to be present in the URL.");return R.jsx(Zb,{})}function RH(e){return`/conversation/${e}`}function LH({children:e}){const t=pw(),n=sa(Ih(c=>Object.keys(c.conversations))),{selectConversation:r}=Nv(),s=eI().conversationId,a=s&&typeof s=="string"&&n.includes(s);return S.useEffect(()=>{if(a){r(s);return}const c=n.at(-1);if(!c)throw new Error("No conversation to navigate to");r(c),t(RH(c),{replace:!0})},[n,a,t,r,s]),e}const sE=S.lazy(()=>Br(()=>import("./ChatHistory-D8uJ-pWz.js"),__vite__mapDeps([9,3,4,2]))),v$="ChatHistoryPlugin",MH={name:v$,components:{ChatHistory:sE},routes:[{target:"/",path:"/conversation/:conversationId",element:R.jsx(AH,{})}],routeWrappers:[{target:"/",wrapper:e=>R.jsx(LH,{children:e})}],slots:[Lu("layout.sidebar",sE,10)]};var y$=Symbol.for("immer-nothing"),aE=Symbol.for("immer-draftable"),Ri=Symbol.for("immer-state");function _o(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Mf=Object.getPrototypeOf;function Df(e){return!!e&&!!e[Ri]}function _u(e){return e?b$(e)||Array.isArray(e)||!!e[aE]||!!e.constructor?.[aE]||Ov(e)||zv(e):!1}var DH=Object.prototype.constructor.toString();function b$(e){if(!e||typeof e!="object")return!1;const t=Mf(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===DH}function cv(e,t){Fv(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Fv(e){const t=e[Ri];return t?t.type_:Array.isArray(e)?1:Ov(e)?2:zv(e)?3:0}function ex(e,t){return Fv(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function x$(e,t,n){const r=Fv(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function NH(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ov(e){return e instanceof Map}function zv(e){return e instanceof Set}function hu(e){return e.copy_||e.base_}function tx(e,t){if(Ov(e))return new Map(e);if(zv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=b$(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Ri];let i=Reflect.ownKeys(r);for(let s=0;s<i.length;s++){const a=i[s],c=r[a];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[a]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[a]})}return Object.create(Mf(e),r)}else{const r=Mf(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function Nw(e,t=!1){return jv(e)||Df(e)||!_u(e)||(Fv(e)>1&&(e.set=e.add=e.clear=e.delete=FH),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Nw(r,!0))),e}function FH(){_o(2)}function jv(e){return Object.isFrozen(e)}var OH={};function Iu(e){const t=OH[e];return t||_o(0,e),t}var fh;function w$(){return fh}function zH(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function lE(e,t){t&&(Iu("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function nx(e){rx(e),e.drafts_.forEach(jH),e.drafts_=null}function rx(e){e===fh&&(fh=e.parent_)}function uE(e){return fh=zH(fh,e)}function jH(e){const t=e[Ri];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function cE(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ri].modified_&&(nx(t),_o(4)),_u(e)&&(e=fv(t,e),t.parent_||dv(t,e)),t.patches_&&Iu("Patches").generateReplacementPatches_(n[Ri].base_,e,t.patches_,t.inversePatches_)):e=fv(t,n,[]),nx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==y$?e:void 0}function fv(e,t,n){if(jv(t))return t;const r=t[Ri];if(!r)return cv(t,(i,s)=>fE(e,r,t,i,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return dv(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let s=i,a=!1;r.type_===3&&(s=new Set(i),i.clear(),a=!0),cv(s,(c,d)=>fE(e,r,i,c,d,n,a)),dv(e,i,!1),n&&e.patches_&&Iu("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function fE(e,t,n,r,i,s,a){if(Df(i)){const c=s&&t&&t.type_!==3&&!ex(t.assigned_,r)?s.concat(r):void 0,d=fv(e,i,c);if(x$(n,r,d),Df(d))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(_u(i)&&!jv(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;fv(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&dv(e,i)}}function dv(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Nw(t,n)}function BH(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:w$(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,s=Fw;n&&(i=[r],s=dh);const{revoke:a,proxy:c}=Proxy.revocable(i,s);return r.draft_=c,r.revoke_=a,c}var Fw={get(e,t){if(t===Ri)return e;const n=hu(e);if(!ex(n,t))return VH(e,n,t);const r=n[t];return e.finalized_||!_u(r)?r:r===K0(e.base_,t)?(W0(e),e.copy_[t]=ox(r,e)):r},has(e,t){return t in hu(e)},ownKeys(e){return Reflect.ownKeys(hu(e))},set(e,t,n){const r=S$(hu(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=K0(hu(e),t),s=i?.[Ri];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(NH(n,i)&&(n!==void 0||ex(e.base_,t)))return!0;W0(e),ix(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return K0(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,W0(e),ix(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=hu(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){_o(11)},getPrototypeOf(e){return Mf(e.base_)},setPrototypeOf(){_o(12)}},dh={};cv(Fw,(e,t)=>{dh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});dh.deleteProperty=function(e,t){return dh.set.call(this,e,t,void 0)};dh.set=function(e,t,n){return Fw.set.call(this,e[0],t,n,e[0])};function K0(e,t){const n=e[Ri];return(n?hu(n):e)[t]}function VH(e,t,n){const r=S$(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function S$(e,t){if(!(t in e))return;let n=Mf(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Mf(n)}}function ix(e){e.modified_||(e.modified_=!0,e.parent_&&ix(e.parent_))}function W0(e){e.copy_||(e.copy_=tx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var UH=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const a=this;return function(d=s,...h){return a.produce(d,m=>n.call(this,m,...h))}}typeof n!="function"&&_o(6),r!==void 0&&typeof r!="function"&&_o(7);let i;if(_u(t)){const s=uE(this),a=ox(t,void 0);let c=!0;try{i=n(a),c=!1}finally{c?nx(s):rx(s)}return lE(s,r),cE(i,s)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===y$&&(i=void 0),this.autoFreeze_&&Nw(i,!0),r){const s=[],a=[];Iu("Patches").generateReplacementPatches_(t,i,s,a),r(s,a)}return i}else _o(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...c)=>this.produceWithPatches(a,d=>t(d,...c));let r,i;return[this.produce(t,n,(a,c)=>{r=a,i=c}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){_u(e)||_o(8),Df(e)&&(e=KH(e));const t=uE(this),n=ox(e,void 0);return n[Ri].isManual_=!0,rx(t),n}finishDraft(e,t){const n=e&&e[Ri];(!n||!n.isManual_)&&_o(9);const{scope_:r}=n;return lE(r,t),cE(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Iu("Patches").applyPatches_;return Df(e)?r(e,t):this.produce(e,i=>r(i,t))}};function ox(e,t){const n=Ov(e)?Iu("MapSet").proxyMap_(e,t):zv(e)?Iu("MapSet").proxySet_(e,t):BH(e,t);return(t?t.scope_:w$()).drafts_.push(n),n}function KH(e){return Df(e)||_o(10,e),k$(e)}function k$(e){if(!_u(e)||jv(e))return e;const t=e[Ri];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=tx(e,t.scope_.immer_.useStrictShallowCopy_)}else n=tx(e,!0);return cv(n,(r,i)=>{x$(n,r,k$(i))}),t&&(t.finalized_=!1),n}var Li=new UH,$h=Li.produce;Li.produceWithPatches.bind(Li);Li.setAutoFreeze.bind(Li);Li.setUseStrictShallowCopy.bind(Li);Li.applyPatches.bind(Li);Li.createDraft.bind(Li);Li.finishDraft.bind(Li);function WH(e,t){return $h(e,n=>{for(const r of t)for(const i of r.routes??[]){if(!i.target){n.push(i);continue}const s=C$(n,i.target);if(!s){console.warn(`Target route "${i.target}" not found`);continue}s.children||(s.children=[]),s.children.push({path:i.path,element:i.element,children:i.children})}})}function C$(e,t){for(const n of e){if(n.path===t)return n;if(n.children){const r=C$(n.children,t);if(r)return r}}}function HH(e,t){const n=r=>r.map(i=>{const s=i.path??"",a=t.filter(h=>h.target==="global"||h.target===s);let c=i.element;for(const{wrapper:h}of a)c=h(c);const d={...i,element:c};return i.children&&(d.children=n(i.children)),d});return n(e)}function GH(){const e=n=>Bt.subscribe(n),t=()=>Bt.getActivePlugins();return S.useSyncExternalStore(e,t)}function qH(){const e=S.useContext(E2);if(!e)throw new Error("useThemeContext must be used within a ThemeContextProvider");return e}const YH=e=>typeof e=="boolean"||e instanceof Boolean,XH=e=>typeof e=="number"||e instanceof Number,QH=e=>typeof e=="bigint"||e instanceof BigInt,E$=e=>!!e&&e instanceof Date,JH=e=>typeof e=="string"||e instanceof String,ZH=e=>Array.isArray(e),eG=e=>typeof e=="object"&&e!==null,P$=e=>!!e&&e instanceof Object&&typeof e=="function";function pv(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function tG(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function T$(e){let{field:t,value:n,data:r,lastElement:i,openBracket:s,closeBracket:a,level:c,style:d,shouldExpandNode:h,clickToExpandNode:m,outerRef:g,beforeExpandChange:b}=e;const x=S.useRef(!1),[k,P]=S.useState(()=>h(c,n,t)),T=S.useRef(null);S.useEffect(()=>{x.current?P(h(c,n,t)):x.current=!0},[h]);const _=S.useId();if(r.length===0)return nG({field:t,openBracket:s,closeBracket:a,lastElement:i,style:d});const A=k?d.collapseIcon:d.expandIcon,M=k?d.ariaLables.collapseJson:d.ariaLables.expandJson,O=c+1,j=r.length-1,$=ie=>{k!==ie&&(!b||b({level:c,value:n,field:t,newExpandValue:ie}))&&P(ie)},Y=ie=>{if(ie.key==="ArrowRight"||ie.key==="ArrowLeft")ie.preventDefault(),$(ie.key==="ArrowRight");else if(ie.key==="ArrowUp"||ie.key==="ArrowDown"){ie.preventDefault();const B=ie.key==="ArrowUp"?-1:1;if(!g.current)return;const W=g.current.querySelectorAll("[role=button]");let G=-1;for(let H=0;H<W.length;H++)if(W[H].tabIndex===0){G=H;break}if(G<0)return;const ee=(G+B+W.length)%W.length;W[G].tabIndex=-1,W[ee].tabIndex=0,W[ee].focus()}},te=()=>{var ie;$(!k);const B=T.current;if(!B)return;const W=(ie=g.current)===null||ie===void 0?void 0:ie.querySelector('[role=button][tabindex="0"]');W&&(W.tabIndex=-1),B.tabIndex=0,B.focus()};return S.createElement("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":k,"aria-selected":void 0},S.createElement("span",{className:A,onClick:te,onKeyDown:Y,role:"button","aria-label":M,"aria-expanded":k,"aria-controls":k?_:void 0,ref:T,tabIndex:c===0?0:-1}),(t||t==="")&&(m?S.createElement("span",{className:d.clickableLabel,onClick:te,onKeyDown:Y},pv(t,d.quotesForFieldNames),":"):S.createElement("span",{className:d.label},pv(t,d.quotesForFieldNames),":")),S.createElement("span",{className:d.punctuation},s),k?S.createElement("ul",{id:_,role:"group",className:d.childFieldsContainer},r.map((ie,B)=>S.createElement(_$,{key:ie[0]||B,field:ie[0],value:ie[1],style:d,lastElement:B===j,level:O,shouldExpandNode:h,clickToExpandNode:m,outerRef:g}))):S.createElement("span",{className:d.collapsedContent,onClick:te,onKeyDown:Y}),S.createElement("span",{className:d.punctuation},a),!i&&S.createElement("span",{className:d.punctuation},","))}function nG(e){let{field:t,openBracket:n,closeBracket:r,lastElement:i,style:s}=e;return S.createElement("div",{className:s.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&S.createElement("span",{className:s.label},pv(t,s.quotesForFieldNames),":"),S.createElement("span",{className:s.punctuation},n),S.createElement("span",{className:s.punctuation},r),!i&&S.createElement("span",{className:s.punctuation},","))}function rG(e){let{field:t,value:n,style:r,lastElement:i,shouldExpandNode:s,clickToExpandNode:a,level:c,outerRef:d,beforeExpandChange:h}=e;return T$({field:t,value:n,lastElement:i||!1,level:c,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:s,clickToExpandNode:a,data:Object.keys(n).map(m=>[m,n[m]]),outerRef:d,beforeExpandChange:h})}function iG(e){let{field:t,value:n,style:r,lastElement:i,level:s,shouldExpandNode:a,clickToExpandNode:c,outerRef:d,beforeExpandChange:h}=e;return T$({field:t,value:n,lastElement:i||!1,level:s,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:a,clickToExpandNode:c,data:n.map(m=>[void 0,m]),outerRef:d,beforeExpandChange:h})}function oG(e){let{field:t,value:n,style:r,lastElement:i}=e,s,a=r.otherValue;return n===null?(s="null",a=r.nullValue):n===void 0?(s="undefined",a=r.undefinedValue):JH(n)?(s=tG(n,!r.noQuotesForStringValues,r.stringifyStringValues),a=r.stringValue):YH(n)?(s=n?"true":"false",a=r.booleanValue):XH(n)?(s=n.toString(),a=r.numberValue):QH(n)?(s=`${n.toString()}n`,a=r.numberValue):E$(n)?s=n.toISOString():P$(n)?s="function() { }":s=n.toString(),S.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&S.createElement("span",{className:r.label},pv(t,r.quotesForFieldNames),":"),S.createElement("span",{className:a},s),!i&&S.createElement("span",{className:r.punctuation},","))}function _$(e){const t=e.value;return ZH(t)?S.createElement(iG,Object.assign({},e)):eG(t)&&!E$(t)&&!P$(t)?S.createElement(rG,Object.assign({},e)):S.createElement(oG,Object.assign({},e))}var Nr={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti"};const sG={collapseJson:"collapse JSON",expandJson:"expand JSON"},eo={container:Nr["container-light"],basicChildStyle:Nr["basic-element-style"],childFieldsContainer:Nr["child-fields-container"],label:Nr["label-light"],clickableLabel:Nr["clickable-label-light"],nullValue:Nr["value-null-light"],undefinedValue:Nr["value-undefined-light"],stringValue:Nr["value-string-light"],booleanValue:Nr["value-boolean-light"],numberValue:Nr["value-number-light"],otherValue:Nr["value-other-light"],punctuation:Nr["punctuation-light"],collapseIcon:Nr["collapse-icon-light"],expandIcon:Nr["expand-icon-light"],collapsedContent:Nr["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:sG,stringifyStringValues:!1},Mp=()=>!0,_g=e=>{let{data:t,style:n=eo,shouldExpandNode:r=Mp,clickToExpandNode:i=!1,beforeExpandChange:s,...a}=e;const c=S.useRef(null);return S.createElement("div",Object.assign({"aria-label":"JSON view"},a,{className:n.container,ref:c,role:"tree"}),S.createElement(_$,{value:t,style:{...eo,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:i,outerRef:c,beforeExpandChange:s}))};function aG(e){return typeof e=="string"?e:`map:${String(e)}`}function Ja(e,t=new WeakSet){if(e===null||typeof e!="object")return typeof e=="bigint"?e.toString():typeof e>"u"||typeof e=="function"?void 0:e;if(t.has(e))return"[Circular]";if(t.add(e),e instanceof Date)return e.toISOString();if(e instanceof Map){const r={};for(const[i,s]of e.entries())r[aG(i)]=Ja(s,t);return r}if(e instanceof Set)return Array.from(e).map(r=>Ja(r,t));if(Array.isArray(e))return e.map(r=>Ja(r,t));const n={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=Ja(e[r],t);i!==void 0&&(n[r]=i)}return n}const Ig={container:"max-w-full overflow-auto rounded bg-default p-2 font-mono font-normal",label:`${eo.label} !text-default-900`,collapseIcon:`${eo.collapseIcon} !text-default-900`,expandIcon:`${eo.expandIcon} !text-default-900`,collapsedContent:`${eo.collapsedContent} !text-default-900`,punctuation:"!text-default-900",stringValue:`${eo.stringValue} !text-green-600`,otherValue:`${eo.otherValue} !text-purple-500`,numberValue:`${eo.numberValue}`,nullValue:`${eo.nullValue}`,booleanValue:`${eo.booleanValue} !text-yellow-600`,undefinedValue:`${eo.undefinedValue}`};function lG({isOpen:e}){const t=Za(s=>s.history),n=Za(s=>s.followupMessages),r=Za(s=>s.eventsLog),i=sa(Ih(s=>s.computed.getContext()));return R.jsx(ol,{children:e&&R.jsx(Js.div,{initial:{scale:.6,opacity:0,width:0},animate:{scale:1,opacity:1,width:"100%"},exit:{scale:.6,opacity:0,width:0},className:"w-full max-w-[33%] overflow-hidden px-4",children:R.jsxs("div",{className:"rounded-medium border-small border-divider mr-4 h-full overflow-auto","data-testid":"debug-panel",children:[R.jsx("div",{className:"border-b-small border-divider min-h-16 p-4 text-lg font-bold",children:R.jsx("span",{children:"Debug"})}),R.jsxs(Rk,{className:"max-h-full",children:[R.jsx(bp,{"aria-label":"Context",title:"Context",children:R.jsx("div",{className:"max-h-[664px] overflow-auto",children:R.jsx(_g,{data:Ja(i)??{},shouldExpandNode:Mp,style:Ig})})},"context"),R.jsx(bp,{"aria-label":"History",title:"History",children:R.jsx("div",{className:"max-h-[664px] overflow-auto",children:R.jsx(_g,{data:Ja(t)??{},shouldExpandNode:Mp,style:Ig})})},"history"),R.jsx(bp,{"aria-label":"Followup messages",title:"Followup messages",children:R.jsx("div",{className:"max-h-[664px] overflow-auto",children:R.jsx(_g,{data:Ja(n)??{},shouldExpandNode:Mp,style:Ig})})},"folowup-messages"),R.jsx(bp,{"aria-label":"Events",title:"Events",children:r.length===0?R.jsx("p",{children:"No events in the log"}):R.jsx(Rk,{children:r.map((s,a)=>R.jsx(bp,{"aria-label":`Events for response number ${a+1}`,title:`Events for response number ${a+1}`,children:R.jsx(_g,{data:Ja(s)??{},shouldExpandNode:Mp,style:Ig})},`events-${a+1}`))})},"events")]})]})})})}function uG(e){return S.useSyncExternalStore(t=>Bt.subscribe(t),()=>Bt.hasSlotFillers(e))}function I$(e){return cG(e)?!0:dG(e)&&fG(e)}function cG(e){try{return new URL(e),!0}catch{return!1}}function fG(e){try{const t="http://base.local";return new URL(e,t),!0}catch{return!1}}function dG(e){return/^[./~\w%-][\w./~%-]*$/.test(e)}function pG({children:e,title:t,subTitle:n,logo:r,classNames:i}){const s=uG("layout.sidebar"),{config:a}=kh(),{newConversation:c,stopAnswering:d}=Nv(),{setTheme:h,theme:m}=qH(),[g,b]=S.useState(!1),x=()=>{h(m===To.DARK?To.LIGHT:To.DARK)},k=S.useCallback(()=>{d(),c()},[c,d]);return R.jsxs("div",{className:"flex h-full min-h-[48rem] justify-center py-4",children:[R.jsx(uv,{name:"layout.sidebar",disableSkeleton:!0}),R.jsxs("div",{className:bn("flex grow flex-col px-4 sm:max-w-[1200px]",s&&"pl-0"),children:[R.jsxs("header",{className:bn("border-small border-divider flex h-16 min-h-16 items-center justify-between gap-2 rounded-none px-4 py-3",i?.header,s?"rounded-tr-medium":"rounded-t-medium"),children:[R.jsxs("div",{className:"flex w-full items-center gap-2",children:[I$(r)?R.jsx("img",{src:r,className:"h-8 w-8",width:32,height:32}):R.jsx("div",{className:"bg-foreground flex h-8 w-8 items-center justify-center rounded-full",children:r}),R.jsxs("div",{className:"w-full min-w-[120px] sm:w-auto",children:[R.jsx("div",{className:bn("text-small text-foreground truncate leading-5 font-semibold",i?.title),children:t}),R.jsx("div",{className:bn("text-small text-default-500 truncate leading-5 font-normal",i?.subTitle),children:n})]})]}),R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx(uv,{name:"layout.headerActions",skeletonSize:{width:"40px",height:"40px"}}),!s&&R.jsx(Bg,{content:"Clear chat",placement:"bottom",children:R.jsx(wr,{isIconOnly:!0,"aria-label":"Clear chat",variant:"ghost",onPress:k,"data-testid":"layout-clear-chat-button",children:R.jsx(ci,{icon:"heroicons:arrow-path"})})}),R.jsx(Bg,{content:"Change theme",placement:"bottom",children:R.jsx(wr,{isIconOnly:!0,"aria-label":`Change theme to ${m===To.DARK?"light":"dark"}`,variant:"ghost",onPress:x,"data-testid":"layout-toggle-theme-button",children:m===To.DARK?R.jsx(ci,{icon:"heroicons:sun"}):R.jsx(ci,{icon:"heroicons:moon"})})}),a.debug_mode&&R.jsx(Bg,{content:"Toggle debug panel",placement:"bottom",children:R.jsxs(wr,{isIconOnly:!0,"aria-label":`${g?"Open":"Close"} debug panel`,variant:"ghost",onPress:()=>b(P=>!P),"data-testid":"layout-debug-button",children:[R.jsx(ci,{icon:"heroicons:bug-ant"}),g&&R.jsx("div",{className:"bg-default-500 absolute top-1/2 right-0 left-0 h-0.5 -rotate-45"})]})})]})]}),R.jsx("main",{className:"flex h-full overflow-hidden",children:R.jsx("div",{className:bn("border-divider flex h-full w-full flex-col gap-4 rounded-none border-0 border-r border-b border-l py-3",i?.container,s?"rounded-br-medium":"rounded-b-medium"),children:e})})]}),R.jsx(lG,{isOpen:g})]})}const $$=e=>{const t=r=>Bt.subscribe(r),n=()=>Bt.getPlugin(e);return S.useSyncExternalStore(t,n)},dE=({plugin:e,component:t,skeletonSize:n,disableSkeleton:r,componentProps:i})=>{const s=$$(e.name),a=n?{width:n.width,height:n.height}:{};if(!s)return null;const c=s.config.components[t];try{return R.jsx(S.Suspense,{fallback:r?null:R.jsx(S2,{className:"rounded-lg",style:a}),children:R.jsx(c,{...i||{}})})}catch(d){return console.error(d),null}},Ow="CredentialsLoginPlugin",A$={name:Ow,components:{CredentialsLogin:S.lazy(()=>Br(()=>import("./CredentialsLogin-CEserYG_.js"),__vite__mapDeps([10,11,12,2])))}},R$="OAuth2LoginPlugin",hG=(e,t,n)=>({name:`${R$}_${e}`,components:{OAuth2Login:S.lazy(()=>Br(()=>import("./OAuth2Login-DepasZu7.js"),[]))},metadata:{provider:e,displayName:t,visualConfig:n}}),mG=S.lazy(()=>Br(()=>import("./Login-DKdY_IGp.js"),[]));function gG(){const e=$$(Ow),t=Bt.getActivePlugins().filter(r=>r.name.startsWith(R$)),n=e&&t.length>0;return R.jsx(S.Suspense,{children:R.jsxs(mG,{children:[R.jsx(dE,{plugin:A$,component:"CredentialsLogin",disableSkeleton:!0}),n&&R.jsxs("div",{className:"my-2 flex items-center gap-2",children:[R.jsx("div",{className:"border-divider flex-1 border-t"}),R.jsx("span",{className:"text-small text-default-500",children:"or"}),R.jsx("div",{className:"border-divider flex-1 border-t"})]}),t.map((r,i)=>{const s=r.metadata?.provider,a=r.metadata?.displayName,c=r.metadata?.visualConfig;return R.jsxs("div",{children:[i>0&&R.jsx("div",{className:"my-2"}),R.jsx(dE,{plugin:r,component:"OAuth2Login",componentProps:{provider:s,displayName:a,visualConfig:c},disableSkeleton:!0})]},r.name)})]})})}const vG=S.lazy(()=>Br(()=>import("./AuthGuard-D7E88Uir.js"),__vite__mapDeps([13,11,12])));function yG({children:e}){return R.jsx(S.Suspense,{children:R.jsx(vG,{children:e})})}const pE=S.lazy(()=>Br(()=>import("./LogoutButton-ibzVLLAx.js"),__vite__mapDeps([14,11]))),L$="AuthPlugin",bG={name:L$,components:{LogoutButton:pE},routes:[{path:"/login",element:R.jsx(gG,{})}],routeWrappers:[{target:"global",wrapper:e=>R.jsx(yG,{children:e})}],slots:[Lu("layout.headerActions",pE,10)]},hE=S.lazy(()=>Br(()=>import("./UsageButton-ByH8ZKPy.js"),__vite__mapDeps([15,4,5,6]))),M$="UsagePluginName",xG={name:M$,components:{UsageButton:hE},slots:[Lu("message.actions",hE,10)]},mE=S.lazy(()=>Br(()=>import("./UploadButton-CfKYWcd6.js"),[])),D$="UploadPlugin",wG={name:D$,components:{UploadButton:mE},slots:[Lu("prompt.beforeSend",mE,5)]};function SG(){const{config:e}=kh();S.useEffect(()=>{if(!e)return;const{feedback:t,user_settings:n,conversation_history:r,authentication:i,show_usage:s,supports_upload:a}=e;(t.like.enabled||t.dislike.enabled)&&Bt.activate(V2),n.form&&Bt.activate(U2),r&&Bt.activate(v$),i.enabled&&(Bt.activate(L$),i.auth_types.includes("credentials")&&Bt.activate(Ow),i.auth_types.includes("oauth2")&&i.oauth2_providers&&i.oauth2_providers.forEach(c=>{const d=hG(c.name,c.display_name||c.name,{color:c.color,buttonColor:c.button_color,textColor:c.text_color,iconSvg:c.icon_svg});Bt.register(d),Bt.activate(d.name)})),s&&Bt.activate(M$),a&&Bt.activate(D$),Bt.activate(H2)},[e])}const gE="generated-favicon";function kG(){SG();const{config:{customization:e}}=kh(),t=S.useMemo(()=>e?.header?.logo??c7,[e?.header?.logo]),n=S.useMemo(()=>e?.header?.title??f7,[e?.header?.title]),r=S.useMemo(()=>e?.header?.subtitle??d7,[e?.header?.subtitle]),i=S.useMemo(()=>e?.meta?.favicon??t,[e?.meta?.favicon,t]),s=S.useMemo(()=>e?.meta?.page_title??n,[e?.meta?.page_title,n]);S.useLayoutEffect(()=>{document.title=s},[s]);const a=c=>{const d=document.createElement("link");d.rel="icon",d.href=c,d.id=gE,document.head.appendChild(d)};return S.useLayoutEffect(()=>{if(document.querySelectorAll("link[rel*='icon']").forEach(d=>d.remove()),I$(i))a(i);else{const d=`
75
75
  <svg xmlns="http://www.w3.org/2000/svg" width="64" height="64">
76
76
  <text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle"
77
77
  font-family="sans-serif" font-size="48">${i}</text>
@@ -80,4 +80,4 @@ Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}
80
80
 
81
81
  `)||(r.content+=`
82
82
 
83
- `)),r.content+=e.content.text},NG=(e,t,n)=>{const r=t.history[n.messageId];r.references=[...r.references??[],e.content]},FG=(e,t,n)=>{const r=t.history[n.messageId];r.serverId=e.content.message_id},OG=(e,t,n)=>{const r=t.history[n.messageId],{update_id:i,content:s,type:a}=e.content,c=$h(r.liveUpdates??{},d=>{a===Qz.Start&&i in d&&console.error(`Got duplicate start event for update_id: ${i}. Ignoring the event.`),d[i]=s});r.liveUpdates=c},zG=(e,t,n)=>{const r=t.history[n.messageId],i=e.content;r.images=$h(r.images??{},s=>{s[i.id]&&console.error(`Got duplicate image event for image_id: ${i.id}. Ignoring the event.`),s[i.id]=i.url})},jG=(e,t,n)=>{const r=t.history[n.messageId];t.history[n.messageId]={id:r.id,role:r.role,content:""}},BG=(e,t,n)=>{const r=t.history[n.messageId];r.usage=e.content.usage},VG=({content:e},t,n)=>{const r=t.history[n.messageId],i=r.tasks??[],s=e.task,a=$h(i,c=>{const d=c.findIndex(h=>h.id===s.id);d===-1?c.push(s):c[d]=s});r.tasks=a},UG=(e,t,n)=>{const r=t.history[n.messageId],i=e.content.confirmation_request.confirmation_id;r.confirmationRequests||(r.confirmationRequests={}),r.confirmationStates||(r.confirmationStates={}),!(i in r.confirmationRequests)&&(r.confirmationRequests[i]=e.content.confirmation_request,r.confirmationStates[i]="pending")},KG=(e,t,n)=>{const r=t.history[n.messageId];r.error=e.content.message};class WG{handlers=new Map;register(t,n){this.handlers.has(t)&&console.warn(`Handler for ${String(t)} already registered - overwriting.`),this.handlers.set(t,n)}get(t){const n=this.handlers.get(t);return n||(console.warn(`No handler registered for type: ${String(t)}`),console.warn("Continuing with empty handler..."),{handle:()=>{},after:()=>{}})}}const Vr=new WG;Vr.register("state_update",{handle:$G});Vr.register("conversation_id",{handle:AG,after:RG});Vr.register("followup_messages",{handle:LG});Vr.register("text",{handle:DG});Vr.register("reference",{handle:NG});Vr.register("message_id",{handle:FG});Vr.register("live_update",{handle:OG});Vr.register("image",{handle:zG});Vr.register("clear_message",{handle:jG});Vr.register("usage",{handle:BG});Vr.register("todo_item",{handle:VG});Vr.register("conversation_summary",{handle:MG});Vr.register("confirmation_request",{handle:UG});Vr.register("error",{handle:KG});function vE(e){return Object.values(e).map(t=>({role:t.role,content:t.content,extra:t.extra||null}))}const fr=[];for(let e=0;e<256;++e)fr.push((e+256).toString(16).slice(1));function HG(e,t=0){return(fr[e[t+0]]+fr[e[t+1]]+fr[e[t+2]]+fr[e[t+3]]+"-"+fr[e[t+4]]+fr[e[t+5]]+"-"+fr[e[t+6]]+fr[e[t+7]]+"-"+fr[e[t+8]]+fr[e[t+9]]+"-"+fr[e[t+10]]+fr[e[t+11]]+fr[e[t+12]]+fr[e[t+13]]+fr[e[t+14]]+fr[e[t+15]]).toLowerCase()}let H0;const GG=new Uint8Array(16);function qG(){if(!H0){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");H0=crypto.getRandomValues.bind(crypto)}return H0(GG)}const YG=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),yE={randomUUID:YG};function F$(e,t,n){if(yE.randomUUID&&!e)return yE.randomUUID();e=e||{};const r=e.random??e.rng?.()??qG();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,HG(r)}const O$="temp-",bE=e=>e.startsWith(O$),_i=(e,t)=>n=>{const r=n.conversations[e];if(!r)throw new Error(`Conversation with ID '${e}' does not exist`);t(r)},z$=()=>`${O$}${F$()}`,ax=()=>({history:{},followupMessages:null,serverState:null,conversationId:z$(),eventsLog:[],lastMessageId:null,context:void 0,chatOptions:void 0,isLoading:!1,abortController:null}),XG=()=>{const e=ax();return{conversations:{[e.conversationId]:e},currentConversation:e.conversationId}},xE=IG((e,t)=>({...XG(),computed:{getContext:()=>{const{primitives:{getCurrentConversation:n}}=t(),r=n(),{serverState:i,conversationId:s,chatOptions:a}=r;return{...i??{},...s&&!bE(r.conversationId)?{conversation_id:s}:{},...a?{user_settings:a}:{},timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}}},_internal:{_hasHydrated:!1,_setHasHydrated:n=>{e(r=>{r._internal._hasHydrated=n})},handleResponse:(n,r,i)=>{let s;const a=Vr.get(i.type);e(_i(n.current,c=>{if(!c.history[r])throw new Error(`Message ID ${r} not found in history`);s=a.handle(i,c,{conversationIdRef:n,messageId:r})})),e(c=>{a.after?.(i,c,{conversationIdRef:n,messageId:r,...s})}),e(_i(n.current,c=>{c.eventsLog[c.eventsLog.length-1].push(i)}))}},primitives:{getCurrentConversation:()=>{const{currentConversation:n,conversations:r}=t(),i=r[n];if(!i)throw new Error("Tried to get conversation that doesn't exist.");return i},restore:(n,r,i,s)=>{const a=z$(),c={...ax(),followupMessages:r,chatOptions:i,serverState:s,history:n,conversationId:a},d=Object.values(n).filter(h=>h.role!==kf.User);c.eventsLog=d.map(()=>[]),e(h=>{h.conversations[a]=c,h.currentConversation=a})},addMessage:(n,r)=>{const i=F$(),s={...r,id:i};return e(_i(n,a=>{a.followupMessages=null,a.lastMessageId=i,a.history[i]=s})),i},deleteMessage:(n,r)=>{e(_i(n,i=>{const{history:s}=i,a=Object.keys(s);a.at(-1)===r&&(i.lastMessageId=a.at(-2)??null),delete i.history[r]}))},stopAnswering:n=>{const r=t().conversations[n];if(!r)throw new Error("Tried to stop answering for conversation that doesn't exist");r.abortController?.abort(),e(_i(n,i=>{i.abortController=null,i.isLoading=!1}))}},actions:{selectConversation:n=>{e(r=>{if(r.currentConversation===n)return;if(!r.conversations[n])throw new Error(`Tried to select conversation that doesn't exist, id: ${n}`);r.currentConversation=n})},deleteConversation:n=>{const{actions:{newConversation:r},primitives:{stopAnswering:i},currentConversation:s}=t();if(i(n),e(a=>{delete a.conversations[n]}),n===s)return r()},mergeExtensions:(n,r)=>{const{currentConversation:i}=t();e(_i(i,s=>{if(!(n in s.history))throw new Error("Attempted to set extensions for a message that does not exist.");const a=s.history[n];a.extensions={...a.extensions,...r},s.history[n]=a}))},initializeChatOptions:n=>{const{currentConversation:r}=t();e(_i(r,i=>{const s=i.chatOptions??{};Object.keys(s).forEach(a=>{a in n||delete s[a]}),Object.keys(n).forEach(a=>{a in s||(s[a]=n[a])}),i.chatOptions=s}))},setConversationProperties:(n,r)=>{e(_i(n,i=>{Object.assign(i,r)}))},stopAnswering:()=>{const{currentConversation:n,primitives:{stopAnswering:r}}=t();r(n)},newConversation:()=>{const n=ax();return e(r=>{r.conversations[n.conversationId]=n,r.currentConversation=n.conversationId,r.conversations=B2.omitBy(r.conversations,i=>bE(i.conversationId)&&i.conversationId!==r.currentConversation)}),n.conversationId},sendMessage:(n,r,i)=>{const{_internal:{handleResponse:s},primitives:{addMessage:a,getCurrentConversation:c,stopAnswering:d},computed:{getContext:h}}=t(),{history:m,conversationId:g}=c();a(g,{role:kf.User,content:n});const b=a(g,{role:kf.Assistant,content:""}),x={message:n,history:vE(m),context:{...h(),...i}};e(_i(g,T=>{T.eventsLog.push([])}));const k=new AbortController,P={current:g};e(_i(g,T=>{T.abortController=k,T.isLoading=!0})),r.makeStreamRequest("/api/chat",x,{onMessage:T=>s(P,b,T),onError:T=>{s(P,b,{type:"text",content:{text:T.message}}),d(P.current)},onClose:()=>{d(P.current)}},k.signal)},sendSilentConfirmation:(n,r,i,s)=>{const{_internal:{handleResponse:a},primitives:{getCurrentConversation:c,stopAnswering:d},computed:{getContext:h}}=t(),{history:m,conversationId:g}=c(),b=Array.isArray(r)?r:[r],x=typeof i=="boolean"?b.reduce((M,O)=>({...M,[O]:i}),{}):i;e(_i(g,M=>{const O=M.history[n];O&&O.confirmationStates&&(b.forEach(j=>{j in O.confirmationStates&&(O.confirmationStates[j]=x[j]?"confirmed":"declined")}),O.hasConfirmationBreak=!0,O.liveUpdates=void 0)}));const k=n,P=b.map(M=>({confirmation_id:M,confirmed:x[M]})),T={message:"",history:vE(m),context:{...h(),confirmed_tools:P}};e(_i(g,M=>{M.eventsLog.push([])}));const _=new AbortController,A={current:g};e(_i(g,M=>{M.abortController=_,M.isLoading=!0})),s.makeStreamRequest("/api/chat",T,{onMessage:M=>a(A,k,M),onError:M=>{a(A,k,{type:"text",content:{text:M.message}}),d(A.current)},onClose:()=>{d(A.current)}},_.signal)}}}));function Bv(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function QG(e,t){let n;const r=()=>{if(n)return n;const i=indexedDB.open(e);return i.onupgradeneeded=()=>i.result.createObjectStore(t),n=Bv(i),n.then(s=>{s.onclose=()=>n=void 0},()=>{}),n};return(i,s)=>r().then(a=>s(a.transaction(t,i).objectStore(t)))}let G0;function zw(){return G0||(G0=QG("keyval-store","keyval")),G0}function JG(e,t=zw()){return t("readonly",n=>Bv(n.get(e)))}function ZG(e,t,n=zw()){return n("readwrite",r=>(r.put(t,e),Bv(r.transaction)))}function eq(e,t=zw()){return t("readwrite",n=>(n.delete(e),Bv(n.transaction)))}const tq={getItem:async e=>await JG(e)||null,setItem:async(e,t)=>{await ZG(e,t)},removeItem:async e=>{await eq(e)}},wE="ragbits-history-store";function nq(e,t){if(e)return iE(TG(xE,{name:t,partialize:r=>({conversations:r.conversations}),onRehydrateStorage:r=>()=>r._internal._setHasHydrated(!0),merge:(r,i)=>{const s=r?.conversations??{},{conversations:a,currentConversation:c}=i,d=Object.values(s).reduce((h,m)=>(m.conversationId===null||(h[m.conversationId]={...m,isLoading:!1,abortController:null}),h),{});return{...i,currentConversation:c,conversations:{...d,...a}}},storage:N$(()=>tq)}));const n=iE(xE);return n.getState()._internal._setHasHydrated(!0),n}function rq({children:e}){const[t,n]=S.useState(wE),{config:{conversation_history:r}}=kh(),i=S.useMemo(()=>nq(r,t),[r,t]),s=p$(i,d=>d._internal._hasHydrated),a=S.useCallback(d=>{n(`${wE}-${d}`)},[]),c=S.useMemo(()=>({store:i,initializeUserStore:a}),[i,a]);return r&&!s?R.jsx(W2,{}):R.jsx(h$.Provider,{value:c,children:e})}Bt.register(a7);Bt.register(l7);Bt.register(v7);Bt.register(MH);Bt.register(bG);Bt.register(xG);Bt.register(A$);Bt.register(wG);F2(["heroicons:check","heroicons:clipboard","heroicons:arrow-path","heroicons:sun","heroicons:moon","heroicons:arrow-down","heroicons:arrow-up","heroicons:chevron-down","heroicons:cog-6-tooth","heroicons:bug-ant","heroicons:trash"]);gL.createRoot(document.getElementById("root")).render(R.jsx(S.StrictMode,{children:R.jsx(AF,{children:R.jsx(Zz,{baseUrl:h7,children:R.jsx(r8,{children:R.jsx(g7,{children:R.jsx(rq,{children:R.jsx(Rj,{children:R.jsx(EG,{})})})})})})})}));export{Rz as $,OM as A,n6 as B,MH as C,Bg as D,ZO as E,vq as F,K6 as G,$u as H,ci as I,Tn as J,Pf as K,$f as L,Tf as M,Y5 as N,fi as O,iw as P,ia as Q,$i as R,Sh as S,ev as T,il as U,X_ as V,Pu as W,Eu as X,fq as Y,Vt as Z,Br as _,Nv as a,y6 as a$,ds as a0,yF as a1,Ae as a2,Ef as a3,nv as a4,He as a5,PF as a6,i2 as a7,d6 as a8,r6 as a9,zT as aA,b6 as aB,sF as aC,PE as aD,pw as aE,Ih as aF,Js as aG,bE as aH,RH as aI,A5 as aJ,g6 as aK,f2 as aL,L5 as aM,P6 as aN,gk as aO,c2 as aP,hq as aQ,Lk as aR,EE as aS,ZL as aT,tl as aU,ph as aV,p$ as aW,an as aX,Qs as aY,pq as aZ,v6 as a_,Ev as aa,s2 as ab,Y0 as ac,wu as ad,DE as ae,Jx as af,lq as ag,oq as ah,C6 as ai,xL as aj,yk as ak,SL as al,W_ as am,D6 as an,C2 as ao,TF as ap,ol as aq,hv as ar,B2 as as,bn as at,u2 as au,bq as av,Ja as aw,mv as ax,px as ay,Z5 as az,kh as b,Pk as b0,Bn as b1,cq as b2,hh as b3,t6 as b4,Cu as b5,P1 as b6,VE as b7,sq as b8,xh as b9,dx as ba,aq as bb,iq as bc,HE as bd,v2 as be,hx as bf,Dt as bg,pF as bh,dq as bi,Su as bj,Ek as bk,hp as bl,$h as bm,pz as bn,al as bo,Zz as bp,h7 as bq,W2 as br,yq as bs,h$ as bt,iE as bu,IG as bv,b5 as bw,oN as bx,L4 as by,e8 as c,wr as d,Uz as e,Dz as f,og as g,Za as h,sa as i,R as j,wh as k,jr as l,Hz as m,Af as n,$F as o,Bt as p,lk as q,S as r,E6 as s,er as t,Gz as u,rn as v,c6 as w,m6 as x,nw as y,rw as z};
83
+ `)),r.content+=e.content.text},NG=(e,t,n)=>{const r=t.history[n.messageId];r.references=[...r.references??[],e.content]},FG=(e,t,n)=>{const r=t.history[n.messageId];r.serverId=e.content.message_id},OG=(e,t,n)=>{const r=t.history[n.messageId],{update_id:i,content:s,type:a}=e.content,c=$h(r.liveUpdates??{},d=>{a===Qz.Start&&i in d&&console.error(`Got duplicate start event for update_id: ${i}. Ignoring the event.`),d[i]=s});r.liveUpdates=c},zG=(e,t,n)=>{const r=t.history[n.messageId],i=e.content;r.images=$h(r.images??{},s=>{s[i.id]&&console.error(`Got duplicate image event for image_id: ${i.id}. Ignoring the event.`),s[i.id]=i.url})},jG=(e,t,n)=>{const r=t.history[n.messageId];t.history[n.messageId]={id:r.id,role:r.role,content:""}},BG=(e,t,n)=>{const r=t.history[n.messageId];r.usage=e.content.usage},VG=({content:e},t,n)=>{const r=t.history[n.messageId],i=r.tasks??[],s=e.task,a=$h(i,c=>{const d=c.findIndex(h=>h.id===s.id);d===-1?c.push(s):c[d]=s});r.tasks=a},UG=(e,t,n)=>{const r=t.history[n.messageId],i=e.content.confirmation_request.confirmation_id;r.confirmationRequests||(r.confirmationRequests={}),r.confirmationStates||(r.confirmationStates={}),!(i in r.confirmationRequests)&&(r.confirmationRequests[i]=e.content.confirmation_request,r.confirmationStates[i]="pending")},KG=(e,t,n)=>{const r=t.history[n.messageId];r.error=e.content.message};class WG{handlers=new Map;register(t,n){this.handlers.has(t)&&console.warn(`Handler for ${String(t)} already registered - overwriting.`),this.handlers.set(t,n)}get(t){const n=this.handlers.get(t);return n||(console.warn(`No handler registered for type: ${String(t)}`),console.warn("Continuing with empty handler..."),{handle:()=>{},after:()=>{}})}}const Vr=new WG;Vr.register("state_update",{handle:$G});Vr.register("conversation_id",{handle:AG,after:RG});Vr.register("followup_messages",{handle:LG});Vr.register("text",{handle:DG});Vr.register("reference",{handle:NG});Vr.register("message_id",{handle:FG});Vr.register("live_update",{handle:OG});Vr.register("image",{handle:zG});Vr.register("clear_message",{handle:jG});Vr.register("usage",{handle:BG});Vr.register("todo_item",{handle:VG});Vr.register("conversation_summary",{handle:MG});Vr.register("confirmation_request",{handle:UG});Vr.register("error",{handle:KG});function vE(e){return Object.values(e).map(t=>({role:t.role,content:t.content,extra:t.extra||null}))}const fr=[];for(let e=0;e<256;++e)fr.push((e+256).toString(16).slice(1));function HG(e,t=0){return(fr[e[t+0]]+fr[e[t+1]]+fr[e[t+2]]+fr[e[t+3]]+"-"+fr[e[t+4]]+fr[e[t+5]]+"-"+fr[e[t+6]]+fr[e[t+7]]+"-"+fr[e[t+8]]+fr[e[t+9]]+"-"+fr[e[t+10]]+fr[e[t+11]]+fr[e[t+12]]+fr[e[t+13]]+fr[e[t+14]]+fr[e[t+15]]).toLowerCase()}let H0;const GG=new Uint8Array(16);function qG(){if(!H0){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");H0=crypto.getRandomValues.bind(crypto)}return H0(GG)}const YG=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),yE={randomUUID:YG};function F$(e,t,n){if(yE.randomUUID&&!e)return yE.randomUUID();e=e||{};const r=e.random??e.rng?.()??qG();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,HG(r)}const O$="temp-",bE=e=>e.startsWith(O$),_i=(e,t)=>n=>{const r=n.conversations[e];if(!r)throw new Error(`Conversation with ID '${e}' does not exist`);t(r)},z$=()=>`${O$}${F$()}`,ax=()=>({history:{},followupMessages:null,serverState:null,conversationId:z$(),eventsLog:[],lastMessageId:null,context:void 0,chatOptions:void 0,isLoading:!1,abortController:null}),XG=()=>{const e=ax();return{conversations:{[e.conversationId]:e},currentConversation:e.conversationId}},xE=IG((e,t)=>({...XG(),computed:{getContext:()=>{const{primitives:{getCurrentConversation:n}}=t(),r=n(),{serverState:i,conversationId:s,chatOptions:a}=r;return{...i??{},...s&&!bE(r.conversationId)?{conversation_id:s}:{},...a?{user_settings:a}:{},timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}}},_internal:{_hasHydrated:!1,_setHasHydrated:n=>{e(r=>{r._internal._hasHydrated=n})},handleResponse:(n,r,i)=>{let s;const a=Vr.get(i.type);e(_i(n.current,c=>{if(!c.history[r])throw new Error(`Message ID ${r} not found in history`);s=a.handle(i,c,{conversationIdRef:n,messageId:r})})),e(c=>{a.after?.(i,c,{conversationIdRef:n,messageId:r,...s})}),e(_i(n.current,c=>{c.eventsLog[c.eventsLog.length-1].push(i)}))}},primitives:{getCurrentConversation:()=>{const{currentConversation:n,conversations:r}=t(),i=r[n];if(!i)throw new Error("Tried to get conversation that doesn't exist.");return i},restore:(n,r,i,s)=>{const a=z$(),c={...ax(),followupMessages:r,chatOptions:i,serverState:s,history:n,conversationId:a},d=Object.values(n).filter(h=>h.role!==kf.User);c.eventsLog=d.map(()=>[]),e(h=>{h.conversations[a]=c,h.currentConversation=a})},addMessage:(n,r)=>{const i=F$(),s={...r,id:i};return e(_i(n,a=>{a.followupMessages=null,a.lastMessageId=i,a.history[i]=s})),i},deleteMessage:(n,r)=>{e(_i(n,i=>{const{history:s}=i,a=Object.keys(s);a.at(-1)===r&&(i.lastMessageId=a.at(-2)??null),delete i.history[r]}))},stopAnswering:n=>{const r=t().conversations[n];if(!r)throw new Error("Tried to stop answering for conversation that doesn't exist");r.abortController?.abort(),e(_i(n,i=>{i.abortController=null,i.isLoading=!1}))}},actions:{selectConversation:n=>{e(r=>{if(r.currentConversation===n)return;if(!r.conversations[n])throw new Error(`Tried to select conversation that doesn't exist, id: ${n}`);r.currentConversation=n})},deleteConversation:n=>{const{actions:{newConversation:r},primitives:{stopAnswering:i},currentConversation:s}=t();if(i(n),e(a=>{delete a.conversations[n]}),n===s)return r()},mergeExtensions:(n,r)=>{const{currentConversation:i}=t();e(_i(i,s=>{if(!(n in s.history))throw new Error("Attempted to set extensions for a message that does not exist.");const a=s.history[n];a.extensions={...a.extensions,...r},s.history[n]=a}))},initializeChatOptions:n=>{const{currentConversation:r}=t();e(_i(r,i=>{const s=i.chatOptions??{};Object.keys(s).forEach(a=>{a in n||delete s[a]}),Object.keys(n).forEach(a=>{a in s||(s[a]=n[a])}),i.chatOptions=s}))},setConversationProperties:(n,r)=>{e(_i(n,i=>{Object.assign(i,r)}))},stopAnswering:()=>{const{currentConversation:n,primitives:{stopAnswering:r}}=t();r(n)},newConversation:()=>{const n=ax();return e(r=>{r.conversations[n.conversationId]=n,r.currentConversation=n.conversationId,r.conversations=B2.omitBy(r.conversations,i=>bE(i.conversationId)&&i.conversationId!==r.currentConversation)}),n.conversationId},sendMessage:(n,r,i)=>{const{_internal:{handleResponse:s},primitives:{addMessage:a,getCurrentConversation:c,stopAnswering:d},computed:{getContext:h}}=t(),{history:m,conversationId:g}=c();a(g,{role:kf.User,content:n});const b=a(g,{role:kf.Assistant,content:""}),x={message:n,history:vE(m),context:{...h(),...i}};e(_i(g,T=>{T.eventsLog.push([])}));const k=new AbortController,P={current:g};e(_i(g,T=>{T.abortController=k,T.isLoading=!0})),r.makeStreamRequest("/api/chat",x,{onMessage:T=>s(P,b,T),onError:T=>{s(P,b,{type:"text",content:{text:T.message}}),d(P.current)},onClose:()=>{d(P.current)}},k.signal)},sendSilentConfirmation:(n,r,i,s)=>{const{_internal:{handleResponse:a},primitives:{getCurrentConversation:c,stopAnswering:d},computed:{getContext:h}}=t(),{history:m,conversationId:g}=c(),b=Array.isArray(r)?r:[r],x=typeof i=="boolean"?b.reduce((M,O)=>({...M,[O]:i}),{}):i;e(_i(g,M=>{const O=M.history[n];O&&O.confirmationStates&&(b.forEach(j=>{j in O.confirmationStates&&(O.confirmationStates[j]=x[j]?"confirmed":"declined")}),O.hasConfirmationBreak=!0,O.liveUpdates=void 0)}));const k=n,P=b.map(M=>({confirmation_id:M,confirmed:x[M]})),T={message:"",history:vE(m),context:{...h(),tool_confirmations:P}};e(_i(g,M=>{M.eventsLog.push([])}));const _=new AbortController,A={current:g};e(_i(g,M=>{M.abortController=_,M.isLoading=!0})),s.makeStreamRequest("/api/chat",T,{onMessage:M=>a(A,k,M),onError:M=>{a(A,k,{type:"text",content:{text:M.message}}),d(A.current)},onClose:()=>{d(A.current)}},_.signal)}}}));function Bv(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function QG(e,t){let n;const r=()=>{if(n)return n;const i=indexedDB.open(e);return i.onupgradeneeded=()=>i.result.createObjectStore(t),n=Bv(i),n.then(s=>{s.onclose=()=>n=void 0},()=>{}),n};return(i,s)=>r().then(a=>s(a.transaction(t,i).objectStore(t)))}let G0;function zw(){return G0||(G0=QG("keyval-store","keyval")),G0}function JG(e,t=zw()){return t("readonly",n=>Bv(n.get(e)))}function ZG(e,t,n=zw()){return n("readwrite",r=>(r.put(t,e),Bv(r.transaction)))}function eq(e,t=zw()){return t("readwrite",n=>(n.delete(e),Bv(n.transaction)))}const tq={getItem:async e=>await JG(e)||null,setItem:async(e,t)=>{await ZG(e,t)},removeItem:async e=>{await eq(e)}},wE="ragbits-history-store";function nq(e,t){if(e)return iE(TG(xE,{name:t,partialize:r=>({conversations:r.conversations}),onRehydrateStorage:r=>()=>r._internal._setHasHydrated(!0),merge:(r,i)=>{const s=r?.conversations??{},{conversations:a,currentConversation:c}=i,d=Object.values(s).reduce((h,m)=>(m.conversationId===null||(h[m.conversationId]={...m,isLoading:!1,abortController:null}),h),{});return{...i,currentConversation:c,conversations:{...d,...a}}},storage:N$(()=>tq)}));const n=iE(xE);return n.getState()._internal._setHasHydrated(!0),n}function rq({children:e}){const[t,n]=S.useState(wE),{config:{conversation_history:r}}=kh(),i=S.useMemo(()=>nq(r,t),[r,t]),s=p$(i,d=>d._internal._hasHydrated),a=S.useCallback(d=>{n(`${wE}-${d}`)},[]),c=S.useMemo(()=>({store:i,initializeUserStore:a}),[i,a]);return r&&!s?R.jsx(W2,{}):R.jsx(h$.Provider,{value:c,children:e})}Bt.register(a7);Bt.register(l7);Bt.register(v7);Bt.register(MH);Bt.register(bG);Bt.register(xG);Bt.register(A$);Bt.register(wG);F2(["heroicons:check","heroicons:clipboard","heroicons:arrow-path","heroicons:sun","heroicons:moon","heroicons:arrow-down","heroicons:arrow-up","heroicons:chevron-down","heroicons:cog-6-tooth","heroicons:bug-ant","heroicons:trash"]);gL.createRoot(document.getElementById("root")).render(R.jsx(S.StrictMode,{children:R.jsx(AF,{children:R.jsx(Zz,{baseUrl:h7,children:R.jsx(r8,{children:R.jsx(g7,{children:R.jsx(rq,{children:R.jsx(Rj,{children:R.jsx(EG,{})})})})})})})}));export{Rz as $,OM as A,n6 as B,MH as C,Bg as D,ZO as E,vq as F,K6 as G,$u as H,ci as I,Tn as J,Pf as K,$f as L,Tf as M,Y5 as N,fi as O,iw as P,ia as Q,$i as R,Sh as S,ev as T,il as U,X_ as V,Pu as W,Eu as X,fq as Y,Vt as Z,Br as _,Nv as a,y6 as a$,ds as a0,yF as a1,Ae as a2,Ef as a3,nv as a4,He as a5,PF as a6,i2 as a7,d6 as a8,r6 as a9,zT as aA,b6 as aB,sF as aC,PE as aD,pw as aE,Ih as aF,Js as aG,bE as aH,RH as aI,A5 as aJ,g6 as aK,f2 as aL,L5 as aM,P6 as aN,gk as aO,c2 as aP,hq as aQ,Lk as aR,EE as aS,ZL as aT,tl as aU,ph as aV,p$ as aW,an as aX,Qs as aY,pq as aZ,v6 as a_,Ev as aa,s2 as ab,Y0 as ac,wu as ad,DE as ae,Jx as af,lq as ag,oq as ah,C6 as ai,xL as aj,yk as ak,SL as al,W_ as am,D6 as an,C2 as ao,TF as ap,ol as aq,hv as ar,B2 as as,bn as at,u2 as au,bq as av,Ja as aw,mv as ax,px as ay,Z5 as az,kh as b,Pk as b0,Bn as b1,cq as b2,hh as b3,t6 as b4,Cu as b5,P1 as b6,VE as b7,sq as b8,xh as b9,dx as ba,aq as bb,iq as bc,HE as bd,v2 as be,hx as bf,Dt as bg,pF as bh,dq as bi,Su as bj,Ek as bk,hp as bl,$h as bm,pz as bn,al as bo,Zz as bp,h7 as bq,W2 as br,yq as bs,h$ as bt,iE as bu,IG as bv,b5 as bw,oN as bx,L4 as by,e8 as c,wr as d,Uz as e,Dz as f,og as g,Za as h,sa as i,R as j,wh as k,jr as l,Hz as m,Af as n,$F as o,Bt as p,lk as q,S as r,E6 as s,er as t,Gz as u,rn as v,c6 as w,m6 as x,nw as y,rw as z};