X?(q.sortIndex=se,e(u,q),n(c)===null&&q===n(u)&&(m?(g(E),E=-1):m=!0,H(_,se-X))):(q.sortIndex=G,e(c,q),h||p||(h=!0,K(R))),q},t.unstable_shouldYield=M,t.unstable_wrapCallback=function(q){var ee=d;return function(){var se=d;d=ee;try{return q.apply(this,arguments)}finally{d=se}}}})(vH);gH.exports=vH;var $ue=gH.exports;/** + */(function(t){function e(q,ee){var se=q.length;q.push(ee);e:for(;0>>1,G=q[X];if(0 >>1;Xs(he,se))fe s(ce,he)?(q[X]=ce,q[fe]=se,X=fe):(q[X]=he,q[Q]=se,X=Q);else if(fe s(ce,se))q[X]=ce,q[fe]=se,X=fe;else break e}}return ee}function s(q,ee){var se=q.sortIndex-ee.sortIndex;return se!==0?se:q.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var c=[],u=[],f=1,l=null,d=3,p=!1,h=!1,m=!1,y=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(q){for(var ee=n(u);ee!==null;){if(ee.callback===null)r(u);else if(ee.startTime<=q)r(u),ee.sortIndex=ee.expirationTime,e(c,ee);else break;ee=n(u)}}function _(q){if(m=!1,b(q),!h)if(n(c)!==null)h=!0,K(R);else{var ee=n(u);ee!==null&&H(_,ee.startTime-q)}}function R(q,ee){h=!1,m&&(m=!1,g(E),E=-1),p=!0;var se=d;try{for(b(ee),l=n(c);l!==null&&(!(l.expirationTime>ee)||q&&!M());){var X=l.callback;if(typeof X=="function"){l.callback=null,d=l.priorityLevel;var G=X(l.expirationTime<=ee);ee=t.unstable_now(),typeof G=="function"?l.callback=G:l===n(c)&&r(c),b(ee)}else r(c);l=n(c)}if(l!==null)var Y=!0;else{var Q=n(u);Q!==null&&H(_,Q.startTime-ee),Y=!1}return Y}finally{l=null,d=se,p=!1}}var P=!1,T=null,E=-1,N=5,k=-1;function M(){return!(t.unstable_now()-k q||125 X?(q.sortIndex=se,e(u,q),n(c)===null&&q===n(u)&&(m?(g(E),E=-1):m=!0,H(_,se-X))):(q.sortIndex=G,e(c,q),h||p||(h=!0,K(R))),q},t.unstable_shouldYield=M,t.unstable_wrapCallback=function(q){var ee=d;return function(){var se=d;d=ee;try{return q.apply(this,arguments)}finally{d=se}}}})(gH);mH.exports=gH;var Fue=mH.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ var pue=Object.defineProperty;var A4=t=>{throw TypeError(t)};var mue=(t,e,n)=>e * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Fue=S,xo=$ue;function ke(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yD=Object.prototype.hasOwnProperty,zue=/^[: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]*$/,k4={},D4={};function Bue(t){return yD.call(D4,t)?!0:yD.call(k4,t)?!1:zue.test(t)?D4[t]=!0:(k4[t]=!0,!1)}function Uue(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function Hue(t,e,n,r){if(e===null||typeof e>"u"||Uue(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function ai(t,e,n,r,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var xs={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){xs[t]=new ai(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];xs[e]=new ai(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){xs[t]=new ai(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){xs[t]=new ai(t,2,!1,t,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(t){xs[t]=new ai(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){xs[t]=new ai(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){xs[t]=new ai(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){xs[t]=new ai(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){xs[t]=new ai(t,5,!1,t.toLowerCase(),null,!1,!1)});var uj=/[\-:]([a-z])/g;function dj(t){return t[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(t){var e=t.replace(uj,dj);xs[e]=new ai(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(uj,dj);xs[e]=new ai(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(uj,dj);xs[e]=new ai(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){xs[t]=new ai(t,1,!1,t.toLowerCase(),null,!1,!1)});xs.xlinkHref=new ai("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){xs[t]=new ai(t,1,!1,t.toLowerCase(),null,!0,!0)});function fj(t,e,n,r){var s=xs.hasOwnProperty(e)?xs[e]:null;(s!==null?s.type!==0:r||!(2 "u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bD=Object.prototype.hasOwnProperty,Bue=/^[: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]*$/,T4={},k4={};function Uue(t){return bD.call(k4,t)?!0:bD.call(T4,t)?!1:Bue.test(t)?k4[t]=!0:(T4[t]=!0,!1)}function Hue(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function Vue(t,e,n,r){if(e===null||typeof e>"u"||Hue(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function ai(t,e,n,r,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var xs={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){xs[t]=new ai(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];xs[e]=new ai(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){xs[t]=new ai(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){xs[t]=new ai(t,2,!1,t,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(t){xs[t]=new ai(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){xs[t]=new ai(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){xs[t]=new ai(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){xs[t]=new ai(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){xs[t]=new ai(t,5,!1,t.toLowerCase(),null,!1,!1)});var uj=/[\-:]([a-z])/g;function dj(t){return t[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(t){var e=t.replace(uj,dj);xs[e]=new ai(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(uj,dj);xs[e]=new ai(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(uj,dj);xs[e]=new ai(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){xs[t]=new ai(t,1,!1,t.toLowerCase(),null,!1,!1)});xs.xlinkHref=new ai("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){xs[t]=new ai(t,1,!1,t.toLowerCase(),null,!0,!0)});function fj(t,e,n,r){var s=xs.hasOwnProperty(e)?xs[e]:null;(s!==null?s.type!==0:r||!(2 a||s[o]!==i[a]){var c=` -`+s[o].replace(" at new "," at ");return t.displayName&&c.includes(" ")&&(c=c.replace(" ",t.displayName)),c}while(1<=o&&0<=a);break}}}finally{cT=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?jb(t):""}function Vue(t){switch(t.tag){case 5:return jb(t.type);case 16:return jb("Lazy");case 13:return jb("Suspense");case 19:return jb("SuspenseList");case 0:case 2:case 15:return t=uT(t.type,!1),t;case 11:return t=uT(t.type.render,!1),t;case 1:return t=uT(t.type,!0),t;default:return""}}function _D(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Bm:return"Fragment";case zm:return"Portal";case bD:return"Profiler";case hj:return"StrictMode";case xD:return"Suspense";case wD:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case xH:return(t.displayName||"Context")+".Consumer";case bH:return(t._context.displayName||"Context")+".Provider";case pj:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case mj:return e=t.displayName||null,e!==null?e:_D(t.type)||"Memo";case Ju:e=t._payload,t=t._init;try{return _D(t(e))}catch{}}return null}function que(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _D(e);case 8:return e===hj?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function ef(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function _H(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Wue(t){var e=_H(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function WS(t){t._valueTracker||(t._valueTracker=Wue(t))}function SH(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=_H(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function BC(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function SD(t,e){var n=e.checked;return sr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function O4(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=ef(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function CH(t,e){e=e.checked,e!=null&&fj(t,"checked",e,!1)}function CD(t,e){CH(t,e);var n=ef(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?ED(t,e.type,n):e.hasOwnProperty("defaultValue")&&ED(t,e.type,ef(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function I4(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function ED(t,e,n){(e!=="number"||BC(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Lb=Array.isArray;function sg(t,e,n,r){if(t=t.options,e){e={};for(var s=0;s "+e.valueOf().toString()+"",e=GS.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function O0(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var c0={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Gue=["Webkit","ms","Moz","O"];Object.keys(c0).forEach(function(t){Gue.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),c0[e]=c0[t]})});function PH(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||c0.hasOwnProperty(t)&&c0[t]?(""+e).trim():e+"px"}function NH(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=PH(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,s):t[n]=s}}var Kue=sr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function PD(t,e){if(e){if(Kue[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ke(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ke(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ke(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ke(62))}}function ND(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var TD=null;function gj(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var kD=null,ig=null,og=null;function $4(t){if(t=a_(t)){if(typeof kD!="function")throw Error(ke(280));var e=t.stateNode;e&&(e=jR(e),kD(t.stateNode,t.type,e))}}function TH(t){ig?og?og.push(t):og=[t]:ig=t}function kH(){if(ig){var t=ig,e=og;if(og=ig=null,$4(t),e)for(t=0;t >>=0,t===0?32:31-(ide(t)/ode|0)|0}var KS=64,YS=4194304;function $b(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function qC(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,s=t.suspendedLanes,i=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=$b(a):(i&=o,i!==0&&(r=$b(i)))}else o=n&~s,o!==0?r=$b(o):i!==0&&(r=$b(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&s)&&(s=r&-r,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0 n;n++)e.push(t);return e}function i_(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Fa(e),t[e]=n}function ude(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0 =d0),G4=" ",K4=!1;function QH(t,e){switch(t){case"keyup":return $de.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ZH(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Um=!1;function zde(t,e){switch(t){case"compositionend":return ZH(e);case"keypress":return e.which!==32?null:(K4=!0,G4);case"textInput":return t=e.data,t===G4&&K4?null:t;default:return null}}function Bde(t,e){if(Um)return t==="compositionend"||!Cj&&QH(t,e)?(t=YH(),q1=wj=Ud=null,Um=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1 =e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Z4(n)}}function nV(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?nV(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function rV(){for(var t=window,e=BC();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=BC(t.document)}return e}function Ej(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Xde(t){var e=rV(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&nV(n.ownerDocument.documentElement,n)){if(r!==null&&Ej(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!t.extend&&i>r&&(s=r,r=i,i=s),s=J4(n,i);var o=J4(n,r);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n =document.documentMode,Hm=null,LD=null,h0=null,$D=!1;function ez(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$D||Hm==null||Hm!==BC(r)||(r=Hm,"selectionStart"in r&&Ej(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),h0&&z0(h0,r)||(h0=r,r=KC(LD,"onSelect"),0 Wm||(t.current=VD[Wm],VD[Wm]=null,Wm--)}function zn(t,e){Wm++,VD[Wm]=t.current,t.current=e}var tf={},Ls=pf(tf),Mi=pf(!1),mp=tf;function Iv(t,e){var n=t.type.contextTypes;if(!n)return tf;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function Oi(t){return t=t.childContextTypes,t!=null}function XC(){Gn(Mi),Gn(Ls)}function az(t,e,n){if(Ls.current!==tf)throw Error(ke(168));zn(Ls,e),zn(Mi,n)}function fV(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in e))throw Error(ke(108,que(t)||"Unknown",s));return sr({},n,r)}function QC(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||tf,mp=Ls.current,zn(Ls,t),zn(Mi,Mi.current),!0}function lz(t,e,n){var r=t.stateNode;if(!r)throw Error(ke(169));n?(t=fV(t,e,mp),r.__reactInternalMemoizedMergedChildContext=t,Gn(Mi),Gn(Ls),zn(Ls,t)):Gn(Mi),zn(Mi,n)}var _c=null,LR=!1,CT=!1;function hV(t){_c===null?_c=[t]:_c.push(t)}function lfe(t){LR=!0,hV(t)}function mf(){if(!CT&&_c!==null){CT=!0;var t=0,e=xn;try{var n=_c;for(xn=1;t >=o,s-=o,Zc=1<<32-Fa(e)+s|n< E?(N=T,T=null):N=T.sibling;var k=d(g,T,b[E],_);if(k===null){T===null&&(T=N);break}t&&T&&k.alternate===null&&e(g,T),v=i(k,v,E),P===null?R=k:P.sibling=k,P=k,T=N}if(E===b.length)return n(g,T),Qn&&zf(g,E),R;if(T===null){for(;EE?(N=T,T=null):N=T.sibling;var M=d(g,T,k.value,_);if(M===null){T===null&&(T=N);break}t&&T&&M.alternate===null&&e(g,T),v=i(M,v,E),P===null?R=M:P.sibling=M,P=M,T=N}if(k.done)return n(g,T),Qn&&zf(g,E),R;if(T===null){for(;!k.done;E++,k=b.next())k=l(g,k.value,_),k!==null&&(v=i(k,v,E),P===null?R=k:P.sibling=k,P=k);return Qn&&zf(g,E),R}for(T=r(g,T);!k.done;E++,k=b.next())k=p(T,g,E,k.value,_),k!==null&&(t&&k.alternate!==null&&T.delete(k.key===null?E:k.key),v=i(k,v,E),P===null?R=k:P.sibling=k,P=k);return t&&T.forEach(function(I){return e(g,I)}),Qn&&zf(g,E),R}function y(g,v,b,_){if(typeof b=="object"&&b!==null&&b.type===Bm&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case qS:e:{for(var R=b.key,P=v;P!==null;){if(P.key===R){if(R=b.type,R===Bm){if(P.tag===7){n(g,P.sibling),v=s(P,b.props.children),v.return=g,g=v;break e}}else if(P.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Ju&&dz(R)===P.type){n(g,P.sibling),v=s(P,b.props),v.ref=db(g,P,b),v.return=g,g=v;break e}n(g,P);break}else e(g,P);P=P.sibling}b.type===Bm?(v=up(b.props.children,g.mode,_,b.key),v.return=g,g=v):(_=J1(b.type,b.key,b.props,null,g.mode,_),_.ref=db(g,v,b),_.return=g,g=_)}return o(g);case zm:e:{for(P=b.key;v!==null;){if(v.key===P)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(g,v.sibling),v=s(v,b.children||[]),v.return=g,g=v;break e}else{n(g,v);break}else e(g,v);v=v.sibling}v=DT(b,g.mode,_),v.return=g,g=v}return o(g);case Ju:return P=b._init,y(g,v,P(b._payload),_)}if(Lb(b))return h(g,v,b,_);if(ob(b))return m(g,v,b,_);n1(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(g,v.sibling),v=s(v,b),v.return=g,g=v):(n(g,v),v=kT(b,g.mode,_),v.return=g,g=v),o(g)):n(g,v)}return y}var Lv=vV(!0),yV=vV(!1),eE=pf(null),tE=null,Ym=null,Nj=null;function Tj(){Nj=Ym=tE=null}function kj(t){var e=eE.current;Gn(eE),t._currentValue=e}function GD(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function lg(t,e){tE=t,Nj=Ym=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Pi=!0),t.firstContext=null)}function ra(t){var e=t._currentValue;if(Nj!==t)if(t={context:t,memoizedValue:e,next:null},Ym===null){if(tE===null)throw Error(ke(308));Ym=t,tE.dependencies={lanes:0,firstContext:t}}else Ym=Ym.next=t;return e}var Jf=null;function Dj(t){Jf===null?Jf=[t]:Jf.push(t)}function bV(t,e,n,r){var s=e.interleaved;return s===null?(n.next=n,Dj(e)):(n.next=s.next,s.next=n),e.interleaved=n,mu(t,r)}function mu(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var ed=!1;function Mj(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xV(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function nu(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Xd(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,Xt&2){var s=r.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),r.pending=e,mu(t,n)}return s=r.interleaved,s===null?(e.next=e,Dj(r)):(e.next=s.next,s.next=e),r.interleaved=e,mu(t,n)}function G1(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,yj(t,n)}}function fz(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=e:i=i.next=e}else s=i=e;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function nE(t,e,n,r){var s=t.updateQueue;ed=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var c=a,u=c.next;c.next=null,o===null?i=u:o.next=u,o=c;var f=t.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==o&&(a===null?f.firstBaseUpdate=u:a.next=u,f.lastBaseUpdate=c))}if(i!==null){var l=s.baseState;o=0,f=u=c=null,a=i;do{var d=a.lane,p=a.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=t,m=a;switch(d=e,p=n,m.tag){case 1:if(h=m.payload,typeof h=="function"){l=h.call(p,l,d);break e}l=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,d=typeof h=="function"?h.call(p,l,d):h,d==null)break e;l=sr({},l,d);break e;case 2:ed=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,d=s.effects,d===null?s.effects=[a]:d.push(a))}else p={eventTime:p,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(u=f=p,c=l):f=f.next=p,o|=d;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;d=a,a=d.next,d.next=null,s.lastBaseUpdate=d,s.shared.pending=null}}while(!0);if(f===null&&(c=l),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=f,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);yp|=o,t.lanes=o,t.memoizedState=l}}function hz(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e n?n:4,t(!0);var r=RT.transition;RT.transition={};try{t(!1),e()}finally{xn=n,RT.transition=r}}function LV(){return sa().memoizedState}function ffe(t,e,n){var r=Zd(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},$V(t))FV(e,n);else if(n=bV(t,e,n,r),n!==null){var s=ni();za(n,t,r,s),zV(n,e,r)}}function hfe(t,e,n){var r=Zd(t),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if($V(t))FV(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,Va(a,o)){var c=e.interleaved;c===null?(s.next=s,Dj(e)):(s.next=c.next,c.next=s),e.interleaved=s;return}}catch{}finally{}n=bV(t,e,s,r),n!==null&&(s=ni(),za(n,t,r,s),zV(n,e,r))}}function $V(t){var e=t.alternate;return t===rr||e!==null&&e===rr}function FV(t,e){p0=sE=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function zV(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,yj(t,n)}}var iE={readContext:ra,useCallback:Cs,useContext:Cs,useEffect:Cs,useImperativeHandle:Cs,useInsertionEffect:Cs,useLayoutEffect:Cs,useMemo:Cs,useReducer:Cs,useRef:Cs,useState:Cs,useDebugValue:Cs,useDeferredValue:Cs,useTransition:Cs,useMutableSource:Cs,useSyncExternalStore:Cs,useId:Cs,unstable_isNewReconciler:!1},pfe={readContext:ra,useCallback:function(t,e){return al().memoizedState=[t,e===void 0?null:e],t},useContext:ra,useEffect:mz,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Y1(4194308,4,DV.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Y1(4194308,4,t,e)},useInsertionEffect:function(t,e){return Y1(4,2,t,e)},useMemo:function(t,e){var n=al();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=al();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=ffe.bind(null,rr,t),[r.memoizedState,t]},useRef:function(t){var e=al();return t={current:t},e.memoizedState=t},useState:pz,useDebugValue:Bj,useDeferredValue:function(t){return al().memoizedState=t},useTransition:function(){var t=pz(!1),e=t[0];return t=dfe.bind(null,t[1]),al().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=rr,s=al();if(Qn){if(n===void 0)throw Error(ke(407));n=n()}else{if(n=e(),ss===null)throw Error(ke(349));vp&30||CV(r,e,n)}s.memoizedState=n;var i={value:n,getSnapshot:e};return s.queue=i,mz(RV.bind(null,r,i,t),[t]),r.flags|=2048,K0(9,EV.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=al(),e=ss.identifierPrefix;if(Qn){var n=Jc,r=Zc;n=(r&~(1<<32-Fa(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=W0++,0 ")&&(c=c.replace(" ",t.displayName)),c}while(1<=o&&0<=a);break}}}finally{uT=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?jb(t):""}function que(t){switch(t.tag){case 5:return jb(t.type);case 16:return jb("Lazy");case 13:return jb("Suspense");case 19:return jb("SuspenseList");case 0:case 2:case 15:return t=dT(t.type,!1),t;case 11:return t=dT(t.type.render,!1),t;case 1:return t=dT(t.type,!0),t;default:return""}}function SD(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Bm:return"Fragment";case zm:return"Portal";case xD:return"Profiler";case hj:return"StrictMode";case wD:return"Suspense";case _D:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case bH:return(t.displayName||"Context")+".Consumer";case yH:return(t._context.displayName||"Context")+".Provider";case pj:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case mj:return e=t.displayName||null,e!==null?e:SD(t.type)||"Memo";case Ju:e=t._payload,t=t._init;try{return SD(t(e))}catch{}}return null}function Wue(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return SD(e);case 8:return e===hj?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function ef(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function wH(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Gue(t){var e=wH(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function WS(t){t._valueTracker||(t._valueTracker=Gue(t))}function _H(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=wH(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function BC(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function CD(t,e){var n=e.checked;return sr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function M4(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=ef(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function SH(t,e){e=e.checked,e!=null&&fj(t,"checked",e,!1)}function ED(t,e){SH(t,e);var n=ef(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?RD(t,e.type,n):e.hasOwnProperty("defaultValue")&&RD(t,e.type,ef(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function O4(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function RD(t,e,n){(e!=="number"||BC(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Lb=Array.isArray;function sg(t,e,n,r){if(t=t.options,e){e={};for(var s=0;s "+e.valueOf().toString()+"",e=GS.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function O0(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var c0={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Kue=["Webkit","ms","Moz","O"];Object.keys(c0).forEach(function(t){Kue.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),c0[e]=c0[t]})});function AH(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||c0.hasOwnProperty(t)&&c0[t]?(""+e).trim():e+"px"}function PH(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=AH(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,s):t[n]=s}}var Yue=sr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ND(t,e){if(e){if(Yue[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ke(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ke(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ke(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ke(62))}}function TD(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var kD=null;function gj(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var DD=null,ig=null,og=null;function L4(t){if(t=a_(t)){if(typeof DD!="function")throw Error(ke(280));var e=t.stateNode;e&&(e=LR(e),DD(t.stateNode,t.type,e))}}function NH(t){ig?og?og.push(t):og=[t]:ig=t}function TH(){if(ig){var t=ig,e=og;if(og=ig=null,L4(t),e)for(t=0;t >>=0,t===0?32:31-(ode(t)/ade|0)|0}var KS=64,YS=4194304;function $b(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function qC(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,s=t.suspendedLanes,i=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=$b(a):(i&=o,i!==0&&(r=$b(i)))}else o=n&~s,o!==0?r=$b(o):i!==0&&(r=$b(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&s)&&(s=r&-r,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0 n;n++)e.push(t);return e}function i_(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Fa(e),t[e]=n}function dde(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0 =d0),W4=" ",G4=!1;function XH(t,e){switch(t){case"keyup":return Fde.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function QH(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Um=!1;function Bde(t,e){switch(t){case"compositionend":return QH(e);case"keypress":return e.which!==32?null:(G4=!0,W4);case"textInput":return t=e.data,t===W4&&G4?null:t;default:return null}}function Ude(t,e){if(Um)return t==="compositionend"||!Cj&&XH(t,e)?(t=KH(),q1=wj=Ud=null,Um=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1 =e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Q4(n)}}function tV(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?tV(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function nV(){for(var t=window,e=BC();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=BC(t.document)}return e}function Ej(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Qde(t){var e=nV(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&tV(n.ownerDocument.documentElement,n)){if(r!==null&&Ej(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!t.extend&&i>r&&(s=r,r=i,i=s),s=Z4(n,i);var o=Z4(n,r);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n =document.documentMode,Hm=null,$D=null,h0=null,FD=!1;function J4(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;FD||Hm==null||Hm!==BC(r)||(r=Hm,"selectionStart"in r&&Ej(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),h0&&z0(h0,r)||(h0=r,r=KC($D,"onSelect"),0 Wm||(t.current=qD[Wm],qD[Wm]=null,Wm--)}function zn(t,e){Wm++,qD[Wm]=t.current,t.current=e}var tf={},Ls=pf(tf),Mi=pf(!1),mp=tf;function Iv(t,e){var n=t.type.contextTypes;if(!n)return tf;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function Oi(t){return t=t.childContextTypes,t!=null}function XC(){Gn(Mi),Gn(Ls)}function oz(t,e,n){if(Ls.current!==tf)throw Error(ke(168));zn(Ls,e),zn(Mi,n)}function dV(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in e))throw Error(ke(108,Wue(t)||"Unknown",s));return sr({},n,r)}function QC(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||tf,mp=Ls.current,zn(Ls,t),zn(Mi,Mi.current),!0}function az(t,e,n){var r=t.stateNode;if(!r)throw Error(ke(169));n?(t=dV(t,e,mp),r.__reactInternalMemoizedMergedChildContext=t,Gn(Mi),Gn(Ls),zn(Ls,t)):Gn(Mi),zn(Mi,n)}var _c=null,$R=!1,ET=!1;function fV(t){_c===null?_c=[t]:_c.push(t)}function cfe(t){$R=!0,fV(t)}function mf(){if(!ET&&_c!==null){ET=!0;var t=0,e=xn;try{var n=_c;for(xn=1;t >=o,s-=o,Zc=1<<32-Fa(e)+s|n< E?(N=T,T=null):N=T.sibling;var k=d(g,T,b[E],_);if(k===null){T===null&&(T=N);break}t&&T&&k.alternate===null&&e(g,T),v=i(k,v,E),P===null?R=k:P.sibling=k,P=k,T=N}if(E===b.length)return n(g,T),Qn&&zf(g,E),R;if(T===null){for(;EE?(N=T,T=null):N=T.sibling;var M=d(g,T,k.value,_);if(M===null){T===null&&(T=N);break}t&&T&&M.alternate===null&&e(g,T),v=i(M,v,E),P===null?R=M:P.sibling=M,P=M,T=N}if(k.done)return n(g,T),Qn&&zf(g,E),R;if(T===null){for(;!k.done;E++,k=b.next())k=l(g,k.value,_),k!==null&&(v=i(k,v,E),P===null?R=k:P.sibling=k,P=k);return Qn&&zf(g,E),R}for(T=r(g,T);!k.done;E++,k=b.next())k=p(T,g,E,k.value,_),k!==null&&(t&&k.alternate!==null&&T.delete(k.key===null?E:k.key),v=i(k,v,E),P===null?R=k:P.sibling=k,P=k);return t&&T.forEach(function(I){return e(g,I)}),Qn&&zf(g,E),R}function y(g,v,b,_){if(typeof b=="object"&&b!==null&&b.type===Bm&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case qS:e:{for(var R=b.key,P=v;P!==null;){if(P.key===R){if(R=b.type,R===Bm){if(P.tag===7){n(g,P.sibling),v=s(P,b.props.children),v.return=g,g=v;break e}}else if(P.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Ju&&uz(R)===P.type){n(g,P.sibling),v=s(P,b.props),v.ref=db(g,P,b),v.return=g,g=v;break e}n(g,P);break}else e(g,P);P=P.sibling}b.type===Bm?(v=up(b.props.children,g.mode,_,b.key),v.return=g,g=v):(_=J1(b.type,b.key,b.props,null,g.mode,_),_.ref=db(g,v,b),_.return=g,g=_)}return o(g);case zm:e:{for(P=b.key;v!==null;){if(v.key===P)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(g,v.sibling),v=s(v,b.children||[]),v.return=g,g=v;break e}else{n(g,v);break}else e(g,v);v=v.sibling}v=MT(b,g.mode,_),v.return=g,g=v}return o(g);case Ju:return P=b._init,y(g,v,P(b._payload),_)}if(Lb(b))return h(g,v,b,_);if(ob(b))return m(g,v,b,_);n1(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(g,v.sibling),v=s(v,b),v.return=g,g=v):(n(g,v),v=DT(b,g.mode,_),v.return=g,g=v),o(g)):n(g,v)}return y}var Lv=gV(!0),vV=gV(!1),eE=pf(null),tE=null,Ym=null,Nj=null;function Tj(){Nj=Ym=tE=null}function kj(t){var e=eE.current;Gn(eE),t._currentValue=e}function KD(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function lg(t,e){tE=t,Nj=Ym=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Pi=!0),t.firstContext=null)}function ra(t){var e=t._currentValue;if(Nj!==t)if(t={context:t,memoizedValue:e,next:null},Ym===null){if(tE===null)throw Error(ke(308));Ym=t,tE.dependencies={lanes:0,firstContext:t}}else Ym=Ym.next=t;return e}var Jf=null;function Dj(t){Jf===null?Jf=[t]:Jf.push(t)}function yV(t,e,n,r){var s=e.interleaved;return s===null?(n.next=n,Dj(e)):(n.next=s.next,s.next=n),e.interleaved=n,mu(t,r)}function mu(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var ed=!1;function Mj(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function bV(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function nu(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Xd(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,Xt&2){var s=r.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),r.pending=e,mu(t,n)}return s=r.interleaved,s===null?(e.next=e,Dj(r)):(e.next=s.next,s.next=e),r.interleaved=e,mu(t,n)}function G1(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,yj(t,n)}}function dz(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=e:i=i.next=e}else s=i=e;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function nE(t,e,n,r){var s=t.updateQueue;ed=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var c=a,u=c.next;c.next=null,o===null?i=u:o.next=u,o=c;var f=t.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==o&&(a===null?f.firstBaseUpdate=u:a.next=u,f.lastBaseUpdate=c))}if(i!==null){var l=s.baseState;o=0,f=u=c=null,a=i;do{var d=a.lane,p=a.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=t,m=a;switch(d=e,p=n,m.tag){case 1:if(h=m.payload,typeof h=="function"){l=h.call(p,l,d);break e}l=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,d=typeof h=="function"?h.call(p,l,d):h,d==null)break e;l=sr({},l,d);break e;case 2:ed=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,d=s.effects,d===null?s.effects=[a]:d.push(a))}else p={eventTime:p,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(u=f=p,c=l):f=f.next=p,o|=d;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;d=a,a=d.next,d.next=null,s.lastBaseUpdate=d,s.shared.pending=null}}while(!0);if(f===null&&(c=l),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=f,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);yp|=o,t.lanes=o,t.memoizedState=l}}function fz(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e n?n:4,t(!0);var r=AT.transition;AT.transition={};try{t(!1),e()}finally{xn=n,AT.transition=r}}function jV(){return sa().memoizedState}function hfe(t,e,n){var r=Zd(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},LV(t))$V(e,n);else if(n=yV(t,e,n,r),n!==null){var s=ni();za(n,t,r,s),FV(n,e,r)}}function pfe(t,e,n){var r=Zd(t),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(LV(t))$V(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,Va(a,o)){var c=e.interleaved;c===null?(s.next=s,Dj(e)):(s.next=c.next,c.next=s),e.interleaved=s;return}}catch{}finally{}n=yV(t,e,s,r),n!==null&&(s=ni(),za(n,t,r,s),FV(n,e,r))}}function LV(t){var e=t.alternate;return t===rr||e!==null&&e===rr}function $V(t,e){p0=sE=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function FV(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,yj(t,n)}}var iE={readContext:ra,useCallback:Cs,useContext:Cs,useEffect:Cs,useImperativeHandle:Cs,useInsertionEffect:Cs,useLayoutEffect:Cs,useMemo:Cs,useReducer:Cs,useRef:Cs,useState:Cs,useDebugValue:Cs,useDeferredValue:Cs,useTransition:Cs,useMutableSource:Cs,useSyncExternalStore:Cs,useId:Cs,unstable_isNewReconciler:!1},mfe={readContext:ra,useCallback:function(t,e){return al().memoizedState=[t,e===void 0?null:e],t},useContext:ra,useEffect:pz,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Y1(4194308,4,kV.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Y1(4194308,4,t,e)},useInsertionEffect:function(t,e){return Y1(4,2,t,e)},useMemo:function(t,e){var n=al();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=al();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=hfe.bind(null,rr,t),[r.memoizedState,t]},useRef:function(t){var e=al();return t={current:t},e.memoizedState=t},useState:hz,useDebugValue:Bj,useDeferredValue:function(t){return al().memoizedState=t},useTransition:function(){var t=hz(!1),e=t[0];return t=ffe.bind(null,t[1]),al().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=rr,s=al();if(Qn){if(n===void 0)throw Error(ke(407));n=n()}else{if(n=e(),ss===null)throw Error(ke(349));vp&30||SV(r,e,n)}s.memoizedState=n;var i={value:n,getSnapshot:e};return s.queue=i,pz(EV.bind(null,r,i,t),[t]),r.flags|=2048,K0(9,CV.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=al(),e=ss.identifierPrefix;if(Qn){var n=Jc,r=Zc;n=(r&~(1<<32-Fa(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=W0++,0 <\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[Nl]=e,t[H0]=r,XV(t,e,!1,!1),e.stateNode=t;e:{switch(o=ND(n,r),n){case"dialog":qn("cancel",t),qn("close",t),s=r;break;case"iframe":case"object":case"embed":qn("load",t),s=r;break;case"video":case"audio":for(s=0;s zv&&(e.flags|=128,r=!0,fb(i,!1),e.lanes=4194304)}else{if(!r)if(t=rE(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),fb(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Qn)return Es(e),null}else 2*_r()-i.renderingStartTime>zv&&n!==1073741824&&(e.flags|=128,r=!0,fb(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(n=i.last,n!==null?n.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=_r(),e.sibling=null,n=nr.current,zn(nr,r?n&1|2:n&1),e):(Es(e),null);case 22:case 23:return Gj(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?uo&1073741824&&(Es(e),e.subtreeFlags&6&&(e.flags|=8192)):Es(e),null;case 24:return null;case 25:return null}throw Error(ke(156,e.tag))}function _fe(t,e){switch(Aj(e),e.tag){case 1:return Oi(e.type)&&XC(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return $v(),Gn(Mi),Gn(Ls),jj(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Ij(e),null;case 13:if(Gn(nr),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ke(340));jv()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Gn(nr),null;case 4:return $v(),null;case 10:return kj(e.type._context),null;case 22:case 23:return Gj(),null;case 24:return null;default:return null}}var s1=!1,Ds=!1,Sfe=typeof WeakSet=="function"?WeakSet:Set,We=null;function Xm(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){hr(t,e,r)}else n.current=null}function nM(t,e,n){try{n()}catch(r){hr(t,e,r)}}var Rz=!1;function Cfe(t,e){if(FD=WC,t=rV(),Ej(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,c=-1,u=0,f=0,l=t,d=null;t:for(;;){for(var p;l!==n||s!==0&&l.nodeType!==3||(a=o+s),l!==i||r!==0&&l.nodeType!==3||(c=o+r),l.nodeType===3&&(o+=l.nodeValue.length),(p=l.firstChild)!==null;)d=l,l=p;for(;;){if(l===t)break t;if(d===n&&++u===s&&(a=o),d===i&&++f===r&&(c=o),(p=l.nextSibling)!==null)break;l=d,d=l.parentNode}l=p}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(zD={focusedElem:t,selectionRange:n},WC=!1,We=e;We!==null;)if(e=We,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,We=t;else for(;We!==null;){e=We;try{var h=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,y=h.memoizedState,g=e.stateNode,v=g.getSnapshotBeforeUpdate(e.elementType===e.type?m:ya(e.type,m),y);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ke(163))}}catch(_){hr(e,e.return,_)}if(t=e.sibling,t!==null){t.return=e.return,We=t;break}We=e.return}return h=Rz,Rz=!1,h}function m0(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&nM(e,n,i)}s=s.next}while(s!==r)}}function zR(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function rM(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function JV(t){var e=t.alternate;e!==null&&(t.alternate=null,JV(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Nl],delete e[H0],delete e[HD],delete e[ofe],delete e[afe])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function e8(t){return t.tag===5||t.tag===3||t.tag===4}function Az(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||e8(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function sM(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=YC));else if(r!==4&&(t=t.child,t!==null))for(sM(t,e,n),t=t.sibling;t!==null;)sM(t,e,n),t=t.sibling}function iM(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(iM(t,e,n),t=t.sibling;t!==null;)iM(t,e,n),t=t.sibling}var gs=null,Oa=!1;function zu(t,e,n){for(n=n.child;n!==null;)t8(t,e,n),n=n.sibling}function t8(t,e,n){if(Il&&typeof Il.onCommitFiberUnmount=="function")try{Il.onCommitFiberUnmount(DR,n)}catch{}switch(n.tag){case 5:Ds||Xm(n,e);case 6:var r=gs,s=Oa;gs=null,zu(t,e,n),gs=r,Oa=s,gs!==null&&(Oa?(t=gs,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):gs.removeChild(n.stateNode));break;case 18:gs!==null&&(Oa?(t=gs,n=n.stateNode,t.nodeType===8?ST(t.parentNode,n):t.nodeType===1&&ST(t,n),$0(t)):ST(gs,n.stateNode));break;case 4:r=gs,s=Oa,gs=n.stateNode.containerInfo,Oa=!0,zu(t,e,n),gs=r,Oa=s;break;case 0:case 11:case 14:case 15:if(!Ds&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&nM(n,e,o),s=s.next}while(s!==r)}zu(t,e,n);break;case 1:if(!Ds&&(Xm(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){hr(n,e,a)}zu(t,e,n);break;case 21:zu(t,e,n);break;case 22:n.mode&1?(Ds=(r=Ds)||n.memoizedState!==null,zu(t,e,n),Ds=r):zu(t,e,n);break;default:zu(t,e,n)}}function Pz(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new Sfe),e.forEach(function(r){var s=Mfe.bind(null,t,r);n.has(r)||(n.add(r),r.then(s,s))})}}function ga(t,e){var n=e.deletions;if(n!==null)for(var r=0;r s&&(s=o),r&=~i}if(r=s,r=_r()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Rfe(r/1960))-r,10 t?16:t,Hd===null)var r=!1;else{if(t=Hd,Hd=null,lE=0,Xt&6)throw Error(ke(331));var s=Xt;for(Xt|=4,We=t.current;We!==null;){var i=We,o=i.child;if(We.flags&16){var a=i.deletions;if(a!==null){for(var c=0;c _r()-qj?cp(t,0):Vj|=n),Ii(t,e)}function c8(t,e){e===0&&(t.mode&1?(e=YS,YS<<=1,!(YS&130023424)&&(YS=4194304)):e=1);var n=ni();t=mu(t,e),t!==null&&(i_(t,e,n),Ii(t,n))}function Dfe(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),c8(t,n)}function Mfe(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(ke(314))}r!==null&&r.delete(e),c8(t,n)}var u8;u8=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Mi.current)Pi=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Pi=!1,xfe(t,e,n);Pi=!!(t.flags&131072)}else Pi=!1,Qn&&e.flags&1048576&&pV(e,JC,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;X1(t,e),t=e.pendingProps;var s=Iv(e,Ls.current);lg(e,n),s=$j(null,e,r,t,s,n);var i=Fj();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Oi(r)?(i=!0,QC(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Mj(e),s.updater=FR,e.stateNode=s,s._reactInternals=e,YD(e,r,t,n),e=ZD(null,e,r,!0,i,n)):(e.tag=0,Qn&&i&&Rj(e),Qs(null,e,s,n),e=e.child),e;case 16:r=e.elementType;e:{switch(X1(t,e),t=e.pendingProps,s=r._init,r=s(r._payload),e.type=r,s=e.tag=Ife(r),t=ya(r,t),s){case 0:e=QD(null,e,r,t,n);break e;case 1:e=Sz(null,e,r,t,n);break e;case 11:e=wz(null,e,r,t,n);break e;case 14:e=_z(null,e,r,ya(r.type,t),n);break e}throw Error(ke(306,r,""))}return e;case 0:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:ya(r,s),QD(t,e,r,s,n);case 1:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:ya(r,s),Sz(t,e,r,s,n);case 3:e:{if(GV(e),t===null)throw Error(ke(387));r=e.pendingProps,i=e.memoizedState,s=i.element,xV(t,e),nE(e,r,null,n);var o=e.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Fv(Error(ke(423)),e),e=Cz(t,e,r,n,s);break e}else if(r!==s){s=Fv(Error(ke(424)),e),e=Cz(t,e,r,n,s);break e}else for(go=Yd(e.stateNode.containerInfo.firstChild),vo=e,Qn=!0,ja=null,n=yV(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(jv(),r===s){e=gu(t,e,n);break e}Qs(t,e,r,n)}e=e.child}return e;case 5:return wV(e),t===null&&WD(e),r=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,BD(r,s)?o=null:i!==null&&BD(r,i)&&(e.flags|=32),WV(t,e),Qs(t,e,o,n),e.child;case 6:return t===null&&WD(e),null;case 13:return KV(t,e,n);case 4:return Oj(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Lv(e,null,r,n):Qs(t,e,r,n),e.child;case 11:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:ya(r,s),wz(t,e,r,s,n);case 7:return Qs(t,e,e.pendingProps,n),e.child;case 8:return Qs(t,e,e.pendingProps.children,n),e.child;case 12:return Qs(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,zn(eE,r._currentValue),r._currentValue=o,i!==null)if(Va(i.value,o)){if(i.children===s.children&&!Mi.current){e=gu(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=nu(-1,n&-n),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?c.next=c:(c.next=f.next,f.next=c),u.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),GD(i.return,n,e),a.lanes|=n;break}c=c.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(ke(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),GD(o,n,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Qs(t,e,s.children,n),e=e.child}return e;case 9:return s=e.type,r=e.pendingProps.children,lg(e,n),s=ra(s),r=r(s),e.flags|=1,Qs(t,e,r,n),e.child;case 14:return r=e.type,s=ya(r,e.pendingProps),s=ya(r.type,s),_z(t,e,r,s,n);case 15:return VV(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:ya(r,s),X1(t,e),e.tag=1,Oi(r)?(t=!0,QC(e)):t=!1,lg(e,n),BV(e,r,s),YD(e,r,s,n),ZD(null,e,r,!0,t,n);case 19:return YV(t,e,n);case 22:return qV(t,e,n)}throw Error(ke(156,e.tag))};function d8(t,e){return $H(t,e)}function Ofe(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zo(t,e,n,r){return new Ofe(t,e,n,r)}function Yj(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ife(t){if(typeof t=="function")return Yj(t)?1:0;if(t!=null){if(t=t.$$typeof,t===pj)return 11;if(t===mj)return 14}return 2}function Jd(t,e){var n=t.alternate;return n===null?(n=Zo(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function J1(t,e,n,r,s,i){var o=2;if(r=t,typeof t=="function")Yj(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Bm:return up(n.children,s,i,e);case hj:o=8,s|=8;break;case bD:return t=Zo(12,n,e,s|2),t.elementType=bD,t.lanes=i,t;case xD:return t=Zo(13,n,e,s),t.elementType=xD,t.lanes=i,t;case wD:return t=Zo(19,n,e,s),t.elementType=wD,t.lanes=i,t;case wH:return UR(n,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case bH:o=10;break e;case xH:o=9;break e;case pj:o=11;break e;case mj:o=14;break e;case Ju:o=16,r=null;break e}throw Error(ke(130,t==null?t:typeof t,""))}return e=Zo(o,n,e,s),e.elementType=t,e.type=r,e.lanes=i,e}function up(t,e,n,r){return t=Zo(7,t,r,e),t.lanes=n,t}function UR(t,e,n,r){return t=Zo(22,t,r,e),t.elementType=wH,t.lanes=n,t.stateNode={isHidden:!1},t}function kT(t,e,n){return t=Zo(6,t,null,e),t.lanes=n,t}function DT(t,e,n){return e=Zo(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function jfe(t,e,n,r,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fT(0),this.expirationTimes=fT(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fT(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Xj(t,e,n,r,s,i,o,a,c){return t=new jfe(t,e,n,a,c),e===1?(e=1,i===!0&&(e|=8)):e=0,i=Zo(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mj(i),t}function Lfe(t,e,n){var r=3 "u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(m8)}catch(t){console.error(t)}}m8(),mH.exports=So;var rs=mH.exports;const GR=_u(rs),Ufe=rH({__proto__:null,default:GR},[rs]);var jz=rs;vD.createRoot=jz.createRoot,vD.hydrateRoot=jz.hydrateRoot;const g8=S.createContext({}),Hfe=({children:t,authActions:e})=>{const n=i=>{var o;try{return Promise.resolve((o=e.login)==null?void 0:o.call(e,i))}catch(a){return console.error(a),Promise.reject(a)}},r=i=>{var o;try{return Promise.resolve((o=e.logout)==null?void 0:o.call(e,i))}catch(a){return console.error(a),Promise.reject(a)}},s=async()=>{var i;try{return Promise.resolve((i=e.check)==null?void 0:i.call(e))}catch(o){return console.error(o),Promise.reject(o)}};return w.jsx(g8.Provider,{value:{...e,login:n,logout:r,check:s},children:t})},KR=()=>{const t=S.useContext(g8);if(t===null)throw new Error("useAuth must be used within a AuthProvider");return t};var oy=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Bv=typeof window>"u"||"Deno"in globalThis;function Uo(){}function Vfe(t,e){return typeof t=="function"?t(e):t}function uM(t){return typeof t=="number"&&t>=0&&t!==1/0}function v8(t,e){return Math.max(t+(e||0)-Date.now(),0)}function ug(t,e){return typeof t=="function"?t(e):t}function La(t,e){return typeof t=="function"?t(e):t}function Lz(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==eL(o,e.options))return!1}else if(!X0(e.queryKey,o))return!1}if(n!=="all"){const c=e.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||s&&s!==e.state.fetchStatus||i&&!i(e))}function $z(t,e){const{exact:n,status:r,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(n){if(xp(e.options.mutationKey)!==xp(i))return!1}else if(!X0(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function eL(t,e){return((e==null?void 0:e.queryKeyHashFn)||xp)(t)}function xp(t){return JSON.stringify(t,(e,n)=>dM(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function X0(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!X0(t[n],e[n])):!1}function y8(t,e){if(t===e)return t;const n=Fz(t)&&Fz(e);if(n||dM(t)&&dM(e)){const r=n?t:Object.keys(t),s=r.length,i=n?e:Object.keys(e),o=i.length,a=n?[]:{};let c=0;for(let u=0;u {setTimeout(e,t)})}function fM(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?y8(t,e):e}function b8(t){return t}function Wfe(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function Gfe(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var x8=Symbol();function w8(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===x8?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var ah,hd,Rg,q6,Kfe=(q6=class extends oy{constructor(){super();B(this,ah);B(this,hd);B(this,Rg);$(this,Rg,e=>{if(!Bv&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){A(this,hd)||this.setEventListener(A(this,Rg))}onUnsubscribe(){var e;this.hasListeners()||((e=A(this,hd))==null||e.call(this),$(this,hd,void 0))}setEventListener(e){var n;$(this,Rg,e),(n=A(this,hd))==null||n.call(this),$(this,hd,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){A(this,ah)!==e&&($(this,ah,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof A(this,ah)=="boolean"?A(this,ah):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},ah=new WeakMap,hd=new WeakMap,Rg=new WeakMap,q6),tL=new Kfe,Ag,pd,Pg,W6,Yfe=(W6=class extends oy{constructor(){super();B(this,Ag,!0);B(this,pd);B(this,Pg);$(this,Pg,e=>{if(!Bv&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){A(this,pd)||this.setEventListener(A(this,Pg))}onUnsubscribe(){var e;this.hasListeners()||((e=A(this,pd))==null||e.call(this),$(this,pd,void 0))}setEventListener(e){var n;$(this,Pg,e),(n=A(this,pd))==null||n.call(this),$(this,pd,e(this.setOnline.bind(this)))}setOnline(e){A(this,Ag)!==e&&($(this,Ag,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return A(this,Ag)}},Ag=new WeakMap,pd=new WeakMap,Pg=new WeakMap,W6),fE=new Yfe;function Xfe(t){return Math.min(1e3*2**t,3e4)}function _8(t){return(t??"online")==="online"?fE.isOnline():!0}var S8=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function MT(t){return t instanceof S8}function C8(t){let e=!1,n=0,r=!1,s,i,o;const a=new Promise((g,v)=>{i=g,o=v}),c=g=>{var v;r||(h(new S8(g)),(v=t.abort)==null||v.call(t))},u=()=>{e=!0},f=()=>{e=!1},l=()=>tL.isFocused()&&(t.networkMode==="always"||fE.isOnline())&&t.canRun(),d=()=>_8(t.networkMode)&&t.canRun(),p=g=>{var v;r||(r=!0,(v=t.onSuccess)==null||v.call(t,g),s==null||s(),i(g))},h=g=>{var v;r||(r=!0,(v=t.onError)==null||v.call(t,g),s==null||s(),o(g))},m=()=>new Promise(g=>{var v;s=b=>{(r||l())&&g(b)},(v=t.onPause)==null||v.call(t)}).then(()=>{var g;s=void 0,r||(g=t.onContinue)==null||g.call(t)}),y=()=>{if(r)return;let g;const v=n===0?t.initialPromise:void 0;try{g=v??t.fn()}catch(b){g=Promise.reject(b)}Promise.resolve(g).then(p).catch(b=>{var E;if(r)return;const _=t.retry??(Bv?0:3),R=t.retryDelay??Xfe,P=typeof R=="function"?R(n,b):R,T=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,b);if(e||!T){h(b);return}n++,(E=t.onFail)==null||E.call(t,n,b),qfe(P).then(()=>l()?void 0:m()).then(()=>{e?h(b):y()})})};return{promise:a,cancel:c,continue:()=>(s==null||s(),a),cancelRetry:u,continueRetry:f,canStart:d,start:()=>(d()?y():m().then(y),a)}}function Qfe(){let t=[],e=0,n=d=>{d()},r=d=>{d()},s=d=>setTimeout(d,0);const i=d=>{s=d},o=d=>{let p;e++;try{p=d()}finally{e--,e||u()}return p},a=d=>{e?t.push(d):s(()=>{n(d)})},c=d=>(...p)=>{a(()=>{d(...p)})},u=()=>{const d=t;t=[],d.length&&s(()=>{r(()=>{d.forEach(p=>{n(p)})})})};return{batch:o,batchCalls:c,schedule:a,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{r=d},setScheduler:i}}var qr=Qfe(),lh,G6,E8=(G6=class{constructor(){B(this,lh)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),uM(this.gcTime)&&$(this,lh,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Bv?1/0:5*60*1e3))}clearGcTimeout(){A(this,lh)&&(clearTimeout(A(this,lh)),$(this,lh,void 0))}},lh=new WeakMap,G6),Ng,Tg,Lo,Ns,wx,ch,xa,pc,K6,Zfe=(K6=class extends E8{constructor(e){super();B(this,xa);B(this,Ng);B(this,Tg);B(this,Lo);B(this,Ns);B(this,wx);B(this,ch);$(this,ch,!1),$(this,wx,e.defaultOptions),this.setOptions(e.options),this.observers=[],$(this,Lo,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,$(this,Ng,Jfe(this.options)),this.state=e.state??A(this,Ng),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=A(this,Ns))==null?void 0:e.promise}setOptions(e){this.options={...A(this,wx),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&A(this,Lo).remove(this)}setData(e,n){const r=fM(this.state.data,e,this.options);return z(this,xa,pc).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){z(this,xa,pc).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,s;const n=(r=A(this,Ns))==null?void 0:r.promise;return(s=A(this,Ns))==null||s.cancel(e),n?n.then(Uo).catch(Uo):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(A(this,Ng))}isActive(){return this.observers.some(e=>La(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!v8(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=A(this,Ns))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=A(this,Ns))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),A(this,Lo).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(A(this,Ns)&&(A(this,ch)?A(this,Ns).cancel({revert:!0}):A(this,Ns).cancelRetry()),this.scheduleGc()),A(this,Lo).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||z(this,xa,pc).call(this,{type:"invalidate"})}fetch(e,n){var c,u,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(A(this,Ns))return A(this,Ns).continueRetry(),A(this,Ns).promise}if(e&&this.setOptions(e),!this.options.queryFn){const l=this.observers.find(d=>d.options.queryFn);l&&this.setOptions(l.options)}const r=new AbortController,s=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>($(this,ch,!0),r.signal)})},i=()=>{const l=w8(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return s(d),$(this,ch,!1),this.options.persister?this.options.persister(l,d,this):l(d)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};s(o),(c=this.options.behavior)==null||c.onFetch(o,this),$(this,Tg,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&z(this,xa,pc).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const a=l=>{var d,p,h,m;MT(l)&&l.silent||z(this,xa,pc).call(this,{type:"error",error:l}),MT(l)||((p=(d=A(this,Lo).config).onError)==null||p.call(d,l,this),(m=(h=A(this,Lo).config).onSettled)==null||m.call(h,this.state.data,l,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return $(this,Ns,C8({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:l=>{var d,p,h,m;if(l===void 0){a(new Error(`${this.queryHash} data is undefined`));return}this.setData(l),(p=(d=A(this,Lo).config).onSuccess)==null||p.call(d,l,this),(m=(h=A(this,Lo).config).onSettled)==null||m.call(h,l,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:a,onFail:(l,d)=>{z(this,xa,pc).call(this,{type:"failed",failureCount:l,error:d})},onPause:()=>{z(this,xa,pc).call(this,{type:"pause"})},onContinue:()=>{z(this,xa,pc).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),A(this,Ns).start()}},Ng=new WeakMap,Tg=new WeakMap,Lo=new WeakMap,Ns=new WeakMap,wx=new WeakMap,ch=new WeakMap,xa=new WeakSet,pc=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...R8(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return MT(s)&&s.revert&&A(this,Tg)?{...A(this,Tg),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),qr.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),A(this,Lo).notify({query:this,type:"updated",action:e})})},K6);function R8(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:_8(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Jfe(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var ll,Y6,ehe=(Y6=class extends oy{constructor(e={}){super();B(this,ll);this.config=e,$(this,ll,new Map)}build(e,n,r){const s=n.queryKey,i=n.queryHash??eL(s,n);let o=this.get(i);return o||(o=new Zfe({cache:this,queryKey:s,queryHash:i,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){A(this,ll).has(e.queryHash)||(A(this,ll).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=A(this,ll).get(e.queryHash);n&&(e.destroy(),n===e&&A(this,ll).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){qr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return A(this,ll).get(e)}getAll(){return[...A(this,ll).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Lz(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>Lz(e,r)):n}notify(e){qr.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){qr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){qr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ll=new WeakMap,Y6),cl,qs,uh,ul,Wu,X6,the=(X6=class extends E8{constructor(e){super();B(this,ul);B(this,cl);B(this,qs);B(this,uh);this.mutationId=e.mutationId,$(this,qs,e.mutationCache),$(this,cl,[]),this.state=e.state||A8(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){A(this,cl).includes(e)||(A(this,cl).push(e),this.clearGcTimeout(),A(this,qs).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){$(this,cl,A(this,cl).filter(n=>n!==e)),this.scheduleGc(),A(this,qs).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){A(this,cl).length||(this.state.status==="pending"?this.scheduleGc():A(this,qs).remove(this))}continue(){var e;return((e=A(this,uh))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var s,i,o,a,c,u,f,l,d,p,h,m,y,g,v,b,_,R,P,T;$(this,uh,C8({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(E,N)=>{z(this,ul,Wu).call(this,{type:"failed",failureCount:E,error:N})},onPause:()=>{z(this,ul,Wu).call(this,{type:"pause"})},onContinue:()=>{z(this,ul,Wu).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>A(this,qs).canRun(this)}));const n=this.state.status==="pending",r=!A(this,uh).canStart();try{if(!n){z(this,ul,Wu).call(this,{type:"pending",variables:e,isPaused:r}),await((i=(s=A(this,qs).config).onMutate)==null?void 0:i.call(s,e,this));const N=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,e));N!==this.state.context&&z(this,ul,Wu).call(this,{type:"pending",context:N,variables:e,isPaused:r})}const E=await A(this,uh).start();return await((u=(c=A(this,qs).config).onSuccess)==null?void 0:u.call(c,E,e,this.state.context,this)),await((l=(f=this.options).onSuccess)==null?void 0:l.call(f,E,e,this.state.context)),await((p=(d=A(this,qs).config).onSettled)==null?void 0:p.call(d,E,null,this.state.variables,this.state.context,this)),await((m=(h=this.options).onSettled)==null?void 0:m.call(h,E,null,e,this.state.context)),z(this,ul,Wu).call(this,{type:"success",data:E}),E}catch(E){try{throw await((g=(y=A(this,qs).config).onError)==null?void 0:g.call(y,E,e,this.state.context,this)),await((b=(v=this.options).onError)==null?void 0:b.call(v,E,e,this.state.context)),await((R=(_=A(this,qs).config).onSettled)==null?void 0:R.call(_,void 0,E,this.state.variables,this.state.context,this)),await((T=(P=this.options).onSettled)==null?void 0:T.call(P,void 0,E,e,this.state.context)),E}finally{z(this,ul,Wu).call(this,{type:"error",error:E})}}finally{A(this,qs).runNext(this)}}},cl=new WeakMap,qs=new WeakMap,uh=new WeakMap,ul=new WeakSet,Wu=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),qr.batch(()=>{A(this,cl).forEach(r=>{r.onMutationUpdate(e)}),A(this,qs).notify({mutation:this,type:"updated",action:e})})},X6);function A8(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var to,_x,Q6,nhe=(Q6=class extends oy{constructor(e={}){super();B(this,to);B(this,_x);this.config=e,$(this,to,new Map),$(this,_x,Date.now())}build(e,n,r){const s=new the({mutationCache:this,mutationId:++Ss(this,_x)._,options:e.defaultMutationOptions(n),state:r});return this.add(s),s}add(e){const n=a1(e),r=A(this,to).get(n)??[];r.push(e),A(this,to).set(n,r),this.notify({type:"added",mutation:e})}remove(e){var r;const n=a1(e);if(A(this,to).has(n)){const s=(r=A(this,to).get(n))==null?void 0:r.filter(i=>i!==e);s&&(s.length===0?A(this,to).delete(n):A(this,to).set(n,s))}this.notify({type:"removed",mutation:e})}canRun(e){var r;const n=(r=A(this,to).get(a1(e)))==null?void 0:r.find(s=>s.state.status==="pending");return!n||n===e}runNext(e){var r;const n=(r=A(this,to).get(a1(e)))==null?void 0:r.find(s=>s!==e&&s.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){qr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...A(this,to).values()].flat()}find(e){const n={exact:!0,...e};return this.getAll().find(r=>$z(n,r))}findAll(e={}){return this.getAll().filter(n=>$z(e,n))}notify(e){qr.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return qr.batch(()=>Promise.all(e.map(n=>n.continue().catch(Uo))))}},to=new WeakMap,_x=new WeakMap,Q6);function a1(t){var e;return((e=t.options.scope)==null?void 0:e.id)??String(t.mutationId)}function rhe(t){return{onFetch:(e,n)=>{const r=async()=>{var h,m,y,g,v;const s=e.options,i=(y=(m=(h=e.fetchOptions)==null?void 0:h.meta)==null?void 0:m.fetchMore)==null?void 0:y.direction,o=((g=e.state.data)==null?void 0:g.pages)||[],a=((v=e.state.data)==null?void 0:v.pageParams)||[],c={pages:[],pageParams:[]};let u=!1;const f=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(e.signal.aborted?u=!0:e.signal.addEventListener("abort",()=>{u=!0}),e.signal)})},l=w8(e.options,e.fetchOptions),d=async(b,_,R)=>{if(u)return Promise.reject();if(_==null&&b.pages.length)return Promise.resolve(b);const P={queryKey:e.queryKey,pageParam:_,direction:R?"backward":"forward",meta:e.options.meta};f(P);const T=await l(P),{maxPages:E}=e.options,N=R?Gfe:Wfe;return{pages:N(b.pages,T,E),pageParams:N(b.pageParams,_,E)}};let p;if(i&&o.length){const b=i==="backward",_=b?she:Bz,R={pages:o,pageParams:a},P=_(s,R);p=await d(R,P,b)}else{p=await d(c,a[0]??s.initialPageParam);const b=t??o.length;for(let _=1;_{var s,i;return(i=(s=e.options).persister)==null?void 0:i.call(s,r,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=r}}}function Bz(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function she(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var dr,md,gd,kg,Dg,vd,Mg,Og,Z6,ihe=(Z6=class{constructor(t={}){B(this,dr);B(this,md);B(this,gd);B(this,kg);B(this,Dg);B(this,vd);B(this,Mg);B(this,Og);$(this,dr,t.queryCache||new ehe),$(this,md,t.mutationCache||new nhe),$(this,gd,t.defaultOptions||{}),$(this,kg,new Map),$(this,Dg,new Map),$(this,vd,0)}mount(){Ss(this,vd)._++,A(this,vd)===1&&($(this,Mg,tL.subscribe(async t=>{t&&(await this.resumePausedMutations(),A(this,dr).onFocus())})),$(this,Og,fE.subscribe(async t=>{t&&(await this.resumePausedMutations(),A(this,dr).onOnline())})))}unmount(){var t,e;Ss(this,vd)._--,A(this,vd)===0&&((t=A(this,Mg))==null||t.call(this),$(this,Mg,void 0),(e=A(this,Og))==null||e.call(this),$(this,Og,void 0))}isFetching(t){return A(this,dr).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return A(this,md).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=A(this,dr).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.getQueryData(t.queryKey);if(e===void 0)return this.fetchQuery(t);{const n=this.defaultQueryOptions(t),r=A(this,dr).build(this,n);return t.revalidateIfStale&&r.isStaleByTime(ug(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(e)}}getQueriesData(t){return A(this,dr).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),s=A(this,dr).get(r.queryHash),i=s==null?void 0:s.state.data,o=Vfe(e,i);if(o!==void 0)return A(this,dr).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return qr.batch(()=>A(this,dr).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=A(this,dr).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=A(this,dr);qr.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=A(this,dr),r={type:"active",...t};return qr.batch(()=>(n.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries(r,e)))}cancelQueries(t={},e={}){const n={revert:!0,...e},r=qr.batch(()=>A(this,dr).findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(Uo).catch(Uo)}invalidateQueries(t={},e={}){return qr.batch(()=>{if(A(this,dr).findAll(t).forEach(r=>{r.invalidate()}),t.refetchType==="none")return Promise.resolve();const n={...t,type:t.refetchType??t.type??"active"};return this.refetchQueries(n,e)})}refetchQueries(t={},e){const n={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},r=qr.batch(()=>A(this,dr).findAll(t).filter(s=>!s.isDisabled()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Uo)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Uo)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=A(this,dr).build(this,e);return n.isStaleByTime(ug(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Uo).catch(Uo)}fetchInfiniteQuery(t){return t.behavior=rhe(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Uo).catch(Uo)}resumePausedMutations(){return fE.isOnline()?A(this,md).resumePausedMutations():Promise.resolve()}getQueryCache(){return A(this,dr)}getMutationCache(){return A(this,md)}getDefaultOptions(){return A(this,gd)}setDefaultOptions(t){$(this,gd,t)}setQueryDefaults(t,e){A(this,kg).set(xp(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...A(this,kg).values()];let n={};return e.forEach(r=>{X0(t,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(t,e){A(this,Dg).set(xp(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...A(this,Dg).values()];let n={};return e.forEach(r=>{X0(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...A(this,gd).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=eL(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===x8&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...A(this,gd).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){A(this,dr).clear(),A(this,md).clear()}},dr=new WeakMap,md=new WeakMap,gd=new WeakMap,kg=new WeakMap,Dg=new WeakMap,vd=new WeakMap,Mg=new WeakMap,Og=new WeakMap,Z6),xi,Ht,Sx,Ws,dh,Ig,dl,Cx,jg,Lg,fh,hh,yd,$g,fn,zb,hM,pM,mM,gM,vM,yM,bM,P8,J6,ohe=(J6=class extends oy{constructor(e,n){super();B(this,fn);B(this,xi);B(this,Ht);B(this,Sx);B(this,Ws);B(this,dh);B(this,Ig);B(this,dl);B(this,Cx);B(this,jg);B(this,Lg);B(this,fh);B(this,hh);B(this,yd);B(this,$g,new Set);this.options=n,$(this,xi,e),$(this,dl,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(A(this,Ht).addObserver(this),Uz(A(this,Ht),this.options)?z(this,fn,zb).call(this):this.updateResult(),z(this,fn,gM).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return xM(A(this,Ht),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return xM(A(this,Ht),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,z(this,fn,vM).call(this),z(this,fn,yM).call(this),A(this,Ht).removeObserver(this)}setOptions(e,n){const r=this.options,s=A(this,Ht);if(this.options=A(this,xi).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof La(this.options.enabled,A(this,Ht))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");z(this,fn,bM).call(this),A(this,Ht).setOptions(this.options),r._defaulted&&!dE(this.options,r)&&A(this,xi).getQueryCache().notify({type:"observerOptionsUpdated",query:A(this,Ht),observer:this});const i=this.hasListeners();i&&Hz(A(this,Ht),s,this.options,r)&&z(this,fn,zb).call(this),this.updateResult(n),i&&(A(this,Ht)!==s||La(this.options.enabled,A(this,Ht))!==La(r.enabled,A(this,Ht))||ug(this.options.staleTime,A(this,Ht))!==ug(r.staleTime,A(this,Ht)))&&z(this,fn,hM).call(this);const o=z(this,fn,pM).call(this);i&&(A(this,Ht)!==s||La(this.options.enabled,A(this,Ht))!==La(r.enabled,A(this,Ht))||o!==A(this,yd))&&z(this,fn,mM).call(this,o)}getOptimisticResult(e){const n=A(this,xi).getQueryCache().build(A(this,xi),e),r=this.createResult(n,e);return lhe(this,r)&&($(this,Ws,r),$(this,Ig,this.options),$(this,dh,A(this,Ht).state)),r}getCurrentResult(){return A(this,Ws)}trackResult(e,n){const r={};return Object.keys(e).forEach(s=>{Object.defineProperty(r,s,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(s),n==null||n(s),e[s])})}),r}trackProp(e){A(this,$g).add(e)}getCurrentQuery(){return A(this,Ht)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=A(this,xi).defaultQueryOptions(e),r=A(this,xi).getQueryCache().build(A(this,xi),n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(e){return z(this,fn,zb).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),A(this,Ws)))}createResult(e,n){var T;const r=A(this,Ht),s=this.options,i=A(this,Ws),o=A(this,dh),a=A(this,Ig),u=e!==r?e.state:A(this,Sx),{state:f}=e;let l={...f},d=!1,p;if(n._optimisticResults){const E=this.hasListeners(),N=!E&&Uz(e,n),k=E&&Hz(e,r,n,s);(N||k)&&(l={...l,...R8(f.data,e.options)}),n._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:h,errorUpdatedAt:m,status:y}=l;if(n.select&&l.data!==void 0)if(i&&l.data===(o==null?void 0:o.data)&&n.select===A(this,Cx))p=A(this,jg);else try{$(this,Cx,n.select),p=n.select(l.data),p=fM(i==null?void 0:i.data,p,n),$(this,jg,p),$(this,dl,null)}catch(E){$(this,dl,E)}else p=l.data;if(n.placeholderData!==void 0&&p===void 0&&y==="pending"){let E;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))E=i.data;else if(E=typeof n.placeholderData=="function"?n.placeholderData((T=A(this,Lg))==null?void 0:T.state.data,A(this,Lg)):n.placeholderData,n.select&&E!==void 0)try{E=n.select(E),$(this,dl,null)}catch(N){$(this,dl,N)}E!==void 0&&(y="success",p=fM(i==null?void 0:i.data,E,n),d=!0)}A(this,dl)&&(h=A(this,dl),p=A(this,jg),m=Date.now(),y="error");const g=l.fetchStatus==="fetching",v=y==="pending",b=y==="error",_=v&&g,R=p!==void 0;return{status:y,fetchStatus:l.fetchStatus,isPending:v,isSuccess:y==="success",isError:b,isInitialLoading:_,isLoading:_,data:p,dataUpdatedAt:l.dataUpdatedAt,error:h,errorUpdatedAt:m,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>u.dataUpdateCount||l.errorUpdateCount>u.errorUpdateCount,isFetching:g,isRefetching:g&&!v,isLoadingError:b&&!R,isPaused:l.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:b&&R,isStale:nL(e,n),refetch:this.refetch}}updateResult(e){const n=A(this,Ws),r=this.createResult(A(this,Ht),this.options);if($(this,dh,A(this,Ht).state),$(this,Ig,this.options),A(this,dh).data!==void 0&&$(this,Lg,A(this,Ht)),dE(r,n))return;$(this,Ws,r);const s={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!A(this,$g).size)return!0;const c=new Set(a??A(this,$g));return this.options.throwOnError&&c.add("error"),Object.keys(A(this,Ws)).some(u=>{const f=u;return A(this,Ws)[f]!==n[f]&&c.has(f)})};(e==null?void 0:e.listeners)!==!1&&i()&&(s.listeners=!0),z(this,fn,P8).call(this,{...s,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&z(this,fn,gM).call(this)}},xi=new WeakMap,Ht=new WeakMap,Sx=new WeakMap,Ws=new WeakMap,dh=new WeakMap,Ig=new WeakMap,dl=new WeakMap,Cx=new WeakMap,jg=new WeakMap,Lg=new WeakMap,fh=new WeakMap,hh=new WeakMap,yd=new WeakMap,$g=new WeakMap,fn=new WeakSet,zb=function(e){z(this,fn,bM).call(this);let n=A(this,Ht).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Uo)),n},hM=function(){z(this,fn,vM).call(this);const e=ug(this.options.staleTime,A(this,Ht));if(Bv||A(this,Ws).isStale||!uM(e))return;const r=v8(A(this,Ws).dataUpdatedAt,e)+1;$(this,fh,setTimeout(()=>{A(this,Ws).isStale||this.updateResult()},r))},pM=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(A(this,Ht)):this.options.refetchInterval)??!1},mM=function(e){z(this,fn,yM).call(this),$(this,yd,e),!(Bv||La(this.options.enabled,A(this,Ht))===!1||!uM(A(this,yd))||A(this,yd)===0)&&$(this,hh,setInterval(()=>{(this.options.refetchIntervalInBackground||tL.isFocused())&&z(this,fn,zb).call(this)},A(this,yd)))},gM=function(){z(this,fn,hM).call(this),z(this,fn,mM).call(this,z(this,fn,pM).call(this))},vM=function(){A(this,fh)&&(clearTimeout(A(this,fh)),$(this,fh,void 0))},yM=function(){A(this,hh)&&(clearInterval(A(this,hh)),$(this,hh,void 0))},bM=function(){const e=A(this,xi).getQueryCache().build(A(this,xi),this.options);if(e===A(this,Ht))return;const n=A(this,Ht);$(this,Ht,e),$(this,Sx,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},P8=function(e){qr.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(A(this,Ws))}),A(this,xi).getQueryCache().notify({query:A(this,Ht),type:"observerResultsUpdated"})})},J6);function ahe(t,e){return La(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function Uz(t,e){return ahe(t,e)||t.state.data!==void 0&&xM(t,e,e.refetchOnMount)}function xM(t,e,n){if(La(e.enabled,t)!==!1){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&nL(t,e)}return!1}function Hz(t,e,n,r){return(t!==e||La(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&nL(t,n)}function nL(t,e){return La(e.enabled,t)!==!1&&t.isStaleByTime(ug(e.staleTime,t))}function lhe(t,e){return!dE(t.getCurrentResult(),e)}var bd,xd,wi,Cc,uu,eC,wM,eH,che=(eH=class extends oy{constructor(n,r){super();B(this,uu);B(this,bd);B(this,xd);B(this,wi);B(this,Cc);$(this,bd,n),this.setOptions(r),this.bindMethods(),z(this,uu,eC).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=A(this,bd).defaultMutationOptions(n),dE(this.options,r)||A(this,bd).getMutationCache().notify({type:"observerOptionsUpdated",mutation:A(this,wi),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&xp(r.mutationKey)!==xp(this.options.mutationKey)?this.reset():((s=A(this,wi))==null?void 0:s.state.status)==="pending"&&A(this,wi).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=A(this,wi))==null||n.removeObserver(this)}onMutationUpdate(n){z(this,uu,eC).call(this),z(this,uu,wM).call(this,n)}getCurrentResult(){return A(this,xd)}reset(){var n;(n=A(this,wi))==null||n.removeObserver(this),$(this,wi,void 0),z(this,uu,eC).call(this),z(this,uu,wM).call(this)}mutate(n,r){var s;return $(this,Cc,r),(s=A(this,wi))==null||s.removeObserver(this),$(this,wi,A(this,bd).getMutationCache().build(A(this,bd),this.options)),A(this,wi).addObserver(this),A(this,wi).execute(n)}},bd=new WeakMap,xd=new WeakMap,wi=new WeakMap,Cc=new WeakMap,uu=new WeakSet,eC=function(){var r;const n=((r=A(this,wi))==null?void 0:r.state)??A8();$(this,xd,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},wM=function(n){qr.batch(()=>{var r,s,i,o,a,c,u,f;if(A(this,Cc)&&this.hasListeners()){const l=A(this,xd).variables,d=A(this,xd).context;(n==null?void 0:n.type)==="success"?((s=(r=A(this,Cc)).onSuccess)==null||s.call(r,n.data,l,d),(o=(i=A(this,Cc)).onSettled)==null||o.call(i,n.data,null,l,d)):(n==null?void 0:n.type)==="error"&&((c=(a=A(this,Cc)).onError)==null||c.call(a,n.error,l,d),(f=(u=A(this,Cc)).onSettled)==null||f.call(u,void 0,n.error,l,d))}this.listeners.forEach(l=>{l(A(this,xd))})})},eH),N8=S.createContext(void 0),eu=t=>{const e=S.useContext(N8);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},uhe=({client:t,children:e})=>(S.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),w.jsx(N8.Provider,{value:t,children:e})),T8=S.createContext(!1),dhe=()=>S.useContext(T8);T8.Provider;function fhe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var hhe=S.createContext(fhe()),phe=()=>S.useContext(hhe);function k8(t,e){return typeof t=="function"?t(...e):!!t}function mhe(){}var ghe=(t,e)=>{(t.suspense||t.throwOnError)&&(e.isReset()||(t.retryOnMount=!1))},vhe=t=>{S.useEffect(()=>{t.clearReset()},[t])},yhe=({result:t,errorResetBoundary:e,throwOnError:n,query:r})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&k8(n,[t.error,r]),bhe=t=>{t.suspense&&(typeof t.staleTime!="number"&&(t.staleTime=1e3),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3)))},xhe=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,whe=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function _he(t,e,n){var u,f,l,d;const r=eu(),s=dhe(),i=phe(),o=r.defaultQueryOptions(t);(f=(u=r.getDefaultOptions().queries)==null?void 0:u._experimental_beforeQuery)==null||f.call(u,o),o._optimisticResults=s?"isRestoring":"optimistic",bhe(o),ghe(o,i),vhe(i);const[a]=S.useState(()=>new e(r,o)),c=a.getOptimisticResult(o);if(S.useSyncExternalStore(S.useCallback(p=>{const h=s?()=>{}:a.subscribe(qr.batchCalls(p));return a.updateResult(),h},[a,s]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),S.useEffect(()=>{a.setOptions(o,{listeners:!1})},[o,a]),xhe(o,c))throw whe(o,a,i);if(yhe({result:c,errorResetBoundary:i,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;return(d=(l=r.getDefaultOptions().queries)==null?void 0:l._experimental_afterQuery)==null||d.call(l,o,c),o.notifyOnChangeProps?c:a.trackResult(c)}function YR(t,e){return _he(t,ohe)}function ru(t,e){const n=eu(),[r]=S.useState(()=>new che(n,t));S.useEffect(()=>{r.setOptions(t)},[r,t]);const s=S.useSyncExternalStore(S.useCallback(o=>r.subscribe(qr.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=S.useCallback((o,a)=>{r.mutate(o,a).catch(mhe)},[r]);if(s.error&&k8(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}class ia{constructor(e=[]){Te(this,"segments",[]);this.segments=e}key(){return this.segments}get(){return this.segments}}class gf extends ia{params(e){return new ia([...this.segments,e])}}class She extends ia{id(e){return new gf([...this.segments,e?String(e):void 0])}}class Che extends ia{ids(...e){return new gf([...this.segments,...e.length?[e.map(n=>String(n))]:[]])}}class Ehe extends ia{action(e){if(["one","report"].includes(e))return new She([...this.segments,e]);if(e==="many")return new Che([...this.segments,e]);if(["list","infinite"].includes(e))return new gf([...this.segments,e]);throw new Error("Invalid action type")}}class Rhe extends ia{resource(e){return new Ehe([...this.segments,e])}mutation(e){return new gf([...e==="custom"?this.segments:[this.segments[0]],e])}}class Ahe extends ia{action(e){return new gf([...this.segments,e])}}class Phe extends ia{action(e){return new gf([...this.segments,e])}}class Nhe extends ia{resource(e){return new Phe([...this.segments,e])}}class The extends ia{action(e){return new gf([...this.segments,e])}}class khe extends ia{resource(e){return new The([...this.segments,e])}action(e){return new gf([...this.segments,e])}}class Dhe extends ia{data(e){return new Rhe(["data",e||"default"])}auth(){return new Ahe(["auth"])}access(){return new Nhe(["access"])}audit(){return new khe(["audit"])}}const Mhe=()=>new Dhe([]),vu=()=>Mhe,D8=t=>{const e=vu(),{getProfile:n}=KR();return YR({queryKey:e().auth().action("profile").get(),queryFn:n,...t})},M8=t=>{const e=vu(),{check:n}=KR();return YR({queryKey:e().auth().action("check").get(),queryFn:n,retry:!1,...t})};/** +`+i.stack}return{value:t,source:e,stack:s,digest:null}}function TT(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function QD(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var yfe=typeof WeakMap=="function"?WeakMap:Map;function BV(t,e,n){n=nu(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){aE||(aE=!0,aM=r),QD(t,e)},n}function UV(t,e,n){n=nu(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var s=e.value;n.payload=function(){return r(s)},n.callback=function(){QD(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){QD(t,e),typeof r!="function"&&(Qd===null?Qd=new Set([this]):Qd.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function vz(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new yfe;var s=new Set;r.set(e,s)}else s=r.get(e),s===void 0&&(s=new Set,r.set(e,s));s.has(n)||(s.add(n),t=Dfe.bind(null,t,e,n),e.then(t,t))}function yz(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function bz(t,e,n,r,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=nu(-1,1),e.tag=2,Xd(n,e,1))),n.lanes|=1),t)}var bfe=Su.ReactCurrentOwner,Pi=!1;function Qs(t,e,n,r){e.child=t===null?vV(e,null,n,r):Lv(e,t.child,n,r)}function xz(t,e,n,r,s){n=n.render;var i=e.ref;return lg(e,s),r=$j(t,e,n,r,i,s),n=Fj(),t!==null&&!Pi?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,gu(t,e,s)):(Qn&&n&&Rj(e),e.flags|=1,Qs(t,e,r,s),e.child)}function wz(t,e,n,r,s){if(t===null){var i=n.type;return typeof i=="function"&&!Yj(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=i,HV(t,e,i,r,s)):(t=J1(n.type,null,r,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:z0,n(o,r)&&t.ref===e.ref)return gu(t,e,s)}return e.flags|=1,t=Jd(i,r),t.ref=e.ref,t.return=e,e.child=t}function HV(t,e,n,r,s){if(t!==null){var i=t.memoizedProps;if(z0(i,r)&&t.ref===e.ref)if(Pi=!1,e.pendingProps=r=i,(t.lanes&s)!==0)t.flags&131072&&(Pi=!0);else return e.lanes=t.lanes,gu(t,e,s)}return ZD(t,e,n,r,s)}function VV(t,e,n){var r=e.pendingProps,s=r.children,i=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},zn(Qm,uo),uo|=n;else{if(!(n&1073741824))return t=i!==null?i.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,zn(Qm,uo),uo|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,zn(Qm,uo),uo|=r}else i!==null?(r=i.baseLanes|n,e.memoizedState=null):r=n,zn(Qm,uo),uo|=r;return Qs(t,e,s,n),e.child}function qV(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function ZD(t,e,n,r,s){var i=Oi(n)?mp:Ls.current;return i=Iv(e,i),lg(e,s),n=$j(t,e,n,r,i,s),r=Fj(),t!==null&&!Pi?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,gu(t,e,s)):(Qn&&r&&Rj(e),e.flags|=1,Qs(t,e,n,s),e.child)}function _z(t,e,n,r,s){if(Oi(n)){var i=!0;QC(e)}else i=!1;if(lg(e,s),e.stateNode===null)X1(t,e),zV(e,n,r),XD(e,n,r,s),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var c=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=ra(u):(u=Oi(n)?mp:Ls.current,u=Iv(e,u));var f=n.getDerivedStateFromProps,l=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";l||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||c!==u)&&gz(e,o,r,u),ed=!1;var d=e.memoizedState;o.state=d,nE(e,r,o,s),c=e.memoizedState,a!==r||d!==c||Mi.current||ed?(typeof f=="function"&&(YD(e,n,f,r),c=e.memoizedState),(a=ed||mz(e,n,a,r,d,c,u))?(l||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=c),o.props=r,o.state=c,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,bV(t,e),a=e.memoizedProps,u=e.type===e.elementType?a:ya(e.type,a),o.props=u,l=e.pendingProps,d=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=ra(c):(c=Oi(n)?mp:Ls.current,c=Iv(e,c));var p=n.getDerivedStateFromProps;(f=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==l||d!==c)&&gz(e,o,r,c),ed=!1,d=e.memoizedState,o.state=d,nE(e,r,o,s);var h=e.memoizedState;a!==l||d!==h||Mi.current||ed?(typeof p=="function"&&(YD(e,n,p,r),h=e.memoizedState),(u=ed||mz(e,n,u,r,d,h,c)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,h,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,h,c)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=h),o.props=r,o.state=h,o.context=c,r=u):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),r=!1)}return JD(t,e,n,r,i,s)}function JD(t,e,n,r,s,i){qV(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return s&&az(e,n,!1),gu(t,e,i);r=e.stateNode,bfe.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=Lv(e,t.child,null,i),e.child=Lv(e,null,a,i)):Qs(t,e,a,i),e.memoizedState=r.state,s&&az(e,n,!0),e.child}function WV(t){var e=t.stateNode;e.pendingContext?oz(t,e.pendingContext,e.pendingContext!==e.context):e.context&&oz(t,e.context,!1),Oj(t,e.containerInfo)}function Sz(t,e,n,r,s){return jv(),Pj(s),e.flags|=256,Qs(t,e,n,r),e.child}var eM={dehydrated:null,treeContext:null,retryLane:0};function tM(t){return{baseLanes:t,cachePool:null,transitions:null}}function GV(t,e,n){var r=e.pendingProps,s=nr.current,i=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),zn(nr,s&1),t===null)return GD(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,i?(r=e.mode,i=e.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=HR(o,r,0,null),t=up(t,r,n,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=tM(n),e.memoizedState=eM,t):Uj(e,o));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return xfe(t,e,o,r,a,s,n);if(i){i=r.fallback,o=e.mode,s=t.child,a=s.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&e.child!==s?(r=e.child,r.childLanes=0,r.pendingProps=c,e.deletions=null):(r=Jd(s,c),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Jd(a,i):(i=up(i,o,n,null),i.flags|=2),i.return=e,r.return=e,r.sibling=i,e.child=r,r=i,i=e.child,o=t.child.memoizedState,o=o===null?tM(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=t.childLanes&~n,e.memoizedState=eM,r}return i=t.child,t=i.sibling,r=Jd(i,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function Uj(t,e){return e=HR({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function r1(t,e,n,r){return r!==null&&Pj(r),Lv(e,t.child,null,n),t=Uj(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function xfe(t,e,n,r,s,i,o){if(n)return e.flags&256?(e.flags&=-257,r=TT(Error(ke(422))),r1(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=r.fallback,s=e.mode,r=HR({mode:"visible",children:r.children},s,0,null),i=up(i,s,o,null),i.flags|=2,r.return=e,i.return=e,r.sibling=i,e.child=r,e.mode&1&&Lv(e,t.child,null,o),e.child.memoizedState=tM(o),e.memoizedState=eM,i);if(!(e.mode&1))return r1(t,e,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(ke(419)),r=TT(i,r,void 0),r1(t,e,o,r)}if(a=(o&t.childLanes)!==0,Pi||a){if(r=ss,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,mu(t,s),za(r,t,s,-1))}return Kj(),r=TT(Error(ke(421))),r1(t,e,o,r)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=Mfe.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,go=Yd(s.nextSibling),vo=e,Qn=!0,ja=null,t!==null&&(Wo[Go++]=Zc,Wo[Go++]=Jc,Wo[Go++]=gp,Zc=t.id,Jc=t.overflow,gp=e),e=Uj(e,r.children),e.flags|=4096,e)}function Cz(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),KD(t.return,e,n)}function kT(t,e,n,r,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function KV(t,e,n){var r=e.pendingProps,s=r.revealOrder,i=r.tail;if(Qs(t,e,r.children,n),r=nr.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Cz(t,n,e);else if(t.tag===19)Cz(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(zn(nr,r),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(n=e.child,s=null;n!==null;)t=n.alternate,t!==null&&rE(t)===null&&(s=n),n=n.sibling;n=s,n===null?(s=e.child,e.child=null):(s=n.sibling,n.sibling=null),kT(e,!1,s,n,i);break;case"backwards":for(n=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&rE(t)===null){e.child=s;break}t=s.sibling,s.sibling=n,n=s,s=t}kT(e,!0,n,null,i);break;case"together":kT(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function X1(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function gu(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),yp|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(ke(153));if(e.child!==null){for(t=e.child,n=Jd(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Jd(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function wfe(t,e,n){switch(e.tag){case 3:WV(e),jv();break;case 5:xV(e);break;case 1:Oi(e.type)&&QC(e);break;case 4:Oj(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,s=e.memoizedProps.value;zn(eE,r._currentValue),r._currentValue=s;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(zn(nr,nr.current&1),e.flags|=128,null):n&e.child.childLanes?GV(t,e,n):(zn(nr,nr.current&1),t=gu(t,e,n),t!==null?t.sibling:null);zn(nr,nr.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return KV(t,e,n);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),zn(nr,nr.current),r)break;return null;case 22:case 23:return e.lanes=0,VV(t,e,n)}return gu(t,e,n)}var YV,nM,XV,QV;YV=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};nM=function(){};XV=function(t,e,n,r){var s=t.memoizedProps;if(s!==r){t=e.stateNode,eh(jl.current);var i=null;switch(n){case"input":s=CD(t,s),r=CD(t,r),i=[];break;case"select":s=sr({},s,{value:void 0}),r=sr({},r,{value:void 0}),i=[];break;case"textarea":s=AD(t,s),r=AD(t,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=YC)}ND(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(M0.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var c=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==a&&(c!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&a[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(i||(i=[]),i.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(M0.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&qn("scroll",t),i||a===c||(i=[])):(i=i||[]).push(u,c))}n&&(i=i||[]).push("style",n);var u=i;(e.updateQueue=u)&&(e.flags|=4)}};QV=function(t,e,n,r){n!==r&&(e.flags|=4)};function fb(t,e){if(!Qn)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Es(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function _fe(t,e,n){var r=e.pendingProps;switch(Aj(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Es(e),null;case 1:return Oi(e.type)&&XC(),Es(e),null;case 3:return r=e.stateNode,$v(),Gn(Mi),Gn(Ls),jj(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(t1(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,ja!==null&&(uM(ja),ja=null))),nM(t,e),Es(e),null;case 5:Ij(e);var s=eh(q0.current);if(n=e.type,t!==null&&e.stateNode!=null)XV(t,e,n,r,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(ke(166));return Es(e),null}if(t=eh(jl.current),t1(e)){r=e.stateNode,n=e.type;var i=e.memoizedProps;switch(r[Nl]=e,r[H0]=i,t=(e.mode&1)!==0,n){case"dialog":qn("cancel",r),qn("close",r);break;case"iframe":case"object":case"embed":qn("load",r);break;case"video":case"audio":for(s=0;s <\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[Nl]=e,t[H0]=r,YV(t,e,!1,!1),e.stateNode=t;e:{switch(o=TD(n,r),n){case"dialog":qn("cancel",t),qn("close",t),s=r;break;case"iframe":case"object":case"embed":qn("load",t),s=r;break;case"video":case"audio":for(s=0;s zv&&(e.flags|=128,r=!0,fb(i,!1),e.lanes=4194304)}else{if(!r)if(t=rE(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),fb(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Qn)return Es(e),null}else 2*_r()-i.renderingStartTime>zv&&n!==1073741824&&(e.flags|=128,r=!0,fb(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(n=i.last,n!==null?n.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=_r(),e.sibling=null,n=nr.current,zn(nr,r?n&1|2:n&1),e):(Es(e),null);case 22:case 23:return Gj(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?uo&1073741824&&(Es(e),e.subtreeFlags&6&&(e.flags|=8192)):Es(e),null;case 24:return null;case 25:return null}throw Error(ke(156,e.tag))}function Sfe(t,e){switch(Aj(e),e.tag){case 1:return Oi(e.type)&&XC(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return $v(),Gn(Mi),Gn(Ls),jj(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Ij(e),null;case 13:if(Gn(nr),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ke(340));jv()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Gn(nr),null;case 4:return $v(),null;case 10:return kj(e.type._context),null;case 22:case 23:return Gj(),null;case 24:return null;default:return null}}var s1=!1,Ds=!1,Cfe=typeof WeakSet=="function"?WeakSet:Set,We=null;function Xm(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){hr(t,e,r)}else n.current=null}function rM(t,e,n){try{n()}catch(r){hr(t,e,r)}}var Ez=!1;function Efe(t,e){if(zD=WC,t=nV(),Ej(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,c=-1,u=0,f=0,l=t,d=null;t:for(;;){for(var p;l!==n||s!==0&&l.nodeType!==3||(a=o+s),l!==i||r!==0&&l.nodeType!==3||(c=o+r),l.nodeType===3&&(o+=l.nodeValue.length),(p=l.firstChild)!==null;)d=l,l=p;for(;;){if(l===t)break t;if(d===n&&++u===s&&(a=o),d===i&&++f===r&&(c=o),(p=l.nextSibling)!==null)break;l=d,d=l.parentNode}l=p}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(BD={focusedElem:t,selectionRange:n},WC=!1,We=e;We!==null;)if(e=We,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,We=t;else for(;We!==null;){e=We;try{var h=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,y=h.memoizedState,g=e.stateNode,v=g.getSnapshotBeforeUpdate(e.elementType===e.type?m:ya(e.type,m),y);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ke(163))}}catch(_){hr(e,e.return,_)}if(t=e.sibling,t!==null){t.return=e.return,We=t;break}We=e.return}return h=Ez,Ez=!1,h}function m0(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&rM(e,n,i)}s=s.next}while(s!==r)}}function BR(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function sM(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function ZV(t){var e=t.alternate;e!==null&&(t.alternate=null,ZV(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Nl],delete e[H0],delete e[VD],delete e[afe],delete e[lfe])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function JV(t){return t.tag===5||t.tag===3||t.tag===4}function Rz(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||JV(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function iM(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=YC));else if(r!==4&&(t=t.child,t!==null))for(iM(t,e,n),t=t.sibling;t!==null;)iM(t,e,n),t=t.sibling}function oM(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(oM(t,e,n),t=t.sibling;t!==null;)oM(t,e,n),t=t.sibling}var gs=null,Oa=!1;function zu(t,e,n){for(n=n.child;n!==null;)e8(t,e,n),n=n.sibling}function e8(t,e,n){if(Il&&typeof Il.onCommitFiberUnmount=="function")try{Il.onCommitFiberUnmount(MR,n)}catch{}switch(n.tag){case 5:Ds||Xm(n,e);case 6:var r=gs,s=Oa;gs=null,zu(t,e,n),gs=r,Oa=s,gs!==null&&(Oa?(t=gs,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):gs.removeChild(n.stateNode));break;case 18:gs!==null&&(Oa?(t=gs,n=n.stateNode,t.nodeType===8?CT(t.parentNode,n):t.nodeType===1&&CT(t,n),$0(t)):CT(gs,n.stateNode));break;case 4:r=gs,s=Oa,gs=n.stateNode.containerInfo,Oa=!0,zu(t,e,n),gs=r,Oa=s;break;case 0:case 11:case 14:case 15:if(!Ds&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&rM(n,e,o),s=s.next}while(s!==r)}zu(t,e,n);break;case 1:if(!Ds&&(Xm(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){hr(n,e,a)}zu(t,e,n);break;case 21:zu(t,e,n);break;case 22:n.mode&1?(Ds=(r=Ds)||n.memoizedState!==null,zu(t,e,n),Ds=r):zu(t,e,n);break;default:zu(t,e,n)}}function Az(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new Cfe),e.forEach(function(r){var s=Ofe.bind(null,t,r);n.has(r)||(n.add(r),r.then(s,s))})}}function ga(t,e){var n=e.deletions;if(n!==null)for(var r=0;r s&&(s=o),r&=~i}if(r=s,r=_r()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Afe(r/1960))-r,10 t?16:t,Hd===null)var r=!1;else{if(t=Hd,Hd=null,lE=0,Xt&6)throw Error(ke(331));var s=Xt;for(Xt|=4,We=t.current;We!==null;){var i=We,o=i.child;if(We.flags&16){var a=i.deletions;if(a!==null){for(var c=0;c _r()-qj?cp(t,0):Vj|=n),Ii(t,e)}function l8(t,e){e===0&&(t.mode&1?(e=YS,YS<<=1,!(YS&130023424)&&(YS=4194304)):e=1);var n=ni();t=mu(t,e),t!==null&&(i_(t,e,n),Ii(t,n))}function Mfe(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),l8(t,n)}function Ofe(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(ke(314))}r!==null&&r.delete(e),l8(t,n)}var c8;c8=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Mi.current)Pi=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Pi=!1,wfe(t,e,n);Pi=!!(t.flags&131072)}else Pi=!1,Qn&&e.flags&1048576&&hV(e,JC,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;X1(t,e),t=e.pendingProps;var s=Iv(e,Ls.current);lg(e,n),s=$j(null,e,r,t,s,n);var i=Fj();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Oi(r)?(i=!0,QC(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Mj(e),s.updater=zR,e.stateNode=s,s._reactInternals=e,XD(e,r,t,n),e=JD(null,e,r,!0,i,n)):(e.tag=0,Qn&&i&&Rj(e),Qs(null,e,s,n),e=e.child),e;case 16:r=e.elementType;e:{switch(X1(t,e),t=e.pendingProps,s=r._init,r=s(r._payload),e.type=r,s=e.tag=jfe(r),t=ya(r,t),s){case 0:e=ZD(null,e,r,t,n);break e;case 1:e=_z(null,e,r,t,n);break e;case 11:e=xz(null,e,r,t,n);break e;case 14:e=wz(null,e,r,ya(r.type,t),n);break e}throw Error(ke(306,r,""))}return e;case 0:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:ya(r,s),ZD(t,e,r,s,n);case 1:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:ya(r,s),_z(t,e,r,s,n);case 3:e:{if(WV(e),t===null)throw Error(ke(387));r=e.pendingProps,i=e.memoizedState,s=i.element,bV(t,e),nE(e,r,null,n);var o=e.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Fv(Error(ke(423)),e),e=Sz(t,e,r,n,s);break e}else if(r!==s){s=Fv(Error(ke(424)),e),e=Sz(t,e,r,n,s);break e}else for(go=Yd(e.stateNode.containerInfo.firstChild),vo=e,Qn=!0,ja=null,n=vV(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(jv(),r===s){e=gu(t,e,n);break e}Qs(t,e,r,n)}e=e.child}return e;case 5:return xV(e),t===null&&GD(e),r=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,UD(r,s)?o=null:i!==null&&UD(r,i)&&(e.flags|=32),qV(t,e),Qs(t,e,o,n),e.child;case 6:return t===null&&GD(e),null;case 13:return GV(t,e,n);case 4:return Oj(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Lv(e,null,r,n):Qs(t,e,r,n),e.child;case 11:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:ya(r,s),xz(t,e,r,s,n);case 7:return Qs(t,e,e.pendingProps,n),e.child;case 8:return Qs(t,e,e.pendingProps.children,n),e.child;case 12:return Qs(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,zn(eE,r._currentValue),r._currentValue=o,i!==null)if(Va(i.value,o)){if(i.children===s.children&&!Mi.current){e=gu(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=nu(-1,n&-n),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?c.next=c:(c.next=f.next,f.next=c),u.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),KD(i.return,n,e),a.lanes|=n;break}c=c.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(ke(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),KD(o,n,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Qs(t,e,s.children,n),e=e.child}return e;case 9:return s=e.type,r=e.pendingProps.children,lg(e,n),s=ra(s),r=r(s),e.flags|=1,Qs(t,e,r,n),e.child;case 14:return r=e.type,s=ya(r,e.pendingProps),s=ya(r.type,s),wz(t,e,r,s,n);case 15:return HV(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:ya(r,s),X1(t,e),e.tag=1,Oi(r)?(t=!0,QC(e)):t=!1,lg(e,n),zV(e,r,s),XD(e,r,s,n),JD(null,e,r,!0,t,n);case 19:return KV(t,e,n);case 22:return VV(t,e,n)}throw Error(ke(156,e.tag))};function u8(t,e){return LH(t,e)}function Ife(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zo(t,e,n,r){return new Ife(t,e,n,r)}function Yj(t){return t=t.prototype,!(!t||!t.isReactComponent)}function jfe(t){if(typeof t=="function")return Yj(t)?1:0;if(t!=null){if(t=t.$$typeof,t===pj)return 11;if(t===mj)return 14}return 2}function Jd(t,e){var n=t.alternate;return n===null?(n=Zo(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function J1(t,e,n,r,s,i){var o=2;if(r=t,typeof t=="function")Yj(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Bm:return up(n.children,s,i,e);case hj:o=8,s|=8;break;case xD:return t=Zo(12,n,e,s|2),t.elementType=xD,t.lanes=i,t;case wD:return t=Zo(13,n,e,s),t.elementType=wD,t.lanes=i,t;case _D:return t=Zo(19,n,e,s),t.elementType=_D,t.lanes=i,t;case xH:return HR(n,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case yH:o=10;break e;case bH:o=9;break e;case pj:o=11;break e;case mj:o=14;break e;case Ju:o=16,r=null;break e}throw Error(ke(130,t==null?t:typeof t,""))}return e=Zo(o,n,e,s),e.elementType=t,e.type=r,e.lanes=i,e}function up(t,e,n,r){return t=Zo(7,t,r,e),t.lanes=n,t}function HR(t,e,n,r){return t=Zo(22,t,r,e),t.elementType=xH,t.lanes=n,t.stateNode={isHidden:!1},t}function DT(t,e,n){return t=Zo(6,t,null,e),t.lanes=n,t}function MT(t,e,n){return e=Zo(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Lfe(t,e,n,r,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=hT(0),this.expirationTimes=hT(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hT(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Xj(t,e,n,r,s,i,o,a,c){return t=new Lfe(t,e,n,a,c),e===1?(e=1,i===!0&&(e|=8)):e=0,i=Zo(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mj(i),t}function $fe(t,e,n){var r=3 "u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(p8)}catch(t){console.error(t)}}p8(),pH.exports=So;var rs=pH.exports;const KR=_u(rs),Hfe=nH({__proto__:null,default:KR},[rs]);var Iz=rs;yD.createRoot=Iz.createRoot,yD.hydrateRoot=Iz.hydrateRoot;const m8=S.createContext({}),Vfe=({children:t,authActions:e})=>{const n=i=>{var o;try{return Promise.resolve((o=e.login)==null?void 0:o.call(e,i))}catch(a){return console.error(a),Promise.reject(a)}},r=i=>{var o;try{return Promise.resolve((o=e.logout)==null?void 0:o.call(e,i))}catch(a){return console.error(a),Promise.reject(a)}},s=async()=>{var i;try{return Promise.resolve((i=e.check)==null?void 0:i.call(e))}catch(o){return console.error(o),Promise.reject(o)}};return w.jsx(m8.Provider,{value:{...e,login:n,logout:r,check:s},children:t})},YR=()=>{const t=S.useContext(m8);if(t===null)throw new Error("useAuth must be used within a AuthProvider");return t};var oy=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Bv=typeof window>"u"||"Deno"in globalThis;function Uo(){}function qfe(t,e){return typeof t=="function"?t(e):t}function dM(t){return typeof t=="number"&&t>=0&&t!==1/0}function g8(t,e){return Math.max(t+(e||0)-Date.now(),0)}function ug(t,e){return typeof t=="function"?t(e):t}function La(t,e){return typeof t=="function"?t(e):t}function jz(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==eL(o,e.options))return!1}else if(!X0(e.queryKey,o))return!1}if(n!=="all"){const c=e.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||s&&s!==e.state.fetchStatus||i&&!i(e))}function Lz(t,e){const{exact:n,status:r,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(n){if(xp(e.options.mutationKey)!==xp(i))return!1}else if(!X0(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function eL(t,e){return((e==null?void 0:e.queryKeyHashFn)||xp)(t)}function xp(t){return JSON.stringify(t,(e,n)=>fM(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function X0(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!X0(t[n],e[n])):!1}function v8(t,e){if(t===e)return t;const n=$z(t)&&$z(e);if(n||fM(t)&&fM(e)){const r=n?t:Object.keys(t),s=r.length,i=n?e:Object.keys(e),o=i.length,a=n?[]:{};let c=0;for(let u=0;u {setTimeout(e,t)})}function hM(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?v8(t,e):e}function y8(t){return t}function Gfe(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function Kfe(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var b8=Symbol();function x8(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===b8?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var ah,hd,Rg,V6,Yfe=(V6=class extends oy{constructor(){super();B(this,ah);B(this,hd);B(this,Rg);$(this,Rg,e=>{if(!Bv&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){A(this,hd)||this.setEventListener(A(this,Rg))}onUnsubscribe(){var e;this.hasListeners()||((e=A(this,hd))==null||e.call(this),$(this,hd,void 0))}setEventListener(e){var n;$(this,Rg,e),(n=A(this,hd))==null||n.call(this),$(this,hd,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){A(this,ah)!==e&&($(this,ah,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof A(this,ah)=="boolean"?A(this,ah):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},ah=new WeakMap,hd=new WeakMap,Rg=new WeakMap,V6),tL=new Yfe,Ag,pd,Pg,q6,Xfe=(q6=class extends oy{constructor(){super();B(this,Ag,!0);B(this,pd);B(this,Pg);$(this,Pg,e=>{if(!Bv&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){A(this,pd)||this.setEventListener(A(this,Pg))}onUnsubscribe(){var e;this.hasListeners()||((e=A(this,pd))==null||e.call(this),$(this,pd,void 0))}setEventListener(e){var n;$(this,Pg,e),(n=A(this,pd))==null||n.call(this),$(this,pd,e(this.setOnline.bind(this)))}setOnline(e){A(this,Ag)!==e&&($(this,Ag,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return A(this,Ag)}},Ag=new WeakMap,pd=new WeakMap,Pg=new WeakMap,q6),fE=new Xfe;function Qfe(t){return Math.min(1e3*2**t,3e4)}function w8(t){return(t??"online")==="online"?fE.isOnline():!0}var _8=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function OT(t){return t instanceof _8}function S8(t){let e=!1,n=0,r=!1,s,i,o;const a=new Promise((g,v)=>{i=g,o=v}),c=g=>{var v;r||(h(new _8(g)),(v=t.abort)==null||v.call(t))},u=()=>{e=!0},f=()=>{e=!1},l=()=>tL.isFocused()&&(t.networkMode==="always"||fE.isOnline())&&t.canRun(),d=()=>w8(t.networkMode)&&t.canRun(),p=g=>{var v;r||(r=!0,(v=t.onSuccess)==null||v.call(t,g),s==null||s(),i(g))},h=g=>{var v;r||(r=!0,(v=t.onError)==null||v.call(t,g),s==null||s(),o(g))},m=()=>new Promise(g=>{var v;s=b=>{(r||l())&&g(b)},(v=t.onPause)==null||v.call(t)}).then(()=>{var g;s=void 0,r||(g=t.onContinue)==null||g.call(t)}),y=()=>{if(r)return;let g;const v=n===0?t.initialPromise:void 0;try{g=v??t.fn()}catch(b){g=Promise.reject(b)}Promise.resolve(g).then(p).catch(b=>{var E;if(r)return;const _=t.retry??(Bv?0:3),R=t.retryDelay??Qfe,P=typeof R=="function"?R(n,b):R,T=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,b);if(e||!T){h(b);return}n++,(E=t.onFail)==null||E.call(t,n,b),Wfe(P).then(()=>l()?void 0:m()).then(()=>{e?h(b):y()})})};return{promise:a,cancel:c,continue:()=>(s==null||s(),a),cancelRetry:u,continueRetry:f,canStart:d,start:()=>(d()?y():m().then(y),a)}}function Zfe(){let t=[],e=0,n=d=>{d()},r=d=>{d()},s=d=>setTimeout(d,0);const i=d=>{s=d},o=d=>{let p;e++;try{p=d()}finally{e--,e||u()}return p},a=d=>{e?t.push(d):s(()=>{n(d)})},c=d=>(...p)=>{a(()=>{d(...p)})},u=()=>{const d=t;t=[],d.length&&s(()=>{r(()=>{d.forEach(p=>{n(p)})})})};return{batch:o,batchCalls:c,schedule:a,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{r=d},setScheduler:i}}var qr=Zfe(),lh,W6,C8=(W6=class{constructor(){B(this,lh)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),dM(this.gcTime)&&$(this,lh,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Bv?1/0:5*60*1e3))}clearGcTimeout(){A(this,lh)&&(clearTimeout(A(this,lh)),$(this,lh,void 0))}},lh=new WeakMap,W6),Ng,Tg,Lo,Ns,wx,ch,xa,pc,G6,Jfe=(G6=class extends C8{constructor(e){super();B(this,xa);B(this,Ng);B(this,Tg);B(this,Lo);B(this,Ns);B(this,wx);B(this,ch);$(this,ch,!1),$(this,wx,e.defaultOptions),this.setOptions(e.options),this.observers=[],$(this,Lo,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,$(this,Ng,ehe(this.options)),this.state=e.state??A(this,Ng),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=A(this,Ns))==null?void 0:e.promise}setOptions(e){this.options={...A(this,wx),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&A(this,Lo).remove(this)}setData(e,n){const r=hM(this.state.data,e,this.options);return z(this,xa,pc).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){z(this,xa,pc).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,s;const n=(r=A(this,Ns))==null?void 0:r.promise;return(s=A(this,Ns))==null||s.cancel(e),n?n.then(Uo).catch(Uo):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(A(this,Ng))}isActive(){return this.observers.some(e=>La(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!g8(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=A(this,Ns))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=A(this,Ns))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),A(this,Lo).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(A(this,Ns)&&(A(this,ch)?A(this,Ns).cancel({revert:!0}):A(this,Ns).cancelRetry()),this.scheduleGc()),A(this,Lo).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||z(this,xa,pc).call(this,{type:"invalidate"})}fetch(e,n){var c,u,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(A(this,Ns))return A(this,Ns).continueRetry(),A(this,Ns).promise}if(e&&this.setOptions(e),!this.options.queryFn){const l=this.observers.find(d=>d.options.queryFn);l&&this.setOptions(l.options)}const r=new AbortController,s=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>($(this,ch,!0),r.signal)})},i=()=>{const l=x8(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return s(d),$(this,ch,!1),this.options.persister?this.options.persister(l,d,this):l(d)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};s(o),(c=this.options.behavior)==null||c.onFetch(o,this),$(this,Tg,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&z(this,xa,pc).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const a=l=>{var d,p,h,m;OT(l)&&l.silent||z(this,xa,pc).call(this,{type:"error",error:l}),OT(l)||((p=(d=A(this,Lo).config).onError)==null||p.call(d,l,this),(m=(h=A(this,Lo).config).onSettled)==null||m.call(h,this.state.data,l,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return $(this,Ns,S8({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:l=>{var d,p,h,m;if(l===void 0){a(new Error(`${this.queryHash} data is undefined`));return}this.setData(l),(p=(d=A(this,Lo).config).onSuccess)==null||p.call(d,l,this),(m=(h=A(this,Lo).config).onSettled)==null||m.call(h,l,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:a,onFail:(l,d)=>{z(this,xa,pc).call(this,{type:"failed",failureCount:l,error:d})},onPause:()=>{z(this,xa,pc).call(this,{type:"pause"})},onContinue:()=>{z(this,xa,pc).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),A(this,Ns).start()}},Ng=new WeakMap,Tg=new WeakMap,Lo=new WeakMap,Ns=new WeakMap,wx=new WeakMap,ch=new WeakMap,xa=new WeakSet,pc=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...E8(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return OT(s)&&s.revert&&A(this,Tg)?{...A(this,Tg),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),qr.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),A(this,Lo).notify({query:this,type:"updated",action:e})})},G6);function E8(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:w8(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function ehe(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var ll,K6,the=(K6=class extends oy{constructor(e={}){super();B(this,ll);this.config=e,$(this,ll,new Map)}build(e,n,r){const s=n.queryKey,i=n.queryHash??eL(s,n);let o=this.get(i);return o||(o=new Jfe({cache:this,queryKey:s,queryHash:i,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){A(this,ll).has(e.queryHash)||(A(this,ll).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=A(this,ll).get(e.queryHash);n&&(e.destroy(),n===e&&A(this,ll).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){qr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return A(this,ll).get(e)}getAll(){return[...A(this,ll).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>jz(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>jz(e,r)):n}notify(e){qr.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){qr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){qr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ll=new WeakMap,K6),cl,qs,uh,ul,Wu,Y6,nhe=(Y6=class extends C8{constructor(e){super();B(this,ul);B(this,cl);B(this,qs);B(this,uh);this.mutationId=e.mutationId,$(this,qs,e.mutationCache),$(this,cl,[]),this.state=e.state||R8(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){A(this,cl).includes(e)||(A(this,cl).push(e),this.clearGcTimeout(),A(this,qs).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){$(this,cl,A(this,cl).filter(n=>n!==e)),this.scheduleGc(),A(this,qs).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){A(this,cl).length||(this.state.status==="pending"?this.scheduleGc():A(this,qs).remove(this))}continue(){var e;return((e=A(this,uh))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var s,i,o,a,c,u,f,l,d,p,h,m,y,g,v,b,_,R,P,T;$(this,uh,S8({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(E,N)=>{z(this,ul,Wu).call(this,{type:"failed",failureCount:E,error:N})},onPause:()=>{z(this,ul,Wu).call(this,{type:"pause"})},onContinue:()=>{z(this,ul,Wu).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>A(this,qs).canRun(this)}));const n=this.state.status==="pending",r=!A(this,uh).canStart();try{if(!n){z(this,ul,Wu).call(this,{type:"pending",variables:e,isPaused:r}),await((i=(s=A(this,qs).config).onMutate)==null?void 0:i.call(s,e,this));const N=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,e));N!==this.state.context&&z(this,ul,Wu).call(this,{type:"pending",context:N,variables:e,isPaused:r})}const E=await A(this,uh).start();return await((u=(c=A(this,qs).config).onSuccess)==null?void 0:u.call(c,E,e,this.state.context,this)),await((l=(f=this.options).onSuccess)==null?void 0:l.call(f,E,e,this.state.context)),await((p=(d=A(this,qs).config).onSettled)==null?void 0:p.call(d,E,null,this.state.variables,this.state.context,this)),await((m=(h=this.options).onSettled)==null?void 0:m.call(h,E,null,e,this.state.context)),z(this,ul,Wu).call(this,{type:"success",data:E}),E}catch(E){try{throw await((g=(y=A(this,qs).config).onError)==null?void 0:g.call(y,E,e,this.state.context,this)),await((b=(v=this.options).onError)==null?void 0:b.call(v,E,e,this.state.context)),await((R=(_=A(this,qs).config).onSettled)==null?void 0:R.call(_,void 0,E,this.state.variables,this.state.context,this)),await((T=(P=this.options).onSettled)==null?void 0:T.call(P,void 0,E,e,this.state.context)),E}finally{z(this,ul,Wu).call(this,{type:"error",error:E})}}finally{A(this,qs).runNext(this)}}},cl=new WeakMap,qs=new WeakMap,uh=new WeakMap,ul=new WeakSet,Wu=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),qr.batch(()=>{A(this,cl).forEach(r=>{r.onMutationUpdate(e)}),A(this,qs).notify({mutation:this,type:"updated",action:e})})},Y6);function R8(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var to,_x,X6,rhe=(X6=class extends oy{constructor(e={}){super();B(this,to);B(this,_x);this.config=e,$(this,to,new Map),$(this,_x,Date.now())}build(e,n,r){const s=new nhe({mutationCache:this,mutationId:++Ss(this,_x)._,options:e.defaultMutationOptions(n),state:r});return this.add(s),s}add(e){const n=a1(e),r=A(this,to).get(n)??[];r.push(e),A(this,to).set(n,r),this.notify({type:"added",mutation:e})}remove(e){var r;const n=a1(e);if(A(this,to).has(n)){const s=(r=A(this,to).get(n))==null?void 0:r.filter(i=>i!==e);s&&(s.length===0?A(this,to).delete(n):A(this,to).set(n,s))}this.notify({type:"removed",mutation:e})}canRun(e){var r;const n=(r=A(this,to).get(a1(e)))==null?void 0:r.find(s=>s.state.status==="pending");return!n||n===e}runNext(e){var r;const n=(r=A(this,to).get(a1(e)))==null?void 0:r.find(s=>s!==e&&s.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){qr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...A(this,to).values()].flat()}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Lz(n,r))}findAll(e={}){return this.getAll().filter(n=>Lz(e,n))}notify(e){qr.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return qr.batch(()=>Promise.all(e.map(n=>n.continue().catch(Uo))))}},to=new WeakMap,_x=new WeakMap,X6);function a1(t){var e;return((e=t.options.scope)==null?void 0:e.id)??String(t.mutationId)}function she(t){return{onFetch:(e,n)=>{const r=async()=>{var h,m,y,g,v;const s=e.options,i=(y=(m=(h=e.fetchOptions)==null?void 0:h.meta)==null?void 0:m.fetchMore)==null?void 0:y.direction,o=((g=e.state.data)==null?void 0:g.pages)||[],a=((v=e.state.data)==null?void 0:v.pageParams)||[],c={pages:[],pageParams:[]};let u=!1;const f=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(e.signal.aborted?u=!0:e.signal.addEventListener("abort",()=>{u=!0}),e.signal)})},l=x8(e.options,e.fetchOptions),d=async(b,_,R)=>{if(u)return Promise.reject();if(_==null&&b.pages.length)return Promise.resolve(b);const P={queryKey:e.queryKey,pageParam:_,direction:R?"backward":"forward",meta:e.options.meta};f(P);const T=await l(P),{maxPages:E}=e.options,N=R?Kfe:Gfe;return{pages:N(b.pages,T,E),pageParams:N(b.pageParams,_,E)}};let p;if(i&&o.length){const b=i==="backward",_=b?ihe:zz,R={pages:o,pageParams:a},P=_(s,R);p=await d(R,P,b)}else{p=await d(c,a[0]??s.initialPageParam);const b=t??o.length;for(let _=1;_{var s,i;return(i=(s=e.options).persister)==null?void 0:i.call(s,r,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=r}}}function zz(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function ihe(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var dr,md,gd,kg,Dg,vd,Mg,Og,Q6,ohe=(Q6=class{constructor(t={}){B(this,dr);B(this,md);B(this,gd);B(this,kg);B(this,Dg);B(this,vd);B(this,Mg);B(this,Og);$(this,dr,t.queryCache||new the),$(this,md,t.mutationCache||new rhe),$(this,gd,t.defaultOptions||{}),$(this,kg,new Map),$(this,Dg,new Map),$(this,vd,0)}mount(){Ss(this,vd)._++,A(this,vd)===1&&($(this,Mg,tL.subscribe(async t=>{t&&(await this.resumePausedMutations(),A(this,dr).onFocus())})),$(this,Og,fE.subscribe(async t=>{t&&(await this.resumePausedMutations(),A(this,dr).onOnline())})))}unmount(){var t,e;Ss(this,vd)._--,A(this,vd)===0&&((t=A(this,Mg))==null||t.call(this),$(this,Mg,void 0),(e=A(this,Og))==null||e.call(this),$(this,Og,void 0))}isFetching(t){return A(this,dr).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return A(this,md).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=A(this,dr).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.getQueryData(t.queryKey);if(e===void 0)return this.fetchQuery(t);{const n=this.defaultQueryOptions(t),r=A(this,dr).build(this,n);return t.revalidateIfStale&&r.isStaleByTime(ug(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(e)}}getQueriesData(t){return A(this,dr).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),s=A(this,dr).get(r.queryHash),i=s==null?void 0:s.state.data,o=qfe(e,i);if(o!==void 0)return A(this,dr).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return qr.batch(()=>A(this,dr).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=A(this,dr).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=A(this,dr);qr.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=A(this,dr),r={type:"active",...t};return qr.batch(()=>(n.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries(r,e)))}cancelQueries(t={},e={}){const n={revert:!0,...e},r=qr.batch(()=>A(this,dr).findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(Uo).catch(Uo)}invalidateQueries(t={},e={}){return qr.batch(()=>{if(A(this,dr).findAll(t).forEach(r=>{r.invalidate()}),t.refetchType==="none")return Promise.resolve();const n={...t,type:t.refetchType??t.type??"active"};return this.refetchQueries(n,e)})}refetchQueries(t={},e){const n={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},r=qr.batch(()=>A(this,dr).findAll(t).filter(s=>!s.isDisabled()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Uo)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Uo)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=A(this,dr).build(this,e);return n.isStaleByTime(ug(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Uo).catch(Uo)}fetchInfiniteQuery(t){return t.behavior=she(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Uo).catch(Uo)}resumePausedMutations(){return fE.isOnline()?A(this,md).resumePausedMutations():Promise.resolve()}getQueryCache(){return A(this,dr)}getMutationCache(){return A(this,md)}getDefaultOptions(){return A(this,gd)}setDefaultOptions(t){$(this,gd,t)}setQueryDefaults(t,e){A(this,kg).set(xp(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...A(this,kg).values()];let n={};return e.forEach(r=>{X0(t,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(t,e){A(this,Dg).set(xp(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...A(this,Dg).values()];let n={};return e.forEach(r=>{X0(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...A(this,gd).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=eL(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===b8&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...A(this,gd).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){A(this,dr).clear(),A(this,md).clear()}},dr=new WeakMap,md=new WeakMap,gd=new WeakMap,kg=new WeakMap,Dg=new WeakMap,vd=new WeakMap,Mg=new WeakMap,Og=new WeakMap,Q6),xi,Ht,Sx,Ws,dh,Ig,dl,Cx,jg,Lg,fh,hh,yd,$g,fn,zb,pM,mM,gM,vM,yM,bM,xM,A8,Z6,ahe=(Z6=class extends oy{constructor(e,n){super();B(this,fn);B(this,xi);B(this,Ht);B(this,Sx);B(this,Ws);B(this,dh);B(this,Ig);B(this,dl);B(this,Cx);B(this,jg);B(this,Lg);B(this,fh);B(this,hh);B(this,yd);B(this,$g,new Set);this.options=n,$(this,xi,e),$(this,dl,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(A(this,Ht).addObserver(this),Bz(A(this,Ht),this.options)?z(this,fn,zb).call(this):this.updateResult(),z(this,fn,vM).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return wM(A(this,Ht),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return wM(A(this,Ht),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,z(this,fn,yM).call(this),z(this,fn,bM).call(this),A(this,Ht).removeObserver(this)}setOptions(e,n){const r=this.options,s=A(this,Ht);if(this.options=A(this,xi).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof La(this.options.enabled,A(this,Ht))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");z(this,fn,xM).call(this),A(this,Ht).setOptions(this.options),r._defaulted&&!dE(this.options,r)&&A(this,xi).getQueryCache().notify({type:"observerOptionsUpdated",query:A(this,Ht),observer:this});const i=this.hasListeners();i&&Uz(A(this,Ht),s,this.options,r)&&z(this,fn,zb).call(this),this.updateResult(n),i&&(A(this,Ht)!==s||La(this.options.enabled,A(this,Ht))!==La(r.enabled,A(this,Ht))||ug(this.options.staleTime,A(this,Ht))!==ug(r.staleTime,A(this,Ht)))&&z(this,fn,pM).call(this);const o=z(this,fn,mM).call(this);i&&(A(this,Ht)!==s||La(this.options.enabled,A(this,Ht))!==La(r.enabled,A(this,Ht))||o!==A(this,yd))&&z(this,fn,gM).call(this,o)}getOptimisticResult(e){const n=A(this,xi).getQueryCache().build(A(this,xi),e),r=this.createResult(n,e);return che(this,r)&&($(this,Ws,r),$(this,Ig,this.options),$(this,dh,A(this,Ht).state)),r}getCurrentResult(){return A(this,Ws)}trackResult(e,n){const r={};return Object.keys(e).forEach(s=>{Object.defineProperty(r,s,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(s),n==null||n(s),e[s])})}),r}trackProp(e){A(this,$g).add(e)}getCurrentQuery(){return A(this,Ht)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=A(this,xi).defaultQueryOptions(e),r=A(this,xi).getQueryCache().build(A(this,xi),n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(e){return z(this,fn,zb).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),A(this,Ws)))}createResult(e,n){var T;const r=A(this,Ht),s=this.options,i=A(this,Ws),o=A(this,dh),a=A(this,Ig),u=e!==r?e.state:A(this,Sx),{state:f}=e;let l={...f},d=!1,p;if(n._optimisticResults){const E=this.hasListeners(),N=!E&&Bz(e,n),k=E&&Uz(e,r,n,s);(N||k)&&(l={...l,...E8(f.data,e.options)}),n._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:h,errorUpdatedAt:m,status:y}=l;if(n.select&&l.data!==void 0)if(i&&l.data===(o==null?void 0:o.data)&&n.select===A(this,Cx))p=A(this,jg);else try{$(this,Cx,n.select),p=n.select(l.data),p=hM(i==null?void 0:i.data,p,n),$(this,jg,p),$(this,dl,null)}catch(E){$(this,dl,E)}else p=l.data;if(n.placeholderData!==void 0&&p===void 0&&y==="pending"){let E;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))E=i.data;else if(E=typeof n.placeholderData=="function"?n.placeholderData((T=A(this,Lg))==null?void 0:T.state.data,A(this,Lg)):n.placeholderData,n.select&&E!==void 0)try{E=n.select(E),$(this,dl,null)}catch(N){$(this,dl,N)}E!==void 0&&(y="success",p=hM(i==null?void 0:i.data,E,n),d=!0)}A(this,dl)&&(h=A(this,dl),p=A(this,jg),m=Date.now(),y="error");const g=l.fetchStatus==="fetching",v=y==="pending",b=y==="error",_=v&&g,R=p!==void 0;return{status:y,fetchStatus:l.fetchStatus,isPending:v,isSuccess:y==="success",isError:b,isInitialLoading:_,isLoading:_,data:p,dataUpdatedAt:l.dataUpdatedAt,error:h,errorUpdatedAt:m,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>u.dataUpdateCount||l.errorUpdateCount>u.errorUpdateCount,isFetching:g,isRefetching:g&&!v,isLoadingError:b&&!R,isPaused:l.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:b&&R,isStale:nL(e,n),refetch:this.refetch}}updateResult(e){const n=A(this,Ws),r=this.createResult(A(this,Ht),this.options);if($(this,dh,A(this,Ht).state),$(this,Ig,this.options),A(this,dh).data!==void 0&&$(this,Lg,A(this,Ht)),dE(r,n))return;$(this,Ws,r);const s={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!A(this,$g).size)return!0;const c=new Set(a??A(this,$g));return this.options.throwOnError&&c.add("error"),Object.keys(A(this,Ws)).some(u=>{const f=u;return A(this,Ws)[f]!==n[f]&&c.has(f)})};(e==null?void 0:e.listeners)!==!1&&i()&&(s.listeners=!0),z(this,fn,A8).call(this,{...s,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&z(this,fn,vM).call(this)}},xi=new WeakMap,Ht=new WeakMap,Sx=new WeakMap,Ws=new WeakMap,dh=new WeakMap,Ig=new WeakMap,dl=new WeakMap,Cx=new WeakMap,jg=new WeakMap,Lg=new WeakMap,fh=new WeakMap,hh=new WeakMap,yd=new WeakMap,$g=new WeakMap,fn=new WeakSet,zb=function(e){z(this,fn,xM).call(this);let n=A(this,Ht).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Uo)),n},pM=function(){z(this,fn,yM).call(this);const e=ug(this.options.staleTime,A(this,Ht));if(Bv||A(this,Ws).isStale||!dM(e))return;const r=g8(A(this,Ws).dataUpdatedAt,e)+1;$(this,fh,setTimeout(()=>{A(this,Ws).isStale||this.updateResult()},r))},mM=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(A(this,Ht)):this.options.refetchInterval)??!1},gM=function(e){z(this,fn,bM).call(this),$(this,yd,e),!(Bv||La(this.options.enabled,A(this,Ht))===!1||!dM(A(this,yd))||A(this,yd)===0)&&$(this,hh,setInterval(()=>{(this.options.refetchIntervalInBackground||tL.isFocused())&&z(this,fn,zb).call(this)},A(this,yd)))},vM=function(){z(this,fn,pM).call(this),z(this,fn,gM).call(this,z(this,fn,mM).call(this))},yM=function(){A(this,fh)&&(clearTimeout(A(this,fh)),$(this,fh,void 0))},bM=function(){A(this,hh)&&(clearInterval(A(this,hh)),$(this,hh,void 0))},xM=function(){const e=A(this,xi).getQueryCache().build(A(this,xi),this.options);if(e===A(this,Ht))return;const n=A(this,Ht);$(this,Ht,e),$(this,Sx,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},A8=function(e){qr.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(A(this,Ws))}),A(this,xi).getQueryCache().notify({query:A(this,Ht),type:"observerResultsUpdated"})})},Z6);function lhe(t,e){return La(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function Bz(t,e){return lhe(t,e)||t.state.data!==void 0&&wM(t,e,e.refetchOnMount)}function wM(t,e,n){if(La(e.enabled,t)!==!1){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&nL(t,e)}return!1}function Uz(t,e,n,r){return(t!==e||La(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&nL(t,n)}function nL(t,e){return La(e.enabled,t)!==!1&&t.isStaleByTime(ug(e.staleTime,t))}function che(t,e){return!dE(t.getCurrentResult(),e)}var bd,xd,wi,Cc,uu,eC,_M,J6,uhe=(J6=class extends oy{constructor(n,r){super();B(this,uu);B(this,bd);B(this,xd);B(this,wi);B(this,Cc);$(this,bd,n),this.setOptions(r),this.bindMethods(),z(this,uu,eC).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=A(this,bd).defaultMutationOptions(n),dE(this.options,r)||A(this,bd).getMutationCache().notify({type:"observerOptionsUpdated",mutation:A(this,wi),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&xp(r.mutationKey)!==xp(this.options.mutationKey)?this.reset():((s=A(this,wi))==null?void 0:s.state.status)==="pending"&&A(this,wi).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=A(this,wi))==null||n.removeObserver(this)}onMutationUpdate(n){z(this,uu,eC).call(this),z(this,uu,_M).call(this,n)}getCurrentResult(){return A(this,xd)}reset(){var n;(n=A(this,wi))==null||n.removeObserver(this),$(this,wi,void 0),z(this,uu,eC).call(this),z(this,uu,_M).call(this)}mutate(n,r){var s;return $(this,Cc,r),(s=A(this,wi))==null||s.removeObserver(this),$(this,wi,A(this,bd).getMutationCache().build(A(this,bd),this.options)),A(this,wi).addObserver(this),A(this,wi).execute(n)}},bd=new WeakMap,xd=new WeakMap,wi=new WeakMap,Cc=new WeakMap,uu=new WeakSet,eC=function(){var r;const n=((r=A(this,wi))==null?void 0:r.state)??R8();$(this,xd,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},_M=function(n){qr.batch(()=>{var r,s,i,o,a,c,u,f;if(A(this,Cc)&&this.hasListeners()){const l=A(this,xd).variables,d=A(this,xd).context;(n==null?void 0:n.type)==="success"?((s=(r=A(this,Cc)).onSuccess)==null||s.call(r,n.data,l,d),(o=(i=A(this,Cc)).onSettled)==null||o.call(i,n.data,null,l,d)):(n==null?void 0:n.type)==="error"&&((c=(a=A(this,Cc)).onError)==null||c.call(a,n.error,l,d),(f=(u=A(this,Cc)).onSettled)==null||f.call(u,void 0,n.error,l,d))}this.listeners.forEach(l=>{l(A(this,xd))})})},J6),P8=S.createContext(void 0),eu=t=>{const e=S.useContext(P8);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},dhe=({client:t,children:e})=>(S.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),w.jsx(P8.Provider,{value:t,children:e})),N8=S.createContext(!1),fhe=()=>S.useContext(N8);N8.Provider;function hhe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var phe=S.createContext(hhe()),mhe=()=>S.useContext(phe);function T8(t,e){return typeof t=="function"?t(...e):!!t}function ghe(){}var vhe=(t,e)=>{(t.suspense||t.throwOnError)&&(e.isReset()||(t.retryOnMount=!1))},yhe=t=>{S.useEffect(()=>{t.clearReset()},[t])},bhe=({result:t,errorResetBoundary:e,throwOnError:n,query:r})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&T8(n,[t.error,r]),xhe=t=>{t.suspense&&(typeof t.staleTime!="number"&&(t.staleTime=1e3),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3)))},whe=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,_he=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function She(t,e,n){var u,f,l,d;const r=eu(),s=fhe(),i=mhe(),o=r.defaultQueryOptions(t);(f=(u=r.getDefaultOptions().queries)==null?void 0:u._experimental_beforeQuery)==null||f.call(u,o),o._optimisticResults=s?"isRestoring":"optimistic",xhe(o),vhe(o,i),yhe(i);const[a]=S.useState(()=>new e(r,o)),c=a.getOptimisticResult(o);if(S.useSyncExternalStore(S.useCallback(p=>{const h=s?()=>{}:a.subscribe(qr.batchCalls(p));return a.updateResult(),h},[a,s]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),S.useEffect(()=>{a.setOptions(o,{listeners:!1})},[o,a]),whe(o,c))throw _he(o,a,i);if(bhe({result:c,errorResetBoundary:i,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;return(d=(l=r.getDefaultOptions().queries)==null?void 0:l._experimental_afterQuery)==null||d.call(l,o,c),o.notifyOnChangeProps?c:a.trackResult(c)}function XR(t,e){return She(t,ahe)}function ru(t,e){const n=eu(),[r]=S.useState(()=>new uhe(n,t));S.useEffect(()=>{r.setOptions(t)},[r,t]);const s=S.useSyncExternalStore(S.useCallback(o=>r.subscribe(qr.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=S.useCallback((o,a)=>{r.mutate(o,a).catch(ghe)},[r]);if(s.error&&T8(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}class ia{constructor(e=[]){Te(this,"segments",[]);this.segments=e}key(){return this.segments}get(){return this.segments}}class gf extends ia{params(e){return new ia([...this.segments,e])}}class Che extends ia{id(e){return new gf([...this.segments,e?String(e):void 0])}}class Ehe extends ia{ids(...e){return new gf([...this.segments,...e.length?[e.map(n=>String(n))]:[]])}}class Rhe extends ia{action(e){if(["one","report"].includes(e))return new Che([...this.segments,e]);if(e==="many")return new Ehe([...this.segments,e]);if(["list","infinite"].includes(e))return new gf([...this.segments,e]);throw new Error("Invalid action type")}}class Ahe extends ia{resource(e){return new Rhe([...this.segments,e])}mutation(e){return new gf([...e==="custom"?this.segments:[this.segments[0]],e])}}class Phe extends ia{action(e){return new gf([...this.segments,e])}}class Nhe extends ia{action(e){return new gf([...this.segments,e])}}class The extends ia{resource(e){return new Nhe([...this.segments,e])}}class khe extends ia{action(e){return new gf([...this.segments,e])}}class Dhe extends ia{resource(e){return new khe([...this.segments,e])}action(e){return new gf([...this.segments,e])}}class Mhe extends ia{data(e){return new Ahe(["data",e||"default"])}auth(){return new Phe(["auth"])}access(){return new The(["access"])}audit(){return new Dhe(["audit"])}}const Ohe=()=>new Mhe([]),vu=()=>Ohe,k8=t=>{const e=vu(),{getProfile:n}=YR();return XR({queryKey:e().auth().action("profile").get(),queryFn:n,...t})},D8=t=>{const e=vu(),{check:n}=YR();return XR({queryKey:e().auth().action("check").get(),queryFn:n,retry:!1,...t})};/** * @remix-run/router v1.19.0 * * Copyright (c) Remix Software Inc. @@ -46,9 +46,9 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function tr(){return tr=Object.assign?Object.assign.bind():function(t){for(var e=1;e "u")throw new Error(e)}function Uv(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Ihe(){return Math.random().toString(36).substr(2,8)}function qz(t,e){return{usr:t.state,key:t.key,idx:e}}function Q0(t,e,n,r){return n===void 0&&(n=null),tr({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?vf(e):e,{state:n,key:e&&e.key||r||Ihe()})}function wp(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function vf(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function jhe(t,e,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Pr.Pop,c=null,u=f();u==null&&(u=0,o.replaceState(tr({},o.state,{idx:u}),""));function f(){return(o.state||{idx:null}).idx}function l(){a=Pr.Pop;let y=f(),g=y==null?null:y-u;u=y,c&&c({action:a,location:m.location,delta:g})}function d(y,g){a=Pr.Push;let v=Q0(m.location,y,g);u=f()+1;let b=qz(v,u),_=m.createHref(v);try{o.pushState(b,"",_)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;s.location.assign(_)}i&&c&&c({action:a,location:m.location,delta:1})}function p(y,g){a=Pr.Replace;let v=Q0(m.location,y,g);u=f();let b=qz(v,u),_=m.createHref(v);o.replaceState(b,"",_),i&&c&&c({action:a,location:m.location,delta:0})}function h(y){let g=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof y=="string"?y:wp(y);return v=v.replace(/ $/,"%20"),Ot(g,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,g)}let m={get action(){return a},get location(){return t(s,o)},listen(y){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(Vz,l),c=y,()=>{s.removeEventListener(Vz,l),c=null}},createHref(y){return e(s,y)},createURL:h,encodeLocation(y){let g=h(y);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:d,replace:p,go(y){return o.go(y)}};return m}var Rn;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Rn||(Rn={}));const Lhe=new Set(["lazy","caseSensitive","path","id","index","children"]);function $he(t){return t.index===!0}function Z0(t,e,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),t.map((s,i)=>{let o=[...n,String(i)],a=typeof s.id=="string"?s.id:o.join("-");if(Ot(s.index!==!0||!s.children,"Cannot specify children on an index route"),Ot(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),$he(s)){let c=tr({},s,e(s),{id:a});return r[a]=c,c}else{let c=tr({},s,e(s),{id:a,children:void 0});return r[a]=c,s.children&&(c.children=Z0(s.children,e,o,r)),c}})}function Wf(t,e,n){return n===void 0&&(n="/"),tC(t,e,n,!1)}function tC(t,e,n,r){let s=typeof e=="string"?vf(e):e,i=nf(s.pathname||"/",n);if(i==null)return null;let o=O8(t);zhe(o);let a=null;for(let c=0;a==null&&c {let c={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};c.relativePath.startsWith("/")&&(Ot(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=su([r,c.relativePath]),f=n.concat(c);i.children&&i.children.length>0&&(Ot(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),O8(i.children,e,f,u)),!(i.path==null&&!i.index)&&e.push({path:u,score:Ghe(u,i.index),routesMeta:f})};return t.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let c of I8(i.path))s(i,o,c)}),e}function I8(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=I8(r.join("/")),a=[];return a.push(...o.map(c=>c===""?i:[i,c].join("/"))),s&&a.push(...o),a.map(c=>t.startsWith("/")&&c===""?"/":c)}function zhe(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:Khe(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Bhe=/^:[\w-]+$/,Uhe=3,Hhe=2,Vhe=1,qhe=10,Whe=-2,Wz=t=>t==="*";function Ghe(t,e){let n=t.split("/"),r=n.length;return n.some(Wz)&&(r+=Whe),e&&(r+=Hhe),n.filter(s=>!Wz(s)).reduce((s,i)=>s+(Bhe.test(i)?Uhe:i===""?Vhe:qhe),r)}function Khe(t,e){return t.length===e.length&&t.slice(0,-1).every((r,s)=>r===e[s])?t[t.length-1]-e[e.length-1]:0}function Yhe(t,e,n){n===void 0&&(n=!1);let{routesMeta:r}=t,s={},i="/",o=[];for(let a=0;a {let{paramName:d,isOptional:p}=f;if(d==="*"){let m=a[l]||"";o=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const h=a[l];return p&&!h?u[d]=void 0:u[d]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:t}}function Xhe(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),Uv(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,c)=>(r.push({paramName:a,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function Qhe(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Uv(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function nf(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function Zhe(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:s=""}=typeof t=="string"?vf(t):t;return{pathname:n?n.startsWith("/")?n:Jhe(n,e):e,search:tpe(r),hash:npe(s)}}function Jhe(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function OT(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function j8(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function XR(t,e){let n=j8(t);return e?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function QR(t,e,n,r){r===void 0&&(r=!1);let s;typeof t=="string"?s=vf(t):(s=tr({},t),Ot(!s.pathname||!s.pathname.includes("?"),OT("?","pathname","search",s)),Ot(!s.pathname||!s.pathname.includes("#"),OT("#","pathname","hash",s)),Ot(!s.search||!s.search.includes("#"),OT("#","search","hash",s)));let i=t===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let l=e.length-1;if(!r&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),l-=1;s.pathname=d.join("/")}a=l>=0?e[l]:"/"}let c=Zhe(s,a),u=o&&o!=="/"&&o.endsWith("/"),f=(i||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const su=t=>t.join("/").replace(/\/\/+/g,"/"),epe=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),tpe=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,npe=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class hE{constructor(e,n,r,s){s===void 0&&(s=!1),this.status=e,this.statusText=n||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function ZR(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const L8=["post","put","patch","delete"],rpe=new Set(L8),spe=["get",...L8],ipe=new Set(spe),ope=new Set([301,302,303,307,308]),ape=new Set([307,308]),IT={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},lpe={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},km={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},rL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cpe=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),$8="remix-router-transitions";function upe(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",r=!n;Ot(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let s;if(t.mapRouteProperties)s=t.mapRouteProperties;else if(t.detectErrorBoundary){let ne=t.detectErrorBoundary;s=ae=>({hasErrorBoundary:ne(ae)})}else s=cpe;let i={},o=Z0(t.routes,s,void 0,i),a,c=t.basename||"/",u=t.unstable_dataStrategy||mpe,f=t.unstable_patchRoutesOnMiss,l=tr({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},t.future),d=null,p=new Set,h=null,m=null,y=null,g=t.hydrationData!=null,v=Wf(o,t.history.location,c),b=null;if(v==null&&!f){let ne=Ys(404,{pathname:t.history.location.pathname}),{matches:ae,route:ge}=rB(o);v=ae,b={[ge.id]:ne}}v&&!t.hydrationData&&Hi(v,o,t.history.location.pathname).active&&(v=null);let _;if(v)if(v.some(ne=>ne.route.lazy))_=!1;else if(!v.some(ne=>ne.route.loader))_=!0;else if(l.v7_partialHydration){let ne=t.hydrationData?t.hydrationData.loaderData:null,ae=t.hydrationData?t.hydrationData.errors:null,ge=_e=>_e.route.loader?typeof _e.route.loader=="function"&&_e.route.loader.hydrate===!0?!1:ne&&ne[_e.route.id]!==void 0||ae&&ae[_e.route.id]!==void 0:!0;if(ae){let _e=v.findIndex(ze=>ae[ze.route.id]!==void 0);_=v.slice(0,_e+1).every(ge)}else _=v.every(ge)}else _=t.hydrationData!=null;else if(_=!1,v=[],l.v7_partialHydration){let ne=Hi(null,o,t.history.location.pathname);ne.active&&ne.matches&&(v=ne.matches)}let R,P={historyAction:t.history.action,location:t.history.location,matches:v,initialized:_,navigation:IT,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||b,fetchers:new Map,blockers:new Map},T=Pr.Pop,E=!1,N,k=!1,M=new Map,I=null,j=!1,L=!1,U=[],K=new Set,H=new Map,q=0,ee=-1,se=new Map,X=new Set,G=new Map,Y=new Map,Q=new Set,he=new Map,fe=new Map,ce=new Map,xe=!1;function Pe(){if(d=t.history.listen(ne=>{let{action:ae,location:ge,delta:_e}=ne;if(xe){xe=!1;return}Uv(fe.size===0||_e!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ze=Nt({currentLocation:P.location,nextLocation:ge,historyAction:ae});if(ze&&_e!=null){xe=!0,t.history.go(_e*-1),yt(ze,{state:"blocked",location:ge,proceed(){yt(ze,{state:"proceeding",proceed:void 0,reset:void 0,location:ge}),t.history.go(_e)},reset(){let Ge=new Map(P.blockers);Ge.set(ze,km),Me({blockers:Ge})}});return}return nt(ae,ge)}),n){Ppe(e,M);let ne=()=>Npe(e,M);e.addEventListener("pagehide",ne),I=()=>e.removeEventListener("pagehide",ne)}return P.initialized||nt(Pr.Pop,P.location,{initialHydration:!0}),R}function pe(){d&&d(),I&&I(),p.clear(),N&&N.abort(),P.fetchers.forEach((ne,ae)=>_n(ae)),P.blockers.forEach((ne,ae)=>Qe(ae))}function Le(ne){return p.add(ne),()=>p.delete(ne)}function Me(ne,ae){ae===void 0&&(ae={}),P=tr({},P,ne);let ge=[],_e=[];l.v7_fetcherPersist&&P.fetchers.forEach((ze,Ge)=>{ze.state==="idle"&&(Q.has(Ge)?_e.push(Ge):ge.push(Ge))}),[...p].forEach(ze=>ze(P,{deletedFetchers:_e,unstable_viewTransitionOpts:ae.viewTransitionOpts,unstable_flushSync:ae.flushSync===!0})),l.v7_fetcherPersist&&(ge.forEach(ze=>P.fetchers.delete(ze)),_e.forEach(ze=>_n(ze)))}function Oe(ne,ae,ge){var _e,ze;let{flushSync:Ge}=ge===void 0?{}:ge,ut=P.actionData!=null&&P.navigation.formMethod!=null&&Ia(P.navigation.formMethod)&&P.navigation.state==="loading"&&((_e=ne.state)==null?void 0:_e._isRedirect)!==!0,je;ae.actionData?Object.keys(ae.actionData).length>0?je=ae.actionData:je=null:ut?je=P.actionData:je=null;let xt=ae.loaderData?tB(P.loaderData,ae.loaderData,ae.matches||[],ae.errors):P.loaderData,rt=P.blockers;rt.size>0&&(rt=new Map(rt),rt.forEach((tn,hn)=>rt.set(hn,km)));let st=E===!0||P.navigation.formMethod!=null&&Ia(P.navigation.formMethod)&&((ze=ne.state)==null?void 0:ze._isRedirect)!==!0;a&&(o=a,a=void 0),j||T===Pr.Pop||(T===Pr.Push?t.history.push(ne,ne.state):T===Pr.Replace&&t.history.replace(ne,ne.state));let ln;if(T===Pr.Pop){let tn=M.get(P.location.pathname);tn&&tn.has(ne.pathname)?ln={currentLocation:P.location,nextLocation:ne}:M.has(ne.pathname)&&(ln={currentLocation:ne,nextLocation:P.location})}else if(k){let tn=M.get(P.location.pathname);tn?tn.add(ne.pathname):(tn=new Set([ne.pathname]),M.set(P.location.pathname,tn)),ln={currentLocation:P.location,nextLocation:ne}}Me(tr({},ae,{actionData:je,loaderData:xt,historyAction:T,location:ne,initialized:!0,navigation:IT,revalidation:"idle",restoreScrollPosition:Dr(ne,ae.matches||P.matches),preventScrollReset:st,blockers:rt}),{viewTransitionOpts:ln,flushSync:Ge===!0}),T=Pr.Pop,E=!1,k=!1,j=!1,L=!1,U=[]}async function Fe(ne,ae){if(typeof ne=="number"){t.history.go(ne);return}let ge=_M(P.location,P.matches,c,l.v7_prependBasename,ne,l.v7_relativeSplatPath,ae==null?void 0:ae.fromRouteId,ae==null?void 0:ae.relative),{path:_e,submission:ze,error:Ge}=Kz(l.v7_normalizeFormMethod,!1,ge,ae),ut=P.location,je=Q0(P.location,_e,ae&&ae.state);je=tr({},je,t.history.encodeLocation(je));let xt=ae&&ae.replace!=null?ae.replace:void 0,rt=Pr.Push;xt===!0?rt=Pr.Replace:xt===!1||ze!=null&&Ia(ze.formMethod)&&ze.formAction===P.location.pathname+P.location.search&&(rt=Pr.Replace);let st=ae&&"preventScrollReset"in ae?ae.preventScrollReset===!0:void 0,ln=(ae&&ae.unstable_flushSync)===!0,tn=Nt({currentLocation:ut,nextLocation:je,historyAction:rt});if(tn){yt(tn,{state:"blocked",location:je,proceed(){yt(tn,{state:"proceeding",proceed:void 0,reset:void 0,location:je}),Fe(ne,ae)},reset(){let hn=new Map(P.blockers);hn.set(tn,km),Me({blockers:hn})}});return}return await nt(rt,je,{submission:ze,pendingError:Ge,preventScrollReset:st,replace:ae&&ae.replace,enableViewTransition:ae&&ae.unstable_viewTransition,flushSync:ln})}function ot(){if(gt(),Me({revalidation:"loading"}),P.navigation.state!=="submitting"){if(P.navigation.state==="idle"){nt(P.historyAction,P.location,{startUninterruptedRevalidation:!0});return}nt(T||P.historyAction,P.navigation.location,{overrideNavigation:P.navigation})}}async function nt(ne,ae,ge){N&&N.abort(),N=null,T=ne,j=(ge&&ge.startUninterruptedRevalidation)===!0,Cr(P.location,P.matches),E=(ge&&ge.preventScrollReset)===!0,k=(ge&&ge.enableViewTransition)===!0;let _e=a||o,ze=ge&&ge.overrideNavigation,Ge=Wf(_e,ae,c),ut=(ge&&ge.flushSync)===!0,je=Hi(Ge,_e,ae.pathname);if(je.active&&je.matches&&(Ge=je.matches),!Ge){let{error:Jt,notFoundMatches:Mr,route:lr}=_t(ae.pathname);Oe(ae,{matches:Mr,loaderData:{},errors:{[lr.id]:Jt}},{flushSync:ut});return}if(P.initialized&&!L&&wpe(P.location,ae)&&!(ge&&ge.submission&&Ia(ge.submission.formMethod))){Oe(ae,{matches:Ge},{flushSync:ut});return}N=new AbortController;let xt=vm(t.history,ae,N.signal,ge&&ge.submission),rt;if(ge&&ge.pendingError)rt=[Zm(Ge).route.id,{type:Rn.error,error:ge.pendingError}];else if(ge&&ge.submission&&Ia(ge.submission.formMethod)){let Jt=await Et(xt,ae,ge.submission,Ge,je.active,{replace:ge.replace,flushSync:ut});if(Jt.shortCircuited)return;if(Jt.pendingActionResult){let[Mr,lr]=Jt.pendingActionResult;if(ho(lr)&&ZR(lr.error)&&lr.error.status===404){N=null,Oe(ae,{matches:Jt.matches,loaderData:{},errors:{[Mr]:lr.error}});return}}Ge=Jt.matches||Ge,rt=Jt.pendingActionResult,ze=jT(ae,ge.submission),ut=!1,je.active=!1,xt=vm(t.history,xt.url,xt.signal)}let{shortCircuited:st,matches:ln,loaderData:tn,errors:hn}=await J(xt,ae,Ge,je.active,ze,ge&&ge.submission,ge&&ge.fetcherSubmission,ge&&ge.replace,ge&&ge.initialHydration===!0,ut,rt);st||(N=null,Oe(ae,tr({matches:ln||Ge},nB(rt),{loaderData:tn,errors:hn})))}async function Et(ne,ae,ge,_e,ze,Ge){Ge===void 0&&(Ge={}),gt();let ut=Rpe(ae,ge);if(Me({navigation:ut},{flushSync:Ge.flushSync===!0}),ze){let rt=await Yr(_e,ae.pathname,ne.signal);if(rt.type==="aborted")return{shortCircuited:!0};if(rt.type==="error"){let{boundaryId:st,error:ln}=Wt(ae.pathname,rt);return{matches:rt.partialMatches,pendingActionResult:[st,{type:Rn.error,error:ln}]}}else if(rt.matches)_e=rt.matches;else{let{notFoundMatches:st,error:ln,route:tn}=_t(ae.pathname);return{matches:st,pendingActionResult:[tn.id,{type:Rn.error,error:ln}]}}}let je,xt=Bb(_e,ae);if(!xt.route.action&&!xt.route.lazy)je={type:Rn.error,error:Ys(405,{method:ne.method,pathname:ae.pathname,routeId:xt.route.id})};else if(je=(await et("action",ne,[xt],_e))[0],ne.signal.aborted)return{shortCircuited:!0};if(nh(je)){let rt;return Ge&&Ge.replace!=null?rt=Ge.replace:rt=Zz(je.response.headers.get("Location"),new URL(ne.url),c)===P.location.pathname+P.location.search,await Ve(ne,je,{submission:ge,replace:rt}),{shortCircuited:!0}}if(th(je))throw Ys(400,{type:"defer-action"});if(ho(je)){let rt=Zm(_e,xt.route.id);return(Ge&&Ge.replace)!==!0&&(T=Pr.Push),{matches:_e,pendingActionResult:[rt.route.id,je]}}return{matches:_e,pendingActionResult:[xt.route.id,je]}}async function J(ne,ae,ge,_e,ze,Ge,ut,je,xt,rt,st){let ln=ze||jT(ae,Ge),tn=Ge||ut||aB(ln),hn=!j&&(!l.v7_partialHydration||!xt);if(_e){if(hn){let Yn=de(st);Me(tr({navigation:ln},Yn!==void 0?{actionData:Yn}:{}),{flushSync:rt})}let St=await Yr(ge,ae.pathname,ne.signal);if(St.type==="aborted")return{shortCircuited:!0};if(St.type==="error"){let{boundaryId:Yn,error:zs}=Wt(ae.pathname,St);return{matches:St.partialMatches,loaderData:{},errors:{[Yn]:zs}}}else if(St.matches)ge=St.matches;else{let{error:Yn,notFoundMatches:zs,route:jn}=_t(ae.pathname);return{matches:zs,loaderData:{},errors:{[jn.id]:Yn}}}}let Jt=a||o,[Mr,lr]=Yz(t.history,P,ge,tn,ae,l.v7_partialHydration&&xt===!0,l.v7_skipActionErrorRevalidation,L,U,K,Q,G,X,Jt,c,st);if(Zt(St=>!(ge&&ge.some(Yn=>Yn.route.id===St))||Mr&&Mr.some(Yn=>Yn.route.id===St)),ee=++q,Mr.length===0&&lr.length===0){let St=$e();return Oe(ae,tr({matches:ge,loaderData:{},errors:st&&ho(st[1])?{[st[0]]:st[1].error}:null},nB(st),St?{fetchers:new Map(P.fetchers)}:{}),{flushSync:rt}),{shortCircuited:!0}}if(hn){let St={};if(!_e){St.navigation=ln;let Yn=de(st);Yn!==void 0&&(St.actionData=Yn)}lr.length>0&&(St.fetchers=me(lr)),Me(St,{flushSync:rt})}lr.forEach(St=>{H.has(St.key)&&or(St.key),St.controller&&H.set(St.key,St.controller)});let el=()=>lr.forEach(St=>or(St.key));N&&N.signal.addEventListener("abort",el);let{loaderResults:tl,fetcherResults:da}=await qt(P.matches,ge,Mr,lr,ne);if(ne.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",el),lr.forEach(St=>H.delete(St.key));let Nu=sB([...tl,...da]);if(Nu){if(Nu.idx>=Mr.length){let St=lr[Nu.idx-Mr.length].key;X.add(St)}return await Ve(ne,Nu.result,{replace:je}),{shortCircuited:!0}}let{loaderData:Tu,errors:Ro}=eB(P,ge,Mr,tl,st,lr,da,he);he.forEach((St,Yn)=>{St.subscribe(zs=>{(zs||St.done)&&he.delete(Yn)})}),l.v7_partialHydration&&xt&&P.errors&&Object.entries(P.errors).filter(St=>{let[Yn]=St;return!Mr.some(zs=>zs.route.id===Yn)}).forEach(St=>{let[Yn,zs]=St;Ro=Object.assign(Ro||{},{[Yn]:zs})});let Cf=$e(),Ef=Ye(ee),Rf=Cf||Ef||lr.length>0;return tr({matches:ge,loaderData:Tu,errors:Ro},Rf?{fetchers:new Map(P.fetchers)}:{})}function de(ne){if(ne&&!ho(ne[1]))return{[ne[0]]:ne[1].data};if(P.actionData)return Object.keys(P.actionData).length===0?null:P.actionData}function me(ne){return ne.forEach(ae=>{let ge=P.fetchers.get(ae.key),_e=pb(void 0,ge?ge.data:void 0);P.fetchers.set(ae.key,_e)}),new Map(P.fetchers)}function Ae(ne,ae,ge,_e){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");H.has(ne)&&or(ne);let ze=(_e&&_e.unstable_flushSync)===!0,Ge=a||o,ut=_M(P.location,P.matches,c,l.v7_prependBasename,ge,l.v7_relativeSplatPath,ae,_e==null?void 0:_e.relative),je=Wf(Ge,ut,c),xt=Hi(je,Ge,ut);if(xt.active&&xt.matches&&(je=xt.matches),!je){an(ne,ae,Ys(404,{pathname:ut}),{flushSync:ze});return}let{path:rt,submission:st,error:ln}=Kz(l.v7_normalizeFormMethod,!0,ut,_e);if(ln){an(ne,ae,ln,{flushSync:ze});return}let tn=Bb(je,rt);if(E=(_e&&_e.preventScrollReset)===!0,st&&Ia(st.formMethod)){Ne(ne,ae,rt,tn,je,xt.active,ze,st);return}G.set(ne,{routeId:ae,path:rt}),Ee(ne,ae,rt,tn,je,xt.active,ze,st)}async function Ne(ne,ae,ge,_e,ze,Ge,ut,je){gt(),G.delete(ne);function xt(jn){if(!jn.route.action&&!jn.route.lazy){let Ao=Ys(405,{method:je.formMethod,pathname:ge,routeId:ae});return an(ne,ae,Ao,{flushSync:ut}),!0}return!1}if(!Ge&&xt(_e))return;let rt=P.fetchers.get(ne);kt(ne,Ape(je,rt),{flushSync:ut});let st=new AbortController,ln=vm(t.history,ge,st.signal,je);if(Ge){let jn=await Yr(ze,ge,ln.signal);if(jn.type==="aborted")return;if(jn.type==="error"){let{error:Ao}=Wt(ge,jn);an(ne,ae,Ao,{flushSync:ut});return}else if(jn.matches){if(ze=jn.matches,_e=Bb(ze,ge),xt(_e))return}else{an(ne,ae,Ys(404,{pathname:ge}),{flushSync:ut});return}}H.set(ne,st);let tn=q,Jt=(await et("action",ln,[_e],ze))[0];if(ln.signal.aborted){H.get(ne)===st&&H.delete(ne);return}if(l.v7_fetcherPersist&&Q.has(ne)){if(nh(Jt)||ho(Jt)){kt(ne,Gu(void 0));return}}else{if(nh(Jt))if(H.delete(ne),ee>tn){kt(ne,Gu(void 0));return}else return X.add(ne),kt(ne,pb(je)),Ve(ln,Jt,{fetcherSubmission:je});if(ho(Jt)){an(ne,ae,Jt.error);return}}if(th(Jt))throw Ys(400,{type:"defer-action"});let Mr=P.navigation.location||P.location,lr=vm(t.history,Mr,st.signal),el=a||o,tl=P.navigation.state!=="idle"?Wf(el,P.navigation.location,c):P.matches;Ot(tl,"Didn't find any matches after fetcher action");let da=++q;se.set(ne,da);let Nu=pb(je,Jt.data);P.fetchers.set(ne,Nu);let[Tu,Ro]=Yz(t.history,P,tl,je,Mr,!1,l.v7_skipActionErrorRevalidation,L,U,K,Q,G,X,el,c,[_e.route.id,Jt]);Ro.filter(jn=>jn.key!==ne).forEach(jn=>{let Ao=jn.key,Vy=P.fetchers.get(Ao),rS=pb(void 0,Vy?Vy.data:void 0);P.fetchers.set(Ao,rS),H.has(Ao)&&or(Ao),jn.controller&&H.set(Ao,jn.controller)}),Me({fetchers:new Map(P.fetchers)});let Cf=()=>Ro.forEach(jn=>or(jn.key));st.signal.addEventListener("abort",Cf);let{loaderResults:Ef,fetcherResults:Rf}=await qt(P.matches,tl,Tu,Ro,lr);if(st.signal.aborted)return;st.signal.removeEventListener("abort",Cf),se.delete(ne),H.delete(ne),Ro.forEach(jn=>H.delete(jn.key));let St=sB([...Ef,...Rf]);if(St){if(St.idx>=Tu.length){let jn=Ro[St.idx-Tu.length].key;X.add(jn)}return Ve(lr,St.result)}let{loaderData:Yn,errors:zs}=eB(P,P.matches,Tu,Ef,void 0,Ro,Rf,he);if(P.fetchers.has(ne)){let jn=Gu(Jt.data);P.fetchers.set(ne,jn)}Ye(da),P.navigation.state==="loading"&&da>ee?(Ot(T,"Expected pending action"),N&&N.abort(),Oe(P.navigation.location,{matches:tl,loaderData:Yn,errors:zs,fetchers:new Map(P.fetchers)})):(Me({errors:zs,loaderData:tB(P.loaderData,Yn,tl,zs),fetchers:new Map(P.fetchers)}),L=!1)}async function Ee(ne,ae,ge,_e,ze,Ge,ut,je){let xt=P.fetchers.get(ne);kt(ne,pb(je,xt?xt.data:void 0),{flushSync:ut});let rt=new AbortController,st=vm(t.history,ge,rt.signal);if(Ge){let Jt=await Yr(ze,ge,st.signal);if(Jt.type==="aborted")return;if(Jt.type==="error"){let{error:Mr}=Wt(ge,Jt);an(ne,ae,Mr,{flushSync:ut});return}else if(Jt.matches)ze=Jt.matches,_e=Bb(ze,ge);else{an(ne,ae,Ys(404,{pathname:ge}),{flushSync:ut});return}}H.set(ne,rt);let ln=q,hn=(await et("loader",st,[_e],ze))[0];if(th(hn)&&(hn=await H8(hn,st.signal,!0)||hn),H.get(ne)===rt&&H.delete(ne),!st.signal.aborted){if(Q.has(ne)){kt(ne,Gu(void 0));return}if(nh(hn))if(ee>ln){kt(ne,Gu(void 0));return}else{X.add(ne),await Ve(st,hn);return}if(ho(hn)){an(ne,ae,hn.error);return}Ot(!th(hn),"Unhandled fetcher deferred data"),kt(ne,Gu(hn.data))}}async function Ve(ne,ae,ge){let{submission:_e,fetcherSubmission:ze,replace:Ge}=ge===void 0?{}:ge;ae.response.headers.has("X-Remix-Revalidate")&&(L=!0);let ut=ae.response.headers.get("Location");Ot(ut,"Expected a Location header on the redirect Response"),ut=Zz(ut,new URL(ne.url),c);let je=Q0(P.location,ut,{_isRedirect:!0});if(n){let hn=!1;if(ae.response.headers.has("X-Remix-Reload-Document"))hn=!0;else if(rL.test(ut)){const Jt=t.history.createURL(ut);hn=Jt.origin!==e.location.origin||nf(Jt.pathname,c)==null}if(hn){Ge?e.location.replace(ut):e.location.assign(ut);return}}N=null;let xt=Ge===!0||ae.response.headers.has("X-Remix-Replace")?Pr.Replace:Pr.Push,{formMethod:rt,formAction:st,formEncType:ln}=P.navigation;!_e&&!ze&&rt&&st&&ln&&(_e=aB(P.navigation));let tn=_e||ze;if(ape.has(ae.response.status)&&tn&&Ia(tn.formMethod))await nt(xt,je,{submission:tr({},tn,{formAction:ut}),preventScrollReset:E});else{let hn=jT(je,_e);await nt(xt,je,{overrideNavigation:hn,fetcherSubmission:ze,preventScrollReset:E})}}async function et(ne,ae,ge,_e){try{let ze=await gpe(u,ne,ae,ge,_e,i,s);return await Promise.all(ze.map((Ge,ut)=>{if(Spe(Ge)){let je=Ge.result;return{type:Rn.redirect,response:bpe(je,ae,ge[ut].route.id,_e,c,l.v7_relativeSplatPath)}}return ype(Ge)}))}catch(ze){return ge.map(()=>({type:Rn.error,error:ze}))}}async function qt(ne,ae,ge,_e,ze){let[Ge,...ut]=await Promise.all([ge.length?et("loader",ze,ge,ae):[],..._e.map(je=>{if(je.matches&&je.match&&je.controller){let xt=vm(t.history,je.path,je.controller.signal);return et("loader",xt,[je.match],je.matches).then(rt=>rt[0])}else return Promise.resolve({type:Rn.error,error:Ys(404,{pathname:je.path})})})]);return await Promise.all([oB(ne,ge,Ge,Ge.map(()=>ze.signal),!1,P.loaderData),oB(ne,_e.map(je=>je.match),ut,_e.map(je=>je.controller?je.controller.signal:null),!0)]),{loaderResults:Ge,fetcherResults:ut}}function gt(){L=!0,U.push(...Zt()),G.forEach((ne,ae)=>{H.has(ae)&&(K.add(ae),or(ae))})}function kt(ne,ae,ge){ge===void 0&&(ge={}),P.fetchers.set(ne,ae),Me({fetchers:new Map(P.fetchers)},{flushSync:(ge&&ge.flushSync)===!0})}function an(ne,ae,ge,_e){_e===void 0&&(_e={});let ze=Zm(P.matches,ae);_n(ne),Me({errors:{[ze.route.id]:ge},fetchers:new Map(P.fetchers)},{flushSync:(_e&&_e.flushSync)===!0})}function gr(ne){return l.v7_fetcherPersist&&(Y.set(ne,(Y.get(ne)||0)+1),Q.has(ne)&&Q.delete(ne)),P.fetchers.get(ne)||lpe}function _n(ne){let ae=P.fetchers.get(ne);H.has(ne)&&!(ae&&ae.state==="loading"&&se.has(ne))&&or(ne),G.delete(ne),se.delete(ne),X.delete(ne),Q.delete(ne),K.delete(ne),P.fetchers.delete(ne)}function di(ne){if(l.v7_fetcherPersist){let ae=(Y.get(ne)||0)-1;ae<=0?(Y.delete(ne),Q.add(ne)):Y.set(ne,ae)}else _n(ne);Me({fetchers:new Map(P.fetchers)})}function or(ne){let ae=H.get(ne);Ot(ae,"Expected fetch controller: "+ne),ae.abort(),H.delete(ne)}function fi(ne){for(let ae of ne){let ge=gr(ae),_e=Gu(ge.data);P.fetchers.set(ae,_e)}}function $e(){let ne=[],ae=!1;for(let ge of X){let _e=P.fetchers.get(ge);Ot(_e,"Expected fetcher: "+ge),_e.state==="loading"&&(X.delete(ge),ne.push(ge),ae=!0)}return fi(ne),ae}function Ye(ne){let ae=[];for(let[ge,_e]of se)if(_e 0}function ht(ne,ae){let ge=P.blockers.get(ne)||km;return fe.get(ne)!==ae&&fe.set(ne,ae),ge}function Qe(ne){P.blockers.delete(ne),fe.delete(ne)}function yt(ne,ae){let ge=P.blockers.get(ne)||km;Ot(ge.state==="unblocked"&&ae.state==="blocked"||ge.state==="blocked"&&ae.state==="blocked"||ge.state==="blocked"&&ae.state==="proceeding"||ge.state==="blocked"&&ae.state==="unblocked"||ge.state==="proceeding"&&ae.state==="unblocked","Invalid blocker state transition: "+ge.state+" -> "+ae.state);let _e=new Map(P.blockers);_e.set(ne,ae),Me({blockers:_e})}function Nt(ne){let{currentLocation:ae,nextLocation:ge,historyAction:_e}=ne;if(fe.size===0)return;fe.size>1&&Uv(!1,"A router only supports one blocker at a time");let ze=Array.from(fe.entries()),[Ge,ut]=ze[ze.length-1],je=P.blockers.get(Ge);if(!(je&&je.state==="proceeding")&&ut({currentLocation:ae,nextLocation:ge,historyAction:_e}))return Ge}function _t(ne){let ae=Ys(404,{pathname:ne}),ge=a||o,{matches:_e,route:ze}=rB(ge);return Zt(),{notFoundMatches:_e,route:ze,error:ae}}function Wt(ne,ae){return{boundaryId:Zm(ae.partialMatches).route.id,error:Ys(400,{type:"route-discovery",pathname:ne,message:ae.error!=null&&"message"in ae.error?ae.error:String(ae.error)})}}function Zt(ne){let ae=[];return he.forEach((ge,_e)=>{(!ne||ne(_e))&&(ge.cancel(),ae.push(_e),he.delete(_e))}),ae}function ar(ne,ae,ge){if(h=ne,y=ae,m=ge||null,!g&&P.navigation===IT){g=!0;let _e=Dr(P.location,P.matches);_e!=null&&Me({restoreScrollPosition:_e})}return()=>{h=null,y=null,m=null}}function Nn(ne,ae){return m&&m(ne,ae.map(_e=>Fhe(_e,P.loaderData)))||ne.key}function Cr(ne,ae){if(h&&y){let ge=Nn(ne,ae);h[ge]=y()}}function Dr(ne,ae){if(h){let ge=Nn(ne,ae),_e=h[ge];if(typeof _e=="number")return _e}return null}function Hi(ne,ae,ge){if(f)if(ne){let _e=ne[ne.length-1].route;if(_e.path&&(_e.path==="*"||_e.path.endsWith("/*")))return{active:!0,matches:tC(ae,ge,c,!0)}}else return{active:!0,matches:tC(ae,ge,c,!0)||[]};return{active:!1,matches:null}}async function Yr(ne,ae,ge){let _e=ne,ze=_e.length>0?_e[_e.length-1].route:null;for(;;){let Ge=a==null,ut=a||o;try{await ppe(f,ae,_e,ut,i,s,ce,ge)}catch(st){return{type:"error",error:st,partialMatches:_e}}finally{Ge&&(o=[...o])}if(ge.aborted)return{type:"aborted"};let je=Wf(ut,ae,c),xt=!1;if(je){let st=je[je.length-1].route;if(st.index)return{type:"success",matches:je};if(st.path&&st.path.length>0)if(st.path==="*")xt=!0;else return{type:"success",matches:je}}let rt=tC(ut,ae,c,!0);if(!rt||_e.map(st=>st.route.id).join("-")===rt.map(st=>st.route.id).join("-"))return{type:"success",matches:xt?je:null};if(_e=rt,ze=_e[_e.length-1].route,ze.path==="*")return{type:"success",matches:_e}}}function Jl(ne){i={},a=Z0(ne,s,void 0,i)}function ua(ne,ae){let ge=a==null;z8(ne,ae,a||o,i,s),ge&&(o=[...o],Me({}))}return R={get basename(){return c},get future(){return l},get state(){return P},get routes(){return o},get window(){return e},initialize:Pe,subscribe:Le,enableScrollRestoration:ar,navigate:Fe,fetch:Ae,revalidate:ot,createHref:ne=>t.history.createHref(ne),encodeLocation:ne=>t.history.encodeLocation(ne),getFetcher:gr,deleteFetcher:di,dispose:pe,getBlocker:ht,deleteBlocker:Qe,patchRoutes:ua,_internalFetchControllers:H,_internalActiveDeferreds:he,_internalSetRoutes:Jl},R}function dpe(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function _M(t,e,n,r,s,i,o,a){let c,u;if(o){c=[];for(let l of e)if(c.push(l),l.route.id===o){u=l;break}}else c=e,u=e[e.length-1];let f=QR(s||".",XR(c,i),nf(t.pathname,n)||t.pathname,a==="path");return s==null&&(f.search=t.search,f.hash=t.hash),(s==null||s===""||s===".")&&u&&u.route.index&&!sL(f.search)&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(f.pathname=f.pathname==="/"?n:su([n,f.pathname])),wp(f)}function Kz(t,e,n,r){if(!r||!dpe(r))return{path:n};if(r.formMethod&&!Epe(r.formMethod))return{path:n,error:Ys(405,{method:r.formMethod})};let s=()=>({path:n,error:Ys(400,{type:"invalid-body"})}),i=r.formMethod||"get",o=t?i.toUpperCase():i.toLowerCase(),a=B8(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ia(o))return s();let d=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((p,h)=>{let[m,y]=h;return""+p+m+"="+y+` -`},""):String(r.body);return{path:n,submission:{formMethod:o,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:d}}}else if(r.formEncType==="application/json"){if(!Ia(o))return s();try{let d=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:o,formAction:a,formEncType:r.formEncType,formData:void 0,json:d,text:void 0}}}catch{return s()}}}Ot(typeof FormData=="function","FormData is not available in this environment");let c,u;if(r.formData)c=SM(r.formData),u=r.formData;else if(r.body instanceof FormData)c=SM(r.body),u=r.body;else if(r.body instanceof URLSearchParams)c=r.body,u=Jz(c);else if(r.body==null)c=new URLSearchParams,u=new FormData;else try{c=new URLSearchParams(r.body),u=Jz(c)}catch{return s()}let f={formMethod:o,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Ia(f.formMethod))return{path:n,submission:f};let l=vf(n);return e&&l.search&&sL(l.search)&&c.append("index",""),l.search="?"+c,{path:wp(l),submission:f}}function fpe(t,e){let n=t;if(e){let r=t.findIndex(s=>s.route.id===e);r>=0&&(n=t.slice(0,r))}return n}function Yz(t,e,n,r,s,i,o,a,c,u,f,l,d,p,h,m){let y=m?ho(m[1])?m[1].error:m[1].data:void 0,g=t.createURL(e.location),v=t.createURL(s),b=m&&ho(m[1])?m[0]:void 0,_=b?fpe(n,b):n,R=m?m[1].statusCode:void 0,P=o&&R&&R>=400,T=_.filter((N,k)=>{let{route:M}=N;if(M.lazy)return!0;if(M.loader==null)return!1;if(i)return typeof M.loader!="function"||M.loader.hydrate?!0:e.loaderData[M.id]===void 0&&(!e.errors||e.errors[M.id]===void 0);if(hpe(e.loaderData,e.matches[k],N)||c.some(L=>L===N.route.id))return!0;let I=e.matches[k],j=N;return Xz(N,tr({currentUrl:g,currentParams:I.params,nextUrl:v,nextParams:j.params},r,{actionResult:y,actionStatus:R,defaultShouldRevalidate:P?!1:a||g.pathname+g.search===v.pathname+v.search||g.search!==v.search||F8(I,j)}))}),E=[];return l.forEach((N,k)=>{if(i||!n.some(U=>U.route.id===N.routeId)||f.has(k))return;let M=Wf(p,N.path,h);if(!M){E.push({key:k,routeId:N.routeId,path:N.path,matches:null,match:null,controller:null});return}let I=e.fetchers.get(k),j=Bb(M,N.path),L=!1;d.has(k)?L=!1:u.has(k)?(u.delete(k),L=!0):I&&I.state!=="idle"&&I.data===void 0?L=a:L=Xz(j,tr({currentUrl:g,currentParams:e.matches[e.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:y,actionStatus:R,defaultShouldRevalidate:P?!1:a})),L&&E.push({key:k,routeId:N.routeId,path:N.path,matches:M,match:j,controller:new AbortController})}),[T,E]}function hpe(t,e,n){let r=!e||n.route.id!==e.route.id,s=t[n.route.id]===void 0;return r||s}function F8(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function Xz(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}async function ppe(t,e,n,r,s,i,o,a){let c=[e,...n.map(u=>u.route.id)].join("-");try{let u=o.get(c);u||(u=t({path:e,matches:n,patch:(f,l)=>{a.aborted||z8(f,l,r,s,i)}}),o.set(c,u)),u&&_pe(u)&&await u}finally{o.delete(c)}}function z8(t,e,n,r,s){if(t){var i;let o=r[t];Ot(o,"No route found to patch children into: routeId = "+t);let a=Z0(e,s,[t,"patch",String(((i=o.children)==null?void 0:i.length)||"0")],r);o.children?o.children.push(...a):o.children=a}else{let o=Z0(e,s,["patch",String(n.length||"0")],r);n.push(...o)}}async function Qz(t,e,n){if(!t.lazy)return;let r=await t.lazy();if(!t.lazy)return;let s=n[t.id];Ot(s,"No route found in manifest");let i={};for(let o in r){let c=s[o]!==void 0&&o!=="hasErrorBoundary";Uv(!c,'Route "'+s.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!c&&!Lhe.has(o)&&(i[o]=r[o])}Object.assign(s,i),Object.assign(s,tr({},e(s),{lazy:void 0}))}function mpe(t){return Promise.all(t.matches.map(e=>e.resolve()))}async function gpe(t,e,n,r,s,i,o,a){let c=r.reduce((l,d)=>l.add(d.route.id),new Set),u=new Set,f=await t({matches:s.map(l=>{let d=c.has(l.route.id);return tr({},l,{shouldLoad:d,resolve:h=>(u.add(l.route.id),d?vpe(e,n,l,i,o,h,a):Promise.resolve({type:Rn.data,result:void 0}))})}),request:n,params:s[0].params,context:a});return s.forEach(l=>Ot(u.has(l.route.id),'`match.resolve()` was not called for route id "'+l.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),f.filter((l,d)=>c.has(s[d].route.id))}async function vpe(t,e,n,r,s,i,o){let a,c,u=f=>{let l,d=new Promise((m,y)=>l=y);c=()=>l(),e.signal.addEventListener("abort",c);let p=m=>typeof f!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+t+'" [routeId: '+n.route.id+"]"))):f({request:e,params:n.params,context:o},...m!==void 0?[m]:[]),h;return i?h=i(m=>p(m)):h=(async()=>{try{return{type:"data",result:await p()}}catch(m){return{type:"error",result:m}}})(),Promise.race([h,d])};try{let f=n.route[t];if(n.route.lazy)if(f){let l,[d]=await Promise.all([u(f).catch(p=>{l=p}),Qz(n.route,s,r)]);if(l!==void 0)throw l;a=d}else if(await Qz(n.route,s,r),f=n.route[t],f)a=await u(f);else if(t==="action"){let l=new URL(e.url),d=l.pathname+l.search;throw Ys(405,{method:e.method,pathname:d,routeId:n.route.id})}else return{type:Rn.data,result:void 0};else if(f)a=await u(f);else{let l=new URL(e.url),d=l.pathname+l.search;throw Ys(404,{pathname:d})}Ot(a.result!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(f){return{type:Rn.error,result:f}}finally{c&&e.signal.removeEventListener("abort",c)}return a}async function ype(t){let{result:e,type:n}=t;if(U8(e)){let u;try{let f=e.headers.get("Content-Type");f&&/\bapplication\/json\b/.test(f)?e.body==null?u=null:u=await e.json():u=await e.text()}catch(f){return{type:Rn.error,error:f}}return n===Rn.error?{type:Rn.error,error:new hE(e.status,e.statusText,u),statusCode:e.status,headers:e.headers}:{type:Rn.data,data:u,statusCode:e.status,headers:e.headers}}if(n===Rn.error){if(iB(e)){var r;if(e.data instanceof Error){var s;return{type:Rn.error,error:e.data,statusCode:(s=e.init)==null?void 0:s.status}}e=new hE(((r=e.init)==null?void 0:r.status)||500,void 0,e.data)}return{type:Rn.error,error:e,statusCode:ZR(e)?e.status:void 0}}if(Cpe(e)){var i,o;return{type:Rn.deferred,deferredData:e,statusCode:(i=e.init)==null?void 0:i.status,headers:((o=e.init)==null?void 0:o.headers)&&new Headers(e.init.headers)}}if(iB(e)){var a,c;return{type:Rn.data,data:e.data,statusCode:(a=e.init)==null?void 0:a.status,headers:(c=e.init)!=null&&c.headers?new Headers(e.init.headers):void 0}}return{type:Rn.data,data:e}}function bpe(t,e,n,r,s,i){let o=t.headers.get("Location");if(Ot(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!rL.test(o)){let a=r.slice(0,r.findIndex(c=>c.route.id===n)+1);o=_M(new URL(e.url),a,s,!0,o,i),t.headers.set("Location",o)}return t}function Zz(t,e,n){if(rL.test(t)){let r=t,s=r.startsWith("//")?new URL(e.protocol+r):new URL(r),i=nf(s.pathname,n)!=null;if(s.origin===e.origin&&i)return s.pathname+s.search+s.hash}return t}function vm(t,e,n,r){let s=t.createURL(B8(e)).toString(),i={signal:n};if(r&&Ia(r.formMethod)){let{formMethod:o,formEncType:a}=r;i.method=o.toUpperCase(),a==="application/json"?(i.headers=new Headers({"Content-Type":a}),i.body=JSON.stringify(r.json)):a==="text/plain"?i.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?i.body=SM(r.formData):i.body=r.formData}return new Request(s,i)}function SM(t){let e=new URLSearchParams;for(let[n,r]of t.entries())e.append(n,typeof r=="string"?r:r.name);return e}function Jz(t){let e=new FormData;for(let[n,r]of t.entries())e.append(n,r);return e}function xpe(t,e,n,r,s,i){let o={},a=null,c,u=!1,f={},l=r&&ho(r[1])?r[1].error:void 0;return n.forEach((d,p)=>{let h=e[p].route.id;if(Ot(!nh(d),"Cannot handle redirect results in processLoaderData"),ho(d)){let m=d.error;l!==void 0&&(m=l,l=void 0),a=a||{};{let y=Zm(t,h);a[y.route.id]==null&&(a[y.route.id]=m)}o[h]=void 0,u||(u=!0,c=ZR(d.error)?d.error.status:500),d.headers&&(f[h]=d.headers)}else th(d)?(s.set(h,d.deferredData),o[h]=d.deferredData.data,d.statusCode!=null&&d.statusCode!==200&&!u&&(c=d.statusCode),d.headers&&(f[h]=d.headers)):(o[h]=d.data,d.statusCode&&d.statusCode!==200&&!u&&(c=d.statusCode),d.headers&&(f[h]=d.headers))}),l!==void 0&&r&&(a={[r[0]]:l},o[r[0]]=void 0),{loaderData:o,errors:a,statusCode:c||200,loaderHeaders:f}}function eB(t,e,n,r,s,i,o,a){let{loaderData:c,errors:u}=xpe(e,n,r,s,a);for(let f=0;f r.route.id===e)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function rB(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function Ys(t,e){let{pathname:n,routeId:r,method:s,type:i,message:o}=e===void 0?{}:e,a="Unknown Server Error",c="Unknown @remix-run/router error";return t===400?(a="Bad Request",i==="route-discovery"?c='Unable to match URL "'+n+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error: -`+o):s&&n&&r?c="You made a "+s+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":i==="defer-action"?c="defer() is not supported in actions":i==="invalid-body"&&(c="Unable to encode submission body")):t===403?(a="Forbidden",c='Route "'+r+'" does not match URL "'+n+'"'):t===404?(a="Not Found",c='No route matches URL "'+n+'"'):t===405&&(a="Method Not Allowed",s&&n&&r?c="You made a "+s.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":s&&(c='Invalid request method "'+s.toUpperCase()+'"')),new hE(t||500,a,new Error(c),!0)}function sB(t){for(let e=t.length-1;e>=0;e--){let n=t[e];if(nh(n))return{result:n,idx:e}}}function B8(t){let e=typeof t=="string"?vf(t):t;return wp(tr({},e,{hash:""}))}function wpe(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function _pe(t){return typeof t=="object"&&t!=null&&"then"in t}function Spe(t){return U8(t.result)&&ope.has(t.result.status)}function th(t){return t.type===Rn.deferred}function ho(t){return t.type===Rn.error}function nh(t){return(t&&t.type)===Rn.redirect}function iB(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function Cpe(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function U8(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function Epe(t){return ipe.has(t.toLowerCase())}function Ia(t){return rpe.has(t.toLowerCase())}async function oB(t,e,n,r,s,i){for(let o=0;o l.route.id===c.route.id),f=u!=null&&!F8(u,c)&&(i&&i[c.route.id])!==void 0;if(th(a)&&(s||f)){let l=r[o];Ot(l,"Expected an AbortSignal for revalidating fetcher deferred result"),await H8(a,l,s).then(d=>{d&&(n[o]=d||n[o])})}}}async function H8(t,e,n){if(n===void 0&&(n=!1),!await t.deferredData.resolveData(e)){if(n)try{return{type:Rn.data,data:t.deferredData.unwrappedData}}catch(s){return{type:Rn.error,error:s}}return{type:Rn.data,data:t.deferredData.data}}}function sL(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function Bb(t,e){let n=typeof e=="string"?vf(e).search:e.search;if(t[t.length-1].route.index&&sL(n||""))return t[t.length-1];let r=j8(t);return r[r.length-1]}function aB(t){let{formMethod:e,formAction:n,formEncType:r,text:s,formData:i,json:o}=t;if(!(!e||!n||!r)){if(s!=null)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:void 0,text:s};if(i!=null)return{formMethod:e,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0};if(o!==void 0)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function jT(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Rpe(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function pb(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Ape(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function Gu(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Ppe(t,e){try{let n=t.sessionStorage.getItem($8);if(n){let r=JSON.parse(n);for(let[s,i]of Object.entries(r||{}))i&&Array.isArray(i)&&e.set(s,new Set(i||[]))}}catch{}}function Npe(t,e){if(e.size>0){let n={};for(let[r,s]of e)n[r]=[...s];try{t.sessionStorage.setItem($8,JSON.stringify(n))}catch(r){Uv(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + */function tr(){return tr=Object.assign?Object.assign.bind():function(t){for(var e=1;e "u")throw new Error(e)}function Uv(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function jhe(){return Math.random().toString(36).substr(2,8)}function Vz(t,e){return{usr:t.state,key:t.key,idx:e}}function Q0(t,e,n,r){return n===void 0&&(n=null),tr({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?vf(e):e,{state:n,key:e&&e.key||r||jhe()})}function wp(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function vf(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function Lhe(t,e,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Pr.Pop,c=null,u=f();u==null&&(u=0,o.replaceState(tr({},o.state,{idx:u}),""));function f(){return(o.state||{idx:null}).idx}function l(){a=Pr.Pop;let y=f(),g=y==null?null:y-u;u=y,c&&c({action:a,location:m.location,delta:g})}function d(y,g){a=Pr.Push;let v=Q0(m.location,y,g);u=f()+1;let b=Vz(v,u),_=m.createHref(v);try{o.pushState(b,"",_)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;s.location.assign(_)}i&&c&&c({action:a,location:m.location,delta:1})}function p(y,g){a=Pr.Replace;let v=Q0(m.location,y,g);u=f();let b=Vz(v,u),_=m.createHref(v);o.replaceState(b,"",_),i&&c&&c({action:a,location:m.location,delta:0})}function h(y){let g=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof y=="string"?y:wp(y);return v=v.replace(/ $/,"%20"),Ot(g,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,g)}let m={get action(){return a},get location(){return t(s,o)},listen(y){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(Hz,l),c=y,()=>{s.removeEventListener(Hz,l),c=null}},createHref(y){return e(s,y)},createURL:h,encodeLocation(y){let g=h(y);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:d,replace:p,go(y){return o.go(y)}};return m}var Rn;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Rn||(Rn={}));const $he=new Set(["lazy","caseSensitive","path","id","index","children"]);function Fhe(t){return t.index===!0}function Z0(t,e,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),t.map((s,i)=>{let o=[...n,String(i)],a=typeof s.id=="string"?s.id:o.join("-");if(Ot(s.index!==!0||!s.children,"Cannot specify children on an index route"),Ot(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),Fhe(s)){let c=tr({},s,e(s),{id:a});return r[a]=c,c}else{let c=tr({},s,e(s),{id:a,children:void 0});return r[a]=c,s.children&&(c.children=Z0(s.children,e,o,r)),c}})}function Wf(t,e,n){return n===void 0&&(n="/"),tC(t,e,n,!1)}function tC(t,e,n,r){let s=typeof e=="string"?vf(e):e,i=nf(s.pathname||"/",n);if(i==null)return null;let o=M8(t);Bhe(o);let a=null;for(let c=0;a==null&&c {let c={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};c.relativePath.startsWith("/")&&(Ot(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=su([r,c.relativePath]),f=n.concat(c);i.children&&i.children.length>0&&(Ot(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),M8(i.children,e,f,u)),!(i.path==null&&!i.index)&&e.push({path:u,score:Khe(u,i.index),routesMeta:f})};return t.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let c of O8(i.path))s(i,o,c)}),e}function O8(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=O8(r.join("/")),a=[];return a.push(...o.map(c=>c===""?i:[i,c].join("/"))),s&&a.push(...o),a.map(c=>t.startsWith("/")&&c===""?"/":c)}function Bhe(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:Yhe(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Uhe=/^:[\w-]+$/,Hhe=3,Vhe=2,qhe=1,Whe=10,Ghe=-2,qz=t=>t==="*";function Khe(t,e){let n=t.split("/"),r=n.length;return n.some(qz)&&(r+=Ghe),e&&(r+=Vhe),n.filter(s=>!qz(s)).reduce((s,i)=>s+(Uhe.test(i)?Hhe:i===""?qhe:Whe),r)}function Yhe(t,e){return t.length===e.length&&t.slice(0,-1).every((r,s)=>r===e[s])?t[t.length-1]-e[e.length-1]:0}function Xhe(t,e,n){n===void 0&&(n=!1);let{routesMeta:r}=t,s={},i="/",o=[];for(let a=0;a {let{paramName:d,isOptional:p}=f;if(d==="*"){let m=a[l]||"";o=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const h=a[l];return p&&!h?u[d]=void 0:u[d]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:t}}function Qhe(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),Uv(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,c)=>(r.push({paramName:a,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function Zhe(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Uv(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function nf(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function Jhe(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:s=""}=typeof t=="string"?vf(t):t;return{pathname:n?n.startsWith("/")?n:epe(n,e):e,search:npe(r),hash:rpe(s)}}function epe(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function IT(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function I8(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function QR(t,e){let n=I8(t);return e?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function ZR(t,e,n,r){r===void 0&&(r=!1);let s;typeof t=="string"?s=vf(t):(s=tr({},t),Ot(!s.pathname||!s.pathname.includes("?"),IT("?","pathname","search",s)),Ot(!s.pathname||!s.pathname.includes("#"),IT("#","pathname","hash",s)),Ot(!s.search||!s.search.includes("#"),IT("#","search","hash",s)));let i=t===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let l=e.length-1;if(!r&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),l-=1;s.pathname=d.join("/")}a=l>=0?e[l]:"/"}let c=Jhe(s,a),u=o&&o!=="/"&&o.endsWith("/"),f=(i||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const su=t=>t.join("/").replace(/\/\/+/g,"/"),tpe=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),npe=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,rpe=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class hE{constructor(e,n,r,s){s===void 0&&(s=!1),this.status=e,this.statusText=n||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function JR(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const j8=["post","put","patch","delete"],spe=new Set(j8),ipe=["get",...j8],ope=new Set(ipe),ape=new Set([301,302,303,307,308]),lpe=new Set([307,308]),jT={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},cpe={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},km={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},rL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,upe=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),L8="remix-router-transitions";function dpe(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",r=!n;Ot(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let s;if(t.mapRouteProperties)s=t.mapRouteProperties;else if(t.detectErrorBoundary){let ne=t.detectErrorBoundary;s=ae=>({hasErrorBoundary:ne(ae)})}else s=upe;let i={},o=Z0(t.routes,s,void 0,i),a,c=t.basename||"/",u=t.unstable_dataStrategy||gpe,f=t.unstable_patchRoutesOnMiss,l=tr({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},t.future),d=null,p=new Set,h=null,m=null,y=null,g=t.hydrationData!=null,v=Wf(o,t.history.location,c),b=null;if(v==null&&!f){let ne=Ys(404,{pathname:t.history.location.pathname}),{matches:ae,route:ge}=nB(o);v=ae,b={[ge.id]:ne}}v&&!t.hydrationData&&Hi(v,o,t.history.location.pathname).active&&(v=null);let _;if(v)if(v.some(ne=>ne.route.lazy))_=!1;else if(!v.some(ne=>ne.route.loader))_=!0;else if(l.v7_partialHydration){let ne=t.hydrationData?t.hydrationData.loaderData:null,ae=t.hydrationData?t.hydrationData.errors:null,ge=_e=>_e.route.loader?typeof _e.route.loader=="function"&&_e.route.loader.hydrate===!0?!1:ne&&ne[_e.route.id]!==void 0||ae&&ae[_e.route.id]!==void 0:!0;if(ae){let _e=v.findIndex(ze=>ae[ze.route.id]!==void 0);_=v.slice(0,_e+1).every(ge)}else _=v.every(ge)}else _=t.hydrationData!=null;else if(_=!1,v=[],l.v7_partialHydration){let ne=Hi(null,o,t.history.location.pathname);ne.active&&ne.matches&&(v=ne.matches)}let R,P={historyAction:t.history.action,location:t.history.location,matches:v,initialized:_,navigation:jT,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||b,fetchers:new Map,blockers:new Map},T=Pr.Pop,E=!1,N,k=!1,M=new Map,I=null,j=!1,L=!1,U=[],K=new Set,H=new Map,q=0,ee=-1,se=new Map,X=new Set,G=new Map,Y=new Map,Q=new Set,he=new Map,fe=new Map,ce=new Map,xe=!1;function Pe(){if(d=t.history.listen(ne=>{let{action:ae,location:ge,delta:_e}=ne;if(xe){xe=!1;return}Uv(fe.size===0||_e!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ze=Nt({currentLocation:P.location,nextLocation:ge,historyAction:ae});if(ze&&_e!=null){xe=!0,t.history.go(_e*-1),yt(ze,{state:"blocked",location:ge,proceed(){yt(ze,{state:"proceeding",proceed:void 0,reset:void 0,location:ge}),t.history.go(_e)},reset(){let Ge=new Map(P.blockers);Ge.set(ze,km),Me({blockers:Ge})}});return}return nt(ae,ge)}),n){Npe(e,M);let ne=()=>Tpe(e,M);e.addEventListener("pagehide",ne),I=()=>e.removeEventListener("pagehide",ne)}return P.initialized||nt(Pr.Pop,P.location,{initialHydration:!0}),R}function pe(){d&&d(),I&&I(),p.clear(),N&&N.abort(),P.fetchers.forEach((ne,ae)=>_n(ae)),P.blockers.forEach((ne,ae)=>Qe(ae))}function Le(ne){return p.add(ne),()=>p.delete(ne)}function Me(ne,ae){ae===void 0&&(ae={}),P=tr({},P,ne);let ge=[],_e=[];l.v7_fetcherPersist&&P.fetchers.forEach((ze,Ge)=>{ze.state==="idle"&&(Q.has(Ge)?_e.push(Ge):ge.push(Ge))}),[...p].forEach(ze=>ze(P,{deletedFetchers:_e,unstable_viewTransitionOpts:ae.viewTransitionOpts,unstable_flushSync:ae.flushSync===!0})),l.v7_fetcherPersist&&(ge.forEach(ze=>P.fetchers.delete(ze)),_e.forEach(ze=>_n(ze)))}function Oe(ne,ae,ge){var _e,ze;let{flushSync:Ge}=ge===void 0?{}:ge,ut=P.actionData!=null&&P.navigation.formMethod!=null&&Ia(P.navigation.formMethod)&&P.navigation.state==="loading"&&((_e=ne.state)==null?void 0:_e._isRedirect)!==!0,je;ae.actionData?Object.keys(ae.actionData).length>0?je=ae.actionData:je=null:ut?je=P.actionData:je=null;let xt=ae.loaderData?eB(P.loaderData,ae.loaderData,ae.matches||[],ae.errors):P.loaderData,rt=P.blockers;rt.size>0&&(rt=new Map(rt),rt.forEach((tn,hn)=>rt.set(hn,km)));let st=E===!0||P.navigation.formMethod!=null&&Ia(P.navigation.formMethod)&&((ze=ne.state)==null?void 0:ze._isRedirect)!==!0;a&&(o=a,a=void 0),j||T===Pr.Pop||(T===Pr.Push?t.history.push(ne,ne.state):T===Pr.Replace&&t.history.replace(ne,ne.state));let ln;if(T===Pr.Pop){let tn=M.get(P.location.pathname);tn&&tn.has(ne.pathname)?ln={currentLocation:P.location,nextLocation:ne}:M.has(ne.pathname)&&(ln={currentLocation:ne,nextLocation:P.location})}else if(k){let tn=M.get(P.location.pathname);tn?tn.add(ne.pathname):(tn=new Set([ne.pathname]),M.set(P.location.pathname,tn)),ln={currentLocation:P.location,nextLocation:ne}}Me(tr({},ae,{actionData:je,loaderData:xt,historyAction:T,location:ne,initialized:!0,navigation:jT,revalidation:"idle",restoreScrollPosition:Dr(ne,ae.matches||P.matches),preventScrollReset:st,blockers:rt}),{viewTransitionOpts:ln,flushSync:Ge===!0}),T=Pr.Pop,E=!1,k=!1,j=!1,L=!1,U=[]}async function Fe(ne,ae){if(typeof ne=="number"){t.history.go(ne);return}let ge=SM(P.location,P.matches,c,l.v7_prependBasename,ne,l.v7_relativeSplatPath,ae==null?void 0:ae.fromRouteId,ae==null?void 0:ae.relative),{path:_e,submission:ze,error:Ge}=Gz(l.v7_normalizeFormMethod,!1,ge,ae),ut=P.location,je=Q0(P.location,_e,ae&&ae.state);je=tr({},je,t.history.encodeLocation(je));let xt=ae&&ae.replace!=null?ae.replace:void 0,rt=Pr.Push;xt===!0?rt=Pr.Replace:xt===!1||ze!=null&&Ia(ze.formMethod)&&ze.formAction===P.location.pathname+P.location.search&&(rt=Pr.Replace);let st=ae&&"preventScrollReset"in ae?ae.preventScrollReset===!0:void 0,ln=(ae&&ae.unstable_flushSync)===!0,tn=Nt({currentLocation:ut,nextLocation:je,historyAction:rt});if(tn){yt(tn,{state:"blocked",location:je,proceed(){yt(tn,{state:"proceeding",proceed:void 0,reset:void 0,location:je}),Fe(ne,ae)},reset(){let hn=new Map(P.blockers);hn.set(tn,km),Me({blockers:hn})}});return}return await nt(rt,je,{submission:ze,pendingError:Ge,preventScrollReset:st,replace:ae&&ae.replace,enableViewTransition:ae&&ae.unstable_viewTransition,flushSync:ln})}function ot(){if(gt(),Me({revalidation:"loading"}),P.navigation.state!=="submitting"){if(P.navigation.state==="idle"){nt(P.historyAction,P.location,{startUninterruptedRevalidation:!0});return}nt(T||P.historyAction,P.navigation.location,{overrideNavigation:P.navigation})}}async function nt(ne,ae,ge){N&&N.abort(),N=null,T=ne,j=(ge&&ge.startUninterruptedRevalidation)===!0,Cr(P.location,P.matches),E=(ge&&ge.preventScrollReset)===!0,k=(ge&&ge.enableViewTransition)===!0;let _e=a||o,ze=ge&&ge.overrideNavigation,Ge=Wf(_e,ae,c),ut=(ge&&ge.flushSync)===!0,je=Hi(Ge,_e,ae.pathname);if(je.active&&je.matches&&(Ge=je.matches),!Ge){let{error:Jt,notFoundMatches:Mr,route:lr}=_t(ae.pathname);Oe(ae,{matches:Mr,loaderData:{},errors:{[lr.id]:Jt}},{flushSync:ut});return}if(P.initialized&&!L&&_pe(P.location,ae)&&!(ge&&ge.submission&&Ia(ge.submission.formMethod))){Oe(ae,{matches:Ge},{flushSync:ut});return}N=new AbortController;let xt=vm(t.history,ae,N.signal,ge&&ge.submission),rt;if(ge&&ge.pendingError)rt=[Zm(Ge).route.id,{type:Rn.error,error:ge.pendingError}];else if(ge&&ge.submission&&Ia(ge.submission.formMethod)){let Jt=await Rt(xt,ae,ge.submission,Ge,je.active,{replace:ge.replace,flushSync:ut});if(Jt.shortCircuited)return;if(Jt.pendingActionResult){let[Mr,lr]=Jt.pendingActionResult;if(ho(lr)&&JR(lr.error)&&lr.error.status===404){N=null,Oe(ae,{matches:Jt.matches,loaderData:{},errors:{[Mr]:lr.error}});return}}Ge=Jt.matches||Ge,rt=Jt.pendingActionResult,ze=LT(ae,ge.submission),ut=!1,je.active=!1,xt=vm(t.history,xt.url,xt.signal)}let{shortCircuited:st,matches:ln,loaderData:tn,errors:hn}=await J(xt,ae,Ge,je.active,ze,ge&&ge.submission,ge&&ge.fetcherSubmission,ge&&ge.replace,ge&&ge.initialHydration===!0,ut,rt);st||(N=null,Oe(ae,tr({matches:ln||Ge},tB(rt),{loaderData:tn,errors:hn})))}async function Rt(ne,ae,ge,_e,ze,Ge){Ge===void 0&&(Ge={}),gt();let ut=Ape(ae,ge);if(Me({navigation:ut},{flushSync:Ge.flushSync===!0}),ze){let rt=await Yr(_e,ae.pathname,ne.signal);if(rt.type==="aborted")return{shortCircuited:!0};if(rt.type==="error"){let{boundaryId:st,error:ln}=Wt(ae.pathname,rt);return{matches:rt.partialMatches,pendingActionResult:[st,{type:Rn.error,error:ln}]}}else if(rt.matches)_e=rt.matches;else{let{notFoundMatches:st,error:ln,route:tn}=_t(ae.pathname);return{matches:st,pendingActionResult:[tn.id,{type:Rn.error,error:ln}]}}}let je,xt=Bb(_e,ae);if(!xt.route.action&&!xt.route.lazy)je={type:Rn.error,error:Ys(405,{method:ne.method,pathname:ae.pathname,routeId:xt.route.id})};else if(je=(await et("action",ne,[xt],_e))[0],ne.signal.aborted)return{shortCircuited:!0};if(nh(je)){let rt;return Ge&&Ge.replace!=null?rt=Ge.replace:rt=Qz(je.response.headers.get("Location"),new URL(ne.url),c)===P.location.pathname+P.location.search,await Ve(ne,je,{submission:ge,replace:rt}),{shortCircuited:!0}}if(th(je))throw Ys(400,{type:"defer-action"});if(ho(je)){let rt=Zm(_e,xt.route.id);return(Ge&&Ge.replace)!==!0&&(T=Pr.Push),{matches:_e,pendingActionResult:[rt.route.id,je]}}return{matches:_e,pendingActionResult:[xt.route.id,je]}}async function J(ne,ae,ge,_e,ze,Ge,ut,je,xt,rt,st){let ln=ze||LT(ae,Ge),tn=Ge||ut||oB(ln),hn=!j&&(!l.v7_partialHydration||!xt);if(_e){if(hn){let Yn=de(st);Me(tr({navigation:ln},Yn!==void 0?{actionData:Yn}:{}),{flushSync:rt})}let St=await Yr(ge,ae.pathname,ne.signal);if(St.type==="aborted")return{shortCircuited:!0};if(St.type==="error"){let{boundaryId:Yn,error:zs}=Wt(ae.pathname,St);return{matches:St.partialMatches,loaderData:{},errors:{[Yn]:zs}}}else if(St.matches)ge=St.matches;else{let{error:Yn,notFoundMatches:zs,route:jn}=_t(ae.pathname);return{matches:zs,loaderData:{},errors:{[jn.id]:Yn}}}}let Jt=a||o,[Mr,lr]=Kz(t.history,P,ge,tn,ae,l.v7_partialHydration&&xt===!0,l.v7_skipActionErrorRevalidation,L,U,K,Q,G,X,Jt,c,st);if(Zt(St=>!(ge&&ge.some(Yn=>Yn.route.id===St))||Mr&&Mr.some(Yn=>Yn.route.id===St)),ee=++q,Mr.length===0&&lr.length===0){let St=$e();return Oe(ae,tr({matches:ge,loaderData:{},errors:st&&ho(st[1])?{[st[0]]:st[1].error}:null},tB(st),St?{fetchers:new Map(P.fetchers)}:{}),{flushSync:rt}),{shortCircuited:!0}}if(hn){let St={};if(!_e){St.navigation=ln;let Yn=de(st);Yn!==void 0&&(St.actionData=Yn)}lr.length>0&&(St.fetchers=me(lr)),Me(St,{flushSync:rt})}lr.forEach(St=>{H.has(St.key)&&or(St.key),St.controller&&H.set(St.key,St.controller)});let el=()=>lr.forEach(St=>or(St.key));N&&N.signal.addEventListener("abort",el);let{loaderResults:tl,fetcherResults:da}=await qt(P.matches,ge,Mr,lr,ne);if(ne.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",el),lr.forEach(St=>H.delete(St.key));let Nu=rB([...tl,...da]);if(Nu){if(Nu.idx>=Mr.length){let St=lr[Nu.idx-Mr.length].key;X.add(St)}return await Ve(ne,Nu.result,{replace:je}),{shortCircuited:!0}}let{loaderData:Tu,errors:Ro}=Jz(P,ge,Mr,tl,st,lr,da,he);he.forEach((St,Yn)=>{St.subscribe(zs=>{(zs||St.done)&&he.delete(Yn)})}),l.v7_partialHydration&&xt&&P.errors&&Object.entries(P.errors).filter(St=>{let[Yn]=St;return!Mr.some(zs=>zs.route.id===Yn)}).forEach(St=>{let[Yn,zs]=St;Ro=Object.assign(Ro||{},{[Yn]:zs})});let Cf=$e(),Ef=Ye(ee),Rf=Cf||Ef||lr.length>0;return tr({matches:ge,loaderData:Tu,errors:Ro},Rf?{fetchers:new Map(P.fetchers)}:{})}function de(ne){if(ne&&!ho(ne[1]))return{[ne[0]]:ne[1].data};if(P.actionData)return Object.keys(P.actionData).length===0?null:P.actionData}function me(ne){return ne.forEach(ae=>{let ge=P.fetchers.get(ae.key),_e=pb(void 0,ge?ge.data:void 0);P.fetchers.set(ae.key,_e)}),new Map(P.fetchers)}function Ae(ne,ae,ge,_e){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");H.has(ne)&&or(ne);let ze=(_e&&_e.unstable_flushSync)===!0,Ge=a||o,ut=SM(P.location,P.matches,c,l.v7_prependBasename,ge,l.v7_relativeSplatPath,ae,_e==null?void 0:_e.relative),je=Wf(Ge,ut,c),xt=Hi(je,Ge,ut);if(xt.active&&xt.matches&&(je=xt.matches),!je){an(ne,ae,Ys(404,{pathname:ut}),{flushSync:ze});return}let{path:rt,submission:st,error:ln}=Gz(l.v7_normalizeFormMethod,!0,ut,_e);if(ln){an(ne,ae,ln,{flushSync:ze});return}let tn=Bb(je,rt);if(E=(_e&&_e.preventScrollReset)===!0,st&&Ia(st.formMethod)){Ne(ne,ae,rt,tn,je,xt.active,ze,st);return}G.set(ne,{routeId:ae,path:rt}),Ee(ne,ae,rt,tn,je,xt.active,ze,st)}async function Ne(ne,ae,ge,_e,ze,Ge,ut,je){gt(),G.delete(ne);function xt(jn){if(!jn.route.action&&!jn.route.lazy){let Ao=Ys(405,{method:je.formMethod,pathname:ge,routeId:ae});return an(ne,ae,Ao,{flushSync:ut}),!0}return!1}if(!Ge&&xt(_e))return;let rt=P.fetchers.get(ne);kt(ne,Ppe(je,rt),{flushSync:ut});let st=new AbortController,ln=vm(t.history,ge,st.signal,je);if(Ge){let jn=await Yr(ze,ge,ln.signal);if(jn.type==="aborted")return;if(jn.type==="error"){let{error:Ao}=Wt(ge,jn);an(ne,ae,Ao,{flushSync:ut});return}else if(jn.matches){if(ze=jn.matches,_e=Bb(ze,ge),xt(_e))return}else{an(ne,ae,Ys(404,{pathname:ge}),{flushSync:ut});return}}H.set(ne,st);let tn=q,Jt=(await et("action",ln,[_e],ze))[0];if(ln.signal.aborted){H.get(ne)===st&&H.delete(ne);return}if(l.v7_fetcherPersist&&Q.has(ne)){if(nh(Jt)||ho(Jt)){kt(ne,Gu(void 0));return}}else{if(nh(Jt))if(H.delete(ne),ee>tn){kt(ne,Gu(void 0));return}else return X.add(ne),kt(ne,pb(je)),Ve(ln,Jt,{fetcherSubmission:je});if(ho(Jt)){an(ne,ae,Jt.error);return}}if(th(Jt))throw Ys(400,{type:"defer-action"});let Mr=P.navigation.location||P.location,lr=vm(t.history,Mr,st.signal),el=a||o,tl=P.navigation.state!=="idle"?Wf(el,P.navigation.location,c):P.matches;Ot(tl,"Didn't find any matches after fetcher action");let da=++q;se.set(ne,da);let Nu=pb(je,Jt.data);P.fetchers.set(ne,Nu);let[Tu,Ro]=Kz(t.history,P,tl,je,Mr,!1,l.v7_skipActionErrorRevalidation,L,U,K,Q,G,X,el,c,[_e.route.id,Jt]);Ro.filter(jn=>jn.key!==ne).forEach(jn=>{let Ao=jn.key,Vy=P.fetchers.get(Ao),rS=pb(void 0,Vy?Vy.data:void 0);P.fetchers.set(Ao,rS),H.has(Ao)&&or(Ao),jn.controller&&H.set(Ao,jn.controller)}),Me({fetchers:new Map(P.fetchers)});let Cf=()=>Ro.forEach(jn=>or(jn.key));st.signal.addEventListener("abort",Cf);let{loaderResults:Ef,fetcherResults:Rf}=await qt(P.matches,tl,Tu,Ro,lr);if(st.signal.aborted)return;st.signal.removeEventListener("abort",Cf),se.delete(ne),H.delete(ne),Ro.forEach(jn=>H.delete(jn.key));let St=rB([...Ef,...Rf]);if(St){if(St.idx>=Tu.length){let jn=Ro[St.idx-Tu.length].key;X.add(jn)}return Ve(lr,St.result)}let{loaderData:Yn,errors:zs}=Jz(P,P.matches,Tu,Ef,void 0,Ro,Rf,he);if(P.fetchers.has(ne)){let jn=Gu(Jt.data);P.fetchers.set(ne,jn)}Ye(da),P.navigation.state==="loading"&&da>ee?(Ot(T,"Expected pending action"),N&&N.abort(),Oe(P.navigation.location,{matches:tl,loaderData:Yn,errors:zs,fetchers:new Map(P.fetchers)})):(Me({errors:zs,loaderData:eB(P.loaderData,Yn,tl,zs),fetchers:new Map(P.fetchers)}),L=!1)}async function Ee(ne,ae,ge,_e,ze,Ge,ut,je){let xt=P.fetchers.get(ne);kt(ne,pb(je,xt?xt.data:void 0),{flushSync:ut});let rt=new AbortController,st=vm(t.history,ge,rt.signal);if(Ge){let Jt=await Yr(ze,ge,st.signal);if(Jt.type==="aborted")return;if(Jt.type==="error"){let{error:Mr}=Wt(ge,Jt);an(ne,ae,Mr,{flushSync:ut});return}else if(Jt.matches)ze=Jt.matches,_e=Bb(ze,ge);else{an(ne,ae,Ys(404,{pathname:ge}),{flushSync:ut});return}}H.set(ne,rt);let ln=q,hn=(await et("loader",st,[_e],ze))[0];if(th(hn)&&(hn=await U8(hn,st.signal,!0)||hn),H.get(ne)===rt&&H.delete(ne),!st.signal.aborted){if(Q.has(ne)){kt(ne,Gu(void 0));return}if(nh(hn))if(ee>ln){kt(ne,Gu(void 0));return}else{X.add(ne),await Ve(st,hn);return}if(ho(hn)){an(ne,ae,hn.error);return}Ot(!th(hn),"Unhandled fetcher deferred data"),kt(ne,Gu(hn.data))}}async function Ve(ne,ae,ge){let{submission:_e,fetcherSubmission:ze,replace:Ge}=ge===void 0?{}:ge;ae.response.headers.has("X-Remix-Revalidate")&&(L=!0);let ut=ae.response.headers.get("Location");Ot(ut,"Expected a Location header on the redirect Response"),ut=Qz(ut,new URL(ne.url),c);let je=Q0(P.location,ut,{_isRedirect:!0});if(n){let hn=!1;if(ae.response.headers.has("X-Remix-Reload-Document"))hn=!0;else if(rL.test(ut)){const Jt=t.history.createURL(ut);hn=Jt.origin!==e.location.origin||nf(Jt.pathname,c)==null}if(hn){Ge?e.location.replace(ut):e.location.assign(ut);return}}N=null;let xt=Ge===!0||ae.response.headers.has("X-Remix-Replace")?Pr.Replace:Pr.Push,{formMethod:rt,formAction:st,formEncType:ln}=P.navigation;!_e&&!ze&&rt&&st&&ln&&(_e=oB(P.navigation));let tn=_e||ze;if(lpe.has(ae.response.status)&&tn&&Ia(tn.formMethod))await nt(xt,je,{submission:tr({},tn,{formAction:ut}),preventScrollReset:E});else{let hn=LT(je,_e);await nt(xt,je,{overrideNavigation:hn,fetcherSubmission:ze,preventScrollReset:E})}}async function et(ne,ae,ge,_e){try{let ze=await vpe(u,ne,ae,ge,_e,i,s);return await Promise.all(ze.map((Ge,ut)=>{if(Cpe(Ge)){let je=Ge.result;return{type:Rn.redirect,response:xpe(je,ae,ge[ut].route.id,_e,c,l.v7_relativeSplatPath)}}return bpe(Ge)}))}catch(ze){return ge.map(()=>({type:Rn.error,error:ze}))}}async function qt(ne,ae,ge,_e,ze){let[Ge,...ut]=await Promise.all([ge.length?et("loader",ze,ge,ae):[],..._e.map(je=>{if(je.matches&&je.match&&je.controller){let xt=vm(t.history,je.path,je.controller.signal);return et("loader",xt,[je.match],je.matches).then(rt=>rt[0])}else return Promise.resolve({type:Rn.error,error:Ys(404,{pathname:je.path})})})]);return await Promise.all([iB(ne,ge,Ge,Ge.map(()=>ze.signal),!1,P.loaderData),iB(ne,_e.map(je=>je.match),ut,_e.map(je=>je.controller?je.controller.signal:null),!0)]),{loaderResults:Ge,fetcherResults:ut}}function gt(){L=!0,U.push(...Zt()),G.forEach((ne,ae)=>{H.has(ae)&&(K.add(ae),or(ae))})}function kt(ne,ae,ge){ge===void 0&&(ge={}),P.fetchers.set(ne,ae),Me({fetchers:new Map(P.fetchers)},{flushSync:(ge&&ge.flushSync)===!0})}function an(ne,ae,ge,_e){_e===void 0&&(_e={});let ze=Zm(P.matches,ae);_n(ne),Me({errors:{[ze.route.id]:ge},fetchers:new Map(P.fetchers)},{flushSync:(_e&&_e.flushSync)===!0})}function gr(ne){return l.v7_fetcherPersist&&(Y.set(ne,(Y.get(ne)||0)+1),Q.has(ne)&&Q.delete(ne)),P.fetchers.get(ne)||cpe}function _n(ne){let ae=P.fetchers.get(ne);H.has(ne)&&!(ae&&ae.state==="loading"&&se.has(ne))&&or(ne),G.delete(ne),se.delete(ne),X.delete(ne),Q.delete(ne),K.delete(ne),P.fetchers.delete(ne)}function di(ne){if(l.v7_fetcherPersist){let ae=(Y.get(ne)||0)-1;ae<=0?(Y.delete(ne),Q.add(ne)):Y.set(ne,ae)}else _n(ne);Me({fetchers:new Map(P.fetchers)})}function or(ne){let ae=H.get(ne);Ot(ae,"Expected fetch controller: "+ne),ae.abort(),H.delete(ne)}function fi(ne){for(let ae of ne){let ge=gr(ae),_e=Gu(ge.data);P.fetchers.set(ae,_e)}}function $e(){let ne=[],ae=!1;for(let ge of X){let _e=P.fetchers.get(ge);Ot(_e,"Expected fetcher: "+ge),_e.state==="loading"&&(X.delete(ge),ne.push(ge),ae=!0)}return fi(ne),ae}function Ye(ne){let ae=[];for(let[ge,_e]of se)if(_e 0}function ht(ne,ae){let ge=P.blockers.get(ne)||km;return fe.get(ne)!==ae&&fe.set(ne,ae),ge}function Qe(ne){P.blockers.delete(ne),fe.delete(ne)}function yt(ne,ae){let ge=P.blockers.get(ne)||km;Ot(ge.state==="unblocked"&&ae.state==="blocked"||ge.state==="blocked"&&ae.state==="blocked"||ge.state==="blocked"&&ae.state==="proceeding"||ge.state==="blocked"&&ae.state==="unblocked"||ge.state==="proceeding"&&ae.state==="unblocked","Invalid blocker state transition: "+ge.state+" -> "+ae.state);let _e=new Map(P.blockers);_e.set(ne,ae),Me({blockers:_e})}function Nt(ne){let{currentLocation:ae,nextLocation:ge,historyAction:_e}=ne;if(fe.size===0)return;fe.size>1&&Uv(!1,"A router only supports one blocker at a time");let ze=Array.from(fe.entries()),[Ge,ut]=ze[ze.length-1],je=P.blockers.get(Ge);if(!(je&&je.state==="proceeding")&&ut({currentLocation:ae,nextLocation:ge,historyAction:_e}))return Ge}function _t(ne){let ae=Ys(404,{pathname:ne}),ge=a||o,{matches:_e,route:ze}=nB(ge);return Zt(),{notFoundMatches:_e,route:ze,error:ae}}function Wt(ne,ae){return{boundaryId:Zm(ae.partialMatches).route.id,error:Ys(400,{type:"route-discovery",pathname:ne,message:ae.error!=null&&"message"in ae.error?ae.error:String(ae.error)})}}function Zt(ne){let ae=[];return he.forEach((ge,_e)=>{(!ne||ne(_e))&&(ge.cancel(),ae.push(_e),he.delete(_e))}),ae}function ar(ne,ae,ge){if(h=ne,y=ae,m=ge||null,!g&&P.navigation===jT){g=!0;let _e=Dr(P.location,P.matches);_e!=null&&Me({restoreScrollPosition:_e})}return()=>{h=null,y=null,m=null}}function Nn(ne,ae){return m&&m(ne,ae.map(_e=>zhe(_e,P.loaderData)))||ne.key}function Cr(ne,ae){if(h&&y){let ge=Nn(ne,ae);h[ge]=y()}}function Dr(ne,ae){if(h){let ge=Nn(ne,ae),_e=h[ge];if(typeof _e=="number")return _e}return null}function Hi(ne,ae,ge){if(f)if(ne){let _e=ne[ne.length-1].route;if(_e.path&&(_e.path==="*"||_e.path.endsWith("/*")))return{active:!0,matches:tC(ae,ge,c,!0)}}else return{active:!0,matches:tC(ae,ge,c,!0)||[]};return{active:!1,matches:null}}async function Yr(ne,ae,ge){let _e=ne,ze=_e.length>0?_e[_e.length-1].route:null;for(;;){let Ge=a==null,ut=a||o;try{await mpe(f,ae,_e,ut,i,s,ce,ge)}catch(st){return{type:"error",error:st,partialMatches:_e}}finally{Ge&&(o=[...o])}if(ge.aborted)return{type:"aborted"};let je=Wf(ut,ae,c),xt=!1;if(je){let st=je[je.length-1].route;if(st.index)return{type:"success",matches:je};if(st.path&&st.path.length>0)if(st.path==="*")xt=!0;else return{type:"success",matches:je}}let rt=tC(ut,ae,c,!0);if(!rt||_e.map(st=>st.route.id).join("-")===rt.map(st=>st.route.id).join("-"))return{type:"success",matches:xt?je:null};if(_e=rt,ze=_e[_e.length-1].route,ze.path==="*")return{type:"success",matches:_e}}}function Jl(ne){i={},a=Z0(ne,s,void 0,i)}function ua(ne,ae){let ge=a==null;F8(ne,ae,a||o,i,s),ge&&(o=[...o],Me({}))}return R={get basename(){return c},get future(){return l},get state(){return P},get routes(){return o},get window(){return e},initialize:Pe,subscribe:Le,enableScrollRestoration:ar,navigate:Fe,fetch:Ae,revalidate:ot,createHref:ne=>t.history.createHref(ne),encodeLocation:ne=>t.history.encodeLocation(ne),getFetcher:gr,deleteFetcher:di,dispose:pe,getBlocker:ht,deleteBlocker:Qe,patchRoutes:ua,_internalFetchControllers:H,_internalActiveDeferreds:he,_internalSetRoutes:Jl},R}function fpe(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function SM(t,e,n,r,s,i,o,a){let c,u;if(o){c=[];for(let l of e)if(c.push(l),l.route.id===o){u=l;break}}else c=e,u=e[e.length-1];let f=ZR(s||".",QR(c,i),nf(t.pathname,n)||t.pathname,a==="path");return s==null&&(f.search=t.search,f.hash=t.hash),(s==null||s===""||s===".")&&u&&u.route.index&&!sL(f.search)&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(f.pathname=f.pathname==="/"?n:su([n,f.pathname])),wp(f)}function Gz(t,e,n,r){if(!r||!fpe(r))return{path:n};if(r.formMethod&&!Rpe(r.formMethod))return{path:n,error:Ys(405,{method:r.formMethod})};let s=()=>({path:n,error:Ys(400,{type:"invalid-body"})}),i=r.formMethod||"get",o=t?i.toUpperCase():i.toLowerCase(),a=z8(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ia(o))return s();let d=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((p,h)=>{let[m,y]=h;return""+p+m+"="+y+` +`},""):String(r.body);return{path:n,submission:{formMethod:o,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:d}}}else if(r.formEncType==="application/json"){if(!Ia(o))return s();try{let d=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:o,formAction:a,formEncType:r.formEncType,formData:void 0,json:d,text:void 0}}}catch{return s()}}}Ot(typeof FormData=="function","FormData is not available in this environment");let c,u;if(r.formData)c=CM(r.formData),u=r.formData;else if(r.body instanceof FormData)c=CM(r.body),u=r.body;else if(r.body instanceof URLSearchParams)c=r.body,u=Zz(c);else if(r.body==null)c=new URLSearchParams,u=new FormData;else try{c=new URLSearchParams(r.body),u=Zz(c)}catch{return s()}let f={formMethod:o,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Ia(f.formMethod))return{path:n,submission:f};let l=vf(n);return e&&l.search&&sL(l.search)&&c.append("index",""),l.search="?"+c,{path:wp(l),submission:f}}function hpe(t,e){let n=t;if(e){let r=t.findIndex(s=>s.route.id===e);r>=0&&(n=t.slice(0,r))}return n}function Kz(t,e,n,r,s,i,o,a,c,u,f,l,d,p,h,m){let y=m?ho(m[1])?m[1].error:m[1].data:void 0,g=t.createURL(e.location),v=t.createURL(s),b=m&&ho(m[1])?m[0]:void 0,_=b?hpe(n,b):n,R=m?m[1].statusCode:void 0,P=o&&R&&R>=400,T=_.filter((N,k)=>{let{route:M}=N;if(M.lazy)return!0;if(M.loader==null)return!1;if(i)return typeof M.loader!="function"||M.loader.hydrate?!0:e.loaderData[M.id]===void 0&&(!e.errors||e.errors[M.id]===void 0);if(ppe(e.loaderData,e.matches[k],N)||c.some(L=>L===N.route.id))return!0;let I=e.matches[k],j=N;return Yz(N,tr({currentUrl:g,currentParams:I.params,nextUrl:v,nextParams:j.params},r,{actionResult:y,actionStatus:R,defaultShouldRevalidate:P?!1:a||g.pathname+g.search===v.pathname+v.search||g.search!==v.search||$8(I,j)}))}),E=[];return l.forEach((N,k)=>{if(i||!n.some(U=>U.route.id===N.routeId)||f.has(k))return;let M=Wf(p,N.path,h);if(!M){E.push({key:k,routeId:N.routeId,path:N.path,matches:null,match:null,controller:null});return}let I=e.fetchers.get(k),j=Bb(M,N.path),L=!1;d.has(k)?L=!1:u.has(k)?(u.delete(k),L=!0):I&&I.state!=="idle"&&I.data===void 0?L=a:L=Yz(j,tr({currentUrl:g,currentParams:e.matches[e.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:y,actionStatus:R,defaultShouldRevalidate:P?!1:a})),L&&E.push({key:k,routeId:N.routeId,path:N.path,matches:M,match:j,controller:new AbortController})}),[T,E]}function ppe(t,e,n){let r=!e||n.route.id!==e.route.id,s=t[n.route.id]===void 0;return r||s}function $8(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function Yz(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}async function mpe(t,e,n,r,s,i,o,a){let c=[e,...n.map(u=>u.route.id)].join("-");try{let u=o.get(c);u||(u=t({path:e,matches:n,patch:(f,l)=>{a.aborted||F8(f,l,r,s,i)}}),o.set(c,u)),u&&Spe(u)&&await u}finally{o.delete(c)}}function F8(t,e,n,r,s){if(t){var i;let o=r[t];Ot(o,"No route found to patch children into: routeId = "+t);let a=Z0(e,s,[t,"patch",String(((i=o.children)==null?void 0:i.length)||"0")],r);o.children?o.children.push(...a):o.children=a}else{let o=Z0(e,s,["patch",String(n.length||"0")],r);n.push(...o)}}async function Xz(t,e,n){if(!t.lazy)return;let r=await t.lazy();if(!t.lazy)return;let s=n[t.id];Ot(s,"No route found in manifest");let i={};for(let o in r){let c=s[o]!==void 0&&o!=="hasErrorBoundary";Uv(!c,'Route "'+s.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!c&&!$he.has(o)&&(i[o]=r[o])}Object.assign(s,i),Object.assign(s,tr({},e(s),{lazy:void 0}))}function gpe(t){return Promise.all(t.matches.map(e=>e.resolve()))}async function vpe(t,e,n,r,s,i,o,a){let c=r.reduce((l,d)=>l.add(d.route.id),new Set),u=new Set,f=await t({matches:s.map(l=>{let d=c.has(l.route.id);return tr({},l,{shouldLoad:d,resolve:h=>(u.add(l.route.id),d?ype(e,n,l,i,o,h,a):Promise.resolve({type:Rn.data,result:void 0}))})}),request:n,params:s[0].params,context:a});return s.forEach(l=>Ot(u.has(l.route.id),'`match.resolve()` was not called for route id "'+l.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),f.filter((l,d)=>c.has(s[d].route.id))}async function ype(t,e,n,r,s,i,o){let a,c,u=f=>{let l,d=new Promise((m,y)=>l=y);c=()=>l(),e.signal.addEventListener("abort",c);let p=m=>typeof f!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+t+'" [routeId: '+n.route.id+"]"))):f({request:e,params:n.params,context:o},...m!==void 0?[m]:[]),h;return i?h=i(m=>p(m)):h=(async()=>{try{return{type:"data",result:await p()}}catch(m){return{type:"error",result:m}}})(),Promise.race([h,d])};try{let f=n.route[t];if(n.route.lazy)if(f){let l,[d]=await Promise.all([u(f).catch(p=>{l=p}),Xz(n.route,s,r)]);if(l!==void 0)throw l;a=d}else if(await Xz(n.route,s,r),f=n.route[t],f)a=await u(f);else if(t==="action"){let l=new URL(e.url),d=l.pathname+l.search;throw Ys(405,{method:e.method,pathname:d,routeId:n.route.id})}else return{type:Rn.data,result:void 0};else if(f)a=await u(f);else{let l=new URL(e.url),d=l.pathname+l.search;throw Ys(404,{pathname:d})}Ot(a.result!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(f){return{type:Rn.error,result:f}}finally{c&&e.signal.removeEventListener("abort",c)}return a}async function bpe(t){let{result:e,type:n}=t;if(B8(e)){let u;try{let f=e.headers.get("Content-Type");f&&/\bapplication\/json\b/.test(f)?e.body==null?u=null:u=await e.json():u=await e.text()}catch(f){return{type:Rn.error,error:f}}return n===Rn.error?{type:Rn.error,error:new hE(e.status,e.statusText,u),statusCode:e.status,headers:e.headers}:{type:Rn.data,data:u,statusCode:e.status,headers:e.headers}}if(n===Rn.error){if(sB(e)){var r;if(e.data instanceof Error){var s;return{type:Rn.error,error:e.data,statusCode:(s=e.init)==null?void 0:s.status}}e=new hE(((r=e.init)==null?void 0:r.status)||500,void 0,e.data)}return{type:Rn.error,error:e,statusCode:JR(e)?e.status:void 0}}if(Epe(e)){var i,o;return{type:Rn.deferred,deferredData:e,statusCode:(i=e.init)==null?void 0:i.status,headers:((o=e.init)==null?void 0:o.headers)&&new Headers(e.init.headers)}}if(sB(e)){var a,c;return{type:Rn.data,data:e.data,statusCode:(a=e.init)==null?void 0:a.status,headers:(c=e.init)!=null&&c.headers?new Headers(e.init.headers):void 0}}return{type:Rn.data,data:e}}function xpe(t,e,n,r,s,i){let o=t.headers.get("Location");if(Ot(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!rL.test(o)){let a=r.slice(0,r.findIndex(c=>c.route.id===n)+1);o=SM(new URL(e.url),a,s,!0,o,i),t.headers.set("Location",o)}return t}function Qz(t,e,n){if(rL.test(t)){let r=t,s=r.startsWith("//")?new URL(e.protocol+r):new URL(r),i=nf(s.pathname,n)!=null;if(s.origin===e.origin&&i)return s.pathname+s.search+s.hash}return t}function vm(t,e,n,r){let s=t.createURL(z8(e)).toString(),i={signal:n};if(r&&Ia(r.formMethod)){let{formMethod:o,formEncType:a}=r;i.method=o.toUpperCase(),a==="application/json"?(i.headers=new Headers({"Content-Type":a}),i.body=JSON.stringify(r.json)):a==="text/plain"?i.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?i.body=CM(r.formData):i.body=r.formData}return new Request(s,i)}function CM(t){let e=new URLSearchParams;for(let[n,r]of t.entries())e.append(n,typeof r=="string"?r:r.name);return e}function Zz(t){let e=new FormData;for(let[n,r]of t.entries())e.append(n,r);return e}function wpe(t,e,n,r,s,i){let o={},a=null,c,u=!1,f={},l=r&&ho(r[1])?r[1].error:void 0;return n.forEach((d,p)=>{let h=e[p].route.id;if(Ot(!nh(d),"Cannot handle redirect results in processLoaderData"),ho(d)){let m=d.error;l!==void 0&&(m=l,l=void 0),a=a||{};{let y=Zm(t,h);a[y.route.id]==null&&(a[y.route.id]=m)}o[h]=void 0,u||(u=!0,c=JR(d.error)?d.error.status:500),d.headers&&(f[h]=d.headers)}else th(d)?(s.set(h,d.deferredData),o[h]=d.deferredData.data,d.statusCode!=null&&d.statusCode!==200&&!u&&(c=d.statusCode),d.headers&&(f[h]=d.headers)):(o[h]=d.data,d.statusCode&&d.statusCode!==200&&!u&&(c=d.statusCode),d.headers&&(f[h]=d.headers))}),l!==void 0&&r&&(a={[r[0]]:l},o[r[0]]=void 0),{loaderData:o,errors:a,statusCode:c||200,loaderHeaders:f}}function Jz(t,e,n,r,s,i,o,a){let{loaderData:c,errors:u}=wpe(e,n,r,s,a);for(let f=0;f r.route.id===e)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function nB(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function Ys(t,e){let{pathname:n,routeId:r,method:s,type:i,message:o}=e===void 0?{}:e,a="Unknown Server Error",c="Unknown @remix-run/router error";return t===400?(a="Bad Request",i==="route-discovery"?c='Unable to match URL "'+n+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error: +`+o):s&&n&&r?c="You made a "+s+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":i==="defer-action"?c="defer() is not supported in actions":i==="invalid-body"&&(c="Unable to encode submission body")):t===403?(a="Forbidden",c='Route "'+r+'" does not match URL "'+n+'"'):t===404?(a="Not Found",c='No route matches URL "'+n+'"'):t===405&&(a="Method Not Allowed",s&&n&&r?c="You made a "+s.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":s&&(c='Invalid request method "'+s.toUpperCase()+'"')),new hE(t||500,a,new Error(c),!0)}function rB(t){for(let e=t.length-1;e>=0;e--){let n=t[e];if(nh(n))return{result:n,idx:e}}}function z8(t){let e=typeof t=="string"?vf(t):t;return wp(tr({},e,{hash:""}))}function _pe(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function Spe(t){return typeof t=="object"&&t!=null&&"then"in t}function Cpe(t){return B8(t.result)&&ape.has(t.result.status)}function th(t){return t.type===Rn.deferred}function ho(t){return t.type===Rn.error}function nh(t){return(t&&t.type)===Rn.redirect}function sB(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function Epe(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function B8(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function Rpe(t){return ope.has(t.toLowerCase())}function Ia(t){return spe.has(t.toLowerCase())}async function iB(t,e,n,r,s,i){for(let o=0;o l.route.id===c.route.id),f=u!=null&&!$8(u,c)&&(i&&i[c.route.id])!==void 0;if(th(a)&&(s||f)){let l=r[o];Ot(l,"Expected an AbortSignal for revalidating fetcher deferred result"),await U8(a,l,s).then(d=>{d&&(n[o]=d||n[o])})}}}async function U8(t,e,n){if(n===void 0&&(n=!1),!await t.deferredData.resolveData(e)){if(n)try{return{type:Rn.data,data:t.deferredData.unwrappedData}}catch(s){return{type:Rn.error,error:s}}return{type:Rn.data,data:t.deferredData.data}}}function sL(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function Bb(t,e){let n=typeof e=="string"?vf(e).search:e.search;if(t[t.length-1].route.index&&sL(n||""))return t[t.length-1];let r=I8(t);return r[r.length-1]}function oB(t){let{formMethod:e,formAction:n,formEncType:r,text:s,formData:i,json:o}=t;if(!(!e||!n||!r)){if(s!=null)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:void 0,text:s};if(i!=null)return{formMethod:e,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0};if(o!==void 0)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function LT(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Ape(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function pb(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Ppe(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function Gu(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Npe(t,e){try{let n=t.sessionStorage.getItem(L8);if(n){let r=JSON.parse(n);for(let[s,i]of Object.entries(r||{}))i&&Array.isArray(i)&&e.set(s,new Set(i||[]))}}catch{}}function Tpe(t,e){if(e.size>0){let n={};for(let[r,s]of e)n[r]=[...s];try{t.sessionStorage.setItem(L8,JSON.stringify(n))}catch(r){Uv(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** * React Router v6.26.0 * * Copyright (c) Remix Software Inc. @@ -57,7 +57,7 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Hv(){return Hv=Object.assign?Object.assign.bind():function(t){for(var e=1;e {a.current=!0}),S.useCallback(function(u,f){if(f===void 0&&(f={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let l=QR(u,JSON.parse(o),i,f.relative==="path");t==null&&e!=="/"&&(l.pathname=l.pathname==="/"?e:su([e,l.pathname])),(f.replace?r.replace:r.push)(l,f.state,f)},[e,r,o,i,t])}const Dpe=S.createContext(null);function Mpe(t){let e=S.useContext(Gl).outlet;return e&&S.createElement(Dpe.Provider,{value:t},e)}function Ope(){let{matches:t}=S.useContext(Gl),e=t[t.length-1];return e?e.params:{}}function G8(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=S.useContext(yf),{matches:s}=S.useContext(Gl),{pathname:i}=Bp(),o=JSON.stringify(XR(s,r.v7_relativeSplatPath));return S.useMemo(()=>QR(t,JSON.parse(o),i,n==="path"),[t,o,i,n])}function Ipe(t,e,n,r){ay()||Ot(!1);let{navigator:s}=S.useContext(yf),{matches:i}=S.useContext(Gl),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=Bp(),f;f=u;let l=f.pathname||"/",d=l;if(c!=="/"){let m=c.replace(/^\//,"").split("/");d="/"+l.replace(/^\//,"").split("/").slice(m.length).join("/")}let p=Wf(t,{pathname:d});return zpe(p&&p.map(m=>Object.assign({},m,{params:Object.assign({},a,m.params),pathname:su([c,s.encodeLocation?s.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?c:su([c,s.encodeLocation?s.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),i,n,r)}function jpe(){let t=Upe(),e=ZR(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},e),n?S.createElement("pre",{style:s},n):null,null)}const Lpe=S.createElement(jpe,null);class $pe 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,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?S.createElement(Gl.Provider,{value:this.props.routeContext},S.createElement(q8.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Fpe(t){let{routeContext:e,match:n,children:r}=t,s=S.useContext(JR);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),S.createElement(Gl.Provider,{value:e},r)}function zpe(t,e,n,r){var s;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var i;if(!n)return null;if(n.errors)t=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let o=t,a=(s=n)==null?void 0:s.errors;if(a!=null){let f=o.findIndex(l=>l.route.id&&(a==null?void 0:a[l.route.id])!==void 0);f>=0||Ot(!1),o=o.slice(0,Math.min(o.length,f+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f =0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((f,l,d)=>{let p,h=!1,m=null,y=null;n&&(p=a&&l.route.id?a[l.route.id]:void 0,m=l.route.errorElement||Lpe,c&&(u<0&&d===0?(Wpe("route-fallback"),h=!0,y=null):u===d&&(h=!0,y=l.route.hydrateFallbackElement||null)));let g=e.concat(o.slice(0,d+1)),v=()=>{let b;return p?b=m:h?b=y:l.route.Component?b=S.createElement(l.route.Component,null):l.route.element?b=l.route.element:b=f,S.createElement(Fpe,{match:l,routeContext:{outlet:f,matches:g,isDataRoute:n!=null},children:b})};return n&&(l.route.ErrorBoundary||l.route.errorElement||d===0)?S.createElement($pe,{location:n.location,revalidation:n.revalidation,component:m,error:p,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var oL=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(oL||{}),J0=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(J0||{});function K8(t){let e=S.useContext(JR);return e||Ot(!1),e}function Y8(t){let e=S.useContext(V8);return e||Ot(!1),e}function Bpe(t){let e=S.useContext(Gl);return e||Ot(!1),e}function X8(t){let e=Bpe(),n=e.matches[e.matches.length-1];return n.route.id||Ot(!1),n.route.id}function Upe(){var t;let e=S.useContext(q8),n=Y8(J0.UseRouteError),r=X8(J0.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}let Hpe=0;function Vpe(t){let{router:e,basename:n}=K8(oL.UseBlocker),r=Y8(J0.UseBlocker),[s,i]=S.useState(""),o=S.useCallback(a=>{if(typeof t!="function")return!!t;if(n==="/")return t(a);let{currentLocation:c,nextLocation:u,historyAction:f}=a;return t({currentLocation:Hv({},c,{pathname:nf(c.pathname,n)||c.pathname}),nextLocation:Hv({},u,{pathname:nf(u.pathname,n)||u.pathname}),historyAction:f})},[n,t]);return S.useEffect(()=>{let a=String(++Hpe);return i(a),()=>e.deleteBlocker(a)},[e]),S.useEffect(()=>{s!==""&&e.getBlocker(s,o)},[e,s,o]),s&&r.blockers.has(s)?r.blockers.get(s):km}function qpe(){let{router:t}=K8(oL.UseNavigateStable),e=X8(J0.UseNavigateStable),n=S.useRef(!1);return W8(()=>{n.current=!0}),S.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,Hv({fromRouteId:e},i)))},[t,e])}const lB={};function Wpe(t,e,n){lB[t]||(lB[t]=!0)}function CM(t){let{to:e,replace:n,state:r,relative:s}=t;ay()||Ot(!1);let{future:i,static:o}=S.useContext(yf),{matches:a}=S.useContext(Gl),{pathname:c}=Bp(),u=$s(),f=QR(e,XR(a,i.v7_relativeSplatPath),c,s==="path"),l=JSON.stringify(f);return S.useEffect(()=>u(JSON.parse(l),{replace:n,state:r,relative:s}),[u,l,s,n,r]),null}function l1(t){return Mpe(t.context)}function Gpe(t){let{basename:e="/",children:n=null,location:r,navigationType:s=Pr.Pop,navigator:i,static:o=!1,future:a}=t;ay()&&Ot(!1);let c=e.replace(/^\/*/,"/"),u=S.useMemo(()=>({basename:c,navigator:i,static:o,future:Hv({v7_relativeSplatPath:!1},a)}),[c,a,i,o]);typeof r=="string"&&(r=vf(r));let{pathname:f="/",search:l="",hash:d="",state:p=null,key:h="default"}=r,m=S.useMemo(()=>{let y=nf(f,c);return y==null?null:{location:{pathname:y,search:l,hash:d,state:p,key:h},navigationType:s}},[c,f,l,d,p,h,s]);return m==null?null:S.createElement(yf.Provider,{value:u},S.createElement(iL.Provider,{children:n,value:m}))}new Promise(()=>{});function Kpe(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:S.createElement(t.Component),Component:void 0}),t.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:S.createElement(t.HydrateFallback),HydrateFallback:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:S.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/** + */function Hv(){return Hv=Object.assign?Object.assign.bind():function(t){for(var e=1;e {a.current=!0}),S.useCallback(function(u,f){if(f===void 0&&(f={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let l=ZR(u,JSON.parse(o),i,f.relative==="path");t==null&&e!=="/"&&(l.pathname=l.pathname==="/"?e:su([e,l.pathname])),(f.replace?r.replace:r.push)(l,f.state,f)},[e,r,o,i,t])}const Mpe=S.createContext(null);function Ope(t){let e=S.useContext(Gl).outlet;return e&&S.createElement(Mpe.Provider,{value:t},e)}function Ipe(){let{matches:t}=S.useContext(Gl),e=t[t.length-1];return e?e.params:{}}function W8(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=S.useContext(yf),{matches:s}=S.useContext(Gl),{pathname:i}=Bp(),o=JSON.stringify(QR(s,r.v7_relativeSplatPath));return S.useMemo(()=>ZR(t,JSON.parse(o),i,n==="path"),[t,o,i,n])}function jpe(t,e,n,r){ay()||Ot(!1);let{navigator:s}=S.useContext(yf),{matches:i}=S.useContext(Gl),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=Bp(),f;f=u;let l=f.pathname||"/",d=l;if(c!=="/"){let m=c.replace(/^\//,"").split("/");d="/"+l.replace(/^\//,"").split("/").slice(m.length).join("/")}let p=Wf(t,{pathname:d});return Bpe(p&&p.map(m=>Object.assign({},m,{params:Object.assign({},a,m.params),pathname:su([c,s.encodeLocation?s.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?c:su([c,s.encodeLocation?s.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),i,n,r)}function Lpe(){let t=Hpe(),e=JR(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},e),n?S.createElement("pre",{style:s},n):null,null)}const $pe=S.createElement(Lpe,null);class Fpe 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,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?S.createElement(Gl.Provider,{value:this.props.routeContext},S.createElement(V8.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function zpe(t){let{routeContext:e,match:n,children:r}=t,s=S.useContext(eA);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),S.createElement(Gl.Provider,{value:e},r)}function Bpe(t,e,n,r){var s;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var i;if(!n)return null;if(n.errors)t=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let o=t,a=(s=n)==null?void 0:s.errors;if(a!=null){let f=o.findIndex(l=>l.route.id&&(a==null?void 0:a[l.route.id])!==void 0);f>=0||Ot(!1),o=o.slice(0,Math.min(o.length,f+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f =0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((f,l,d)=>{let p,h=!1,m=null,y=null;n&&(p=a&&l.route.id?a[l.route.id]:void 0,m=l.route.errorElement||$pe,c&&(u<0&&d===0?(Gpe("route-fallback"),h=!0,y=null):u===d&&(h=!0,y=l.route.hydrateFallbackElement||null)));let g=e.concat(o.slice(0,d+1)),v=()=>{let b;return p?b=m:h?b=y:l.route.Component?b=S.createElement(l.route.Component,null):l.route.element?b=l.route.element:b=f,S.createElement(zpe,{match:l,routeContext:{outlet:f,matches:g,isDataRoute:n!=null},children:b})};return n&&(l.route.ErrorBoundary||l.route.errorElement||d===0)?S.createElement(Fpe,{location:n.location,revalidation:n.revalidation,component:m,error:p,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var oL=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(oL||{}),J0=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(J0||{});function G8(t){let e=S.useContext(eA);return e||Ot(!1),e}function K8(t){let e=S.useContext(H8);return e||Ot(!1),e}function Upe(t){let e=S.useContext(Gl);return e||Ot(!1),e}function Y8(t){let e=Upe(),n=e.matches[e.matches.length-1];return n.route.id||Ot(!1),n.route.id}function Hpe(){var t;let e=S.useContext(V8),n=K8(J0.UseRouteError),r=Y8(J0.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}let Vpe=0;function qpe(t){let{router:e,basename:n}=G8(oL.UseBlocker),r=K8(J0.UseBlocker),[s,i]=S.useState(""),o=S.useCallback(a=>{if(typeof t!="function")return!!t;if(n==="/")return t(a);let{currentLocation:c,nextLocation:u,historyAction:f}=a;return t({currentLocation:Hv({},c,{pathname:nf(c.pathname,n)||c.pathname}),nextLocation:Hv({},u,{pathname:nf(u.pathname,n)||u.pathname}),historyAction:f})},[n,t]);return S.useEffect(()=>{let a=String(++Vpe);return i(a),()=>e.deleteBlocker(a)},[e]),S.useEffect(()=>{s!==""&&e.getBlocker(s,o)},[e,s,o]),s&&r.blockers.has(s)?r.blockers.get(s):km}function Wpe(){let{router:t}=G8(oL.UseNavigateStable),e=Y8(J0.UseNavigateStable),n=S.useRef(!1);return q8(()=>{n.current=!0}),S.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,Hv({fromRouteId:e},i)))},[t,e])}const aB={};function Gpe(t,e,n){aB[t]||(aB[t]=!0)}function EM(t){let{to:e,replace:n,state:r,relative:s}=t;ay()||Ot(!1);let{future:i,static:o}=S.useContext(yf),{matches:a}=S.useContext(Gl),{pathname:c}=Bp(),u=$s(),f=ZR(e,QR(a,i.v7_relativeSplatPath),c,s==="path"),l=JSON.stringify(f);return S.useEffect(()=>u(JSON.parse(l),{replace:n,state:r,relative:s}),[u,l,s,n,r]),null}function l1(t){return Ope(t.context)}function Kpe(t){let{basename:e="/",children:n=null,location:r,navigationType:s=Pr.Pop,navigator:i,static:o=!1,future:a}=t;ay()&&Ot(!1);let c=e.replace(/^\/*/,"/"),u=S.useMemo(()=>({basename:c,navigator:i,static:o,future:Hv({v7_relativeSplatPath:!1},a)}),[c,a,i,o]);typeof r=="string"&&(r=vf(r));let{pathname:f="/",search:l="",hash:d="",state:p=null,key:h="default"}=r,m=S.useMemo(()=>{let y=nf(f,c);return y==null?null:{location:{pathname:y,search:l,hash:d,state:p,key:h},navigationType:s}},[c,f,l,d,p,h,s]);return m==null?null:S.createElement(yf.Provider,{value:u},S.createElement(iL.Provider,{children:n,value:m}))}new Promise(()=>{});function Ype(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:S.createElement(t.Component),Component:void 0}),t.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:S.createElement(t.HydrateFallback),HydrateFallback:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:S.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/** * React Router DOM v6.26.0 * * Copyright (c) Remix Software Inc. @@ -66,233 +66,238 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function ex(){return ex=Object.assign?Object.assign.bind():function(t){for(var e=1;e =0)&&(n[s]=t[s]);return n}function Xpe(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Qpe(t,e){return t.button===0&&(!e||e==="_self")&&!Xpe(t)}function EM(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function Zpe(t,e){let n=EM(t);return e&&e.forEach((r,s)=>{n.has(s)||e.getAll(s).forEach(i=>{n.append(s,i)})}),n}const Jpe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],eme="6";try{window.__reactRouterVersion=eme}catch{}function tme(t,e){return upe({basename:e==null?void 0:e.basename,future:ex({},e==null?void 0:e.future,{v7_prependBasename:!0}),history:Ohe({window:e==null?void 0:e.window}),hydrationData:(e==null?void 0:e.hydrationData)||nme(),routes:t,mapRouteProperties:Kpe,unstable_dataStrategy:e==null?void 0:e.unstable_dataStrategy,unstable_patchRoutesOnMiss:e==null?void 0:e.unstable_patchRoutesOnMiss,window:e==null?void 0:e.window}).initialize()}function nme(){var t;let e=(t=window)==null?void 0:t.__staticRouterHydrationData;return e&&e.errors&&(e=ex({},e,{errors:rme(e.errors)})),e}function rme(t){if(!t)return null;let e=Object.entries(t),n={};for(let[r,s]of e)if(s&&s.__type==="RouteErrorResponse")n[r]=new hE(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let i=window[s.__subType];if(typeof i=="function")try{let o=new i(s.message);o.stack="",n[r]=o}catch{}}if(n[r]==null){let i=new Error(s.message);i.stack="",n[r]=i}}else n[r]=s;return n}const sme=S.createContext({isTransitioning:!1}),ime=S.createContext(new Map),ome="startTransition",cB=s_[ome],ame="flushSync",uB=Ufe[ame];function lme(t){cB?cB(t):t()}function mb(t){uB?uB(t):t()}class cme{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function ume(t){let{fallbackElement:e,router:n,future:r}=t,[s,i]=S.useState(n.state),[o,a]=S.useState(),[c,u]=S.useState({isTransitioning:!1}),[f,l]=S.useState(),[d,p]=S.useState(),[h,m]=S.useState(),y=S.useRef(new Map),{v7_startTransition:g}=r||{},v=S.useCallback(E=>{g?lme(E):E()},[g]),b=S.useCallback((E,N)=>{let{deletedFetchers:k,unstable_flushSync:M,unstable_viewTransitionOpts:I}=N;k.forEach(L=>y.current.delete(L)),E.fetchers.forEach((L,U)=>{L.data!==void 0&&y.current.set(U,L.data)});let j=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!I||j){M?mb(()=>i(E)):v(()=>i(E));return}if(M){mb(()=>{d&&(f&&f.resolve(),d.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:I.currentLocation,nextLocation:I.nextLocation})});let L=n.window.document.startViewTransition(()=>{mb(()=>i(E))});L.finished.finally(()=>{mb(()=>{l(void 0),p(void 0),a(void 0),u({isTransitioning:!1})})}),mb(()=>p(L));return}d?(f&&f.resolve(),d.skipTransition(),m({state:E,currentLocation:I.currentLocation,nextLocation:I.nextLocation})):(a(E),u({isTransitioning:!0,flushSync:!1,currentLocation:I.currentLocation,nextLocation:I.nextLocation}))},[n.window,d,f,y,v]);S.useLayoutEffect(()=>n.subscribe(b),[n,b]),S.useEffect(()=>{c.isTransitioning&&!c.flushSync&&l(new cme)},[c]),S.useEffect(()=>{if(f&&o&&n.window){let E=o,N=f.promise,k=n.window.document.startViewTransition(async()=>{v(()=>i(E)),await N});k.finished.finally(()=>{l(void 0),p(void 0),a(void 0),u({isTransitioning:!1})}),p(k)}},[v,o,f,n.window]),S.useEffect(()=>{f&&o&&s.location.key===o.location.key&&f.resolve()},[f,d,s.location,o]),S.useEffect(()=>{!c.isTransitioning&&h&&(a(h.state),u({isTransitioning:!0,flushSync:!1,currentLocation:h.currentLocation,nextLocation:h.nextLocation}),m(void 0))},[c.isTransitioning,h]),S.useEffect(()=>{},[]);let _=S.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:E=>n.navigate(E),push:(E,N,k)=>n.navigate(E,{state:N,preventScrollReset:k==null?void 0:k.preventScrollReset}),replace:(E,N,k)=>n.navigate(E,{replace:!0,state:N,preventScrollReset:k==null?void 0:k.preventScrollReset})}),[n]),R=n.basename||"/",P=S.useMemo(()=>({router:n,navigator:_,static:!1,basename:R}),[n,_,R]),T=S.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return S.createElement(S.Fragment,null,S.createElement(JR.Provider,{value:P},S.createElement(V8.Provider,{value:s},S.createElement(ime.Provider,{value:y.current},S.createElement(sme.Provider,{value:c},S.createElement(Gpe,{basename:R,location:s.location,navigationType:s.historyAction,navigator:_,future:T},s.initialized||n.future.v7_partialHydration?S.createElement(dme,{routes:n.routes,future:n.future,state:s}):e))))),null)}const dme=S.memo(fme);function fme(t){let{routes:e,future:n,state:r}=t;return Ipe(e,void 0,r,n)}const hme=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",pme=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yc=S.forwardRef(function(e,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:c,to:u,preventScrollReset:f,unstable_viewTransition:l}=e,d=Ype(e,Jpe),{basename:p}=S.useContext(yf),h,m=!1;if(typeof u=="string"&&pme.test(u)&&(h=u,hme))try{let b=new URL(window.location.href),_=u.startsWith("//")?new URL(b.protocol+u):new URL(u),R=nf(_.pathname,p);_.origin===b.origin&&R!=null?u=R+_.search+_.hash:m=!0}catch{}let y=Tpe(u,{relative:s}),g=mme(u,{replace:o,state:a,target:c,preventScrollReset:f,relative:s,unstable_viewTransition:l});function v(b){r&&r(b),b.defaultPrevented||g(b)}return S.createElement("a",ex({},d,{href:h||y,onClick:m||i?r:v,ref:n,target:c}))});var dB;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(dB||(dB={}));var fB;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(fB||(fB={}));function mme(t,e){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,unstable_viewTransition:a}=e===void 0?{}:e,c=$s(),u=Bp(),f=G8(t,{relative:o});return S.useCallback(l=>{if(Qpe(l,n)){l.preventDefault();let d=r!==void 0?r:wp(u)===wp(f);c(t,{replace:d,state:s,preventScrollReset:i,relative:o,unstable_viewTransition:a})}},[u,c,f,r,s,n,t,i,o,a])}function gme(t){let e=S.useRef(EM(t)),n=S.useRef(!1),r=Bp(),s=S.useMemo(()=>Zpe(r.search,n.current?null:e.current),[r.search]),i=$s(),o=S.useCallback((a,c)=>{const u=EM(typeof a=="function"?a(s):a);n.current=!0,i("?"+u,c)},[i,s]);return[s,o]}const vme=3,yme=1e6;let LT=0;function bme(){return LT=(LT+1)%Number.MAX_SAFE_INTEGER,LT.toString()}const $T=new Map,hB=t=>{if($T.has(t))return;const e=setTimeout(()=>{$T.delete(t),y0({type:"REMOVE_TOAST",toastId:t})},yme);$T.set(t,e)},xme=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,vme)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;return n?hB(n):t.toasts.forEach(r=>{hB(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},nC=[];let rC={toasts:[]};function y0(t){rC=xme(rC,t),nC.forEach(e=>{e(rC)})}function wme({...t}){const e=bme(),n=s=>y0({type:"UPDATE_TOAST",toast:{...s,id:e}}),r=()=>y0({type:"DISMISS_TOAST",toastId:e});return y0({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||r()}}}),{id:e,dismiss:r,update:n}}function Kl(){const[t,e]=S.useState(rC);return S.useEffect(()=>(nC.push(e),()=>{const n=nC.indexOf(e);n>-1&&nC.splice(n,1)}),[t]),{...t,toast:wme,dismiss:n=>y0({type:"DISMISS_TOAST",toastId:n})}}const _me=t=>{const{toast:e}=Kl(),{onSuccess:n,onError:r,...s}=t||{},i=vu(),{login:o}=KR(),a=$s();return ru({mutationKey:i().auth().action("login").get(),mutationFn:o,onSuccess:(c,u,f)=>{const{success:l,redirectTo:d}=c;l&&d&&a(d||"/quotes"),n&&n(c,u,f)},onError:(c,u,f)=>{const{message:l}=c;console.error(l),e({description:l,title:"Error"}),r&&r(c,u,f)},...s})};function Sme(t,e){const n=S.createContext(e);function r(i){const{children:o,...a}=i,c=S.useMemo(()=>a,Object.values(a));return w.jsx(n.Provider,{value:c,children:o})}function s(i){const o=S.useContext(n);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return r.displayName=t+"Provider",[r,s]}function In(t,e=[]){let n=[];function r(i,o){const a=S.createContext(o),c=n.length;n=[...n,o];function u(l){const{scope:d,children:p,...h}=l,m=(d==null?void 0:d[t][c])||a,y=S.useMemo(()=>h,Object.values(h));return w.jsx(m.Provider,{value:y,children:p})}function f(l,d){const p=(d==null?void 0:d[t][c])||a,h=S.useContext(p);if(h)return h;if(o!==void 0)return o;throw new Error(`\`${l}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const s=()=>{const i=n.map(o=>S.createContext(o));return function(a){const c=(a==null?void 0:a[t])||i;return S.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return s.scopeName=t,[r,Cme(s,...e)]}function Cme(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:c,scopeName:u})=>{const l=c(i)[`__scope${u}`];return{...a,...l}},{});return S.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}function Eme(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function c_(...t){return e=>t.forEach(n=>Eme(n,e))}function Je(...t){return S.useCallback(c_(...t),t)}var qa=S.forwardRef((t,e)=>{const{children:n,...r}=t,s=S.Children.toArray(n),i=s.find(Rme);if(i){const o=i.props.children,a=s.map(c=>c===i?S.Children.count(o)>1?S.Children.only(null):S.isValidElement(o)?o.props.children:null:c);return w.jsx(RM,{...r,ref:e,children:S.isValidElement(o)?S.cloneElement(o,void 0,a):null})}return w.jsx(RM,{...r,ref:e,children:n})});qa.displayName="Slot";var RM=S.forwardRef((t,e)=>{const{children:n,...r}=t;if(S.isValidElement(n)){const s=Pme(n);return S.cloneElement(n,{...Ame(r,n.props),ref:e?c_(e,s):s})}return S.Children.count(n)>1?S.Children.only(null):null});RM.displayName="SlotClone";var aL=({children:t})=>w.jsx(w.Fragment,{children:t});function Rme(t){return S.isValidElement(t)&&t.type===aL}function Ame(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{i(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function Pme(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function Cu(t){const e=t+"CollectionProvider",[n,r]=In(e),[s,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=p=>{const{scope:h,children:m}=p,y=oe.useRef(null),g=oe.useRef(new Map).current;return w.jsx(s,{scope:h,itemMap:g,collectionRef:y,children:m})};o.displayName=e;const a=t+"CollectionSlot",c=oe.forwardRef((p,h)=>{const{scope:m,children:y}=p,g=i(a,m),v=Je(h,g.collectionRef);return w.jsx(qa,{ref:v,children:y})});c.displayName=a;const u=t+"CollectionItemSlot",f="data-radix-collection-item",l=oe.forwardRef((p,h)=>{const{scope:m,children:y,...g}=p,v=oe.useRef(null),b=Je(h,v),_=i(u,m);return oe.useEffect(()=>(_.itemMap.set(v,{ref:v,...g}),()=>void _.itemMap.delete(v))),w.jsx(qa,{[f]:"",ref:b,children:y})});l.displayName=u;function d(p){const h=i(t+"CollectionConsumer",p);return oe.useCallback(()=>{const y=h.collectionRef.current;if(!y)return[];const g=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((_,R)=>g.indexOf(_.ref.current)-g.indexOf(R.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:o,Slot:c,ItemSlot:l},d,r]}function ye(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function on(t){const e=S.useRef(t);return S.useEffect(()=>{e.current=t}),S.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function mr({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,s]=Nme({defaultProp:e,onChange:n}),i=t!==void 0,o=i?t:r,a=on(n),c=S.useCallback(u=>{if(i){const l=typeof u=="function"?u(t):u;l!==t&&a(l)}else s(u)},[i,t,s,a]);return[o,c]}function Nme({defaultProp:t,onChange:e}){const n=S.useState(t),[r]=n,s=S.useRef(r),i=on(e);return S.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}var Tme=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],De=Tme.reduce((t,e)=>{const n=S.forwardRef((r,s)=>{const{asChild:i,...o}=r,a=i?qa:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(a,{...o,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function tx(t,e){t&&rs.flushSync(()=>t.dispatchEvent(e))}var ir=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{};function kme(t,e){return S.useReducer((n,r)=>e[n][r]??n,t)}var Kn=t=>{const{present:e,children:n}=t,r=Dme(e),s=typeof n=="function"?n({present:r.isPresent}):S.Children.only(n),i=Je(r.ref,Mme(s));return typeof n=="function"||r.isPresent?S.cloneElement(s,{ref:i}):null};Kn.displayName="Presence";function Dme(t){const[e,n]=S.useState(),r=S.useRef({}),s=S.useRef(t),i=S.useRef("none"),o=t?"mounted":"unmounted",[a,c]=kme(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const u=c1(r.current);i.current=a==="mounted"?u:"none"},[a]),ir(()=>{const u=r.current,f=s.current;if(f!==t){const d=i.current,p=c1(u);t?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&d!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),ir(()=>{if(e){const u=l=>{const p=c1(r.current).includes(l.animationName);l.target===e&&p&&rs.flushSync(()=>c("ANIMATION_END"))},f=l=>{l.target===e&&(i.current=c1(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",u),e.addEventListener("animationend",u),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",u),e.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:S.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function c1(t){return(t==null?void 0:t.animationName)||"none"}function Mme(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Ome=s_.useId||(()=>{}),Ime=0;function js(t){const[e,n]=S.useState(Ome());return ir(()=>{n(r=>r??String(Ime++))},[t]),e?`radix-${e}`:""}var lL="Collapsible",[jme,Q8]=In(lL),[Lme,cL]=jme(lL),Z8=S.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:i,onOpenChange:o,...a}=t,[c=!1,u]=mr({prop:r,defaultProp:s,onChange:o});return w.jsx(Lme,{scope:n,disabled:i,contentId:js(),open:c,onOpenToggle:S.useCallback(()=>u(f=>!f),[u]),children:w.jsx(De.div,{"data-state":dL(c),"data-disabled":i?"":void 0,...a,ref:e})})});Z8.displayName=lL;var J8="CollapsibleTrigger",eq=S.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,s=cL(J8,n);return w.jsx(De.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":dL(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:e,onClick:ye(t.onClick,s.onOpenToggle)})});eq.displayName=J8;var uL="CollapsibleContent",tq=S.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=cL(uL,t.__scopeCollapsible);return w.jsx(Kn,{present:n||s.open,children:({present:i})=>w.jsx($me,{...r,ref:e,present:i})})});tq.displayName=uL;var $me=S.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:s,...i}=t,o=cL(uL,n),[a,c]=S.useState(r),u=S.useRef(null),f=Je(e,u),l=S.useRef(0),d=l.current,p=S.useRef(0),h=p.current,m=o.open||a,y=S.useRef(m),g=S.useRef();return S.useEffect(()=>{const v=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(v)},[]),ir(()=>{const v=u.current;if(v){g.current=g.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const b=v.getBoundingClientRect();l.current=b.height,p.current=b.width,y.current||(v.style.transitionDuration=g.current.transitionDuration,v.style.animationName=g.current.animationName),c(r)}},[o.open,r]),w.jsx(De.div,{"data-state":dL(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...i,ref:f,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...t.style},children:m&&s})});function dL(t){return t?"open":"closed"}var Fme=Z8,zme=eq,Bme=tq,Ume=S.createContext(void 0);function Qa(t){const e=S.useContext(Ume);return t||e||"ltr"}var Eu="Accordion",Hme=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[fL,Vme,qme]=Cu(Eu),[eA,PUe]=In(Eu,[qme,Q8]),hL=Q8(),Wme=oe.forwardRef((t,e)=>{const{type:n,...r}=t,s=r,i=r;return w.jsx(fL.Provider,{scope:t.__scopeAccordion,children:n==="multiple"?w.jsx(Xme,{...i,ref:e}):w.jsx(Yme,{...s,ref:e})})});Wme.displayName=Eu;var[nq,Gme]=eA(Eu),[rq,Kme]=eA(Eu,{collapsible:!1}),Yme=oe.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:i=!1,...o}=t,[a,c]=mr({prop:n,defaultProp:r,onChange:s});return w.jsx(nq,{scope:t.__scopeAccordion,value:a?[a]:[],onItemOpen:c,onItemClose:oe.useCallback(()=>i&&c(""),[i,c]),children:w.jsx(rq,{scope:t.__scopeAccordion,collapsible:i,children:w.jsx(sq,{...o,ref:e})})})}),Xme=oe.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...i}=t,[o=[],a]=mr({prop:n,defaultProp:r,onChange:s}),c=oe.useCallback(f=>a((l=[])=>[...l,f]),[a]),u=oe.useCallback(f=>a((l=[])=>l.filter(d=>d!==f)),[a]);return w.jsx(nq,{scope:t.__scopeAccordion,value:o,onItemOpen:c,onItemClose:u,children:w.jsx(rq,{scope:t.__scopeAccordion,collapsible:!0,children:w.jsx(sq,{...i,ref:e})})})}),[Qme,tA]=eA(Eu),sq=oe.forwardRef((t,e)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:i="vertical",...o}=t,a=oe.useRef(null),c=Je(a,e),u=Vme(n),l=Qa(s)==="ltr",d=ye(t.onKeyDown,p=>{var E;if(!Hme.includes(p.key))return;const h=p.target,m=u().filter(N=>{var k;return!((k=N.ref.current)!=null&&k.disabled)}),y=m.findIndex(N=>N.ref.current===h),g=m.length;if(y===-1)return;p.preventDefault();let v=y;const b=0,_=g-1,R=()=>{v=y+1,v>_&&(v=b)},P=()=>{v=y-1,v{const{__scopeAccordion:n,value:r,...s}=t,i=tA(pE,n),o=Gme(pE,n),a=hL(n),c=js(),u=r&&o.value.includes(r)||!1,f=i.disabled||t.disabled;return w.jsx(Zme,{scope:n,open:u,disabled:f,triggerId:c,children:w.jsx(Fme,{"data-orientation":i.orientation,"data-state":dq(u),...a,...s,ref:e,disabled:f,open:u,onOpenChange:l=>{l?o.onItemOpen(r):o.onItemClose(r)}})})});iq.displayName=pE;var oq="AccordionHeader",aq=oe.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=tA(Eu,n),i=pL(oq,n);return w.jsx(De.h3,{"data-orientation":s.orientation,"data-state":dq(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:e})});aq.displayName=oq;var AM="AccordionTrigger",lq=oe.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=tA(Eu,n),i=pL(AM,n),o=Kme(AM,n),a=hL(n);return w.jsx(fL.ItemSlot,{scope:n,children:w.jsx(zme,{"aria-disabled":i.open&&!o.collapsible||void 0,"data-orientation":s.orientation,id:i.triggerId,...a,...r,ref:e})})});lq.displayName=AM;var cq="AccordionContent",uq=oe.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=tA(Eu,n),i=pL(cq,n),o=hL(n);return w.jsx(Bme,{role:"region","aria-labelledby":i.triggerId,"data-orientation":s.orientation,...o,...r,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});uq.displayName=cq;function dq(t){return t?"open":"closed"}var Jme=iq,ege=aq,fq=lq,hq=uq;/** + */function ex(){return ex=Object.assign?Object.assign.bind():function(t){for(var e=1;e =0)&&(n[s]=t[s]);return n}function Qpe(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Zpe(t,e){return t.button===0&&(!e||e==="_self")&&!Qpe(t)}function RM(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function Jpe(t,e){let n=RM(t);return e&&e.forEach((r,s)=>{n.has(s)||e.getAll(s).forEach(i=>{n.append(s,i)})}),n}const eme=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],tme="6";try{window.__reactRouterVersion=tme}catch{}function nme(t,e){return dpe({basename:e==null?void 0:e.basename,future:ex({},e==null?void 0:e.future,{v7_prependBasename:!0}),history:Ihe({window:e==null?void 0:e.window}),hydrationData:(e==null?void 0:e.hydrationData)||rme(),routes:t,mapRouteProperties:Ype,unstable_dataStrategy:e==null?void 0:e.unstable_dataStrategy,unstable_patchRoutesOnMiss:e==null?void 0:e.unstable_patchRoutesOnMiss,window:e==null?void 0:e.window}).initialize()}function rme(){var t;let e=(t=window)==null?void 0:t.__staticRouterHydrationData;return e&&e.errors&&(e=ex({},e,{errors:sme(e.errors)})),e}function sme(t){if(!t)return null;let e=Object.entries(t),n={};for(let[r,s]of e)if(s&&s.__type==="RouteErrorResponse")n[r]=new hE(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let i=window[s.__subType];if(typeof i=="function")try{let o=new i(s.message);o.stack="",n[r]=o}catch{}}if(n[r]==null){let i=new Error(s.message);i.stack="",n[r]=i}}else n[r]=s;return n}const ime=S.createContext({isTransitioning:!1}),ome=S.createContext(new Map),ame="startTransition",lB=s_[ame],lme="flushSync",cB=Hfe[lme];function cme(t){lB?lB(t):t()}function mb(t){cB?cB(t):t()}class ume{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function dme(t){let{fallbackElement:e,router:n,future:r}=t,[s,i]=S.useState(n.state),[o,a]=S.useState(),[c,u]=S.useState({isTransitioning:!1}),[f,l]=S.useState(),[d,p]=S.useState(),[h,m]=S.useState(),y=S.useRef(new Map),{v7_startTransition:g}=r||{},v=S.useCallback(E=>{g?cme(E):E()},[g]),b=S.useCallback((E,N)=>{let{deletedFetchers:k,unstable_flushSync:M,unstable_viewTransitionOpts:I}=N;k.forEach(L=>y.current.delete(L)),E.fetchers.forEach((L,U)=>{L.data!==void 0&&y.current.set(U,L.data)});let j=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!I||j){M?mb(()=>i(E)):v(()=>i(E));return}if(M){mb(()=>{d&&(f&&f.resolve(),d.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:I.currentLocation,nextLocation:I.nextLocation})});let L=n.window.document.startViewTransition(()=>{mb(()=>i(E))});L.finished.finally(()=>{mb(()=>{l(void 0),p(void 0),a(void 0),u({isTransitioning:!1})})}),mb(()=>p(L));return}d?(f&&f.resolve(),d.skipTransition(),m({state:E,currentLocation:I.currentLocation,nextLocation:I.nextLocation})):(a(E),u({isTransitioning:!0,flushSync:!1,currentLocation:I.currentLocation,nextLocation:I.nextLocation}))},[n.window,d,f,y,v]);S.useLayoutEffect(()=>n.subscribe(b),[n,b]),S.useEffect(()=>{c.isTransitioning&&!c.flushSync&&l(new ume)},[c]),S.useEffect(()=>{if(f&&o&&n.window){let E=o,N=f.promise,k=n.window.document.startViewTransition(async()=>{v(()=>i(E)),await N});k.finished.finally(()=>{l(void 0),p(void 0),a(void 0),u({isTransitioning:!1})}),p(k)}},[v,o,f,n.window]),S.useEffect(()=>{f&&o&&s.location.key===o.location.key&&f.resolve()},[f,d,s.location,o]),S.useEffect(()=>{!c.isTransitioning&&h&&(a(h.state),u({isTransitioning:!0,flushSync:!1,currentLocation:h.currentLocation,nextLocation:h.nextLocation}),m(void 0))},[c.isTransitioning,h]),S.useEffect(()=>{},[]);let _=S.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:E=>n.navigate(E),push:(E,N,k)=>n.navigate(E,{state:N,preventScrollReset:k==null?void 0:k.preventScrollReset}),replace:(E,N,k)=>n.navigate(E,{replace:!0,state:N,preventScrollReset:k==null?void 0:k.preventScrollReset})}),[n]),R=n.basename||"/",P=S.useMemo(()=>({router:n,navigator:_,static:!1,basename:R}),[n,_,R]),T=S.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return S.createElement(S.Fragment,null,S.createElement(eA.Provider,{value:P},S.createElement(H8.Provider,{value:s},S.createElement(ome.Provider,{value:y.current},S.createElement(ime.Provider,{value:c},S.createElement(Kpe,{basename:R,location:s.location,navigationType:s.historyAction,navigator:_,future:T},s.initialized||n.future.v7_partialHydration?S.createElement(fme,{routes:n.routes,future:n.future,state:s}):e))))),null)}const fme=S.memo(hme);function hme(t){let{routes:e,future:n,state:r}=t;return jpe(e,void 0,r,n)}const pme=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mme=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yc=S.forwardRef(function(e,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:c,to:u,preventScrollReset:f,unstable_viewTransition:l}=e,d=Xpe(e,eme),{basename:p}=S.useContext(yf),h,m=!1;if(typeof u=="string"&&mme.test(u)&&(h=u,pme))try{let b=new URL(window.location.href),_=u.startsWith("//")?new URL(b.protocol+u):new URL(u),R=nf(_.pathname,p);_.origin===b.origin&&R!=null?u=R+_.search+_.hash:m=!0}catch{}let y=kpe(u,{relative:s}),g=gme(u,{replace:o,state:a,target:c,preventScrollReset:f,relative:s,unstable_viewTransition:l});function v(b){r&&r(b),b.defaultPrevented||g(b)}return S.createElement("a",ex({},d,{href:h||y,onClick:m||i?r:v,ref:n,target:c}))});var uB;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(uB||(uB={}));var dB;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(dB||(dB={}));function gme(t,e){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,unstable_viewTransition:a}=e===void 0?{}:e,c=$s(),u=Bp(),f=W8(t,{relative:o});return S.useCallback(l=>{if(Zpe(l,n)){l.preventDefault();let d=r!==void 0?r:wp(u)===wp(f);c(t,{replace:d,state:s,preventScrollReset:i,relative:o,unstable_viewTransition:a})}},[u,c,f,r,s,n,t,i,o,a])}function vme(t){let e=S.useRef(RM(t)),n=S.useRef(!1),r=Bp(),s=S.useMemo(()=>Jpe(r.search,n.current?null:e.current),[r.search]),i=$s(),o=S.useCallback((a,c)=>{const u=RM(typeof a=="function"?a(s):a);n.current=!0,i("?"+u,c)},[i,s]);return[s,o]}const yme=3,bme=1e6;let $T=0;function xme(){return $T=($T+1)%Number.MAX_SAFE_INTEGER,$T.toString()}const FT=new Map,fB=t=>{if(FT.has(t))return;const e=setTimeout(()=>{FT.delete(t),y0({type:"REMOVE_TOAST",toastId:t})},bme);FT.set(t,e)},wme=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,yme)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;return n?fB(n):t.toasts.forEach(r=>{fB(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},nC=[];let rC={toasts:[]};function y0(t){rC=wme(rC,t),nC.forEach(e=>{e(rC)})}function _me({...t}){const e=xme(),n=s=>y0({type:"UPDATE_TOAST",toast:{...s,id:e}}),r=()=>y0({type:"DISMISS_TOAST",toastId:e});return y0({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||r()}}}),{id:e,dismiss:r,update:n}}function Kl(){const[t,e]=S.useState(rC);return S.useEffect(()=>(nC.push(e),()=>{const n=nC.indexOf(e);n>-1&&nC.splice(n,1)}),[t]),{...t,toast:_me,dismiss:n=>y0({type:"DISMISS_TOAST",toastId:n})}}const Sme=t=>{const{toast:e}=Kl(),{onSuccess:n,onError:r,...s}=t||{},i=vu(),{login:o}=YR(),a=$s();return ru({mutationKey:i().auth().action("login").get(),mutationFn:o,onSuccess:(c,u,f)=>{const{success:l,redirectTo:d}=c;l&&d&&a(d||"/quotes"),n&&n(c,u,f)},onError:(c,u,f)=>{const{message:l}=c;console.error(l),e({description:l,title:"Error"}),r&&r(c,u,f)},...s})};function Cme(t,e){const n=S.createContext(e);function r(i){const{children:o,...a}=i,c=S.useMemo(()=>a,Object.values(a));return w.jsx(n.Provider,{value:c,children:o})}function s(i){const o=S.useContext(n);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return r.displayName=t+"Provider",[r,s]}function In(t,e=[]){let n=[];function r(i,o){const a=S.createContext(o),c=n.length;n=[...n,o];function u(l){const{scope:d,children:p,...h}=l,m=(d==null?void 0:d[t][c])||a,y=S.useMemo(()=>h,Object.values(h));return w.jsx(m.Provider,{value:y,children:p})}function f(l,d){const p=(d==null?void 0:d[t][c])||a,h=S.useContext(p);if(h)return h;if(o!==void 0)return o;throw new Error(`\`${l}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const s=()=>{const i=n.map(o=>S.createContext(o));return function(a){const c=(a==null?void 0:a[t])||i;return S.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return s.scopeName=t,[r,Eme(s,...e)]}function Eme(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:c,scopeName:u})=>{const l=c(i)[`__scope${u}`];return{...a,...l}},{});return S.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}function Rme(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function c_(...t){return e=>t.forEach(n=>Rme(n,e))}function Je(...t){return S.useCallback(c_(...t),t)}var qa=S.forwardRef((t,e)=>{const{children:n,...r}=t,s=S.Children.toArray(n),i=s.find(Ame);if(i){const o=i.props.children,a=s.map(c=>c===i?S.Children.count(o)>1?S.Children.only(null):S.isValidElement(o)?o.props.children:null:c);return w.jsx(AM,{...r,ref:e,children:S.isValidElement(o)?S.cloneElement(o,void 0,a):null})}return w.jsx(AM,{...r,ref:e,children:n})});qa.displayName="Slot";var AM=S.forwardRef((t,e)=>{const{children:n,...r}=t;if(S.isValidElement(n)){const s=Nme(n);return S.cloneElement(n,{...Pme(r,n.props),ref:e?c_(e,s):s})}return S.Children.count(n)>1?S.Children.only(null):null});AM.displayName="SlotClone";var aL=({children:t})=>w.jsx(w.Fragment,{children:t});function Ame(t){return S.isValidElement(t)&&t.type===aL}function Pme(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{i(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function Nme(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function Cu(t){const e=t+"CollectionProvider",[n,r]=In(e),[s,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=p=>{const{scope:h,children:m}=p,y=oe.useRef(null),g=oe.useRef(new Map).current;return w.jsx(s,{scope:h,itemMap:g,collectionRef:y,children:m})};o.displayName=e;const a=t+"CollectionSlot",c=oe.forwardRef((p,h)=>{const{scope:m,children:y}=p,g=i(a,m),v=Je(h,g.collectionRef);return w.jsx(qa,{ref:v,children:y})});c.displayName=a;const u=t+"CollectionItemSlot",f="data-radix-collection-item",l=oe.forwardRef((p,h)=>{const{scope:m,children:y,...g}=p,v=oe.useRef(null),b=Je(h,v),_=i(u,m);return oe.useEffect(()=>(_.itemMap.set(v,{ref:v,...g}),()=>void _.itemMap.delete(v))),w.jsx(qa,{[f]:"",ref:b,children:y})});l.displayName=u;function d(p){const h=i(t+"CollectionConsumer",p);return oe.useCallback(()=>{const y=h.collectionRef.current;if(!y)return[];const g=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((_,R)=>g.indexOf(_.ref.current)-g.indexOf(R.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:o,Slot:c,ItemSlot:l},d,r]}function ye(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function on(t){const e=S.useRef(t);return S.useEffect(()=>{e.current=t}),S.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function mr({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,s]=Tme({defaultProp:e,onChange:n}),i=t!==void 0,o=i?t:r,a=on(n),c=S.useCallback(u=>{if(i){const l=typeof u=="function"?u(t):u;l!==t&&a(l)}else s(u)},[i,t,s,a]);return[o,c]}function Tme({defaultProp:t,onChange:e}){const n=S.useState(t),[r]=n,s=S.useRef(r),i=on(e);return S.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}var kme=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],De=kme.reduce((t,e)=>{const n=S.forwardRef((r,s)=>{const{asChild:i,...o}=r,a=i?qa:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(a,{...o,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function tx(t,e){t&&rs.flushSync(()=>t.dispatchEvent(e))}var ir=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{};function Dme(t,e){return S.useReducer((n,r)=>e[n][r]??n,t)}var Kn=t=>{const{present:e,children:n}=t,r=Mme(e),s=typeof n=="function"?n({present:r.isPresent}):S.Children.only(n),i=Je(r.ref,Ome(s));return typeof n=="function"||r.isPresent?S.cloneElement(s,{ref:i}):null};Kn.displayName="Presence";function Mme(t){const[e,n]=S.useState(),r=S.useRef({}),s=S.useRef(t),i=S.useRef("none"),o=t?"mounted":"unmounted",[a,c]=Dme(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const u=c1(r.current);i.current=a==="mounted"?u:"none"},[a]),ir(()=>{const u=r.current,f=s.current;if(f!==t){const d=i.current,p=c1(u);t?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&d!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),ir(()=>{if(e){const u=l=>{const p=c1(r.current).includes(l.animationName);l.target===e&&p&&rs.flushSync(()=>c("ANIMATION_END"))},f=l=>{l.target===e&&(i.current=c1(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",u),e.addEventListener("animationend",u),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",u),e.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:S.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function c1(t){return(t==null?void 0:t.animationName)||"none"}function Ome(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Ime=s_.useId||(()=>{}),jme=0;function js(t){const[e,n]=S.useState(Ime());return ir(()=>{n(r=>r??String(jme++))},[t]),e?`radix-${e}`:""}var lL="Collapsible",[Lme,X8]=In(lL),[$me,cL]=Lme(lL),Q8=S.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:i,onOpenChange:o,...a}=t,[c=!1,u]=mr({prop:r,defaultProp:s,onChange:o});return w.jsx($me,{scope:n,disabled:i,contentId:js(),open:c,onOpenToggle:S.useCallback(()=>u(f=>!f),[u]),children:w.jsx(De.div,{"data-state":dL(c),"data-disabled":i?"":void 0,...a,ref:e})})});Q8.displayName=lL;var Z8="CollapsibleTrigger",J8=S.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,s=cL(Z8,n);return w.jsx(De.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":dL(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:e,onClick:ye(t.onClick,s.onOpenToggle)})});J8.displayName=Z8;var uL="CollapsibleContent",eq=S.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=cL(uL,t.__scopeCollapsible);return w.jsx(Kn,{present:n||s.open,children:({present:i})=>w.jsx(Fme,{...r,ref:e,present:i})})});eq.displayName=uL;var Fme=S.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:s,...i}=t,o=cL(uL,n),[a,c]=S.useState(r),u=S.useRef(null),f=Je(e,u),l=S.useRef(0),d=l.current,p=S.useRef(0),h=p.current,m=o.open||a,y=S.useRef(m),g=S.useRef();return S.useEffect(()=>{const v=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(v)},[]),ir(()=>{const v=u.current;if(v){g.current=g.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const b=v.getBoundingClientRect();l.current=b.height,p.current=b.width,y.current||(v.style.transitionDuration=g.current.transitionDuration,v.style.animationName=g.current.animationName),c(r)}},[o.open,r]),w.jsx(De.div,{"data-state":dL(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...i,ref:f,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...t.style},children:m&&s})});function dL(t){return t?"open":"closed"}var zme=Q8,Bme=J8,Ume=eq,Hme=S.createContext(void 0);function Qa(t){const e=S.useContext(Hme);return t||e||"ltr"}var Eu="Accordion",Vme=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[fL,qme,Wme]=Cu(Eu),[tA,NUe]=In(Eu,[Wme,X8]),hL=X8(),Gme=oe.forwardRef((t,e)=>{const{type:n,...r}=t,s=r,i=r;return w.jsx(fL.Provider,{scope:t.__scopeAccordion,children:n==="multiple"?w.jsx(Qme,{...i,ref:e}):w.jsx(Xme,{...s,ref:e})})});Gme.displayName=Eu;var[tq,Kme]=tA(Eu),[nq,Yme]=tA(Eu,{collapsible:!1}),Xme=oe.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:i=!1,...o}=t,[a,c]=mr({prop:n,defaultProp:r,onChange:s});return w.jsx(tq,{scope:t.__scopeAccordion,value:a?[a]:[],onItemOpen:c,onItemClose:oe.useCallback(()=>i&&c(""),[i,c]),children:w.jsx(nq,{scope:t.__scopeAccordion,collapsible:i,children:w.jsx(rq,{...o,ref:e})})})}),Qme=oe.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...i}=t,[o=[],a]=mr({prop:n,defaultProp:r,onChange:s}),c=oe.useCallback(f=>a((l=[])=>[...l,f]),[a]),u=oe.useCallback(f=>a((l=[])=>l.filter(d=>d!==f)),[a]);return w.jsx(tq,{scope:t.__scopeAccordion,value:o,onItemOpen:c,onItemClose:u,children:w.jsx(nq,{scope:t.__scopeAccordion,collapsible:!0,children:w.jsx(rq,{...i,ref:e})})})}),[Zme,nA]=tA(Eu),rq=oe.forwardRef((t,e)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:i="vertical",...o}=t,a=oe.useRef(null),c=Je(a,e),u=qme(n),l=Qa(s)==="ltr",d=ye(t.onKeyDown,p=>{var E;if(!Vme.includes(p.key))return;const h=p.target,m=u().filter(N=>{var k;return!((k=N.ref.current)!=null&&k.disabled)}),y=m.findIndex(N=>N.ref.current===h),g=m.length;if(y===-1)return;p.preventDefault();let v=y;const b=0,_=g-1,R=()=>{v=y+1,v>_&&(v=b)},P=()=>{v=y-1,v{const{__scopeAccordion:n,value:r,...s}=t,i=nA(pE,n),o=Kme(pE,n),a=hL(n),c=js(),u=r&&o.value.includes(r)||!1,f=i.disabled||t.disabled;return w.jsx(Jme,{scope:n,open:u,disabled:f,triggerId:c,children:w.jsx(zme,{"data-orientation":i.orientation,"data-state":uq(u),...a,...s,ref:e,disabled:f,open:u,onOpenChange:l=>{l?o.onItemOpen(r):o.onItemClose(r)}})})});sq.displayName=pE;var iq="AccordionHeader",oq=oe.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=nA(Eu,n),i=pL(iq,n);return w.jsx(De.h3,{"data-orientation":s.orientation,"data-state":uq(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:e})});oq.displayName=iq;var PM="AccordionTrigger",aq=oe.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=nA(Eu,n),i=pL(PM,n),o=Yme(PM,n),a=hL(n);return w.jsx(fL.ItemSlot,{scope:n,children:w.jsx(Bme,{"aria-disabled":i.open&&!o.collapsible||void 0,"data-orientation":s.orientation,id:i.triggerId,...a,...r,ref:e})})});aq.displayName=PM;var lq="AccordionContent",cq=oe.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=nA(Eu,n),i=pL(lq,n),o=hL(n);return w.jsx(Ume,{role:"region","aria-labelledby":i.triggerId,"data-orientation":s.orientation,...o,...r,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});cq.displayName=lq;function uq(t){return t?"open":"closed"}var ege=sq,tge=oq,dq=aq,fq=cq;/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const tge=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),pq=(...t)=>t.filter((e,n,r)=>!!e&&r.indexOf(e)===n).join(" ");/** + */const nge=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),hq=(...t)=>t.filter((e,n,r)=>!!e&&r.indexOf(e)===n).join(" ");/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */var nge={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + */var rge={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const rge=S.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},c)=>S.createElement("svg",{ref:c,...nge,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:pq("lucide",s),...a},[...o.map(([u,f])=>S.createElement(u,f)),...Array.isArray(i)?i:[i]]));/** + */const sge=S.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},c)=>S.createElement("svg",{ref:c,...rge,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:hq("lucide",s),...a},[...o.map(([u,f])=>S.createElement(u,f)),...Array.isArray(i)?i:[i]]));/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Pt=(t,e)=>{const n=S.forwardRef(({className:r,...s},i)=>S.createElement(rge,{ref:i,iconNode:e,className:pq(`lucide-${tge(t)}`,r),...s}));return n.displayName=`${t}`,n};/** + */const Et=(t,e)=>{const n=S.forwardRef(({className:r,...s},i)=>S.createElement(sge,{ref:i,iconNode:e,className:hq(`lucide-${nge(t)}`,r),...s}));return n.displayName=`${t}`,n};/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const sge=Pt("ArrowDownUp",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]]);/** + */const ige=Et("ArrowDownUp",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const pB=Pt("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** + */const hB=Et("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const mB=Pt("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** + */const pB=Et("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ige=Pt("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** + */const oge=Et("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const u_=Pt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + */const u_=Et("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const d_=Pt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + */const d_=Et("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const nA=Pt("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + */const rA=Et("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ly=Pt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + */const ly=Et("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const mq=Pt("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + */const pq=Et("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const oge=Pt("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);/** + */const age=Et("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const age=Pt("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);/** + */const lge=Et("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const gq=Pt("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** + */const mq=Et("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vq=Pt("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + */const gq=Et("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const lge=Pt("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/** + */const cge=Et("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const cge=Pt("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/** + */const uge=Et("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const uge=Pt("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** + */const dge=Et("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const rA=Pt("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** + */const sA=Et("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const dge=Pt("CopyPlus",[["line",{x1:"15",x2:"15",y1:"12",y2:"18",key:"1p7wdc"}],["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + */const fge=Et("CopyPlus",[["line",{x1:"15",x2:"15",y1:"12",y2:"18",key:"1p7wdc"}],["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const fge=Pt("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + */const hge=Et("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const hge=Pt("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** + */const pge=Et("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const yq=Pt("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/** + */const vq=Et("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const bq=Pt("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** + */const yq=Et("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const pge=Pt("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + */const mge=Et("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const PM=Pt("FilePenLine",[["path",{d:"m18 5-2.414-2.414A2 2 0 0 0 14.172 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2",key:"142zxg"}],["path",{d:"M21.378 12.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"2t3380"}],["path",{d:"M8 18h1",key:"13wk12"}]]);/** + */const bq=Et("FilePenLine",[["path",{d:"m18 5-2.414-2.414A2 2 0 0 0 14.172 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2",key:"142zxg"}],["path",{d:"M21.378 12.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"2t3380"}],["path",{d:"M8 18h1",key:"13wk12"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const mge=Pt("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** + */const gge=Et("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const xq=Pt("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** + */const xq=Et("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const gge=Pt("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** + */const vge=Et("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vge=Pt("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** + */const yge=Et("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const yge=Pt("Loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);/** + */const bge=Et("Loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const bge=Pt("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** + */const xge=Et("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const xge=Pt("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** + */const wge=Et("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const wge=Pt("Package2",[["path",{d:"M3 9h18v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9Z",key:"1ront0"}],["path",{d:"m3 9 2.45-4.9A2 2 0 0 1 7.24 3h9.52a2 2 0 0 1 1.8 1.1L21 9",key:"19h2x1"}],["path",{d:"M12 3v6",key:"1holv5"}]]);/** + */const _ge=Et("Package2",[["path",{d:"M3 9h18v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9Z",key:"1ront0"}],["path",{d:"m3 9 2.45-4.9A2 2 0 0 1 7.24 3h9.52a2 2 0 0 1 1.8 1.1L21 9",key:"19h2x1"}],["path",{d:"M12 3v6",key:"1holv5"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const wq=Pt("PackagePlus",[["path",{d:"M16 16h6",key:"100bgy"}],["path",{d:"M19 13v6",key:"85cyf1"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/** + */const wq=Et("PackagePlus",[["path",{d:"M16 16h6",key:"100bgy"}],["path",{d:"M19 13v6",key:"85cyf1"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const _q=Pt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + */const _q=Et("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const _ge=Pt("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** + */const Sge=Et("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Sge=Pt("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/** + */const Cge=Et("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Sq=Pt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + */const Sq=Et("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Cge=Pt("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/** + */const Cq=Et("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ege=Pt("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + */const Ege=Et("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Cq=Pt("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + */const Rge=Et("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const sA=Pt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Eq(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e {const e=Pge(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:o=>{const a=o.split(mL);return a[0]===""&&a.length!==1&&a.shift(),Rq(a,e)||Age(o)},getConflictingClassGroupIds:(o,a)=>{const c=n[o]||[];return a&&r[o]?[...c,...r[o]]:c}}},Rq=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?Rq(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join(mL);return(o=e.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},gB=/^\[(.+)\]$/,Age=t=>{if(gB.test(t)){const e=gB.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},Pge=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return Tge(Object.entries(t.classGroups),n).forEach(([i,o])=>{NM(o,r,i,e)}),r},NM=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:vB(e,s);i.classGroupId=n;return}if(typeof s=="function"){if(Nge(s)){NM(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{NM(o,vB(e,i),n,r)})})},vB=(t,e)=>{let n=t;return e.split(mL).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Nge=t=>t.isThemeGetter,Tge=(t,e)=>e?t.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[e+o,a])):i);return[n,s]}):t,kge=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),e++,e>t&&(e=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},Aq="!",Dge=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,s=e[0],i=e.length,o=a=>{const c=[];let u=0,f=0,l;for(let y=0;yf?l-f:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},Mge=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},Oge=t=>({cache:kge(t.cacheSize),parseClassName:Dge(t),...Rge(t)}),Ige=/\s+/,jge=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,i=[],o=t.trim().split(Ige);let a="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:f,hasImportantModifier:l,baseClassName:d,maybePostfixModifierPosition:p}=n(u);let h=!!p,m=r(h?d.substring(0,p):d);if(!m){if(!h){a=u+(a.length>0?" "+a:a);continue}if(m=r(d),!m){a=u+(a.length>0?" "+a:a);continue}h=!1}const y=Mge(f).join(":"),g=l?y+Aq:y,v=g+m;if(i.includes(v))continue;i.push(v);const b=s(m,h);for(let _=0;_ 0?" "+a:a)}return a};function Lge(){let t=0,e,n,r="";for(;t {if(typeof t=="string")return t;let e,n="";for(let r=0;r l(f),t());return n=Oge(u),r=n.cache.get,s=n.cache.set,i=a,a(c)}function a(c){const u=r(c);if(u)return u;const f=jge(c,n);return s(c,f),f}return function(){return i(Lge.apply(null,arguments))}}const Hn=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},Nq=/^\[(?:([a-z-]+):)?(.+)\]$/i,Fge=/^\d+\/\d+$/,zge=new Set(["px","full","screen"]),Bge=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Uge=/\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$/,Hge=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Vge=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qge=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,cc=t=>dg(t)||zge.has(t)||Fge.test(t),Bu=t=>uy(t,"length",Jge),dg=t=>!!t&&!Number.isNaN(Number(t)),FT=t=>uy(t,"number",dg),gb=t=>!!t&&Number.isInteger(Number(t)),Wge=t=>t.endsWith("%")&&dg(t.slice(0,-1)),At=t=>Nq.test(t),Uu=t=>Bge.test(t),Gge=new Set(["length","size","percentage"]),Kge=t=>uy(t,Gge,Tq),Yge=t=>uy(t,"position",Tq),Xge=new Set(["image","url"]),Qge=t=>uy(t,Xge,tve),Zge=t=>uy(t,"",eve),vb=()=>!0,uy=(t,e,n)=>{const r=Nq.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},Jge=t=>Uge.test(t)&&!Hge.test(t),Tq=()=>!1,eve=t=>Vge.test(t),tve=t=>qge.test(t),nve=()=>{const t=Hn("colors"),e=Hn("spacing"),n=Hn("blur"),r=Hn("brightness"),s=Hn("borderColor"),i=Hn("borderRadius"),o=Hn("borderSpacing"),a=Hn("borderWidth"),c=Hn("contrast"),u=Hn("grayscale"),f=Hn("hueRotate"),l=Hn("invert"),d=Hn("gap"),p=Hn("gradientColorStops"),h=Hn("gradientColorStopPositions"),m=Hn("inset"),y=Hn("margin"),g=Hn("opacity"),v=Hn("padding"),b=Hn("saturate"),_=Hn("scale"),R=Hn("sepia"),P=Hn("skew"),T=Hn("space"),E=Hn("translate"),N=()=>["auto","contain","none"],k=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",At,e],I=()=>[At,e],j=()=>["",cc,Bu],L=()=>["auto",dg,At],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],K=()=>["solid","dashed","dotted","double","none"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>["start","end","center","between","around","evenly","stretch"],ee=()=>["","0",At],se=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>[dg,At];return{cacheSize:500,separator:":",theme:{colors:[vb],spacing:[cc,Bu],blur:["none","",Uu,At],brightness:X(),borderColor:[t],borderRadius:["none","","full",Uu,At],borderSpacing:I(),borderWidth:j(),contrast:X(),grayscale:ee(),hueRotate:X(),invert:ee(),gap:I(),gradientColorStops:[t],gradientColorStopPositions:[Wge,Bu],inset:M(),margin:M(),opacity:X(),padding:I(),saturate:X(),scale:X(),sepia:ee(),skew:X(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",At]}],container:["container"],columns:[{columns:[Uu]}],"break-after":[{"break-after":se()}],"break-before":[{"break-before":se()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...U(),At]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",gb,At]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",At]}],grow:[{grow:ee()}],shrink:[{shrink:ee()}],order:[{order:["first","last","none",gb,At]}],"grid-cols":[{"grid-cols":[vb]}],"col-start-end":[{col:["auto",{span:["full",gb,At]},At]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[vb]}],"row-start-end":[{row:["auto",{span:[gb,At]},At]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",At]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",At]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",At,e]}],"min-w":[{"min-w":[At,e,"min","max","fit"]}],"max-w":[{"max-w":[At,e,"none","full","min","max","fit","prose",{screen:[Uu]},Uu]}],h:[{h:[At,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[At,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[At,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[At,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Uu,Bu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",FT]}],"font-family":[{font:[vb]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",At]}],"line-clamp":[{"line-clamp":["none",dg,FT]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",cc,At]}],"list-image":[{"list-image":["none",At]}],"list-style-type":[{list:["none","disc","decimal",At]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",cc,Bu]}],"underline-offset":[{"underline-offset":["auto",cc,At]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",At]}],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",At]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),Yge]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Kge]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Qge]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...K(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:K()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...K()]}],"outline-offset":[{"outline-offset":[cc,At]}],"outline-w":[{outline:[cc,Bu]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[cc,Bu]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Uu,Zge]}],"shadow-color":[{shadow:[vb]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Uu,At]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[l]}],saturate:[{saturate:[b]}],sepia:[{sepia:[R]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[l]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[R]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",At]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",At]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",At]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[gb,At]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",At]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",At]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",At]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[cc,Bu,FT]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},rve=$ge(nve);function ie(...t){return rve(cy(t))}const sve=S.forwardRef(({className:t,...e},n)=>w.jsx(Jme,{ref:n,className:ie("border-b",t),...e}));sve.displayName="AccordionItem";const ive=S.forwardRef(({className:t,children:e,...n},r)=>w.jsx(ege,{className:"flex",children:w.jsxs(fq,{ref:r,className:ie("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",t),...n,children:[e,w.jsx(d_,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));ive.displayName=fq.displayName;const ove=S.forwardRef(({className:t,children:e,...n},r)=>w.jsx(hq,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:w.jsx("div",{className:ie("pb-4 pt-0",t),children:e})}));ove.displayName=hq.displayName;function kq(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e typeof t=="boolean"?"".concat(t):t===0?"0":t,bB=ave,li=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return bB(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(u=>{const f=n==null?void 0:n[u],l=i==null?void 0:i[u];if(f===null)return null;const d=yB(f)||yB(l);return s[u][d]}),a=n&&Object.entries(n).reduce((u,f)=>{let[l,d]=f;return d===void 0||(u[l]=d),u},{}),c=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:l,className:d,...p}=f;return Object.entries(p).every(h=>{let[m,y]=h;return Array.isArray(y)?y.includes({...i,...a}[m]):{...i,...a}[m]===y})?[...u,l,d]:u},[]);return bB(t,o,c,n==null?void 0:n.class,n==null?void 0:n.className)},lve=li("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),gL=S.forwardRef(({className:t,variant:e,...n},r)=>w.jsx("div",{ref:r,role:"alert",className:ie(lve({variant:e}),t),...n}));gL.displayName="Alert";const vL=S.forwardRef(({className:t,...e},n)=>w.jsx("h5",{ref:n,className:ie("mb-1 font-medium leading-none tracking-tight",t),...e}));vL.displayName="AlertTitle";const yL=S.forwardRef(({className:t,...e},n)=>w.jsx("div",{ref:n,className:ie("text-sm [&_p]:leading-relaxed",t),...e}));yL.displayName="AlertDescription";function cve(t,e=globalThis==null?void 0:globalThis.document){const n=on(t);S.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var uve="DismissableLayer",TM="dismissableLayer.update",dve="dismissableLayer.pointerDownOutside",fve="dismissableLayer.focusOutside",xB,Dq=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ru=S.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...c}=t,u=S.useContext(Dq),[f,l]=S.useState(null),d=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=S.useState({}),h=Je(e,T=>l(T)),m=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(y),v=f?m.indexOf(f):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,_=v>=g,R=pve(T=>{const E=T.target,N=[...u.branches].some(k=>k.contains(E));!_||N||(s==null||s(T),o==null||o(T),T.defaultPrevented||a==null||a())},d),P=mve(T=>{const E=T.target;[...u.branches].some(k=>k.contains(E))||(i==null||i(T),o==null||o(T),T.defaultPrevented||a==null||a())},d);return cve(T=>{v===u.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},d),S.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(xB=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),wB(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=xB)}},[f,d,n,u]),S.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),wB())},[f,u]),S.useEffect(()=>{const T=()=>p({});return document.addEventListener(TM,T),()=>document.removeEventListener(TM,T)},[]),w.jsx(De.div,{...c,ref:h,style:{pointerEvents:b?_?"auto":"none":void 0,...t.style},onFocusCapture:ye(t.onFocusCapture,P.onFocusCapture),onBlurCapture:ye(t.onBlurCapture,P.onBlurCapture),onPointerDownCapture:ye(t.onPointerDownCapture,R.onPointerDownCapture)})});Ru.displayName=uve;var hve="DismissableLayerBranch",Mq=S.forwardRef((t,e)=>{const n=S.useContext(Dq),r=S.useRef(null),s=Je(e,r);return S.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),w.jsx(De.div,{...t,ref:s})});Mq.displayName=hve;function pve(t,e=globalThis==null?void 0:globalThis.document){const n=on(t),r=S.useRef(!1),s=S.useRef(()=>{});return S.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let c=function(){Oq(dve,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}else e.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function mve(t,e=globalThis==null?void 0:globalThis.document){const n=on(t),r=S.useRef(!1);return S.useEffect(()=>{const s=i=>{i.target&&!r.current&&Oq(fve,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function wB(){const t=new CustomEvent(TM);document.dispatchEvent(t)}function Oq(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?tx(s,i):s.dispatchEvent(i)}var gve=Ru,vve=Mq,zT="focusScope.autoFocusOnMount",BT="focusScope.autoFocusOnUnmount",_B={bubbles:!1,cancelable:!0},yve="FocusScope",f_=S.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,c]=S.useState(null),u=on(s),f=on(i),l=S.useRef(null),d=Je(e,m=>c(m)),p=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(r){let m=function(b){if(p.paused||!a)return;const _=b.target;a.contains(_)?l.current=_:Ku(l.current,{select:!0})},y=function(b){if(p.paused||!a)return;const _=b.relatedTarget;_!==null&&(a.contains(_)||Ku(l.current,{select:!0}))},g=function(b){if(document.activeElement===document.body)for(const R of b)R.removedNodes.length>0&&Ku(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const v=new MutationObserver(g);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),v.disconnect()}}},[r,a,p.paused]),S.useEffect(()=>{if(a){CB.add(p);const m=document.activeElement;if(!a.contains(m)){const g=new CustomEvent(zT,_B);a.addEventListener(zT,u),a.dispatchEvent(g),g.defaultPrevented||(bve(Cve(Iq(a)),{select:!0}),document.activeElement===m&&Ku(a))}return()=>{a.removeEventListener(zT,u),setTimeout(()=>{const g=new CustomEvent(BT,_B);a.addEventListener(BT,f),a.dispatchEvent(g),g.defaultPrevented||Ku(m??document.body,{select:!0}),a.removeEventListener(BT,f),CB.remove(p)},0)}}},[a,u,f,p]);const h=S.useCallback(m=>{if(!n&&!r||p.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(y&&g){const v=m.currentTarget,[b,_]=xve(v);b&&_?!m.shiftKey&&g===_?(m.preventDefault(),n&&Ku(b,{select:!0})):m.shiftKey&&g===b&&(m.preventDefault(),n&&Ku(_,{select:!0})):g===v&&m.preventDefault()}},[n,r,p.paused]);return w.jsx(De.div,{tabIndex:-1,...o,ref:d,onKeyDown:h})});f_.displayName=yve;function bve(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Ku(r,{select:e}),document.activeElement!==n)return}function xve(t){const e=Iq(t),n=SB(e,t),r=SB(e.reverse(),t);return[n,r]}function Iq(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function SB(t,e){for(const n of t)if(!wve(n,{upTo:e}))return n}function wve(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function _ve(t){return t instanceof HTMLInputElement&&"select"in t}function Ku(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&_ve(t)&&e&&t.select()}}var CB=Sve();function Sve(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=EB(t,e),t.unshift(e)},remove(e){var n;t=EB(t,e),(n=t[0])==null||n.resume()}}}function EB(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function Cve(t){return t.filter(e=>e.tagName!=="A")}var Eve="Portal",dy=S.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[s,i]=S.useState(!1);ir(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?GR.createPortal(w.jsx(De.div,{...r,ref:e}),o):null});dy.displayName=Eve;var UT=0;function iA(){S.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??RB()),document.body.insertAdjacentElement("beforeend",t[1]??RB()),UT++,()=>{UT===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),UT--}},[])}function RB(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}var Ms=function(){return Ms=Object.assign||function(e){for(var n,r=1,s=arguments.length;r "u")return $ve;var e=Fve(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},Bve=xL(),fg="data-scroll-locked",Uve=function(t,e,n,r){var s=t.left,i=t.top,o=t.right,a=t.gap;return n===void 0&&(n="margin"),` - .`.concat(Rve,` { + */const Eq=Et("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + * @license lucide-react v0.427.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iA=Et("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Rq(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e{const e=Nge(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:o=>{const a=o.split(mL);return a[0]===""&&a.length!==1&&a.shift(),Aq(a,e)||Pge(o)},getConflictingClassGroupIds:(o,a)=>{const c=n[o]||[];return a&&r[o]?[...c,...r[o]]:c}}},Aq=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?Aq(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join(mL);return(o=e.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},mB=/^\[(.+)\]$/,Pge=t=>{if(mB.test(t)){const e=mB.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},Nge=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return kge(Object.entries(t.classGroups),n).forEach(([i,o])=>{NM(o,r,i,e)}),r},NM=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:gB(e,s);i.classGroupId=n;return}if(typeof s=="function"){if(Tge(s)){NM(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{NM(o,gB(e,i),n,r)})})},gB=(t,e)=>{let n=t;return e.split(mL).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Tge=t=>t.isThemeGetter,kge=(t,e)=>e?t.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[e+o,a])):i);return[n,s]}):t,Dge=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),e++,e>t&&(e=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},Pq="!",Mge=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,s=e[0],i=e.length,o=a=>{const c=[];let u=0,f=0,l;for(let y=0;yf?l-f:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},Oge=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},Ige=t=>({cache:Dge(t.cacheSize),parseClassName:Mge(t),...Age(t)}),jge=/\s+/,Lge=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,i=[],o=t.trim().split(jge);let a="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:f,hasImportantModifier:l,baseClassName:d,maybePostfixModifierPosition:p}=n(u);let h=!!p,m=r(h?d.substring(0,p):d);if(!m){if(!h){a=u+(a.length>0?" "+a:a);continue}if(m=r(d),!m){a=u+(a.length>0?" "+a:a);continue}h=!1}const y=Oge(f).join(":"),g=l?y+Pq:y,v=g+m;if(i.includes(v))continue;i.push(v);const b=s(m,h);for(let _=0;_ 0?" "+a:a)}return a};function $ge(){let t=0,e,n,r="";for(;t {if(typeof t=="string")return t;let e,n="";for(let r=0;r l(f),t());return n=Ige(u),r=n.cache.get,s=n.cache.set,i=a,a(c)}function a(c){const u=r(c);if(u)return u;const f=Lge(c,n);return s(c,f),f}return function(){return i($ge.apply(null,arguments))}}const Hn=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},Tq=/^\[(?:([a-z-]+):)?(.+)\]$/i,zge=/^\d+\/\d+$/,Bge=new Set(["px","full","screen"]),Uge=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Hge=/\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$/,Vge=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,qge=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Wge=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,cc=t=>dg(t)||Bge.has(t)||zge.test(t),Bu=t=>uy(t,"length",eve),dg=t=>!!t&&!Number.isNaN(Number(t)),zT=t=>uy(t,"number",dg),gb=t=>!!t&&Number.isInteger(Number(t)),Gge=t=>t.endsWith("%")&&dg(t.slice(0,-1)),Pt=t=>Tq.test(t),Uu=t=>Uge.test(t),Kge=new Set(["length","size","percentage"]),Yge=t=>uy(t,Kge,kq),Xge=t=>uy(t,"position",kq),Qge=new Set(["image","url"]),Zge=t=>uy(t,Qge,nve),Jge=t=>uy(t,"",tve),vb=()=>!0,uy=(t,e,n)=>{const r=Tq.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},eve=t=>Hge.test(t)&&!Vge.test(t),kq=()=>!1,tve=t=>qge.test(t),nve=t=>Wge.test(t),rve=()=>{const t=Hn("colors"),e=Hn("spacing"),n=Hn("blur"),r=Hn("brightness"),s=Hn("borderColor"),i=Hn("borderRadius"),o=Hn("borderSpacing"),a=Hn("borderWidth"),c=Hn("contrast"),u=Hn("grayscale"),f=Hn("hueRotate"),l=Hn("invert"),d=Hn("gap"),p=Hn("gradientColorStops"),h=Hn("gradientColorStopPositions"),m=Hn("inset"),y=Hn("margin"),g=Hn("opacity"),v=Hn("padding"),b=Hn("saturate"),_=Hn("scale"),R=Hn("sepia"),P=Hn("skew"),T=Hn("space"),E=Hn("translate"),N=()=>["auto","contain","none"],k=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",Pt,e],I=()=>[Pt,e],j=()=>["",cc,Bu],L=()=>["auto",dg,Pt],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],K=()=>["solid","dashed","dotted","double","none"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>["start","end","center","between","around","evenly","stretch"],ee=()=>["","0",Pt],se=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>[dg,Pt];return{cacheSize:500,separator:":",theme:{colors:[vb],spacing:[cc,Bu],blur:["none","",Uu,Pt],brightness:X(),borderColor:[t],borderRadius:["none","","full",Uu,Pt],borderSpacing:I(),borderWidth:j(),contrast:X(),grayscale:ee(),hueRotate:X(),invert:ee(),gap:I(),gradientColorStops:[t],gradientColorStopPositions:[Gge,Bu],inset:M(),margin:M(),opacity:X(),padding:I(),saturate:X(),scale:X(),sepia:ee(),skew:X(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",Pt]}],container:["container"],columns:[{columns:[Uu]}],"break-after":[{"break-after":se()}],"break-before":[{"break-before":se()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...U(),Pt]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",gb,Pt]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Pt]}],grow:[{grow:ee()}],shrink:[{shrink:ee()}],order:[{order:["first","last","none",gb,Pt]}],"grid-cols":[{"grid-cols":[vb]}],"col-start-end":[{col:["auto",{span:["full",gb,Pt]},Pt]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[vb]}],"row-start-end":[{row:["auto",{span:[gb,Pt]},Pt]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Pt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Pt]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Pt,e]}],"min-w":[{"min-w":[Pt,e,"min","max","fit"]}],"max-w":[{"max-w":[Pt,e,"none","full","min","max","fit","prose",{screen:[Uu]},Uu]}],h:[{h:[Pt,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Pt,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Pt,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Pt,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Uu,Bu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",zT]}],"font-family":[{font:[vb]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Pt]}],"line-clamp":[{"line-clamp":["none",dg,zT]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",cc,Pt]}],"list-image":[{"list-image":["none",Pt]}],"list-style-type":[{list:["none","disc","decimal",Pt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",cc,Bu]}],"underline-offset":[{"underline-offset":["auto",cc,Pt]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Pt]}],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",Pt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),Xge]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Yge]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Zge]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...K(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:K()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...K()]}],"outline-offset":[{"outline-offset":[cc,Pt]}],"outline-w":[{outline:[cc,Bu]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[cc,Bu]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Uu,Jge]}],"shadow-color":[{shadow:[vb]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Uu,Pt]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[l]}],saturate:[{saturate:[b]}],sepia:[{sepia:[R]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[l]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[R]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Pt]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",Pt]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",Pt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[gb,Pt]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Pt]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Pt]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",Pt]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[cc,Bu,zT]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},sve=Fge(rve);function ie(...t){return sve(cy(t))}const ive=S.forwardRef(({className:t,...e},n)=>w.jsx(ege,{ref:n,className:ie("border-b",t),...e}));ive.displayName="AccordionItem";const ove=S.forwardRef(({className:t,children:e,...n},r)=>w.jsx(tge,{className:"flex",children:w.jsxs(dq,{ref:r,className:ie("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",t),...n,children:[e,w.jsx(d_,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));ove.displayName=dq.displayName;const ave=S.forwardRef(({className:t,children:e,...n},r)=>w.jsx(fq,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:w.jsx("div",{className:ie("pb-4 pt-0",t),children:e})}));ave.displayName=fq.displayName;function Dq(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e typeof t=="boolean"?"".concat(t):t===0?"0":t,yB=lve,li=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return yB(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(u=>{const f=n==null?void 0:n[u],l=i==null?void 0:i[u];if(f===null)return null;const d=vB(f)||vB(l);return s[u][d]}),a=n&&Object.entries(n).reduce((u,f)=>{let[l,d]=f;return d===void 0||(u[l]=d),u},{}),c=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:l,className:d,...p}=f;return Object.entries(p).every(h=>{let[m,y]=h;return Array.isArray(y)?y.includes({...i,...a}[m]):{...i,...a}[m]===y})?[...u,l,d]:u},[]);return yB(t,o,c,n==null?void 0:n.class,n==null?void 0:n.className)},cve=li("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),gL=S.forwardRef(({className:t,variant:e,...n},r)=>w.jsx("div",{ref:r,role:"alert",className:ie(cve({variant:e}),t),...n}));gL.displayName="Alert";const vL=S.forwardRef(({className:t,...e},n)=>w.jsx("h5",{ref:n,className:ie("mb-1 font-medium leading-none tracking-tight",t),...e}));vL.displayName="AlertTitle";const yL=S.forwardRef(({className:t,...e},n)=>w.jsx("div",{ref:n,className:ie("text-sm [&_p]:leading-relaxed",t),...e}));yL.displayName="AlertDescription";function uve(t,e=globalThis==null?void 0:globalThis.document){const n=on(t);S.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var dve="DismissableLayer",TM="dismissableLayer.update",fve="dismissableLayer.pointerDownOutside",hve="dismissableLayer.focusOutside",bB,Mq=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ru=S.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...c}=t,u=S.useContext(Mq),[f,l]=S.useState(null),d=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=S.useState({}),h=Je(e,T=>l(T)),m=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(y),v=f?m.indexOf(f):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,_=v>=g,R=mve(T=>{const E=T.target,N=[...u.branches].some(k=>k.contains(E));!_||N||(s==null||s(T),o==null||o(T),T.defaultPrevented||a==null||a())},d),P=gve(T=>{const E=T.target;[...u.branches].some(k=>k.contains(E))||(i==null||i(T),o==null||o(T),T.defaultPrevented||a==null||a())},d);return uve(T=>{v===u.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},d),S.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(bB=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),xB(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=bB)}},[f,d,n,u]),S.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),xB())},[f,u]),S.useEffect(()=>{const T=()=>p({});return document.addEventListener(TM,T),()=>document.removeEventListener(TM,T)},[]),w.jsx(De.div,{...c,ref:h,style:{pointerEvents:b?_?"auto":"none":void 0,...t.style},onFocusCapture:ye(t.onFocusCapture,P.onFocusCapture),onBlurCapture:ye(t.onBlurCapture,P.onBlurCapture),onPointerDownCapture:ye(t.onPointerDownCapture,R.onPointerDownCapture)})});Ru.displayName=dve;var pve="DismissableLayerBranch",Oq=S.forwardRef((t,e)=>{const n=S.useContext(Mq),r=S.useRef(null),s=Je(e,r);return S.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),w.jsx(De.div,{...t,ref:s})});Oq.displayName=pve;function mve(t,e=globalThis==null?void 0:globalThis.document){const n=on(t),r=S.useRef(!1),s=S.useRef(()=>{});return S.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let c=function(){Iq(fve,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}else e.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function gve(t,e=globalThis==null?void 0:globalThis.document){const n=on(t),r=S.useRef(!1);return S.useEffect(()=>{const s=i=>{i.target&&!r.current&&Iq(hve,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function xB(){const t=new CustomEvent(TM);document.dispatchEvent(t)}function Iq(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?tx(s,i):s.dispatchEvent(i)}var vve=Ru,yve=Oq,BT="focusScope.autoFocusOnMount",UT="focusScope.autoFocusOnUnmount",wB={bubbles:!1,cancelable:!0},bve="FocusScope",f_=S.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,c]=S.useState(null),u=on(s),f=on(i),l=S.useRef(null),d=Je(e,m=>c(m)),p=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(r){let m=function(b){if(p.paused||!a)return;const _=b.target;a.contains(_)?l.current=_:Ku(l.current,{select:!0})},y=function(b){if(p.paused||!a)return;const _=b.relatedTarget;_!==null&&(a.contains(_)||Ku(l.current,{select:!0}))},g=function(b){if(document.activeElement===document.body)for(const R of b)R.removedNodes.length>0&&Ku(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const v=new MutationObserver(g);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),v.disconnect()}}},[r,a,p.paused]),S.useEffect(()=>{if(a){SB.add(p);const m=document.activeElement;if(!a.contains(m)){const g=new CustomEvent(BT,wB);a.addEventListener(BT,u),a.dispatchEvent(g),g.defaultPrevented||(xve(Eve(jq(a)),{select:!0}),document.activeElement===m&&Ku(a))}return()=>{a.removeEventListener(BT,u),setTimeout(()=>{const g=new CustomEvent(UT,wB);a.addEventListener(UT,f),a.dispatchEvent(g),g.defaultPrevented||Ku(m??document.body,{select:!0}),a.removeEventListener(UT,f),SB.remove(p)},0)}}},[a,u,f,p]);const h=S.useCallback(m=>{if(!n&&!r||p.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(y&&g){const v=m.currentTarget,[b,_]=wve(v);b&&_?!m.shiftKey&&g===_?(m.preventDefault(),n&&Ku(b,{select:!0})):m.shiftKey&&g===b&&(m.preventDefault(),n&&Ku(_,{select:!0})):g===v&&m.preventDefault()}},[n,r,p.paused]);return w.jsx(De.div,{tabIndex:-1,...o,ref:d,onKeyDown:h})});f_.displayName=bve;function xve(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Ku(r,{select:e}),document.activeElement!==n)return}function wve(t){const e=jq(t),n=_B(e,t),r=_B(e.reverse(),t);return[n,r]}function jq(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function _B(t,e){for(const n of t)if(!_ve(n,{upTo:e}))return n}function _ve(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function Sve(t){return t instanceof HTMLInputElement&&"select"in t}function Ku(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&Sve(t)&&e&&t.select()}}var SB=Cve();function Cve(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=CB(t,e),t.unshift(e)},remove(e){var n;t=CB(t,e),(n=t[0])==null||n.resume()}}}function CB(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function Eve(t){return t.filter(e=>e.tagName!=="A")}var Rve="Portal",dy=S.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[s,i]=S.useState(!1);ir(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?KR.createPortal(w.jsx(De.div,{...r,ref:e}),o):null});dy.displayName=Rve;var HT=0;function oA(){S.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??EB()),document.body.insertAdjacentElement("beforeend",t[1]??EB()),HT++,()=>{HT===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),HT--}},[])}function EB(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}var Ms=function(){return Ms=Object.assign||function(e){for(var n,r=1,s=arguments.length;r "u")return Fve;var e=zve(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},Uve=xL(),fg="data-scroll-locked",Hve=function(t,e,n,r){var s=t.left,i=t.top,o=t.right,a=t.gap;return n===void 0&&(n="margin"),` + .`.concat(Ave,` { overflow: hidden `).concat(r,`; padding-right: `).concat(a,"px ").concat(r,`; } @@ -326,59 +331,59 @@ Error generating stack: `+i.message+` } body[`).concat(fg,`] { - `).concat(Ave,": ").concat(a,`px; + `).concat(Pve,": ").concat(a,`px; } -`)},PB=function(){var t=parseInt(document.body.getAttribute(fg)||"0",10);return isFinite(t)?t:0},Hve=function(){S.useEffect(function(){return document.body.setAttribute(fg,(PB()+1).toString()),function(){var t=PB()-1;t<=0?document.body.removeAttribute(fg):document.body.setAttribute(fg,t.toString())}},[])},Uq=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,s=r===void 0?"margin":r;Hve();var i=S.useMemo(function(){return zve(s)},[s]);return S.createElement(Bve,{styles:Uve(i,!e,s,n?"":"!important")})},kM=!1;if(typeof window<"u")try{var u1=Object.defineProperty({},"passive",{get:function(){return kM=!0,!0}});window.addEventListener("test",u1,u1),window.removeEventListener("test",u1,u1)}catch{kM=!1}var ym=kM?{passive:!1}:!1,Vve=function(t){return t.tagName==="TEXTAREA"},Hq=function(t,e){var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!Vve(t)&&n[e]==="visible")},qve=function(t){return Hq(t,"overflowY")},Wve=function(t){return Hq(t,"overflowX")},NB=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=Vq(t,r);if(s){var i=qq(t,r),o=i[1],a=i[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Gve=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},Kve=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},Vq=function(t,e){return t==="v"?qve(e):Wve(e)},qq=function(t,e){return t==="v"?Gve(e):Kve(e)},Yve=function(t,e){return t==="h"&&e==="rtl"?-1:1},Xve=function(t,e,n,r,s){var i=Yve(t,window.getComputedStyle(e).direction),o=i*r,a=n.target,c=e.contains(a),u=!1,f=o>0,l=0,d=0;do{var p=qq(t,a),h=p[0],m=p[1],y=p[2],g=m-y-i*h;(h||g)&&Vq(t,a)&&(l+=g,d+=h),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(f&&(Math.abs(l)<1||!s)||!f&&(Math.abs(d)<1||!s))&&(u=!0),u},d1=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},TB=function(t){return[t.deltaX,t.deltaY]},kB=function(t){return t&&"current"in t?t.current:t},Qve=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Zve=function(t){return` +`)},AB=function(){var t=parseInt(document.body.getAttribute(fg)||"0",10);return isFinite(t)?t:0},Vve=function(){S.useEffect(function(){return document.body.setAttribute(fg,(AB()+1).toString()),function(){var t=AB()-1;t<=0?document.body.removeAttribute(fg):document.body.setAttribute(fg,t.toString())}},[])},Hq=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,s=r===void 0?"margin":r;Vve();var i=S.useMemo(function(){return Bve(s)},[s]);return S.createElement(Uve,{styles:Hve(i,!e,s,n?"":"!important")})},kM=!1;if(typeof window<"u")try{var u1=Object.defineProperty({},"passive",{get:function(){return kM=!0,!0}});window.addEventListener("test",u1,u1),window.removeEventListener("test",u1,u1)}catch{kM=!1}var ym=kM?{passive:!1}:!1,qve=function(t){return t.tagName==="TEXTAREA"},Vq=function(t,e){var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!qve(t)&&n[e]==="visible")},Wve=function(t){return Vq(t,"overflowY")},Gve=function(t){return Vq(t,"overflowX")},PB=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=qq(t,r);if(s){var i=Wq(t,r),o=i[1],a=i[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Kve=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},Yve=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},qq=function(t,e){return t==="v"?Wve(e):Gve(e)},Wq=function(t,e){return t==="v"?Kve(e):Yve(e)},Xve=function(t,e){return t==="h"&&e==="rtl"?-1:1},Qve=function(t,e,n,r,s){var i=Xve(t,window.getComputedStyle(e).direction),o=i*r,a=n.target,c=e.contains(a),u=!1,f=o>0,l=0,d=0;do{var p=Wq(t,a),h=p[0],m=p[1],y=p[2],g=m-y-i*h;(h||g)&&qq(t,a)&&(l+=g,d+=h),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(f&&(Math.abs(l)<1||!s)||!f&&(Math.abs(d)<1||!s))&&(u=!0),u},d1=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},NB=function(t){return[t.deltaX,t.deltaY]},TB=function(t){return t&&"current"in t?t.current:t},Zve=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Jve=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},Jve=0,bm=[];function eye(t){var e=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),s=S.useState(Jve++)[0],i=S.useState(xL)[0],o=S.useRef(t);S.useEffect(function(){o.current=t},[t]),S.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var m=jq([t.lockRef.current],(t.shards||[]).map(kB),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=S.useCallback(function(m,y){if("touches"in m&&m.touches.length===2)return!o.current.allowPinchZoom;var g=d1(m),v=n.current,b="deltaX"in m?m.deltaX:v[0]-g[0],_="deltaY"in m?m.deltaY:v[1]-g[1],R,P=m.target,T=Math.abs(b)>Math.abs(_)?"h":"v";if("touches"in m&&T==="h"&&P.type==="range")return!1;var E=NB(T,P);if(!E)return!0;if(E?R=T:(R=T==="v"?"h":"v",E=NB(T,P)),!E)return!1;if(!r.current&&"changedTouches"in m&&(b||_)&&(r.current=R),!R)return!0;var N=r.current||R;return Xve(N,y,m,N==="h"?b:_,!0)},[]),c=S.useCallback(function(m){var y=m;if(!(!bm.length||bm[bm.length-1]!==i)){var g="deltaY"in y?TB(y):d1(y),v=e.current.filter(function(R){return R.name===y.type&&(R.target===y.target||y.target===R.shadowParent)&&Qve(R.delta,g)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var b=(o.current.shards||[]).map(kB).filter(Boolean).filter(function(R){return R.contains(y.target)}),_=b.length>0?a(y,b[0]):!o.current.noIsolation;_&&y.cancelable&&y.preventDefault()}}},[]),u=S.useCallback(function(m,y,g,v){var b={name:m,delta:y,target:g,should:v,shadowParent:tye(g)};e.current.push(b),setTimeout(function(){e.current=e.current.filter(function(_){return _!==b})},1)},[]),f=S.useCallback(function(m){n.current=d1(m),r.current=void 0},[]),l=S.useCallback(function(m){u(m.type,TB(m),m.target,a(m,t.lockRef.current))},[]),d=S.useCallback(function(m){u(m.type,d1(m),m.target,a(m,t.lockRef.current))},[]);S.useEffect(function(){return bm.push(i),t.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:d}),document.addEventListener("wheel",c,ym),document.addEventListener("touchmove",c,ym),document.addEventListener("touchstart",f,ym),function(){bm=bm.filter(function(m){return m!==i}),document.removeEventListener("wheel",c,ym),document.removeEventListener("touchmove",c,ym),document.removeEventListener("touchstart",f,ym)}},[]);var p=t.removeScrollBar,h=t.inert;return S.createElement(S.Fragment,null,h?S.createElement(i,{styles:Zve(s)}):null,p?S.createElement(Uq,{gapMode:t.gapMode}):null)}function tye(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const nye=zq(Bq,eye);var h_=S.forwardRef(function(t,e){return S.createElement(oA,Ms({},t,{ref:e,sideCar:nye}))});h_.classNames=oA.classNames;var rye=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},xm=new WeakMap,f1=new WeakMap,h1={},WT=0,Wq=function(t){return t&&(t.host||Wq(t.parentNode))},sye=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=Wq(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},iye=function(t,e,n,r){var s=sye(e,Array.isArray(t)?t:[t]);h1[n]||(h1[n]=new WeakMap);var i=h1[n],o=[],a=new Set,c=new Set(s),u=function(l){!l||a.has(l)||(a.add(l),u(l.parentNode))};s.forEach(u);var f=function(l){!l||c.has(l)||Array.prototype.forEach.call(l.children,function(d){if(a.has(d))f(d);else try{var p=d.getAttribute(r),h=p!==null&&p!=="false",m=(xm.get(d)||0)+1,y=(i.get(d)||0)+1;xm.set(d,m),i.set(d,y),o.push(d),m===1&&h&&f1.set(d,!0),y===1&&d.setAttribute(n,"true"),h||d.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",d,g)}})};return f(e),a.clear(),WT++,function(){o.forEach(function(l){var d=xm.get(l)-1,p=i.get(l)-1;xm.set(l,d),i.set(l,p),d||(f1.has(l)||l.removeAttribute(r),f1.delete(l)),p||l.removeAttribute(n)}),WT--,WT||(xm=new WeakMap,xm=new WeakMap,f1=new WeakMap,h1={})}},p_=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),s=rye(t);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),iye(r,s,n,"aria-hidden")):function(){return null}},wL="Dialog",[Gq,Kq]=In(wL),[oye,Za]=Gq(wL),Yq=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!0}=t,a=S.useRef(null),c=S.useRef(null),[u=!1,f]=mr({prop:r,defaultProp:s,onChange:i});return w.jsx(oye,{scope:e,triggerRef:a,contentRef:c,contentId:js(),titleId:js(),descriptionId:js(),open:u,onOpenChange:f,onOpenToggle:S.useCallback(()=>f(l=>!l),[f]),modal:o,children:n})};Yq.displayName=wL;var Xq="DialogTrigger",Qq=S.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Za(Xq,n),i=Je(e,s.triggerRef);return w.jsx(De.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":EL(s.open),...r,ref:i,onClick:ye(t.onClick,s.onOpenToggle)})});Qq.displayName=Xq;var _L="DialogPortal",[aye,Zq]=Gq(_L,{forceMount:void 0}),Jq=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,i=Za(_L,e);return w.jsx(aye,{scope:e,forceMount:n,children:S.Children.map(r,o=>w.jsx(Kn,{present:n||i.open,children:w.jsx(dy,{asChild:!0,container:s,children:o})}))})};Jq.displayName=_L;var mE="DialogOverlay",eW=S.forwardRef((t,e)=>{const n=Zq(mE,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Za(mE,t.__scopeDialog);return i.modal?w.jsx(Kn,{present:r||i.open,children:w.jsx(lye,{...s,ref:e})}):null});eW.displayName=mE;var lye=S.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Za(mE,n);return w.jsx(h_,{as:qa,allowPinchZoom:!0,shards:[s.contentRef],children:w.jsx(De.div,{"data-state":EL(s.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),_p="DialogContent",tW=S.forwardRef((t,e)=>{const n=Zq(_p,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Za(_p,t.__scopeDialog);return w.jsx(Kn,{present:r||i.open,children:i.modal?w.jsx(cye,{...s,ref:e}):w.jsx(uye,{...s,ref:e})})});tW.displayName=_p;var cye=S.forwardRef((t,e)=>{const n=Za(_p,t.__scopeDialog),r=S.useRef(null),s=Je(e,n.contentRef,r);return S.useEffect(()=>{const i=r.current;if(i)return p_(i)},[]),w.jsx(nW,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ye(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ye(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:ye(t.onFocusOutside,i=>i.preventDefault())})}),uye=S.forwardRef((t,e)=>{const n=Za(_p,t.__scopeDialog),r=S.useRef(!1),s=S.useRef(!1);return w.jsx(nW,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=t.onInteractOutside)==null||c.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),nW=S.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=Za(_p,n),c=S.useRef(null),u=Je(e,c);return iA(),w.jsxs(w.Fragment,{children:[w.jsx(f_,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:w.jsx(Ru,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":EL(a.open),...o,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),w.jsxs(w.Fragment,{children:[w.jsx(fye,{titleId:a.titleId}),w.jsx(pye,{contentRef:c,descriptionId:a.descriptionId})]})]})}),SL="DialogTitle",rW=S.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Za(SL,n);return w.jsx(De.h2,{id:s.titleId,...r,ref:e})});rW.displayName=SL;var sW="DialogDescription",CL=S.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Za(sW,n);return w.jsx(De.p,{id:s.descriptionId,...r,ref:e})});CL.displayName=sW;var iW="DialogClose",oW=S.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Za(iW,n);return w.jsx(De.button,{type:"button",...r,ref:e,onClick:ye(t.onClick,()=>s.onOpenChange(!1))})});oW.displayName=iW;function EL(t){return t?"open":"closed"}var aW="DialogTitleWarning",[dye,lW]=Sme(aW,{contentName:_p,titleName:SL,docsSlug:"dialog"}),fye=({titleId:t})=>{const e=lW(aW),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. +`)},eye=0,bm=[];function tye(t){var e=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),s=S.useState(eye++)[0],i=S.useState(xL)[0],o=S.useRef(t);S.useEffect(function(){o.current=t},[t]),S.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var m=Lq([t.lockRef.current],(t.shards||[]).map(TB),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=S.useCallback(function(m,y){if("touches"in m&&m.touches.length===2)return!o.current.allowPinchZoom;var g=d1(m),v=n.current,b="deltaX"in m?m.deltaX:v[0]-g[0],_="deltaY"in m?m.deltaY:v[1]-g[1],R,P=m.target,T=Math.abs(b)>Math.abs(_)?"h":"v";if("touches"in m&&T==="h"&&P.type==="range")return!1;var E=PB(T,P);if(!E)return!0;if(E?R=T:(R=T==="v"?"h":"v",E=PB(T,P)),!E)return!1;if(!r.current&&"changedTouches"in m&&(b||_)&&(r.current=R),!R)return!0;var N=r.current||R;return Qve(N,y,m,N==="h"?b:_,!0)},[]),c=S.useCallback(function(m){var y=m;if(!(!bm.length||bm[bm.length-1]!==i)){var g="deltaY"in y?NB(y):d1(y),v=e.current.filter(function(R){return R.name===y.type&&(R.target===y.target||y.target===R.shadowParent)&&Zve(R.delta,g)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var b=(o.current.shards||[]).map(TB).filter(Boolean).filter(function(R){return R.contains(y.target)}),_=b.length>0?a(y,b[0]):!o.current.noIsolation;_&&y.cancelable&&y.preventDefault()}}},[]),u=S.useCallback(function(m,y,g,v){var b={name:m,delta:y,target:g,should:v,shadowParent:nye(g)};e.current.push(b),setTimeout(function(){e.current=e.current.filter(function(_){return _!==b})},1)},[]),f=S.useCallback(function(m){n.current=d1(m),r.current=void 0},[]),l=S.useCallback(function(m){u(m.type,NB(m),m.target,a(m,t.lockRef.current))},[]),d=S.useCallback(function(m){u(m.type,d1(m),m.target,a(m,t.lockRef.current))},[]);S.useEffect(function(){return bm.push(i),t.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:d}),document.addEventListener("wheel",c,ym),document.addEventListener("touchmove",c,ym),document.addEventListener("touchstart",f,ym),function(){bm=bm.filter(function(m){return m!==i}),document.removeEventListener("wheel",c,ym),document.removeEventListener("touchmove",c,ym),document.removeEventListener("touchstart",f,ym)}},[]);var p=t.removeScrollBar,h=t.inert;return S.createElement(S.Fragment,null,h?S.createElement(i,{styles:Jve(s)}):null,p?S.createElement(Hq,{gapMode:t.gapMode}):null)}function nye(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const rye=Bq(Uq,tye);var h_=S.forwardRef(function(t,e){return S.createElement(aA,Ms({},t,{ref:e,sideCar:rye}))});h_.classNames=aA.classNames;var sye=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},xm=new WeakMap,f1=new WeakMap,h1={},GT=0,Gq=function(t){return t&&(t.host||Gq(t.parentNode))},iye=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=Gq(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},oye=function(t,e,n,r){var s=iye(e,Array.isArray(t)?t:[t]);h1[n]||(h1[n]=new WeakMap);var i=h1[n],o=[],a=new Set,c=new Set(s),u=function(l){!l||a.has(l)||(a.add(l),u(l.parentNode))};s.forEach(u);var f=function(l){!l||c.has(l)||Array.prototype.forEach.call(l.children,function(d){if(a.has(d))f(d);else try{var p=d.getAttribute(r),h=p!==null&&p!=="false",m=(xm.get(d)||0)+1,y=(i.get(d)||0)+1;xm.set(d,m),i.set(d,y),o.push(d),m===1&&h&&f1.set(d,!0),y===1&&d.setAttribute(n,"true"),h||d.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",d,g)}})};return f(e),a.clear(),GT++,function(){o.forEach(function(l){var d=xm.get(l)-1,p=i.get(l)-1;xm.set(l,d),i.set(l,p),d||(f1.has(l)||l.removeAttribute(r),f1.delete(l)),p||l.removeAttribute(n)}),GT--,GT||(xm=new WeakMap,xm=new WeakMap,f1=new WeakMap,h1={})}},p_=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),s=sye(t);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),oye(r,s,n,"aria-hidden")):function(){return null}},wL="Dialog",[Kq,Yq]=In(wL),[aye,Za]=Kq(wL),Xq=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!0}=t,a=S.useRef(null),c=S.useRef(null),[u=!1,f]=mr({prop:r,defaultProp:s,onChange:i});return w.jsx(aye,{scope:e,triggerRef:a,contentRef:c,contentId:js(),titleId:js(),descriptionId:js(),open:u,onOpenChange:f,onOpenToggle:S.useCallback(()=>f(l=>!l),[f]),modal:o,children:n})};Xq.displayName=wL;var Qq="DialogTrigger",Zq=S.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Za(Qq,n),i=Je(e,s.triggerRef);return w.jsx(De.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":EL(s.open),...r,ref:i,onClick:ye(t.onClick,s.onOpenToggle)})});Zq.displayName=Qq;var _L="DialogPortal",[lye,Jq]=Kq(_L,{forceMount:void 0}),eW=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,i=Za(_L,e);return w.jsx(lye,{scope:e,forceMount:n,children:S.Children.map(r,o=>w.jsx(Kn,{present:n||i.open,children:w.jsx(dy,{asChild:!0,container:s,children:o})}))})};eW.displayName=_L;var mE="DialogOverlay",tW=S.forwardRef((t,e)=>{const n=Jq(mE,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Za(mE,t.__scopeDialog);return i.modal?w.jsx(Kn,{present:r||i.open,children:w.jsx(cye,{...s,ref:e})}):null});tW.displayName=mE;var cye=S.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Za(mE,n);return w.jsx(h_,{as:qa,allowPinchZoom:!0,shards:[s.contentRef],children:w.jsx(De.div,{"data-state":EL(s.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),_p="DialogContent",nW=S.forwardRef((t,e)=>{const n=Jq(_p,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Za(_p,t.__scopeDialog);return w.jsx(Kn,{present:r||i.open,children:i.modal?w.jsx(uye,{...s,ref:e}):w.jsx(dye,{...s,ref:e})})});nW.displayName=_p;var uye=S.forwardRef((t,e)=>{const n=Za(_p,t.__scopeDialog),r=S.useRef(null),s=Je(e,n.contentRef,r);return S.useEffect(()=>{const i=r.current;if(i)return p_(i)},[]),w.jsx(rW,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ye(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ye(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:ye(t.onFocusOutside,i=>i.preventDefault())})}),dye=S.forwardRef((t,e)=>{const n=Za(_p,t.__scopeDialog),r=S.useRef(!1),s=S.useRef(!1);return w.jsx(rW,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=t.onInteractOutside)==null||c.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),rW=S.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=Za(_p,n),c=S.useRef(null),u=Je(e,c);return oA(),w.jsxs(w.Fragment,{children:[w.jsx(f_,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:w.jsx(Ru,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":EL(a.open),...o,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),w.jsxs(w.Fragment,{children:[w.jsx(hye,{titleId:a.titleId}),w.jsx(mye,{contentRef:c,descriptionId:a.descriptionId})]})]})}),SL="DialogTitle",sW=S.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Za(SL,n);return w.jsx(De.h2,{id:s.titleId,...r,ref:e})});sW.displayName=SL;var iW="DialogDescription",CL=S.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Za(iW,n);return w.jsx(De.p,{id:s.descriptionId,...r,ref:e})});CL.displayName=iW;var oW="DialogClose",aW=S.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Za(oW,n);return w.jsx(De.button,{type:"button",...r,ref:e,onClick:ye(t.onClick,()=>s.onOpenChange(!1))})});aW.displayName=oW;function EL(t){return t?"open":"closed"}var lW="DialogTitleWarning",[fye,cW]=Cme(lW,{contentName:_p,titleName:SL,docsSlug:"dialog"}),hye=({titleId:t})=>{const e=cW(lW),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component. -For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return S.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},hye="DialogDescriptionWarning",pye=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lW(hye).contentName}}.`;return S.useEffect(()=>{var i;const s=(i=t.current)==null?void 0:i.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},aA=Yq,lA=Qq,cA=Jq,fy=eW,hy=tW,py=rW,my=CL,gy=oW,cW="AlertDialog",[mye,NUe]=In(cW,[Kq]),Au=Kq(),uW=t=>{const{__scopeAlertDialog:e,...n}=t,r=Au(e);return w.jsx(aA,{...r,...n,modal:!0})};uW.displayName=cW;var gye="AlertDialogTrigger",dW=S.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Au(n);return w.jsx(lA,{...s,...r,ref:e})});dW.displayName=gye;var vye="AlertDialogPortal",fW=t=>{const{__scopeAlertDialog:e,...n}=t,r=Au(e);return w.jsx(cA,{...r,...n})};fW.displayName=vye;var yye="AlertDialogOverlay",hW=S.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Au(n);return w.jsx(fy,{...s,...r,ref:e})});hW.displayName=yye;var hg="AlertDialogContent",[bye,xye]=mye(hg),pW=S.forwardRef((t,e)=>{const{__scopeAlertDialog:n,children:r,...s}=t,i=Au(n),o=S.useRef(null),a=Je(e,o),c=S.useRef(null);return w.jsx(dye,{contentName:hg,titleName:mW,docsSlug:"alert-dialog",children:w.jsx(bye,{scope:n,cancelRef:c,children:w.jsxs(hy,{role:"alertdialog",...i,...s,ref:a,onOpenAutoFocus:ye(s.onOpenAutoFocus,u=>{var f;u.preventDefault(),(f=c.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[w.jsx(aL,{children:r}),w.jsx(_ye,{contentRef:o})]})})})});pW.displayName=hg;var mW="AlertDialogTitle",gW=S.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Au(n);return w.jsx(py,{...s,...r,ref:e})});gW.displayName=mW;var vW="AlertDialogDescription",yW=S.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Au(n);return w.jsx(my,{...s,...r,ref:e})});yW.displayName=vW;var wye="AlertDialogAction",bW=S.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Au(n);return w.jsx(gy,{...s,...r,ref:e})});bW.displayName=wye;var xW="AlertDialogCancel",wW=S.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,{cancelRef:s}=xye(xW,n),i=Au(n),o=Je(e,s);return w.jsx(gy,{...i,...r,ref:o})});wW.displayName=xW;var _ye=({contentRef:t})=>{const e=`\`${hg}\` requires a description for the component to be accessible for screen reader users. +For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return S.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},pye="DialogDescriptionWarning",mye=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${cW(pye).contentName}}.`;return S.useEffect(()=>{var i;const s=(i=t.current)==null?void 0:i.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},lA=Xq,cA=Zq,uA=eW,fy=tW,hy=nW,py=sW,my=CL,gy=aW,uW="AlertDialog",[gye,TUe]=In(uW,[Yq]),Au=Yq(),dW=t=>{const{__scopeAlertDialog:e,...n}=t,r=Au(e);return w.jsx(lA,{...r,...n,modal:!0})};dW.displayName=uW;var vye="AlertDialogTrigger",fW=S.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Au(n);return w.jsx(cA,{...s,...r,ref:e})});fW.displayName=vye;var yye="AlertDialogPortal",hW=t=>{const{__scopeAlertDialog:e,...n}=t,r=Au(e);return w.jsx(uA,{...r,...n})};hW.displayName=yye;var bye="AlertDialogOverlay",pW=S.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Au(n);return w.jsx(fy,{...s,...r,ref:e})});pW.displayName=bye;var hg="AlertDialogContent",[xye,wye]=gye(hg),mW=S.forwardRef((t,e)=>{const{__scopeAlertDialog:n,children:r,...s}=t,i=Au(n),o=S.useRef(null),a=Je(e,o),c=S.useRef(null);return w.jsx(fye,{contentName:hg,titleName:gW,docsSlug:"alert-dialog",children:w.jsx(xye,{scope:n,cancelRef:c,children:w.jsxs(hy,{role:"alertdialog",...i,...s,ref:a,onOpenAutoFocus:ye(s.onOpenAutoFocus,u=>{var f;u.preventDefault(),(f=c.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[w.jsx(aL,{children:r}),w.jsx(Sye,{contentRef:o})]})})})});mW.displayName=hg;var gW="AlertDialogTitle",vW=S.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Au(n);return w.jsx(py,{...s,...r,ref:e})});vW.displayName=gW;var yW="AlertDialogDescription",bW=S.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Au(n);return w.jsx(my,{...s,...r,ref:e})});bW.displayName=yW;var _ye="AlertDialogAction",xW=S.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Au(n);return w.jsx(gy,{...s,...r,ref:e})});xW.displayName=_ye;var wW="AlertDialogCancel",_W=S.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,{cancelRef:s}=wye(wW,n),i=Au(n),o=Je(e,s);return w.jsx(gy,{...i,...r,ref:o})});_W.displayName=wW;var Sye=({contentRef:t})=>{const e=`\`${hg}\` requires a description for the component to be accessible for screen reader users. -You can add a description to the \`${hg}\` by passing a \`${vW}\` component as a child, which also benefits sighted users by adding visible context to the dialog. +You can add a description to the \`${hg}\` by passing a \`${yW}\` component as a child, which also benefits sighted users by adding visible context to the dialog. Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${hg}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. -For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return S.useEffect(()=>{var r;document.getElementById((r=t.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(e)},[e,t]),null},Sye=uW,Cye=dW,Eye=fW,_W=hW,SW=pW,CW=bW,EW=wW,RW=gW,AW=yW;const nx=li("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),tt=S.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...s},i)=>{const o=r?qa:"button";return w.jsx(o,{className:ie(nx({variant:e,size:n,className:t})),ref:i,...s})});tt.displayName="Button";const RL=Sye,Rye=Cye,Aye=Eye,PW=S.forwardRef(({className:t,...e},n)=>w.jsx(_W,{className:ie("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e,ref:n}));PW.displayName=_W.displayName;const uA=S.forwardRef(({className:t,...e},n)=>w.jsxs(Aye,{children:[w.jsx(PW,{}),w.jsx(SW,{ref:n,className:ie("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...e})]}));uA.displayName=SW.displayName;const dA=({className:t,...e})=>w.jsx("div",{className:ie("flex flex-col space-y-2 text-center sm:text-left",t),...e});dA.displayName="AlertDialogHeader";const fA=({className:t,...e})=>w.jsx("div",{className:ie("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});fA.displayName="AlertDialogFooter";const hA=S.forwardRef(({className:t,...e},n)=>w.jsx(RW,{ref:n,className:ie("text-lg font-semibold",t),...e}));hA.displayName=RW.displayName;const pA=S.forwardRef(({className:t,...e},n)=>w.jsx(AW,{ref:n,className:ie("text-sm text-muted-foreground",t),...e}));pA.displayName=AW.displayName;const mA=S.forwardRef(({className:t,...e},n)=>w.jsx(CW,{ref:n,className:ie(nx(),t),...e}));mA.displayName=CW.displayName;const gA=S.forwardRef(({className:t,...e},n)=>w.jsx(EW,{ref:n,className:ie(nx({variant:"outline"}),"mt-2 sm:mt-0",t),...e}));gA.displayName=EW.displayName;const Pye=({textAreaRef:t,triggerAutoSize:e,maxHeight:n=Number.MAX_SAFE_INTEGER,minHeight:r=0})=>{const[s,i]=S.useState(!0);S.useEffect(()=>{if(t){s&&(t.style.minHeight=`${r+2}px`,n>r&&(t.style.maxHeight=`${n}px`),i(!1)),t.style.height=`${r+2}px`;const a=t.scrollHeight;a>n?t.style.height=`${n}px`:t.style.height=`${a+2}px`}},[t,e,s,n,r])},NW=S.forwardRef(({maxHeight:t=Number.MAX_SAFE_INTEGER,minHeight:e=52,className:n,onChange:r,value:s,...i},o)=>{const a=S.useRef(null),[c,u]=S.useState("");return Pye({textAreaRef:a.current,triggerAutoSize:c,maxHeight:t,minHeight:e}),S.useImperativeHandle(o,()=>({textArea:a.current,focus:()=>{var f;return(f=a.current)==null?void 0:f.focus()},maxHeight:t,minHeight:e})),S.useEffect(()=>{(s||i!=null&&i.defaultValue)&&u(s)},[s||(i==null?void 0:i.defaultValue)]),w.jsx("textarea",{...i,value:s,ref:a,className:ie("flex w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",n),onChange:f=>{u(f.target.value),r==null||r(f)}})});NW.displayName="AutosizeTextarea";var AL="Avatar",[Nye,TUe]=In(AL),[Tye,TW]=Nye(AL),kW=S.forwardRef((t,e)=>{const{__scopeAvatar:n,...r}=t,[s,i]=S.useState("idle");return w.jsx(Tye,{scope:n,imageLoadingStatus:s,onImageLoadingStatusChange:i,children:w.jsx(De.span,{...r,ref:e})})});kW.displayName=AL;var DW="AvatarImage",MW=S.forwardRef((t,e)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:s=()=>{},...i}=t,o=TW(DW,n),a=kye(r),c=on(u=>{s(u),o.onImageLoadingStatusChange(u)});return ir(()=>{a!=="idle"&&c(a)},[a,c]),a==="loaded"?w.jsx(De.img,{...i,ref:e,src:r}):null});MW.displayName=DW;var OW="AvatarFallback",IW=S.forwardRef((t,e)=>{const{__scopeAvatar:n,delayMs:r,...s}=t,i=TW(OW,n),[o,a]=S.useState(r===void 0);return S.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(c)}},[r]),o&&i.imageLoadingStatus!=="loaded"?w.jsx(De.span,{...s,ref:e}):null});IW.displayName=OW;function kye(t){const[e,n]=S.useState("idle");return ir(()=>{if(!t){n("error");return}let r=!0;const s=new window.Image,i=o=>()=>{r&&n(o)};return n("loading"),s.onload=i("loaded"),s.onerror=i("error"),s.src=t,()=>{r=!1}},[t]),e}var jW=kW,LW=MW,$W=IW;const Dye=S.forwardRef(({className:t,...e},n)=>w.jsx(jW,{ref:n,className:ie("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",t),...e}));Dye.displayName=jW.displayName;const Mye=S.forwardRef(({className:t,...e},n)=>w.jsx(LW,{ref:n,className:ie("aspect-square h-full w-full",t),...e}));Mye.displayName=LW.displayName;const Oye=S.forwardRef(({className:t,...e},n)=>w.jsx($W,{ref:n,className:ie("flex h-full w-full items-center justify-center rounded-full bg-muted",t),...e}));Oye.displayName=$W.displayName;const Iye=li("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function FW({className:t,variant:e,...n}){return w.jsx("div",{className:ie(Iye({variant:e}),t),...n})}const jye=S.forwardRef(({...t},e)=>w.jsx("nav",{ref:e,"aria-label":"breadcrumb",...t}));jye.displayName="Breadcrumb";const Lye=S.forwardRef(({className:t,...e},n)=>w.jsx("ol",{ref:n,className:ie("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",t),...e}));Lye.displayName="BreadcrumbList";const $ye=S.forwardRef(({className:t,...e},n)=>w.jsx("li",{ref:n,className:ie("inline-flex items-center gap-1.5",t),...e}));$ye.displayName="BreadcrumbItem";const Fye=S.forwardRef(({asChild:t,className:e,...n},r)=>{const s=t?qa:"a";return w.jsx(s,{ref:r,className:ie("transition-colors hover:text-foreground",e),...n})});Fye.displayName="BreadcrumbLink";const zye=S.forwardRef(({className:t,...e},n)=>w.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:ie("font-normal text-foreground",t),...e}));zye.displayName="BreadcrumbPage";function Qt(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function wo(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function Zs(t,e){const n=Qt(t);return isNaN(e)?wo(t,NaN):(e&&n.setDate(n.getDate()+e),n)}function Wa(t,e){const n=Qt(t);if(isNaN(e))return wo(t,NaN);if(!e)return n;const r=n.getDate(),s=wo(t,n.getTime());s.setMonth(n.getMonth()+e+1,0);const i=s.getDate();return r>=i?s:(n.setFullYear(s.getFullYear(),s.getMonth(),r),n)}const PL=6048e5,Bye=864e5;let Uye={};function m_(){return Uye}function zl(t,e){var a,c,u,f;const n=m_(),r=(e==null?void 0:e.weekStartsOn)??((c=(a=e==null?void 0:e.locale)==null?void 0:a.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,s=Qt(t),i=s.getDay(),o=(i=s.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function Vv(t){const e=Qt(t);return e.setHours(0,0,0,0),e}function gE(t){const e=Qt(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function kl(t,e){const n=Vv(t),r=Vv(e),s=+n-gE(n),i=+r-gE(r);return Math.round((s-i)/Bye)}function Hye(t){const e=zW(t),n=wo(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),Sp(n)}function DM(t,e){const n=e*7;return Zs(t,n)}function Vye(t,e){return Wa(t,e*12)}function qye(t){let e;return t.forEach(function(n){const r=Qt(n);(e===void 0||e {const r=Qt(n);(!e||e>r||isNaN(+r))&&(e=r)}),e||new Date(NaN)}function Ni(t,e){const n=Vv(t),r=Vv(e);return+n==+r}function NL(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Gye(t){if(!NL(t)&&typeof t!="number")return!1;const e=Qt(t);return!isNaN(Number(e))}function rx(t,e){const n=Qt(t),r=Qt(e),s=n.getFullYear()-r.getFullYear(),i=n.getMonth()-r.getMonth();return s*12+i}function Kye(t,e,n){const r=zl(t,n),s=zl(e,n),i=+r-gE(r),o=+s-gE(s);return Math.round((i-o)/PL)}function TL(t){const e=Qt(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e}function ji(t){const e=Qt(t);return e.setDate(1),e.setHours(0,0,0,0),e}function BW(t){const e=Qt(t),n=wo(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}function kL(t,e){var a,c,u,f;const n=m_(),r=(e==null?void 0:e.weekStartsOn)??((c=(a=e==null?void 0:e.locale)==null?void 0:a.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,s=Qt(t),i=s.getDay(),o=(i {let r;const s=Yye[t];return typeof s=="string"?r=s:e===1?r=s.one:r=s.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function GT(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Qye={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Zye={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Jye={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ebe={date:GT({formats:Qye,defaultWidth:"full"}),time:GT({formats:Zye,defaultWidth:"full"}),dateTime:GT({formats:Jye,defaultWidth:"full"})},tbe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},nbe=(t,e,n,r)=>tbe[t];function yb(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,a=n!=null&&n.width?String(n.width):o;s=t.formattingValues[a]||t.formattingValues[o]}else{const o=t.defaultWidth,a=n!=null&&n.width?String(n.width):t.defaultWidth;s=t.values[a]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return s[i]}}const rbe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},sbe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ibe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},obe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},abe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},lbe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},cbe=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},ube={ordinalNumber:cbe,era:yb({values:rbe,defaultWidth:"wide"}),quarter:yb({values:sbe,defaultWidth:"wide",argumentCallback:t=>t-1}),month:yb({values:ibe,defaultWidth:"wide"}),day:yb({values:obe,defaultWidth:"wide"}),dayPeriod:yb({values:abe,defaultWidth:"wide",formattingValues:lbe,defaultFormattingWidth:"wide"})};function bb(t){return(e,n={})=>{const r=n.width,s=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(s);if(!i)return null;const o=i[0],a=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(a)?fbe(a,l=>l.test(o)):dbe(a,l=>l.test(o));let u;u=t.valueCallback?t.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const f=e.slice(o.length);return{value:u,rest:f}}}function dbe(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function fbe(t,e){for(let n=0;n {const r=e.match(t.matchPattern);if(!r)return null;const s=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const a=e.slice(s.length);return{value:o,rest:a}}}const pbe=/^(\d+)(th|st|nd|rd)?/i,mbe=/\d+/i,gbe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},vbe={any:[/^b/i,/^(a|c)/i]},ybe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},bbe={any:[/1/i,/2/i,/3/i,/4/i]},xbe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},wbe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},_be={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Sbe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Cbe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ebe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Rbe={ordinalNumber:hbe({matchPattern:pbe,parsePattern:mbe,valueCallback:t=>parseInt(t,10)}),era:bb({matchPatterns:gbe,defaultMatchWidth:"wide",parsePatterns:vbe,defaultParseWidth:"any"}),quarter:bb({matchPatterns:ybe,defaultMatchWidth:"wide",parsePatterns:bbe,defaultParseWidth:"any",valueCallback:t=>t+1}),month:bb({matchPatterns:xbe,defaultMatchWidth:"wide",parsePatterns:wbe,defaultParseWidth:"any"}),day:bb({matchPatterns:_be,defaultMatchWidth:"wide",parsePatterns:Sbe,defaultParseWidth:"any"}),dayPeriod:bb({matchPatterns:Cbe,defaultMatchWidth:"any",parsePatterns:Ebe,defaultParseWidth:"any"})},HW={code:"en-US",formatDistance:Xye,formatLong:ebe,formatRelative:nbe,localize:ube,match:Rbe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Abe(t){const e=Qt(t);return kl(e,BW(e))+1}function VW(t){const e=Qt(t),n=+Sp(e)-+Hye(e);return Math.round(n/PL)+1}function qW(t,e){var f,l,d,p;const n=Qt(t),r=n.getFullYear(),s=m_(),i=(e==null?void 0:e.firstWeekContainsDate)??((l=(f=e==null?void 0:e.locale)==null?void 0:f.options)==null?void 0:l.firstWeekContainsDate)??s.firstWeekContainsDate??((p=(d=s.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,o=wo(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const a=zl(o,e),c=wo(t,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const u=zl(c,e);return n.getTime()>=a.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function Pbe(t,e){var a,c,u,f;const n=m_(),r=(e==null?void 0:e.firstWeekContainsDate)??((c=(a=e==null?void 0:e.locale)==null?void 0:a.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,s=qW(t,e),i=wo(t,0);return i.setFullYear(s,0,r),i.setHours(0,0,0,0),zl(i,e)}function WW(t,e){const n=Qt(t),r=+zl(n,e)-+Pbe(n,e);return Math.round(r/PL)+1}function vn(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const Hu={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return vn(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):vn(n+1,2)},d(t,e){return vn(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return vn(t.getHours()%12||12,e.length)},H(t,e){return vn(t.getHours(),e.length)},m(t,e){return vn(t.getMinutes(),e.length)},s(t,e){return vn(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return vn(s,e.length)}},wm={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},DB={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return Hu.y(t,e)},Y:function(t,e,n,r){const s=qW(t,r),i=s>0?s:1-s;if(e==="YY"){const o=i%100;return vn(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):vn(i,e.length)},R:function(t,e){const n=zW(t);return vn(n,e.length)},u:function(t,e){const n=t.getFullYear();return vn(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return vn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return vn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return Hu.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return vn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const s=WW(t,r);return e==="wo"?n.ordinalNumber(s,{unit:"week"}):vn(s,e.length)},I:function(t,e,n){const r=VW(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):vn(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Hu.d(t,e)},D:function(t,e,n){const r=Abe(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):vn(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const s=t.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return vn(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const s=t.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return vn(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),s=r===0?7:r;switch(e){case"i":return String(s);case"ii":return vn(s,e.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const s=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let s;switch(r===12?s=wm.noon:r===0?s=wm.midnight:s=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let s;switch(r>=17?s=wm.evening:r>=12?s=wm.afternoon:r>=4?s=wm.morning:s=wm.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Hu.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Hu.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):vn(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):vn(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Hu.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Hu.s(t,e)},S:function(t,e){return Hu.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return OB(r);case"XXXX":case"XX":return Uf(r);case"XXXXX":case"XXX":default:return Uf(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return OB(r);case"xxxx":case"xx":return Uf(r);case"xxxxx":case"xxx":default:return Uf(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+MB(r,":");case"OOOO":default:return"GMT"+Uf(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+MB(r,":");case"zzzz":default:return"GMT"+Uf(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return vn(r,e.length)},T:function(t,e,n){const r=t.getTime();return vn(r,e.length)}};function MB(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=Math.trunc(r/60),i=r%60;return i===0?n+String(s):n+String(s)+e+vn(i,2)}function OB(t,e){return t%60===0?(t>0?"-":"+")+vn(Math.abs(t)/60,2):Uf(t,e)}function Uf(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=vn(Math.trunc(r/60),2),i=vn(r%60,2);return n+s+e+i}const IB=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},GW=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Nbe=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return IB(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",IB(r,e)).replace("{{time}}",GW(s,e))},Tbe={p:GW,P:Nbe},kbe=/^D+$/,Dbe=/^Y+$/,Mbe=["D","DD","YY","YYYY"];function Obe(t){return kbe.test(t)}function Ibe(t){return Dbe.test(t)}function jbe(t,e,n){const r=Lbe(t,e,n);if(console.warn(r),Mbe.includes(t))throw new RangeError(r)}function Lbe(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const $be=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Fbe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zbe=/^'([^]*?)'?$/,Bbe=/''/g,Ube=/[a-zA-Z]/;function Up(t,e,n){var f,l,d,p,h,m,y,g;const r=m_(),s=(n==null?void 0:n.locale)??r.locale??HW,i=(n==null?void 0:n.firstWeekContainsDate)??((l=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((p=(d=r.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((m=(h=n==null?void 0:n.locale)==null?void 0:h.options)==null?void 0:m.weekStartsOn)??r.weekStartsOn??((g=(y=r.locale)==null?void 0:y.options)==null?void 0:g.weekStartsOn)??0,a=Qt(t);if(!Gye(a))throw new RangeError("Invalid time value");let c=e.match(Fbe).map(v=>{const b=v[0];if(b==="p"||b==="P"){const _=Tbe[b];return _(v,s.formatLong)}return v}).join("").match($be).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const b=v[0];if(b==="'")return{isToken:!1,value:Hbe(v)};if(DB[b])return{isToken:!0,value:v};if(b.match(Ube))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");return{isToken:!1,value:v}});s.localize.preprocessor&&(c=s.localize.preprocessor(a,c));const u={firstWeekContainsDate:i,weekStartsOn:o,locale:s};return c.map(v=>{if(!v.isToken)return v.value;const b=v.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Ibe(b)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Obe(b))&&jbe(b,e,String(t));const _=DB[b[0]];return _(a,b,s.localize,u)}).join("")}function Hbe(t){const e=t.match(zbe);return e?e[1].replace(Bbe,"'"):t}function Vbe(t){const e=Qt(t),n=e.getFullYear(),r=e.getMonth(),s=wo(t,0);return s.setFullYear(n,r+1,0),s.setHours(0,0,0,0),s.getDate()}function qbe(t){return Math.trunc(+Qt(t)/1e3)}function Wbe(t){const e=Qt(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(0,0,0,0),e}function Gbe(t,e){return Kye(Wbe(t),ji(t),e)+1}function MM(t,e){const n=Qt(t),r=Qt(e);return n.getTime()>r.getTime()}function KW(t,e){const n=Qt(t),r=Qt(e);return+n<+r}function DL(t,e){const n=Qt(t),r=Qt(e);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Kbe(t,e){const n=Qt(t),r=Qt(e);return n.getFullYear()===r.getFullYear()}function KT(t,e){return Zs(t,-e)}function YT(t,e){const n=Qt(t),r=n.getFullYear(),s=n.getDate(),i=wo(t,0);i.setFullYear(r,e,15),i.setHours(0,0,0,0);const o=Vbe(i);return n.setMonth(e,Math.min(s,o)),n}function jB(t,e){const n=Qt(t);return isNaN(+n)?wo(t,NaN):(n.setFullYear(e),n)}var pt=function(){return pt=Object.assign||function(e){for(var n,r=1,s=arguments.length;r 1&&(c||!u),l=e>1&&(u||!c),d=function(){r&&i(r)},p=function(){s&&i(s)};return w.jsx(A0e,{displayMonth:t.displayMonth,hideNext:f,hidePrevious:l,nextMonth:s,previousMonth:r,onPreviousClick:d,onNextClick:p})}function P0e(t){var e,n=Bn(),r=n.classNames,s=n.disableNavigation,i=n.styles,o=n.captionLayout,a=n.components,c=(e=a==null?void 0:a.CaptionLabel)!==null&&e!==void 0?e:QW,u;return s?u=w.jsx(c,{id:t.id,displayMonth:t.displayMonth}):o==="dropdown"?u=w.jsx(LB,{displayMonth:t.displayMonth,id:t.id}):o==="dropdown-buttons"?u=w.jsxs(w.Fragment,{children:[w.jsx(LB,{displayMonth:t.displayMonth,displayIndex:t.displayIndex,id:t.id}),w.jsx($B,{displayMonth:t.displayMonth,displayIndex:t.displayIndex,id:t.id})]}):u=w.jsxs(w.Fragment,{children:[w.jsx(c,{id:t.id,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),w.jsx($B,{displayMonth:t.displayMonth,id:t.id})]}),w.jsx("div",{className:r.caption,style:i.caption,children:u})}function N0e(t){var e=Bn(),n=e.footer,r=e.styles,s=e.classNames.tfoot;return n?w.jsx("tfoot",{className:s,style:r.tfoot,children:w.jsx("tr",{children:w.jsx("td",{colSpan:8,children:n})})}):w.jsx(w.Fragment,{})}function T0e(t,e,n){for(var r=n?Sp(new Date):zl(new Date,{locale:t,weekStartsOn:e}),s=[],i=0;i<7;i++){var o=Zs(r,i);s.push(o)}return s}function k0e(){var t=Bn(),e=t.classNames,n=t.styles,r=t.showWeekNumber,s=t.locale,i=t.weekStartsOn,o=t.ISOWeek,a=t.formatters.formatWeekdayName,c=t.labels.labelWeekday,u=T0e(s,i,o);return w.jsxs("tr",{style:n.head_row,className:e.head_row,children:[r&&w.jsx("td",{style:n.head_cell,className:e.head_cell}),u.map(function(f,l){return w.jsx("th",{scope:"col",className:e.head_cell,style:n.head_cell,"aria-label":c(f,{locale:s}),children:a(f,{locale:s})},l)})]})}function D0e(){var t,e=Bn(),n=e.classNames,r=e.styles,s=e.components,i=(t=s==null?void 0:s.HeadRow)!==null&&t!==void 0?t:k0e;return w.jsx("thead",{style:r.head,className:n.head,children:w.jsx(i,{})})}function M0e(t){var e=Bn(),n=e.locale,r=e.formatters.formatDay;return w.jsx(w.Fragment,{children:r(t.date,{locale:n})})}var ML=S.createContext(void 0);function O0e(t){if(!g_(t.initialProps)){var e={selected:void 0,modifiers:{disabled:[]}};return w.jsx(ML.Provider,{value:e,children:t.children})}return w.jsx(I0e,{initialProps:t.initialProps,children:t.children})}function I0e(t){var e=t.initialProps,n=t.children,r=e.selected,s=e.min,i=e.max,o=function(u,f,l){var d,p;(d=e.onDayClick)===null||d===void 0||d.call(e,u,f,l);var h=!!(f.selected&&s&&(r==null?void 0:r.length)===s);if(!h){var m=!!(!f.selected&&i&&(r==null?void 0:r.length)===i);if(!m){var y=r?YW([],r):[];if(f.selected){var g=y.findIndex(function(v){return Ni(u,v)});y.splice(g,1)}else y.push(u);(p=e.onSelect)===null||p===void 0||p.call(e,y,u,f,l)}}},a={disabled:[]};r&&a.disabled.push(function(u){var f=i&&r.length>i-1,l=r.some(function(d){return Ni(d,u)});return!!(f&&!l)});var c={selected:r,onDayClick:o,modifiers:a};return w.jsx(ML.Provider,{value:c,children:n})}function OL(){var t=S.useContext(ML);if(!t)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return t}function j0e(t,e){var n=e||{},r=n.from,s=n.to;return r&&s?Ni(s,t)&&Ni(r,t)?void 0:Ni(s,t)?{from:s,to:void 0}:Ni(r,t)?void 0:MM(r,t)?{from:t,to:s}:{from:r,to:t}:s?MM(t,s)?{from:s,to:t}:{from:t,to:s}:r?KW(t,r)?{from:t,to:r}:{from:r,to:t}:{from:t,to:void 0}}var IL=S.createContext(void 0);function L0e(t){if(!v_(t.initialProps)){var e={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return w.jsx(IL.Provider,{value:e,children:t.children})}return w.jsx($0e,{initialProps:t.initialProps,children:t.children})}function $0e(t){var e=t.initialProps,n=t.children,r=e.selected,s=r||{},i=s.from,o=s.to,a=e.min,c=e.max,u=function(p,h,m){var y,g;(y=e.onDayClick)===null||y===void 0||y.call(e,p,h,m);var v=j0e(p,r);(g=e.onSelect)===null||g===void 0||g.call(e,v,p,h,m)},f={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(f.range_start=[i],o?(f.range_end=[o],Ni(i,o)||(f.range_middle=[{after:i,before:o}])):f.range_end=[i]):o&&(f.range_start=[o],f.range_end=[o]),a&&(i&&!o&&f.disabled.push({after:KT(i,a-1),before:Zs(i,a-1)}),i&&o&&f.disabled.push({after:i,before:Zs(i,a-1)}),!i&&o&&f.disabled.push({after:KT(o,a-1),before:Zs(o,a-1)})),c){if(i&&!o&&(f.disabled.push({before:Zs(i,-c+1)}),f.disabled.push({after:Zs(i,c-1)})),i&&o){var l=kl(o,i)+1,d=c-l;f.disabled.push({before:KT(i,d)}),f.disabled.push({after:Zs(o,d)})}!i&&o&&(f.disabled.push({before:Zs(o,-c+1)}),f.disabled.push({after:Zs(o,c-1)}))}return w.jsx(IL.Provider,{value:{selected:r,onDayClick:u,modifiers:f},children:n})}function jL(){var t=S.useContext(IL);if(!t)throw new Error("useSelectRange must be used within a SelectRangeProvider");return t}function sC(t){return Array.isArray(t)?YW([],t):t!==void 0?[t]:[]}function F0e(t){var e={};return Object.entries(t).forEach(function(n){var r=n[0],s=n[1];e[r]=sC(s)}),e}var Ga;(function(t){t.Outside="outside",t.Disabled="disabled",t.Selected="selected",t.Hidden="hidden",t.Today="today",t.RangeStart="range_start",t.RangeEnd="range_end",t.RangeMiddle="range_middle"})(Ga||(Ga={}));var z0e=Ga.Selected,uc=Ga.Disabled,B0e=Ga.Hidden,U0e=Ga.Today,XT=Ga.RangeEnd,QT=Ga.RangeMiddle,ZT=Ga.RangeStart,H0e=Ga.Outside;function V0e(t,e,n){var r,s=(r={},r[z0e]=sC(t.selected),r[uc]=sC(t.disabled),r[B0e]=sC(t.hidden),r[U0e]=[t.today],r[XT]=[],r[QT]=[],r[ZT]=[],r[H0e]=[],r);return t.fromDate&&s[uc].push({before:t.fromDate}),t.toDate&&s[uc].push({after:t.toDate}),g_(t)?s[uc]=s[uc].concat(e.modifiers[uc]):v_(t)&&(s[uc]=s[uc].concat(n.modifiers[uc]),s[ZT]=n.modifiers[ZT],s[QT]=n.modifiers[QT],s[XT]=n.modifiers[XT]),s}var eG=S.createContext(void 0);function q0e(t){var e=Bn(),n=OL(),r=jL(),s=V0e(e,n,r),i=F0e(e.modifiers),o=pt(pt({},s),i);return w.jsx(eG.Provider,{value:o,children:t.children})}function tG(){var t=S.useContext(eG);if(!t)throw new Error("useModifiers must be used within a ModifiersProvider");return t}function W0e(t){return!!(t&&typeof t=="object"&&"before"in t&&"after"in t)}function G0e(t){return!!(t&&typeof t=="object"&&"from"in t)}function K0e(t){return!!(t&&typeof t=="object"&&"after"in t)}function Y0e(t){return!!(t&&typeof t=="object"&&"before"in t)}function X0e(t){return!!(t&&typeof t=="object"&&"dayOfWeek"in t)}function Q0e(t,e){var n,r=e.from,s=e.to;if(r&&s){var i=kl(s,r)<0;i&&(n=[s,r],r=n[0],s=n[1]);var o=kl(t,r)>=0&&kl(s,t)>=0;return o}return s?Ni(s,t):r?Ni(r,t):!1}function Z0e(t){return NL(t)}function J0e(t){return Array.isArray(t)&&t.every(NL)}function exe(t,e){return e.some(function(n){if(typeof n=="boolean")return n;if(Z0e(n))return Ni(t,n);if(J0e(n))return n.includes(t);if(G0e(n))return Q0e(t,n);if(X0e(n))return n.dayOfWeek.includes(t.getDay());if(W0e(n)){var r=kl(n.before,t),s=kl(n.after,t),i=r>0,o=s<0,a=MM(n.before,n.after);return a?o&&i:i||o}return K0e(n)?kl(t,n.after)>0:Y0e(n)?kl(n.before,t)>0:typeof n=="function"?n(t):!1})}function LL(t,e,n){var r=Object.keys(e).reduce(function(i,o){var a=e[o];return exe(t,a)&&i.push(o),i},[]),s={};return r.forEach(function(i){return s[i]=!0}),n&&!DL(t,n)&&(s.outside=!0),s}function txe(t,e){for(var n=ji(t[0]),r=TL(t[t.length-1]),s,i,o=n;o<=r;){var a=LL(o,e),c=!a.disabled&&!a.hidden;if(!c){o=Zs(o,1);continue}if(a.selected)return o;a.today&&!i&&(i=o),s||(s=o),o=Zs(o,1)}return i||s}var nxe=365;function nG(t,e){var n=e.moveBy,r=e.direction,s=e.context,i=e.modifiers,o=e.retry,a=o===void 0?{count:0,lastFocused:t}:o,c=s.weekStartsOn,u=s.fromDate,f=s.toDate,l=s.locale,d={day:Zs,week:DM,month:Wa,year:Vye,startOfWeek:function(y){return s.ISOWeek?Sp(y):zl(y,{locale:l,weekStartsOn:c})},endOfWeek:function(y){return s.ISOWeek?UW(y):kL(y,{locale:l,weekStartsOn:c})}},p=d[n](t,r==="after"?1:-1);r==="before"&&u?p=qye([u,p]):r==="after"&&f&&(p=Wye([f,p]));var h=!0;if(i){var m=LL(p,i);h=!m.disabled&&!m.hidden}return h?p:a.count>nxe?a.lastFocused:nG(p,{moveBy:n,direction:r,context:s,modifiers:i,retry:pt(pt({},a),{count:a.count+1})})}var rG=S.createContext(void 0);function rxe(t){var e=y_(),n=tG(),r=S.useState(),s=r[0],i=r[1],o=S.useState(),a=o[0],c=o[1],u=txe(e.displayMonths,n),f=s??(a&&e.isDateDisplayed(a))?a:u,l=function(){c(s),i(void 0)},d=function(y){i(y)},p=Bn(),h=function(y,g){if(s){var v=nG(s,{moveBy:y,direction:g,context:p,modifiers:n});Ni(s,v)||(e.goToDate(v,s),d(v))}},m={focusedDay:s,focusTarget:f,blur:l,focus:d,focusDayAfter:function(){return h("day","after")},focusDayBefore:function(){return h("day","before")},focusWeekAfter:function(){return h("week","after")},focusWeekBefore:function(){return h("week","before")},focusMonthBefore:function(){return h("month","before")},focusMonthAfter:function(){return h("month","after")},focusYearBefore:function(){return h("year","before")},focusYearAfter:function(){return h("year","after")},focusStartOfWeek:function(){return h("startOfWeek","before")},focusEndOfWeek:function(){return h("endOfWeek","after")}};return w.jsx(rG.Provider,{value:m,children:t.children})}function $L(){var t=S.useContext(rG);if(!t)throw new Error("useFocusContext must be used within a FocusProvider");return t}function sxe(t,e){var n=tG(),r=LL(t,n,e);return r}var FL=S.createContext(void 0);function ixe(t){if(!vA(t.initialProps)){var e={selected:void 0};return w.jsx(FL.Provider,{value:e,children:t.children})}return w.jsx(oxe,{initialProps:t.initialProps,children:t.children})}function oxe(t){var e=t.initialProps,n=t.children,r=function(i,o,a){var c,u,f;if((c=e.onDayClick)===null||c===void 0||c.call(e,i,o,a),o.selected&&!e.required){(u=e.onSelect)===null||u===void 0||u.call(e,void 0,i,o,a);return}(f=e.onSelect)===null||f===void 0||f.call(e,i,i,o,a)},s={selected:e.selected,onDayClick:r};return w.jsx(FL.Provider,{value:s,children:n})}function sG(){var t=S.useContext(FL);if(!t)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return t}function axe(t,e){var n=Bn(),r=sG(),s=OL(),i=jL(),o=$L(),a=o.focusDayAfter,c=o.focusDayBefore,u=o.focusWeekAfter,f=o.focusWeekBefore,l=o.blur,d=o.focus,p=o.focusMonthBefore,h=o.focusMonthAfter,m=o.focusYearBefore,y=o.focusYearAfter,g=o.focusStartOfWeek,v=o.focusEndOfWeek,b=function(H){var q,ee,se,X;vA(n)?(q=r.onDayClick)===null||q===void 0||q.call(r,t,e,H):g_(n)?(ee=s.onDayClick)===null||ee===void 0||ee.call(s,t,e,H):v_(n)?(se=i.onDayClick)===null||se===void 0||se.call(i,t,e,H):(X=n.onDayClick)===null||X===void 0||X.call(n,t,e,H)},_=function(H){var q;d(t),(q=n.onDayFocus)===null||q===void 0||q.call(n,t,e,H)},R=function(H){var q;l(),(q=n.onDayBlur)===null||q===void 0||q.call(n,t,e,H)},P=function(H){var q;(q=n.onDayMouseEnter)===null||q===void 0||q.call(n,t,e,H)},T=function(H){var q;(q=n.onDayMouseLeave)===null||q===void 0||q.call(n,t,e,H)},E=function(H){var q;(q=n.onDayPointerEnter)===null||q===void 0||q.call(n,t,e,H)},N=function(H){var q;(q=n.onDayPointerLeave)===null||q===void 0||q.call(n,t,e,H)},k=function(H){var q;(q=n.onDayTouchCancel)===null||q===void 0||q.call(n,t,e,H)},M=function(H){var q;(q=n.onDayTouchEnd)===null||q===void 0||q.call(n,t,e,H)},I=function(H){var q;(q=n.onDayTouchMove)===null||q===void 0||q.call(n,t,e,H)},j=function(H){var q;(q=n.onDayTouchStart)===null||q===void 0||q.call(n,t,e,H)},L=function(H){var q;(q=n.onDayKeyUp)===null||q===void 0||q.call(n,t,e,H)},U=function(H){var q;switch(H.key){case"ArrowLeft":H.preventDefault(),H.stopPropagation(),n.dir==="rtl"?a():c();break;case"ArrowRight":H.preventDefault(),H.stopPropagation(),n.dir==="rtl"?c():a();break;case"ArrowDown":H.preventDefault(),H.stopPropagation(),u();break;case"ArrowUp":H.preventDefault(),H.stopPropagation(),f();break;case"PageUp":H.preventDefault(),H.stopPropagation(),H.shiftKey?m():p();break;case"PageDown":H.preventDefault(),H.stopPropagation(),H.shiftKey?y():h();break;case"Home":H.preventDefault(),H.stopPropagation(),g();break;case"End":H.preventDefault(),H.stopPropagation(),v();break}(q=n.onDayKeyDown)===null||q===void 0||q.call(n,t,e,H)},K={onClick:b,onFocus:_,onBlur:R,onKeyDown:U,onKeyUp:L,onMouseEnter:P,onMouseLeave:T,onPointerEnter:E,onPointerLeave:N,onTouchCancel:k,onTouchEnd:M,onTouchMove:I,onTouchStart:j};return K}function lxe(){var t=Bn(),e=sG(),n=OL(),r=jL(),s=vA(t)?e.selected:g_(t)?n.selected:v_(t)?r.selected:void 0;return s}function cxe(t){return Object.values(Ga).includes(t)}function uxe(t,e){var n=[t.classNames.day];return Object.keys(e).forEach(function(r){var s=t.modifiersClassNames[r];if(s)n.push(s);else if(cxe(r)){var i=t.classNames["day_".concat(r)];i&&n.push(i)}}),n}function dxe(t,e){var n=pt({},t.styles.day);return Object.keys(e).forEach(function(r){var s;n=pt(pt({},n),(s=t.modifiersStyles)===null||s===void 0?void 0:s[r])}),n}function fxe(t,e,n){var r,s,i,o=Bn(),a=$L(),c=sxe(t,e),u=axe(t,c),f=lxe(),l=!!(o.onDayClick||o.mode!=="default");S.useEffect(function(){var P;c.outside||a.focusedDay&&l&&Ni(a.focusedDay,t)&&((P=n.current)===null||P===void 0||P.focus())},[a.focusedDay,t,n,l,c.outside]);var d=uxe(o,c).join(" "),p=dxe(o,c),h=!!(c.outside&&!o.showOutsideDays||c.hidden),m=(i=(s=o.components)===null||s===void 0?void 0:s.DayContent)!==null&&i!==void 0?i:M0e,y=w.jsx(m,{date:t,displayMonth:e,activeModifiers:c}),g={style:p,className:d,children:y,role:"gridcell"},v=a.focusTarget&&Ni(a.focusTarget,t)&&!c.outside,b=a.focusedDay&&Ni(a.focusedDay,t),_=pt(pt(pt({},g),(r={disabled:c.disabled,role:"gridcell"},r["aria-selected"]=c.selected,r.tabIndex=b||v?0:-1,r)),u),R={isButton:l,isHidden:h,activeModifiers:c,selectedDays:f,buttonProps:_,divProps:g};return R}function hxe(t){var e=S.useRef(null),n=fxe(t.date,t.displayMonth,e);return n.isHidden?w.jsx("div",{role:"gridcell"}):n.isButton?w.jsx(vE,pt({name:"day",ref:e},n.buttonProps)):w.jsx("div",pt({},n.divProps))}function pxe(t){var e=t.number,n=t.dates,r=Bn(),s=r.onWeekNumberClick,i=r.styles,o=r.classNames,a=r.locale,c=r.labels.labelWeekNumber,u=r.formatters.formatWeekNumber,f=u(Number(e),{locale:a});if(!s)return w.jsx("span",{className:o.weeknumber,style:i.weeknumber,children:f});var l=c(Number(e),{locale:a}),d=function(p){s(e,n,p)};return w.jsx(vE,{name:"week-number","aria-label":l,className:o.weeknumber,style:i.weeknumber,onClick:d,children:f})}function mxe(t){var e,n,r=Bn(),s=r.styles,i=r.classNames,o=r.showWeekNumber,a=r.components,c=(e=a==null?void 0:a.Day)!==null&&e!==void 0?e:hxe,u=(n=a==null?void 0:a.WeekNumber)!==null&&n!==void 0?n:pxe,f;return o&&(f=w.jsx("td",{className:i.cell,style:s.cell,children:w.jsx(u,{number:t.weekNumber,dates:t.dates})})),w.jsxs("tr",{className:i.row,style:s.row,children:[f,t.dates.map(function(l){return w.jsx("td",{className:i.cell,style:s.cell,role:"presentation",children:w.jsx(c,{displayMonth:t.displayMonth,date:l})},qbe(l))})]})}function FB(t,e,n){for(var r=n!=null&&n.ISOWeek?UW(e):kL(e,n),s=n!=null&&n.ISOWeek?Sp(t):zl(t,n),i=kl(r,s),o=[],a=0;a<=i;a++)o.push(Zs(s,a));var c=o.reduce(function(u,f){var l=n!=null&&n.ISOWeek?VW(f):WW(f,n),d=u.find(function(p){return p.weekNumber===l});return d?(d.dates.push(f),u):(u.push({weekNumber:l,dates:[f]}),u)},[]);return c}function gxe(t,e){var n=FB(ji(t),TL(t),e);if(e!=null&&e.useFixedWeeks){var r=Gbe(t,e);if(r<6){var s=n[n.length-1],i=s.dates[s.dates.length-1],o=DM(i,6-r),a=FB(DM(i,1),o,e);n.push.apply(n,a)}}return n}function vxe(t){var e,n,r,s=Bn(),i=s.locale,o=s.classNames,a=s.styles,c=s.hideHead,u=s.fixedWeeks,f=s.components,l=s.weekStartsOn,d=s.firstWeekContainsDate,p=s.ISOWeek,h=gxe(t.displayMonth,{useFixedWeeks:!!u,ISOWeek:p,locale:i,weekStartsOn:l,firstWeekContainsDate:d}),m=(e=f==null?void 0:f.Head)!==null&&e!==void 0?e:D0e,y=(n=f==null?void 0:f.Row)!==null&&n!==void 0?n:mxe,g=(r=f==null?void 0:f.Footer)!==null&&r!==void 0?r:N0e;return w.jsxs("table",{id:t.id,className:o.table,style:a.table,role:"grid","aria-labelledby":t["aria-labelledby"],children:[!c&&w.jsx(m,{}),w.jsx("tbody",{className:o.tbody,style:a.tbody,children:h.map(function(v){return w.jsx(y,{displayMonth:t.displayMonth,dates:v.dates,weekNumber:v.weekNumber},v.weekNumber)})}),w.jsx(g,{displayMonth:t.displayMonth})]})}function yxe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var bxe=yxe()?S.useLayoutEffect:S.useEffect,JT=!1,xxe=0;function zB(){return"react-day-picker-".concat(++xxe)}function wxe(t){var e,n=t??(JT?zB():null),r=S.useState(n),s=r[0],i=r[1];return bxe(function(){s===null&&i(zB())},[]),S.useEffect(function(){JT===!1&&(JT=!0)},[]),(e=t??s)!==null&&e!==void 0?e:void 0}function _xe(t){var e,n,r=Bn(),s=r.dir,i=r.classNames,o=r.styles,a=r.components,c=y_().displayMonths,u=wxe(r.id?"".concat(r.id,"-").concat(t.displayIndex):void 0),f=r.id?"".concat(r.id,"-grid-").concat(t.displayIndex):void 0,l=[i.month],d=o.month,p=t.displayIndex===0,h=t.displayIndex===c.length-1,m=!p&&!h;s==="rtl"&&(e=[p,h],h=e[0],p=e[1]),p&&(l.push(i.caption_start),d=pt(pt({},d),o.caption_start)),h&&(l.push(i.caption_end),d=pt(pt({},d),o.caption_end)),m&&(l.push(i.caption_between),d=pt(pt({},d),o.caption_between));var y=(n=a==null?void 0:a.Caption)!==null&&n!==void 0?n:P0e;return w.jsxs("div",{className:l.join(" "),style:d,children:[w.jsx(y,{id:u,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),w.jsx(vxe,{id:f,"aria-labelledby":u,displayMonth:t.displayMonth})]},t.displayIndex)}function Sxe(t){var e=Bn(),n=e.classNames,r=e.styles;return w.jsx("div",{className:n.months,style:r.months,children:t.children})}function Cxe(t){var e,n,r=t.initialProps,s=Bn(),i=$L(),o=y_(),a=S.useState(!1),c=a[0],u=a[1];S.useEffect(function(){s.initialFocus&&i.focusTarget&&(c||(i.focus(i.focusTarget),u(!0)))},[s.initialFocus,c,i.focus,i.focusTarget,i]);var f=[s.classNames.root,s.className];s.numberOfMonths>1&&f.push(s.classNames.multiple_months),s.showWeekNumber&&f.push(s.classNames.with_weeknumber);var l=pt(pt({},s.styles.root),s.style),d=Object.keys(r).filter(function(h){return h.startsWith("data-")}).reduce(function(h,m){var y;return pt(pt({},h),(y={},y[m]=r[m],y))},{}),p=(n=(e=r.components)===null||e===void 0?void 0:e.Months)!==null&&n!==void 0?n:Sxe;return w.jsx("div",pt({className:f.join(" "),style:l,dir:s.dir,id:s.id,nonce:r.nonce,title:r.title,lang:r.lang},d,{children:w.jsx(p,{children:o.displayMonths.map(function(h,m){return w.jsx(_xe,{displayIndex:m,displayMonth:h},m)})})}))}function Exe(t){var e=t.children,n=Ybe(t,["children"]);return w.jsx(p0e,{initialProps:n,children:w.jsx(C0e,{children:w.jsx(ixe,{initialProps:n,children:w.jsx(O0e,{initialProps:n,children:w.jsx(L0e,{initialProps:n,children:w.jsx(q0e,{children:w.jsx(rxe,{children:e})})})})})})})}function Rxe(t){return w.jsx(Exe,pt({},t,{children:w.jsx(Cxe,{initialProps:t})}))}function iG({className:t,classNames:e,showOutsideDays:n=!0,...r}){return w.jsx(Rxe,{showOutsideDays:n,className:ie("p-3",t),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:ie(nx({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:ie(nx({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...e},components:{IconLeft:()=>w.jsx(nA,{className:"w-4 h-4"}),IconRight:()=>w.jsx(ly,{className:"w-4 h-4"})},...r})}iG.displayName="Calendar";const xr=S.forwardRef(({className:t,...e},n)=>w.jsx("div",{ref:n,className:ie("rounded-md border bg-card text-card-foreground shadow",t),...e}));xr.displayName="Card";const Ei=S.forwardRef(({className:t,...e},n)=>w.jsx("div",{ref:n,className:ie("flex flex-col space-y-1.5 p-6",t),...e}));Ei.displayName="CardHeader";const ns=S.forwardRef(({className:t,...e},n)=>w.jsx("h3",{ref:n,className:ie("font-semibold leading-none tracking-tight",t),...e}));ns.displayName="CardTitle";const vs=S.forwardRef(({className:t,...e},n)=>w.jsx("p",{ref:n,className:ie("text-sm text-muted-foreground",t),...e}));vs.displayName="CardDescription";const wr=S.forwardRef(({className:t,...e},n)=>w.jsx("div",{ref:n,className:ie("p-6 pt-0",t),...e}));wr.displayName="CardContent";const Vo=S.forwardRef(({className:t,...e},n)=>w.jsx("div",{ref:n,className:ie("flex items-center p-6 pt-0",t),...e}));Vo.displayName="CardFooter";var Axe=Array.isArray,Pxe=Axe,Nxe=typeof pr=="object"&&pr&&pr.Object===Object&&pr,Txe=Nxe,kxe=Txe,Dxe=typeof self=="object"&&self&&self.Object===Object&&self,Mxe=kxe||Dxe||Function("return this")(),yA=Mxe,Oxe=yA,Ixe=Oxe.Symbol,zL=Ixe,BB=zL,oG=Object.prototype,jxe=oG.hasOwnProperty,Lxe=oG.toString,xb=BB?BB.toStringTag:void 0;function $xe(t){var e=jxe.call(t,xb),n=t[xb];try{t[xb]=void 0;var r=!0}catch{}var s=Lxe.call(t);return r&&(e?t[xb]=n:delete t[xb]),s}var Fxe=$xe,zxe=Object.prototype,Bxe=zxe.toString;function Uxe(t){return Bxe.call(t)}var Hxe=Uxe,UB=zL,Vxe=Fxe,qxe=Hxe,Wxe="[object Null]",Gxe="[object Undefined]",HB=UB?UB.toStringTag:void 0;function Kxe(t){return t==null?t===void 0?Gxe:Wxe:HB&&HB in Object(t)?Vxe(t):qxe(t)}var BL=Kxe;function Yxe(t){return t!=null&&typeof t=="object"}var aG=Yxe,Xxe=BL,Qxe=aG,Zxe="[object Symbol]";function Jxe(t){return typeof t=="symbol"||Qxe(t)&&Xxe(t)==Zxe}var ewe=Jxe;function twe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var b_=twe,nwe=BL,rwe=b_,swe="[object AsyncFunction]",iwe="[object Function]",owe="[object GeneratorFunction]",awe="[object Proxy]";function lwe(t){if(!rwe(t))return!1;var e=nwe(t);return e==iwe||e==owe||e==swe||e==awe}var cwe=lwe,uwe=yA,dwe=uwe["__core-js_shared__"],fwe=dwe,ek=fwe,VB=function(){var t=/[^.]+$/.exec(ek&&ek.keys&&ek.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function hwe(t){return!!VB&&VB in t}var pwe=hwe,mwe=Function.prototype,gwe=mwe.toString;function vwe(t){if(t!=null){try{return gwe.call(t)}catch{}try{return t+""}catch{}}return""}var ywe=vwe,bwe=cwe,xwe=pwe,wwe=b_,_we=ywe,Swe=/[\\^$.*+?()[\]{}|]/g,Cwe=/^\[object .+?Constructor\]$/,Ewe=Function.prototype,Rwe=Object.prototype,Awe=Ewe.toString,Pwe=Rwe.hasOwnProperty,Nwe=RegExp("^"+Awe.call(Pwe).replace(Swe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Twe(t){if(!wwe(t)||xwe(t))return!1;var e=bwe(t)?Nwe:Cwe;return e.test(_we(t))}var kwe=Twe;function Dwe(t,e){return t==null?void 0:t[e]}var Mwe=Dwe,Owe=kwe,Iwe=Mwe;function jwe(t,e){var n=Iwe(t,e);return Owe(n)?n:void 0}var lG=jwe,Lwe=lG,$we=Lwe(Object,"create"),bA=$we,qB=bA;function Fwe(){this.__data__=qB?qB(null):{},this.size=0}var zwe=Fwe;function Bwe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Uwe=Bwe,Hwe=bA,Vwe="__lodash_hash_undefined__",qwe=Object.prototype,Wwe=qwe.hasOwnProperty;function Gwe(t){var e=this.__data__;if(Hwe){var n=e[t];return n===Vwe?void 0:n}return Wwe.call(e,t)?e[t]:void 0}var Kwe=Gwe,Ywe=bA,Xwe=Object.prototype,Qwe=Xwe.hasOwnProperty;function Zwe(t){var e=this.__data__;return Ywe?e[t]!==void 0:Qwe.call(e,t)}var Jwe=Zwe,e_e=bA,t_e="__lodash_hash_undefined__";function n_e(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=e_e&&e===void 0?t_e:e,this}var r_e=n_e,s_e=zwe,i_e=Uwe,o_e=Kwe,a_e=Jwe,l_e=r_e;function vy(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1}var R_e=E_e,A_e=xA;function P_e(t,e){var n=this.__data__,r=A_e(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var N_e=P_e,T_e=d_e,k_e=x_e,D_e=S_e,M_e=R_e,O_e=N_e;function yy(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e {var r;document.getElementById((r=t.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(e)},[e,t]),null},Cye=dW,Eye=fW,Rye=hW,SW=pW,CW=mW,EW=xW,RW=_W,AW=vW,PW=bW;const nx=li("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),tt=S.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...s},i)=>{const o=r?qa:"button";return w.jsx(o,{className:ie(nx({variant:e,size:n,className:t})),ref:i,...s})});tt.displayName="Button";const RL=Cye,Aye=Eye,Pye=Rye,NW=S.forwardRef(({className:t,...e},n)=>w.jsx(SW,{className:ie("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e,ref:n}));NW.displayName=SW.displayName;const dA=S.forwardRef(({className:t,...e},n)=>w.jsxs(Pye,{children:[w.jsx(NW,{}),w.jsx(CW,{ref:n,className:ie("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...e})]}));dA.displayName=CW.displayName;const fA=({className:t,...e})=>w.jsx("div",{className:ie("flex flex-col space-y-2 text-center sm:text-left",t),...e});fA.displayName="AlertDialogHeader";const hA=({className:t,...e})=>w.jsx("div",{className:ie("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});hA.displayName="AlertDialogFooter";const pA=S.forwardRef(({className:t,...e},n)=>w.jsx(AW,{ref:n,className:ie("text-lg font-semibold",t),...e}));pA.displayName=AW.displayName;const mA=S.forwardRef(({className:t,...e},n)=>w.jsx(PW,{ref:n,className:ie("text-sm text-muted-foreground",t),...e}));mA.displayName=PW.displayName;const gA=S.forwardRef(({className:t,...e},n)=>w.jsx(EW,{ref:n,className:ie(nx(),t),...e}));gA.displayName=EW.displayName;const vA=S.forwardRef(({className:t,...e},n)=>w.jsx(RW,{ref:n,className:ie(nx({variant:"outline"}),"mt-2 sm:mt-0",t),...e}));vA.displayName=RW.displayName;const Nye=({textAreaRef:t,triggerAutoSize:e,maxHeight:n=Number.MAX_SAFE_INTEGER,minHeight:r=0})=>{const[s,i]=S.useState(!0);S.useEffect(()=>{if(t){s&&(t.style.minHeight=`${r+2}px`,n>r&&(t.style.maxHeight=`${n}px`),i(!1)),t.style.height=`${r+2}px`;const a=t.scrollHeight;a>n?t.style.height=`${n}px`:t.style.height=`${a+2}px`}},[t,e,s,n,r])},TW=S.forwardRef(({maxHeight:t=Number.MAX_SAFE_INTEGER,minHeight:e=52,className:n,onChange:r,value:s,...i},o)=>{const a=S.useRef(null),[c,u]=S.useState("");return Nye({textAreaRef:a.current,triggerAutoSize:c,maxHeight:t,minHeight:e}),S.useImperativeHandle(o,()=>({textArea:a.current,focus:()=>{var f;return(f=a.current)==null?void 0:f.focus()},maxHeight:t,minHeight:e})),S.useEffect(()=>{(s||i!=null&&i.defaultValue)&&u(s)},[s||(i==null?void 0:i.defaultValue)]),w.jsx("textarea",{...i,value:s,ref:a,className:ie("flex w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",n),onChange:f=>{u(f.target.value),r==null||r(f)}})});TW.displayName="AutosizeTextarea";var AL="Avatar",[Tye,kUe]=In(AL),[kye,kW]=Tye(AL),DW=S.forwardRef((t,e)=>{const{__scopeAvatar:n,...r}=t,[s,i]=S.useState("idle");return w.jsx(kye,{scope:n,imageLoadingStatus:s,onImageLoadingStatusChange:i,children:w.jsx(De.span,{...r,ref:e})})});DW.displayName=AL;var MW="AvatarImage",OW=S.forwardRef((t,e)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:s=()=>{},...i}=t,o=kW(MW,n),a=Dye(r),c=on(u=>{s(u),o.onImageLoadingStatusChange(u)});return ir(()=>{a!=="idle"&&c(a)},[a,c]),a==="loaded"?w.jsx(De.img,{...i,ref:e,src:r}):null});OW.displayName=MW;var IW="AvatarFallback",jW=S.forwardRef((t,e)=>{const{__scopeAvatar:n,delayMs:r,...s}=t,i=kW(IW,n),[o,a]=S.useState(r===void 0);return S.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(c)}},[r]),o&&i.imageLoadingStatus!=="loaded"?w.jsx(De.span,{...s,ref:e}):null});jW.displayName=IW;function Dye(t){const[e,n]=S.useState("idle");return ir(()=>{if(!t){n("error");return}let r=!0;const s=new window.Image,i=o=>()=>{r&&n(o)};return n("loading"),s.onload=i("loaded"),s.onerror=i("error"),s.src=t,()=>{r=!1}},[t]),e}var LW=DW,$W=OW,FW=jW;const Mye=S.forwardRef(({className:t,...e},n)=>w.jsx(LW,{ref:n,className:ie("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",t),...e}));Mye.displayName=LW.displayName;const Oye=S.forwardRef(({className:t,...e},n)=>w.jsx($W,{ref:n,className:ie("aspect-square h-full w-full",t),...e}));Oye.displayName=$W.displayName;const Iye=S.forwardRef(({className:t,...e},n)=>w.jsx(FW,{ref:n,className:ie("flex h-full w-full items-center justify-center rounded-full bg-muted",t),...e}));Iye.displayName=FW.displayName;const jye=li("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function zW({className:t,variant:e,...n}){return w.jsx("div",{className:ie(jye({variant:e}),t),...n})}const Lye=S.forwardRef(({...t},e)=>w.jsx("nav",{ref:e,"aria-label":"breadcrumb",...t}));Lye.displayName="Breadcrumb";const $ye=S.forwardRef(({className:t,...e},n)=>w.jsx("ol",{ref:n,className:ie("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",t),...e}));$ye.displayName="BreadcrumbList";const Fye=S.forwardRef(({className:t,...e},n)=>w.jsx("li",{ref:n,className:ie("inline-flex items-center gap-1.5",t),...e}));Fye.displayName="BreadcrumbItem";const zye=S.forwardRef(({asChild:t,className:e,...n},r)=>{const s=t?qa:"a";return w.jsx(s,{ref:r,className:ie("transition-colors hover:text-foreground",e),...n})});zye.displayName="BreadcrumbLink";const Bye=S.forwardRef(({className:t,...e},n)=>w.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:ie("font-normal text-foreground",t),...e}));Bye.displayName="BreadcrumbPage";function Qt(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function wo(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function Zs(t,e){const n=Qt(t);return isNaN(e)?wo(t,NaN):(e&&n.setDate(n.getDate()+e),n)}function Wa(t,e){const n=Qt(t);if(isNaN(e))return wo(t,NaN);if(!e)return n;const r=n.getDate(),s=wo(t,n.getTime());s.setMonth(n.getMonth()+e+1,0);const i=s.getDate();return r>=i?s:(n.setFullYear(s.getFullYear(),s.getMonth(),r),n)}const PL=6048e5,Uye=864e5;let Hye={};function m_(){return Hye}function zl(t,e){var a,c,u,f;const n=m_(),r=(e==null?void 0:e.weekStartsOn)??((c=(a=e==null?void 0:e.locale)==null?void 0:a.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,s=Qt(t),i=s.getDay(),o=(i =s.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function Vv(t){const e=Qt(t);return e.setHours(0,0,0,0),e}function gE(t){const e=Qt(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function kl(t,e){const n=Vv(t),r=Vv(e),s=+n-gE(n),i=+r-gE(r);return Math.round((s-i)/Uye)}function Vye(t){const e=BW(t),n=wo(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),Sp(n)}function DM(t,e){const n=e*7;return Zs(t,n)}function qye(t,e){return Wa(t,e*12)}function Wye(t){let e;return t.forEach(function(n){const r=Qt(n);(e===void 0||e {const r=Qt(n);(!e||e>r||isNaN(+r))&&(e=r)}),e||new Date(NaN)}function Ni(t,e){const n=Vv(t),r=Vv(e);return+n==+r}function NL(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Kye(t){if(!NL(t)&&typeof t!="number")return!1;const e=Qt(t);return!isNaN(Number(e))}function rx(t,e){const n=Qt(t),r=Qt(e),s=n.getFullYear()-r.getFullYear(),i=n.getMonth()-r.getMonth();return s*12+i}function Yye(t,e,n){const r=zl(t,n),s=zl(e,n),i=+r-gE(r),o=+s-gE(s);return Math.round((i-o)/PL)}function TL(t){const e=Qt(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e}function ji(t){const e=Qt(t);return e.setDate(1),e.setHours(0,0,0,0),e}function UW(t){const e=Qt(t),n=wo(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}function kL(t,e){var a,c,u,f;const n=m_(),r=(e==null?void 0:e.weekStartsOn)??((c=(a=e==null?void 0:e.locale)==null?void 0:a.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,s=Qt(t),i=s.getDay(),o=(i {let r;const s=Xye[t];return typeof s=="string"?r=s:e===1?r=s.one:r=s.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function KT(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Zye={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Jye={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ebe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},tbe={date:KT({formats:Zye,defaultWidth:"full"}),time:KT({formats:Jye,defaultWidth:"full"}),dateTime:KT({formats:ebe,defaultWidth:"full"})},nbe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},rbe=(t,e,n,r)=>nbe[t];function yb(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,a=n!=null&&n.width?String(n.width):o;s=t.formattingValues[a]||t.formattingValues[o]}else{const o=t.defaultWidth,a=n!=null&&n.width?String(n.width):t.defaultWidth;s=t.values[a]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return s[i]}}const sbe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ibe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},obe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},abe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},lbe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},cbe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ube=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},dbe={ordinalNumber:ube,era:yb({values:sbe,defaultWidth:"wide"}),quarter:yb({values:ibe,defaultWidth:"wide",argumentCallback:t=>t-1}),month:yb({values:obe,defaultWidth:"wide"}),day:yb({values:abe,defaultWidth:"wide"}),dayPeriod:yb({values:lbe,defaultWidth:"wide",formattingValues:cbe,defaultFormattingWidth:"wide"})};function bb(t){return(e,n={})=>{const r=n.width,s=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(s);if(!i)return null;const o=i[0],a=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(a)?hbe(a,l=>l.test(o)):fbe(a,l=>l.test(o));let u;u=t.valueCallback?t.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const f=e.slice(o.length);return{value:u,rest:f}}}function fbe(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function hbe(t,e){for(let n=0;n {const r=e.match(t.matchPattern);if(!r)return null;const s=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const a=e.slice(s.length);return{value:o,rest:a}}}const mbe=/^(\d+)(th|st|nd|rd)?/i,gbe=/\d+/i,vbe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ybe={any:[/^b/i,/^(a|c)/i]},bbe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xbe={any:[/1/i,/2/i,/3/i,/4/i]},wbe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},_be={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Sbe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Cbe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Ebe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Rbe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Abe={ordinalNumber:pbe({matchPattern:mbe,parsePattern:gbe,valueCallback:t=>parseInt(t,10)}),era:bb({matchPatterns:vbe,defaultMatchWidth:"wide",parsePatterns:ybe,defaultParseWidth:"any"}),quarter:bb({matchPatterns:bbe,defaultMatchWidth:"wide",parsePatterns:xbe,defaultParseWidth:"any",valueCallback:t=>t+1}),month:bb({matchPatterns:wbe,defaultMatchWidth:"wide",parsePatterns:_be,defaultParseWidth:"any"}),day:bb({matchPatterns:Sbe,defaultMatchWidth:"wide",parsePatterns:Cbe,defaultParseWidth:"any"}),dayPeriod:bb({matchPatterns:Ebe,defaultMatchWidth:"any",parsePatterns:Rbe,defaultParseWidth:"any"})},VW={code:"en-US",formatDistance:Qye,formatLong:tbe,formatRelative:rbe,localize:dbe,match:Abe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Pbe(t){const e=Qt(t);return kl(e,UW(e))+1}function qW(t){const e=Qt(t),n=+Sp(e)-+Vye(e);return Math.round(n/PL)+1}function WW(t,e){var f,l,d,p;const n=Qt(t),r=n.getFullYear(),s=m_(),i=(e==null?void 0:e.firstWeekContainsDate)??((l=(f=e==null?void 0:e.locale)==null?void 0:f.options)==null?void 0:l.firstWeekContainsDate)??s.firstWeekContainsDate??((p=(d=s.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,o=wo(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const a=zl(o,e),c=wo(t,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const u=zl(c,e);return n.getTime()>=a.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function Nbe(t,e){var a,c,u,f;const n=m_(),r=(e==null?void 0:e.firstWeekContainsDate)??((c=(a=e==null?void 0:e.locale)==null?void 0:a.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,s=WW(t,e),i=wo(t,0);return i.setFullYear(s,0,r),i.setHours(0,0,0,0),zl(i,e)}function GW(t,e){const n=Qt(t),r=+zl(n,e)-+Nbe(n,e);return Math.round(r/PL)+1}function vn(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const Hu={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return vn(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):vn(n+1,2)},d(t,e){return vn(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return vn(t.getHours()%12||12,e.length)},H(t,e){return vn(t.getHours(),e.length)},m(t,e){return vn(t.getMinutes(),e.length)},s(t,e){return vn(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return vn(s,e.length)}},wm={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},kB={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return Hu.y(t,e)},Y:function(t,e,n,r){const s=WW(t,r),i=s>0?s:1-s;if(e==="YY"){const o=i%100;return vn(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):vn(i,e.length)},R:function(t,e){const n=BW(t);return vn(n,e.length)},u:function(t,e){const n=t.getFullYear();return vn(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return vn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return vn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return Hu.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return vn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const s=GW(t,r);return e==="wo"?n.ordinalNumber(s,{unit:"week"}):vn(s,e.length)},I:function(t,e,n){const r=qW(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):vn(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Hu.d(t,e)},D:function(t,e,n){const r=Pbe(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):vn(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const s=t.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return vn(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const s=t.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return vn(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),s=r===0?7:r;switch(e){case"i":return String(s);case"ii":return vn(s,e.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const s=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let s;switch(r===12?s=wm.noon:r===0?s=wm.midnight:s=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let s;switch(r>=17?s=wm.evening:r>=12?s=wm.afternoon:r>=4?s=wm.morning:s=wm.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Hu.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Hu.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):vn(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):vn(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Hu.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Hu.s(t,e)},S:function(t,e){return Hu.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return MB(r);case"XXXX":case"XX":return Uf(r);case"XXXXX":case"XXX":default:return Uf(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return MB(r);case"xxxx":case"xx":return Uf(r);case"xxxxx":case"xxx":default:return Uf(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+DB(r,":");case"OOOO":default:return"GMT"+Uf(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+DB(r,":");case"zzzz":default:return"GMT"+Uf(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return vn(r,e.length)},T:function(t,e,n){const r=t.getTime();return vn(r,e.length)}};function DB(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=Math.trunc(r/60),i=r%60;return i===0?n+String(s):n+String(s)+e+vn(i,2)}function MB(t,e){return t%60===0?(t>0?"-":"+")+vn(Math.abs(t)/60,2):Uf(t,e)}function Uf(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=vn(Math.trunc(r/60),2),i=vn(r%60,2);return n+s+e+i}const OB=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},KW=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Tbe=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return OB(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",OB(r,e)).replace("{{time}}",KW(s,e))},kbe={p:KW,P:Tbe},Dbe=/^D+$/,Mbe=/^Y+$/,Obe=["D","DD","YY","YYYY"];function Ibe(t){return Dbe.test(t)}function jbe(t){return Mbe.test(t)}function Lbe(t,e,n){const r=$be(t,e,n);if(console.warn(r),Obe.includes(t))throw new RangeError(r)}function $be(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Fbe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zbe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Bbe=/^'([^]*?)'?$/,Ube=/''/g,Hbe=/[a-zA-Z]/;function Up(t,e,n){var f,l,d,p,h,m,y,g;const r=m_(),s=(n==null?void 0:n.locale)??r.locale??VW,i=(n==null?void 0:n.firstWeekContainsDate)??((l=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((p=(d=r.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((m=(h=n==null?void 0:n.locale)==null?void 0:h.options)==null?void 0:m.weekStartsOn)??r.weekStartsOn??((g=(y=r.locale)==null?void 0:y.options)==null?void 0:g.weekStartsOn)??0,a=Qt(t);if(!Kye(a))throw new RangeError("Invalid time value");let c=e.match(zbe).map(v=>{const b=v[0];if(b==="p"||b==="P"){const _=kbe[b];return _(v,s.formatLong)}return v}).join("").match(Fbe).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const b=v[0];if(b==="'")return{isToken:!1,value:Vbe(v)};if(kB[b])return{isToken:!0,value:v};if(b.match(Hbe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");return{isToken:!1,value:v}});s.localize.preprocessor&&(c=s.localize.preprocessor(a,c));const u={firstWeekContainsDate:i,weekStartsOn:o,locale:s};return c.map(v=>{if(!v.isToken)return v.value;const b=v.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&jbe(b)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Ibe(b))&&Lbe(b,e,String(t));const _=kB[b[0]];return _(a,b,s.localize,u)}).join("")}function Vbe(t){const e=t.match(Bbe);return e?e[1].replace(Ube,"'"):t}function qbe(t){const e=Qt(t),n=e.getFullYear(),r=e.getMonth(),s=wo(t,0);return s.setFullYear(n,r+1,0),s.setHours(0,0,0,0),s.getDate()}function Wbe(t){return Math.trunc(+Qt(t)/1e3)}function Gbe(t){const e=Qt(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(0,0,0,0),e}function Kbe(t,e){return Yye(Gbe(t),ji(t),e)+1}function MM(t,e){const n=Qt(t),r=Qt(e);return n.getTime()>r.getTime()}function YW(t,e){const n=Qt(t),r=Qt(e);return+n<+r}function DL(t,e){const n=Qt(t),r=Qt(e);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Ybe(t,e){const n=Qt(t),r=Qt(e);return n.getFullYear()===r.getFullYear()}function YT(t,e){return Zs(t,-e)}function XT(t,e){const n=Qt(t),r=n.getFullYear(),s=n.getDate(),i=wo(t,0);i.setFullYear(r,e,15),i.setHours(0,0,0,0);const o=qbe(i);return n.setMonth(e,Math.min(s,o)),n}function IB(t,e){const n=Qt(t);return isNaN(+n)?wo(t,NaN):(n.setFullYear(e),n)}var pt=function(){return pt=Object.assign||function(e){for(var n,r=1,s=arguments.length;r 1&&(c||!u),l=e>1&&(u||!c),d=function(){r&&i(r)},p=function(){s&&i(s)};return w.jsx(P0e,{displayMonth:t.displayMonth,hideNext:f,hidePrevious:l,nextMonth:s,previousMonth:r,onPreviousClick:d,onNextClick:p})}function N0e(t){var e,n=Bn(),r=n.classNames,s=n.disableNavigation,i=n.styles,o=n.captionLayout,a=n.components,c=(e=a==null?void 0:a.CaptionLabel)!==null&&e!==void 0?e:ZW,u;return s?u=w.jsx(c,{id:t.id,displayMonth:t.displayMonth}):o==="dropdown"?u=w.jsx(jB,{displayMonth:t.displayMonth,id:t.id}):o==="dropdown-buttons"?u=w.jsxs(w.Fragment,{children:[w.jsx(jB,{displayMonth:t.displayMonth,displayIndex:t.displayIndex,id:t.id}),w.jsx(LB,{displayMonth:t.displayMonth,displayIndex:t.displayIndex,id:t.id})]}):u=w.jsxs(w.Fragment,{children:[w.jsx(c,{id:t.id,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),w.jsx(LB,{displayMonth:t.displayMonth,id:t.id})]}),w.jsx("div",{className:r.caption,style:i.caption,children:u})}function T0e(t){var e=Bn(),n=e.footer,r=e.styles,s=e.classNames.tfoot;return n?w.jsx("tfoot",{className:s,style:r.tfoot,children:w.jsx("tr",{children:w.jsx("td",{colSpan:8,children:n})})}):w.jsx(w.Fragment,{})}function k0e(t,e,n){for(var r=n?Sp(new Date):zl(new Date,{locale:t,weekStartsOn:e}),s=[],i=0;i<7;i++){var o=Zs(r,i);s.push(o)}return s}function D0e(){var t=Bn(),e=t.classNames,n=t.styles,r=t.showWeekNumber,s=t.locale,i=t.weekStartsOn,o=t.ISOWeek,a=t.formatters.formatWeekdayName,c=t.labels.labelWeekday,u=k0e(s,i,o);return w.jsxs("tr",{style:n.head_row,className:e.head_row,children:[r&&w.jsx("td",{style:n.head_cell,className:e.head_cell}),u.map(function(f,l){return w.jsx("th",{scope:"col",className:e.head_cell,style:n.head_cell,"aria-label":c(f,{locale:s}),children:a(f,{locale:s})},l)})]})}function M0e(){var t,e=Bn(),n=e.classNames,r=e.styles,s=e.components,i=(t=s==null?void 0:s.HeadRow)!==null&&t!==void 0?t:D0e;return w.jsx("thead",{style:r.head,className:n.head,children:w.jsx(i,{})})}function O0e(t){var e=Bn(),n=e.locale,r=e.formatters.formatDay;return w.jsx(w.Fragment,{children:r(t.date,{locale:n})})}var ML=S.createContext(void 0);function I0e(t){if(!g_(t.initialProps)){var e={selected:void 0,modifiers:{disabled:[]}};return w.jsx(ML.Provider,{value:e,children:t.children})}return w.jsx(j0e,{initialProps:t.initialProps,children:t.children})}function j0e(t){var e=t.initialProps,n=t.children,r=e.selected,s=e.min,i=e.max,o=function(u,f,l){var d,p;(d=e.onDayClick)===null||d===void 0||d.call(e,u,f,l);var h=!!(f.selected&&s&&(r==null?void 0:r.length)===s);if(!h){var m=!!(!f.selected&&i&&(r==null?void 0:r.length)===i);if(!m){var y=r?XW([],r):[];if(f.selected){var g=y.findIndex(function(v){return Ni(u,v)});y.splice(g,1)}else y.push(u);(p=e.onSelect)===null||p===void 0||p.call(e,y,u,f,l)}}},a={disabled:[]};r&&a.disabled.push(function(u){var f=i&&r.length>i-1,l=r.some(function(d){return Ni(d,u)});return!!(f&&!l)});var c={selected:r,onDayClick:o,modifiers:a};return w.jsx(ML.Provider,{value:c,children:n})}function OL(){var t=S.useContext(ML);if(!t)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return t}function L0e(t,e){var n=e||{},r=n.from,s=n.to;return r&&s?Ni(s,t)&&Ni(r,t)?void 0:Ni(s,t)?{from:s,to:void 0}:Ni(r,t)?void 0:MM(r,t)?{from:t,to:s}:{from:r,to:t}:s?MM(t,s)?{from:s,to:t}:{from:t,to:s}:r?YW(t,r)?{from:t,to:r}:{from:r,to:t}:{from:t,to:void 0}}var IL=S.createContext(void 0);function $0e(t){if(!v_(t.initialProps)){var e={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return w.jsx(IL.Provider,{value:e,children:t.children})}return w.jsx(F0e,{initialProps:t.initialProps,children:t.children})}function F0e(t){var e=t.initialProps,n=t.children,r=e.selected,s=r||{},i=s.from,o=s.to,a=e.min,c=e.max,u=function(p,h,m){var y,g;(y=e.onDayClick)===null||y===void 0||y.call(e,p,h,m);var v=L0e(p,r);(g=e.onSelect)===null||g===void 0||g.call(e,v,p,h,m)},f={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(f.range_start=[i],o?(f.range_end=[o],Ni(i,o)||(f.range_middle=[{after:i,before:o}])):f.range_end=[i]):o&&(f.range_start=[o],f.range_end=[o]),a&&(i&&!o&&f.disabled.push({after:YT(i,a-1),before:Zs(i,a-1)}),i&&o&&f.disabled.push({after:i,before:Zs(i,a-1)}),!i&&o&&f.disabled.push({after:YT(o,a-1),before:Zs(o,a-1)})),c){if(i&&!o&&(f.disabled.push({before:Zs(i,-c+1)}),f.disabled.push({after:Zs(i,c-1)})),i&&o){var l=kl(o,i)+1,d=c-l;f.disabled.push({before:YT(i,d)}),f.disabled.push({after:Zs(o,d)})}!i&&o&&(f.disabled.push({before:Zs(o,-c+1)}),f.disabled.push({after:Zs(o,c-1)}))}return w.jsx(IL.Provider,{value:{selected:r,onDayClick:u,modifiers:f},children:n})}function jL(){var t=S.useContext(IL);if(!t)throw new Error("useSelectRange must be used within a SelectRangeProvider");return t}function sC(t){return Array.isArray(t)?XW([],t):t!==void 0?[t]:[]}function z0e(t){var e={};return Object.entries(t).forEach(function(n){var r=n[0],s=n[1];e[r]=sC(s)}),e}var Ga;(function(t){t.Outside="outside",t.Disabled="disabled",t.Selected="selected",t.Hidden="hidden",t.Today="today",t.RangeStart="range_start",t.RangeEnd="range_end",t.RangeMiddle="range_middle"})(Ga||(Ga={}));var B0e=Ga.Selected,uc=Ga.Disabled,U0e=Ga.Hidden,H0e=Ga.Today,QT=Ga.RangeEnd,ZT=Ga.RangeMiddle,JT=Ga.RangeStart,V0e=Ga.Outside;function q0e(t,e,n){var r,s=(r={},r[B0e]=sC(t.selected),r[uc]=sC(t.disabled),r[U0e]=sC(t.hidden),r[H0e]=[t.today],r[QT]=[],r[ZT]=[],r[JT]=[],r[V0e]=[],r);return t.fromDate&&s[uc].push({before:t.fromDate}),t.toDate&&s[uc].push({after:t.toDate}),g_(t)?s[uc]=s[uc].concat(e.modifiers[uc]):v_(t)&&(s[uc]=s[uc].concat(n.modifiers[uc]),s[JT]=n.modifiers[JT],s[ZT]=n.modifiers[ZT],s[QT]=n.modifiers[QT]),s}var tG=S.createContext(void 0);function W0e(t){var e=Bn(),n=OL(),r=jL(),s=q0e(e,n,r),i=z0e(e.modifiers),o=pt(pt({},s),i);return w.jsx(tG.Provider,{value:o,children:t.children})}function nG(){var t=S.useContext(tG);if(!t)throw new Error("useModifiers must be used within a ModifiersProvider");return t}function G0e(t){return!!(t&&typeof t=="object"&&"before"in t&&"after"in t)}function K0e(t){return!!(t&&typeof t=="object"&&"from"in t)}function Y0e(t){return!!(t&&typeof t=="object"&&"after"in t)}function X0e(t){return!!(t&&typeof t=="object"&&"before"in t)}function Q0e(t){return!!(t&&typeof t=="object"&&"dayOfWeek"in t)}function Z0e(t,e){var n,r=e.from,s=e.to;if(r&&s){var i=kl(s,r)<0;i&&(n=[s,r],r=n[0],s=n[1]);var o=kl(t,r)>=0&&kl(s,t)>=0;return o}return s?Ni(s,t):r?Ni(r,t):!1}function J0e(t){return NL(t)}function exe(t){return Array.isArray(t)&&t.every(NL)}function txe(t,e){return e.some(function(n){if(typeof n=="boolean")return n;if(J0e(n))return Ni(t,n);if(exe(n))return n.includes(t);if(K0e(n))return Z0e(t,n);if(Q0e(n))return n.dayOfWeek.includes(t.getDay());if(G0e(n)){var r=kl(n.before,t),s=kl(n.after,t),i=r>0,o=s<0,a=MM(n.before,n.after);return a?o&&i:i||o}return Y0e(n)?kl(t,n.after)>0:X0e(n)?kl(n.before,t)>0:typeof n=="function"?n(t):!1})}function LL(t,e,n){var r=Object.keys(e).reduce(function(i,o){var a=e[o];return txe(t,a)&&i.push(o),i},[]),s={};return r.forEach(function(i){return s[i]=!0}),n&&!DL(t,n)&&(s.outside=!0),s}function nxe(t,e){for(var n=ji(t[0]),r=TL(t[t.length-1]),s,i,o=n;o<=r;){var a=LL(o,e),c=!a.disabled&&!a.hidden;if(!c){o=Zs(o,1);continue}if(a.selected)return o;a.today&&!i&&(i=o),s||(s=o),o=Zs(o,1)}return i||s}var rxe=365;function rG(t,e){var n=e.moveBy,r=e.direction,s=e.context,i=e.modifiers,o=e.retry,a=o===void 0?{count:0,lastFocused:t}:o,c=s.weekStartsOn,u=s.fromDate,f=s.toDate,l=s.locale,d={day:Zs,week:DM,month:Wa,year:qye,startOfWeek:function(y){return s.ISOWeek?Sp(y):zl(y,{locale:l,weekStartsOn:c})},endOfWeek:function(y){return s.ISOWeek?HW(y):kL(y,{locale:l,weekStartsOn:c})}},p=d[n](t,r==="after"?1:-1);r==="before"&&u?p=Wye([u,p]):r==="after"&&f&&(p=Gye([f,p]));var h=!0;if(i){var m=LL(p,i);h=!m.disabled&&!m.hidden}return h?p:a.count>rxe?a.lastFocused:rG(p,{moveBy:n,direction:r,context:s,modifiers:i,retry:pt(pt({},a),{count:a.count+1})})}var sG=S.createContext(void 0);function sxe(t){var e=y_(),n=nG(),r=S.useState(),s=r[0],i=r[1],o=S.useState(),a=o[0],c=o[1],u=nxe(e.displayMonths,n),f=s??(a&&e.isDateDisplayed(a))?a:u,l=function(){c(s),i(void 0)},d=function(y){i(y)},p=Bn(),h=function(y,g){if(s){var v=rG(s,{moveBy:y,direction:g,context:p,modifiers:n});Ni(s,v)||(e.goToDate(v,s),d(v))}},m={focusedDay:s,focusTarget:f,blur:l,focus:d,focusDayAfter:function(){return h("day","after")},focusDayBefore:function(){return h("day","before")},focusWeekAfter:function(){return h("week","after")},focusWeekBefore:function(){return h("week","before")},focusMonthBefore:function(){return h("month","before")},focusMonthAfter:function(){return h("month","after")},focusYearBefore:function(){return h("year","before")},focusYearAfter:function(){return h("year","after")},focusStartOfWeek:function(){return h("startOfWeek","before")},focusEndOfWeek:function(){return h("endOfWeek","after")}};return w.jsx(sG.Provider,{value:m,children:t.children})}function $L(){var t=S.useContext(sG);if(!t)throw new Error("useFocusContext must be used within a FocusProvider");return t}function ixe(t,e){var n=nG(),r=LL(t,n,e);return r}var FL=S.createContext(void 0);function oxe(t){if(!yA(t.initialProps)){var e={selected:void 0};return w.jsx(FL.Provider,{value:e,children:t.children})}return w.jsx(axe,{initialProps:t.initialProps,children:t.children})}function axe(t){var e=t.initialProps,n=t.children,r=function(i,o,a){var c,u,f;if((c=e.onDayClick)===null||c===void 0||c.call(e,i,o,a),o.selected&&!e.required){(u=e.onSelect)===null||u===void 0||u.call(e,void 0,i,o,a);return}(f=e.onSelect)===null||f===void 0||f.call(e,i,i,o,a)},s={selected:e.selected,onDayClick:r};return w.jsx(FL.Provider,{value:s,children:n})}function iG(){var t=S.useContext(FL);if(!t)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return t}function lxe(t,e){var n=Bn(),r=iG(),s=OL(),i=jL(),o=$L(),a=o.focusDayAfter,c=o.focusDayBefore,u=o.focusWeekAfter,f=o.focusWeekBefore,l=o.blur,d=o.focus,p=o.focusMonthBefore,h=o.focusMonthAfter,m=o.focusYearBefore,y=o.focusYearAfter,g=o.focusStartOfWeek,v=o.focusEndOfWeek,b=function(H){var q,ee,se,X;yA(n)?(q=r.onDayClick)===null||q===void 0||q.call(r,t,e,H):g_(n)?(ee=s.onDayClick)===null||ee===void 0||ee.call(s,t,e,H):v_(n)?(se=i.onDayClick)===null||se===void 0||se.call(i,t,e,H):(X=n.onDayClick)===null||X===void 0||X.call(n,t,e,H)},_=function(H){var q;d(t),(q=n.onDayFocus)===null||q===void 0||q.call(n,t,e,H)},R=function(H){var q;l(),(q=n.onDayBlur)===null||q===void 0||q.call(n,t,e,H)},P=function(H){var q;(q=n.onDayMouseEnter)===null||q===void 0||q.call(n,t,e,H)},T=function(H){var q;(q=n.onDayMouseLeave)===null||q===void 0||q.call(n,t,e,H)},E=function(H){var q;(q=n.onDayPointerEnter)===null||q===void 0||q.call(n,t,e,H)},N=function(H){var q;(q=n.onDayPointerLeave)===null||q===void 0||q.call(n,t,e,H)},k=function(H){var q;(q=n.onDayTouchCancel)===null||q===void 0||q.call(n,t,e,H)},M=function(H){var q;(q=n.onDayTouchEnd)===null||q===void 0||q.call(n,t,e,H)},I=function(H){var q;(q=n.onDayTouchMove)===null||q===void 0||q.call(n,t,e,H)},j=function(H){var q;(q=n.onDayTouchStart)===null||q===void 0||q.call(n,t,e,H)},L=function(H){var q;(q=n.onDayKeyUp)===null||q===void 0||q.call(n,t,e,H)},U=function(H){var q;switch(H.key){case"ArrowLeft":H.preventDefault(),H.stopPropagation(),n.dir==="rtl"?a():c();break;case"ArrowRight":H.preventDefault(),H.stopPropagation(),n.dir==="rtl"?c():a();break;case"ArrowDown":H.preventDefault(),H.stopPropagation(),u();break;case"ArrowUp":H.preventDefault(),H.stopPropagation(),f();break;case"PageUp":H.preventDefault(),H.stopPropagation(),H.shiftKey?m():p();break;case"PageDown":H.preventDefault(),H.stopPropagation(),H.shiftKey?y():h();break;case"Home":H.preventDefault(),H.stopPropagation(),g();break;case"End":H.preventDefault(),H.stopPropagation(),v();break}(q=n.onDayKeyDown)===null||q===void 0||q.call(n,t,e,H)},K={onClick:b,onFocus:_,onBlur:R,onKeyDown:U,onKeyUp:L,onMouseEnter:P,onMouseLeave:T,onPointerEnter:E,onPointerLeave:N,onTouchCancel:k,onTouchEnd:M,onTouchMove:I,onTouchStart:j};return K}function cxe(){var t=Bn(),e=iG(),n=OL(),r=jL(),s=yA(t)?e.selected:g_(t)?n.selected:v_(t)?r.selected:void 0;return s}function uxe(t){return Object.values(Ga).includes(t)}function dxe(t,e){var n=[t.classNames.day];return Object.keys(e).forEach(function(r){var s=t.modifiersClassNames[r];if(s)n.push(s);else if(uxe(r)){var i=t.classNames["day_".concat(r)];i&&n.push(i)}}),n}function fxe(t,e){var n=pt({},t.styles.day);return Object.keys(e).forEach(function(r){var s;n=pt(pt({},n),(s=t.modifiersStyles)===null||s===void 0?void 0:s[r])}),n}function hxe(t,e,n){var r,s,i,o=Bn(),a=$L(),c=ixe(t,e),u=lxe(t,c),f=cxe(),l=!!(o.onDayClick||o.mode!=="default");S.useEffect(function(){var P;c.outside||a.focusedDay&&l&&Ni(a.focusedDay,t)&&((P=n.current)===null||P===void 0||P.focus())},[a.focusedDay,t,n,l,c.outside]);var d=dxe(o,c).join(" "),p=fxe(o,c),h=!!(c.outside&&!o.showOutsideDays||c.hidden),m=(i=(s=o.components)===null||s===void 0?void 0:s.DayContent)!==null&&i!==void 0?i:O0e,y=w.jsx(m,{date:t,displayMonth:e,activeModifiers:c}),g={style:p,className:d,children:y,role:"gridcell"},v=a.focusTarget&&Ni(a.focusTarget,t)&&!c.outside,b=a.focusedDay&&Ni(a.focusedDay,t),_=pt(pt(pt({},g),(r={disabled:c.disabled,role:"gridcell"},r["aria-selected"]=c.selected,r.tabIndex=b||v?0:-1,r)),u),R={isButton:l,isHidden:h,activeModifiers:c,selectedDays:f,buttonProps:_,divProps:g};return R}function pxe(t){var e=S.useRef(null),n=hxe(t.date,t.displayMonth,e);return n.isHidden?w.jsx("div",{role:"gridcell"}):n.isButton?w.jsx(vE,pt({name:"day",ref:e},n.buttonProps)):w.jsx("div",pt({},n.divProps))}function mxe(t){var e=t.number,n=t.dates,r=Bn(),s=r.onWeekNumberClick,i=r.styles,o=r.classNames,a=r.locale,c=r.labels.labelWeekNumber,u=r.formatters.formatWeekNumber,f=u(Number(e),{locale:a});if(!s)return w.jsx("span",{className:o.weeknumber,style:i.weeknumber,children:f});var l=c(Number(e),{locale:a}),d=function(p){s(e,n,p)};return w.jsx(vE,{name:"week-number","aria-label":l,className:o.weeknumber,style:i.weeknumber,onClick:d,children:f})}function gxe(t){var e,n,r=Bn(),s=r.styles,i=r.classNames,o=r.showWeekNumber,a=r.components,c=(e=a==null?void 0:a.Day)!==null&&e!==void 0?e:pxe,u=(n=a==null?void 0:a.WeekNumber)!==null&&n!==void 0?n:mxe,f;return o&&(f=w.jsx("td",{className:i.cell,style:s.cell,children:w.jsx(u,{number:t.weekNumber,dates:t.dates})})),w.jsxs("tr",{className:i.row,style:s.row,children:[f,t.dates.map(function(l){return w.jsx("td",{className:i.cell,style:s.cell,role:"presentation",children:w.jsx(c,{displayMonth:t.displayMonth,date:l})},Wbe(l))})]})}function $B(t,e,n){for(var r=n!=null&&n.ISOWeek?HW(e):kL(e,n),s=n!=null&&n.ISOWeek?Sp(t):zl(t,n),i=kl(r,s),o=[],a=0;a<=i;a++)o.push(Zs(s,a));var c=o.reduce(function(u,f){var l=n!=null&&n.ISOWeek?qW(f):GW(f,n),d=u.find(function(p){return p.weekNumber===l});return d?(d.dates.push(f),u):(u.push({weekNumber:l,dates:[f]}),u)},[]);return c}function vxe(t,e){var n=$B(ji(t),TL(t),e);if(e!=null&&e.useFixedWeeks){var r=Kbe(t,e);if(r<6){var s=n[n.length-1],i=s.dates[s.dates.length-1],o=DM(i,6-r),a=$B(DM(i,1),o,e);n.push.apply(n,a)}}return n}function yxe(t){var e,n,r,s=Bn(),i=s.locale,o=s.classNames,a=s.styles,c=s.hideHead,u=s.fixedWeeks,f=s.components,l=s.weekStartsOn,d=s.firstWeekContainsDate,p=s.ISOWeek,h=vxe(t.displayMonth,{useFixedWeeks:!!u,ISOWeek:p,locale:i,weekStartsOn:l,firstWeekContainsDate:d}),m=(e=f==null?void 0:f.Head)!==null&&e!==void 0?e:M0e,y=(n=f==null?void 0:f.Row)!==null&&n!==void 0?n:gxe,g=(r=f==null?void 0:f.Footer)!==null&&r!==void 0?r:T0e;return w.jsxs("table",{id:t.id,className:o.table,style:a.table,role:"grid","aria-labelledby":t["aria-labelledby"],children:[!c&&w.jsx(m,{}),w.jsx("tbody",{className:o.tbody,style:a.tbody,children:h.map(function(v){return w.jsx(y,{displayMonth:t.displayMonth,dates:v.dates,weekNumber:v.weekNumber},v.weekNumber)})}),w.jsx(g,{displayMonth:t.displayMonth})]})}function bxe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var xxe=bxe()?S.useLayoutEffect:S.useEffect,ek=!1,wxe=0;function FB(){return"react-day-picker-".concat(++wxe)}function _xe(t){var e,n=t??(ek?FB():null),r=S.useState(n),s=r[0],i=r[1];return xxe(function(){s===null&&i(FB())},[]),S.useEffect(function(){ek===!1&&(ek=!0)},[]),(e=t??s)!==null&&e!==void 0?e:void 0}function Sxe(t){var e,n,r=Bn(),s=r.dir,i=r.classNames,o=r.styles,a=r.components,c=y_().displayMonths,u=_xe(r.id?"".concat(r.id,"-").concat(t.displayIndex):void 0),f=r.id?"".concat(r.id,"-grid-").concat(t.displayIndex):void 0,l=[i.month],d=o.month,p=t.displayIndex===0,h=t.displayIndex===c.length-1,m=!p&&!h;s==="rtl"&&(e=[p,h],h=e[0],p=e[1]),p&&(l.push(i.caption_start),d=pt(pt({},d),o.caption_start)),h&&(l.push(i.caption_end),d=pt(pt({},d),o.caption_end)),m&&(l.push(i.caption_between),d=pt(pt({},d),o.caption_between));var y=(n=a==null?void 0:a.Caption)!==null&&n!==void 0?n:N0e;return w.jsxs("div",{className:l.join(" "),style:d,children:[w.jsx(y,{id:u,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),w.jsx(yxe,{id:f,"aria-labelledby":u,displayMonth:t.displayMonth})]},t.displayIndex)}function Cxe(t){var e=Bn(),n=e.classNames,r=e.styles;return w.jsx("div",{className:n.months,style:r.months,children:t.children})}function Exe(t){var e,n,r=t.initialProps,s=Bn(),i=$L(),o=y_(),a=S.useState(!1),c=a[0],u=a[1];S.useEffect(function(){s.initialFocus&&i.focusTarget&&(c||(i.focus(i.focusTarget),u(!0)))},[s.initialFocus,c,i.focus,i.focusTarget,i]);var f=[s.classNames.root,s.className];s.numberOfMonths>1&&f.push(s.classNames.multiple_months),s.showWeekNumber&&f.push(s.classNames.with_weeknumber);var l=pt(pt({},s.styles.root),s.style),d=Object.keys(r).filter(function(h){return h.startsWith("data-")}).reduce(function(h,m){var y;return pt(pt({},h),(y={},y[m]=r[m],y))},{}),p=(n=(e=r.components)===null||e===void 0?void 0:e.Months)!==null&&n!==void 0?n:Cxe;return w.jsx("div",pt({className:f.join(" "),style:l,dir:s.dir,id:s.id,nonce:r.nonce,title:r.title,lang:r.lang},d,{children:w.jsx(p,{children:o.displayMonths.map(function(h,m){return w.jsx(Sxe,{displayIndex:m,displayMonth:h},m)})})}))}function Rxe(t){var e=t.children,n=Xbe(t,["children"]);return w.jsx(m0e,{initialProps:n,children:w.jsx(E0e,{children:w.jsx(oxe,{initialProps:n,children:w.jsx(I0e,{initialProps:n,children:w.jsx($0e,{initialProps:n,children:w.jsx(W0e,{children:w.jsx(sxe,{children:e})})})})})})})}function Axe(t){return w.jsx(Rxe,pt({},t,{children:w.jsx(Exe,{initialProps:t})}))}function oG({className:t,classNames:e,showOutsideDays:n=!0,...r}){return w.jsx(Axe,{showOutsideDays:n,className:ie("p-3",t),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:ie(nx({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:ie(nx({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...e},components:{IconLeft:()=>w.jsx(rA,{className:"w-4 h-4"}),IconRight:()=>w.jsx(ly,{className:"w-4 h-4"})},...r})}oG.displayName="Calendar";const xr=S.forwardRef(({className:t,...e},n)=>w.jsx("div",{ref:n,className:ie("rounded-md border bg-card text-card-foreground shadow",t),...e}));xr.displayName="Card";const Ei=S.forwardRef(({className:t,...e},n)=>w.jsx("div",{ref:n,className:ie("flex flex-col space-y-1.5 p-6",t),...e}));Ei.displayName="CardHeader";const ns=S.forwardRef(({className:t,...e},n)=>w.jsx("h3",{ref:n,className:ie("font-semibold leading-none tracking-tight",t),...e}));ns.displayName="CardTitle";const vs=S.forwardRef(({className:t,...e},n)=>w.jsx("p",{ref:n,className:ie("text-sm text-muted-foreground",t),...e}));vs.displayName="CardDescription";const wr=S.forwardRef(({className:t,...e},n)=>w.jsx("div",{ref:n,className:ie("p-6 pt-0",t),...e}));wr.displayName="CardContent";const Vo=S.forwardRef(({className:t,...e},n)=>w.jsx("div",{ref:n,className:ie("flex items-center p-6 pt-0",t),...e}));Vo.displayName="CardFooter";var Pxe=Array.isArray,Nxe=Pxe,Txe=typeof pr=="object"&&pr&&pr.Object===Object&&pr,kxe=Txe,Dxe=kxe,Mxe=typeof self=="object"&&self&&self.Object===Object&&self,Oxe=Dxe||Mxe||Function("return this")(),bA=Oxe,Ixe=bA,jxe=Ixe.Symbol,zL=jxe,zB=zL,aG=Object.prototype,Lxe=aG.hasOwnProperty,$xe=aG.toString,xb=zB?zB.toStringTag:void 0;function Fxe(t){var e=Lxe.call(t,xb),n=t[xb];try{t[xb]=void 0;var r=!0}catch{}var s=$xe.call(t);return r&&(e?t[xb]=n:delete t[xb]),s}var zxe=Fxe,Bxe=Object.prototype,Uxe=Bxe.toString;function Hxe(t){return Uxe.call(t)}var Vxe=Hxe,BB=zL,qxe=zxe,Wxe=Vxe,Gxe="[object Null]",Kxe="[object Undefined]",UB=BB?BB.toStringTag:void 0;function Yxe(t){return t==null?t===void 0?Kxe:Gxe:UB&&UB in Object(t)?qxe(t):Wxe(t)}var BL=Yxe;function Xxe(t){return t!=null&&typeof t=="object"}var lG=Xxe,Qxe=BL,Zxe=lG,Jxe="[object Symbol]";function ewe(t){return typeof t=="symbol"||Zxe(t)&&Qxe(t)==Jxe}var twe=ewe;function nwe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var b_=nwe,rwe=BL,swe=b_,iwe="[object AsyncFunction]",owe="[object Function]",awe="[object GeneratorFunction]",lwe="[object Proxy]";function cwe(t){if(!swe(t))return!1;var e=rwe(t);return e==owe||e==awe||e==iwe||e==lwe}var uwe=cwe,dwe=bA,fwe=dwe["__core-js_shared__"],hwe=fwe,tk=hwe,HB=function(){var t=/[^.]+$/.exec(tk&&tk.keys&&tk.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function pwe(t){return!!HB&&HB in t}var mwe=pwe,gwe=Function.prototype,vwe=gwe.toString;function ywe(t){if(t!=null){try{return vwe.call(t)}catch{}try{return t+""}catch{}}return""}var bwe=ywe,xwe=uwe,wwe=mwe,_we=b_,Swe=bwe,Cwe=/[\\^$.*+?()[\]{}|]/g,Ewe=/^\[object .+?Constructor\]$/,Rwe=Function.prototype,Awe=Object.prototype,Pwe=Rwe.toString,Nwe=Awe.hasOwnProperty,Twe=RegExp("^"+Pwe.call(Nwe).replace(Cwe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kwe(t){if(!_we(t)||wwe(t))return!1;var e=xwe(t)?Twe:Ewe;return e.test(Swe(t))}var Dwe=kwe;function Mwe(t,e){return t==null?void 0:t[e]}var Owe=Mwe,Iwe=Dwe,jwe=Owe;function Lwe(t,e){var n=jwe(t,e);return Iwe(n)?n:void 0}var cG=Lwe,$we=cG,Fwe=$we(Object,"create"),xA=Fwe,VB=xA;function zwe(){this.__data__=VB?VB(null):{},this.size=0}var Bwe=zwe;function Uwe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Hwe=Uwe,Vwe=xA,qwe="__lodash_hash_undefined__",Wwe=Object.prototype,Gwe=Wwe.hasOwnProperty;function Kwe(t){var e=this.__data__;if(Vwe){var n=e[t];return n===qwe?void 0:n}return Gwe.call(e,t)?e[t]:void 0}var Ywe=Kwe,Xwe=xA,Qwe=Object.prototype,Zwe=Qwe.hasOwnProperty;function Jwe(t){var e=this.__data__;return Xwe?e[t]!==void 0:Zwe.call(e,t)}var e_e=Jwe,t_e=xA,n_e="__lodash_hash_undefined__";function r_e(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=t_e&&e===void 0?n_e:e,this}var s_e=r_e,i_e=Bwe,o_e=Hwe,a_e=Ywe,l_e=e_e,c_e=s_e;function vy(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1}var A_e=R_e,P_e=wA;function N_e(t,e){var n=this.__data__,r=P_e(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var T_e=N_e,k_e=f_e,D_e=w_e,M_e=C_e,O_e=A_e,I_e=T_e;function yy(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e 2?r-2:0),i=2;i =e||T<0||l&&E>=i}function g(){var P=nk();if(y(P))return v(P);a=setTimeout(g,m(P))}function v(P){return a=void 0,d&&r?p(P):(r=s=void 0,o)}function b(){a!==void 0&&clearTimeout(a),u=0,r=c=s=a=void 0}function _(){return a===void 0?o:v(nk())}function R(){var P=nk(),T=y(P);if(r=arguments,s=this,c=P,T){if(a===void 0)return h(c);if(l)return clearTimeout(a),a=setTimeout(g,e),p(c)}return a===void 0&&(a=setTimeout(g,e)),o}return R.cancel=b,R.flush=_,R}var r1e=n1e,s1e=r1e,i1e=b_,o1e="Expected a function";function a1e(t,e,n){var r=!0,s=!0;if(typeof t!="function")throw new TypeError(o1e);return i1e(n)&&(r="leading"in n?!!n.leading:r,s="trailing"in n?!!n.trailing:s),s1e(t,e,{leading:r,maxWait:e,trailing:s})}var l1e=a1e;const c1e=_u(l1e);function sx(t){"@babel/helpers - typeof";return sx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sx(t)}function JB(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function m1(t){for(var e=1;e t.length)&&(e=t.length);for(var n=0,r=new Array(e);n 0&&(j=c1e(j,m,{trailing:!0,leading:!1}));var L=new ResizeObserver(j),U=R.current.getBoundingClientRect(),K=U.width,H=U.height;return M(K,H),L.observe(R.current),function(){L.disconnect()}},[M,m]);var I=S.useMemo(function(){var j=N.containerWidth,L=N.containerHeight;if(j<0||L<0)return null;tk(p1(o)||p1(c),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,o,c),tk(!n||n>0,"The aspect(%s) must be greater than zero.",n);var U=p1(o)?j:o,K=p1(c)?L:c;n&&n>0&&(U?K=U/n:K&&(U=K*n),d&&K>d&&(K=d)),tk(U>0||K>0,`The width(%s) and height(%s) of chart should be greater than 0, + */var is=typeof Symbol=="function"&&Symbol.for,HL=is?Symbol.for("react.element"):60103,VL=is?Symbol.for("react.portal"):60106,SA=is?Symbol.for("react.fragment"):60107,CA=is?Symbol.for("react.strict_mode"):60108,EA=is?Symbol.for("react.profiler"):60114,RA=is?Symbol.for("react.provider"):60109,AA=is?Symbol.for("react.context"):60110,qL=is?Symbol.for("react.async_mode"):60111,PA=is?Symbol.for("react.concurrent_mode"):60111,NA=is?Symbol.for("react.forward_ref"):60112,TA=is?Symbol.for("react.suspense"):60113,NSe=is?Symbol.for("react.suspense_list"):60120,kA=is?Symbol.for("react.memo"):60115,DA=is?Symbol.for("react.lazy"):60116,TSe=is?Symbol.for("react.block"):60121,kSe=is?Symbol.for("react.fundamental"):60117,DSe=is?Symbol.for("react.responder"):60118,MSe=is?Symbol.for("react.scope"):60119;function Eo(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case HL:switch(t=t.type,t){case qL:case PA:case SA:case EA:case CA:case TA:return t;default:switch(t=t&&t.$$typeof,t){case AA:case NA:case DA:case kA:case RA:return t;default:return e}}case VL:return e}}}function fG(t){return Eo(t)===PA}wn.AsyncMode=qL;wn.ConcurrentMode=PA;wn.ContextConsumer=AA;wn.ContextProvider=RA;wn.Element=HL;wn.ForwardRef=NA;wn.Fragment=SA;wn.Lazy=DA;wn.Memo=kA;wn.Portal=VL;wn.Profiler=EA;wn.StrictMode=CA;wn.Suspense=TA;wn.isAsyncMode=function(t){return fG(t)||Eo(t)===qL};wn.isConcurrentMode=fG;wn.isContextConsumer=function(t){return Eo(t)===AA};wn.isContextProvider=function(t){return Eo(t)===RA};wn.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===HL};wn.isForwardRef=function(t){return Eo(t)===NA};wn.isFragment=function(t){return Eo(t)===SA};wn.isLazy=function(t){return Eo(t)===DA};wn.isMemo=function(t){return Eo(t)===kA};wn.isPortal=function(t){return Eo(t)===VL};wn.isProfiler=function(t){return Eo(t)===EA};wn.isStrictMode=function(t){return Eo(t)===CA};wn.isSuspense=function(t){return Eo(t)===TA};wn.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===SA||t===PA||t===EA||t===CA||t===TA||t===NSe||typeof t=="object"&&t!==null&&(t.$$typeof===DA||t.$$typeof===kA||t.$$typeof===RA||t.$$typeof===AA||t.$$typeof===NA||t.$$typeof===kSe||t.$$typeof===DSe||t.$$typeof===MSe||t.$$typeof===TSe)};wn.typeOf=Eo;dG.exports=wn;var KB=dG.exports,p1=function(e){return PSe(e)&&e.indexOf("%")===e.length-1},OSe=function(e){return typeof e=="string"?e:e?e.displayName||e.name||"Component":""},nk=function(e,n){for(var r=arguments.length,s=new Array(r>2?r-2:0),i=2;i =e||T<0||l&&E>=i}function g(){var P=rk();if(y(P))return v(P);a=setTimeout(g,m(P))}function v(P){return a=void 0,d&&r?p(P):(r=s=void 0,o)}function b(){a!==void 0&&clearTimeout(a),u=0,r=c=s=a=void 0}function _(){return a===void 0?o:v(rk())}function R(){var P=rk(),T=y(P);if(r=arguments,s=this,c=P,T){if(a===void 0)return h(c);if(l)return clearTimeout(a),a=setTimeout(g,e),p(c)}return a===void 0&&(a=setTimeout(g,e)),o}return R.cancel=b,R.flush=_,R}var s1e=r1e,i1e=s1e,o1e=b_,a1e="Expected a function";function l1e(t,e,n){var r=!0,s=!0;if(typeof t!="function")throw new TypeError(a1e);return o1e(n)&&(r="leading"in n?!!n.leading:r,s="trailing"in n?!!n.trailing:s),i1e(t,e,{leading:r,maxWait:e,trailing:s})}var c1e=l1e;const u1e=_u(c1e);function sx(t){"@babel/helpers - typeof";return sx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sx(t)}function ZB(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function m1(t){for(var e=1;e t.length)&&(e=t.length);for(var n=0,r=new Array(e);n 0&&(j=u1e(j,m,{trailing:!0,leading:!1}));var L=new ResizeObserver(j),U=R.current.getBoundingClientRect(),K=U.width,H=U.height;return M(K,H),L.observe(R.current),function(){L.disconnect()}},[M,m]);var I=S.useMemo(function(){var j=N.containerWidth,L=N.containerHeight;if(j<0||L<0)return null;nk(p1(o)||p1(c),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,o,c),nk(!n||n>0,"The aspect(%s) must be greater than zero.",n);var U=p1(o)?j:o,K=p1(c)?L:c;n&&n>0&&(U?K=U/n:K&&(U=K*n),d&&K>d&&(K=d)),nk(U>0||K>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,U,K,o,c,f,l,n);var H=!Array.isArray(p)&&YB.isElement(p)&&MSe(p.type).endsWith("Chart");return oe.Children.map(p,function(q){return YB.isElement(q)?S.cloneElement(q,m1({width:U,height:K},H?{style:m1({height:"100%",width:"100%",maxHeight:K,maxWidth:U},q.props.style)}:{})):q})},[n,p,c,d,l,f,N,o]);return oe.createElement("div",{id:y?"".concat(y):void 0,className:cy("recharts-responsive-container",g),style:m1(m1({},_),{},{width:o,height:c,minWidth:f,minHeight:l,maxHeight:d}),ref:R},I)}),b1e="Invariant failed";function Mn(t,e){if(!t)throw new Error(b1e)}const x1e={light:"",dark:".dark"},fG=S.createContext(null);function hG(){const t=S.useContext(fG);if(!t)throw new Error("useChart must be used within a ");return t}const w1e=S.forwardRef(({id:t,className:e,children:n,config:r,...s},i)=>{const o=S.useId(),a=`chart-${t||o.replace(/:/g,"")}`;return w.jsx(fG.Provider,{value:{config:r},children:w.jsxs("div",{"data-chart":a,ref:i,className:ie("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",e),...s,children:[w.jsx(_1e,{id:a,config:r}),w.jsx(y1e,{children:n})]})})});w1e.displayName="Chart";const _1e=({id:t,config:e})=>{const n=Object.entries(e).filter(([r,s])=>s.theme||s.color);return n.length?w.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(x1e).map(([r,s])=>` + height and width.`,U,K,o,c,f,l,n);var H=!Array.isArray(p)&&KB.isElement(p)&&OSe(p.type).endsWith("Chart");return oe.Children.map(p,function(q){return KB.isElement(q)?S.cloneElement(q,m1({width:U,height:K},H?{style:m1({height:"100%",width:"100%",maxHeight:K,maxWidth:U},q.props.style)}:{})):q})},[n,p,c,d,l,f,N,o]);return oe.createElement("div",{id:y?"".concat(y):void 0,className:cy("recharts-responsive-container",g),style:m1(m1({},_),{},{width:o,height:c,minWidth:f,minHeight:l,maxHeight:d}),ref:R},I)}),x1e="Invariant failed";function Mn(t,e){if(!t)throw new Error(x1e)}const w1e={light:"",dark:".dark"},hG=S.createContext(null);function pG(){const t=S.useContext(hG);if(!t)throw new Error("useChart must be used within a ");return t}const _1e=S.forwardRef(({id:t,className:e,children:n,config:r,...s},i)=>{const o=S.useId(),a=`chart-${t||o.replace(/:/g,"")}`;return w.jsx(hG.Provider,{value:{config:r},children:w.jsxs("div",{"data-chart":a,ref:i,className:ie("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",e),...s,children:[w.jsx(S1e,{id:a,config:r}),w.jsx(b1e,{children:n})]})})});_1e.displayName="Chart";const S1e=({id:t,config:e})=>{const n=Object.entries(e).filter(([r,s])=>s.theme||s.color);return n.length?w.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(w1e).map(([r,s])=>` ${s} [data-chart=${t}] { ${n.map(([i,o])=>{var c;const a=((c=o.theme)==null?void 0:c[r])||o.color;return a?` --color-${i}: ${a};`:null}).join(` `)} } `).join(` -`)}}):null},S1e=S.forwardRef(({active:t,payload:e,className:n,indicator:r="dot",hideLabel:s=!1,hideIndicator:i=!1,label:o,labelFormatter:a,labelClassName:c,formatter:u,color:f,nameKey:l,labelKey:d},p)=>{const{config:h}=hG(),m=S.useMemo(()=>{var R;if(s||!(e!=null&&e.length))return null;const[g]=e,v=`${d||g.dataKey||g.name||"value"}`,b=OM(h,g,v),_=!d&&typeof o=="string"?((R=h[o])==null?void 0:R.label)||o:b==null?void 0:b.label;return a?w.jsx("div",{className:ie("font-medium",c),children:a(_,e)}):_?w.jsx("div",{className:ie("font-medium",c),children:_}):null},[o,a,e,s,c,h,d]);if(!t||!(e!=null&&e.length))return null;const y=e.length===1&&r!=="dot";return w.jsxs("div",{ref:p,className:ie("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",n),children:[y?null:m,w.jsx("div",{className:"grid gap-1.5",children:e.map((g,v)=>{const b=`${l||g.name||g.dataKey||"value"}`,_=OM(h,g,b),R=f||g.payload.fill||g.color;return w.jsx("div",{className:ie("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",r==="dot"&&"items-center"),children:u&&(g==null?void 0:g.value)!==void 0&&g.name?u(g.value,g.name,g,v,g.payload):w.jsxs(w.Fragment,{children:[_!=null&&_.icon?w.jsx(_.icon,{}):!i&&w.jsx("div",{className:ie("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":y&&r==="dashed"}),style:{"--color-bg":R,"--color-border":R}}),w.jsxs("div",{className:ie("flex flex-1 justify-between leading-none",y?"items-end":"items-center"),children:[w.jsxs("div",{className:"grid gap-1.5",children:[y?m:null,w.jsx("span",{className:"text-muted-foreground",children:(_==null?void 0:_.label)||g.name})]}),g.value&&w.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:g.value.toLocaleString()})]})]})},g.dataKey)})})]})});S1e.displayName="ChartTooltip";const C1e=S.forwardRef(({className:t,hideIcon:e=!1,payload:n,verticalAlign:r="bottom",nameKey:s},i)=>{const{config:o}=hG();return n!=null&&n.length?w.jsx("div",{ref:i,className:ie("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",t),children:n.map(a=>{const c=`${s||a.dataKey||"value"}`,u=OM(o,a,c);return w.jsxs("div",{className:ie("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[u!=null&&u.icon&&!e?w.jsx(u.icon,{}):w.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:a.color}}),u==null?void 0:u.label]},a.value)})}):null});C1e.displayName="ChartLegend";function OM(t,e,n){if(typeof e!="object"||e===null)return;const r="payload"in e&&typeof e.payload=="object"&&e.payload!==null?e.payload:void 0;let s=n;return n in e&&typeof e[n]=="string"?s=e[n]:r&&n in r&&typeof r[n]=="string"&&(s=r[n]),s in t?t[s]:t[n]}function xy(t){const e=S.useRef({value:t,previous:t});return S.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function x_(t){const[e,n]=S.useState(void 0);return ir(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,a=u.blockSize}else o=t.offsetWidth,a=t.offsetHeight;n({width:o,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var WL="Checkbox",[E1e,kUe]=In(WL),[R1e,A1e]=E1e(WL),pG=S.forwardRef((t,e)=>{const{__scopeCheckbox:n,name:r,checked:s,defaultChecked:i,required:o,disabled:a,value:c="on",onCheckedChange:u,...f}=t,[l,d]=S.useState(null),p=Je(e,b=>d(b)),h=S.useRef(!1),m=l?!!l.closest("form"):!0,[y=!1,g]=mr({prop:s,defaultProp:i,onChange:u}),v=S.useRef(y);return S.useEffect(()=>{const b=l==null?void 0:l.form;if(b){const _=()=>g(v.current);return b.addEventListener("reset",_),()=>b.removeEventListener("reset",_)}},[l,g]),w.jsxs(R1e,{scope:n,state:y,disabled:a,children:[w.jsx(De.button,{type:"button",role:"checkbox","aria-checked":dp(y)?"mixed":y,"aria-required":o,"data-state":vG(y),"data-disabled":a?"":void 0,disabled:a,value:c,...f,ref:p,onKeyDown:ye(t.onKeyDown,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:ye(t.onClick,b=>{g(_=>dp(_)?!0:!_),m&&(h.current=b.isPropagationStopped(),h.current||b.stopPropagation())})}),m&&w.jsx(P1e,{control:l,bubbles:!h.current,name:r,value:c,checked:y,required:o,disabled:a,style:{transform:"translateX(-100%)"}})]})});pG.displayName=WL;var mG="CheckboxIndicator",gG=S.forwardRef((t,e)=>{const{__scopeCheckbox:n,forceMount:r,...s}=t,i=A1e(mG,n);return w.jsx(Kn,{present:r||dp(i.state)||i.state===!0,children:w.jsx(De.span,{"data-state":vG(i.state),"data-disabled":i.disabled?"":void 0,...s,ref:e,style:{pointerEvents:"none",...t.style}})})});gG.displayName=mG;var P1e=t=>{const{control:e,checked:n,bubbles:r=!0,...s}=t,i=S.useRef(null),o=xy(n),a=x_(e);return S.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==n&&l){const d=new Event("click",{bubbles:r});c.indeterminate=dp(n),l.call(c,dp(n)?!1:n),c.dispatchEvent(d)}},[o,n,r]),w.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:dp(n)?!1:n,...s,tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function dp(t){return t==="indeterminate"}function vG(t){return dp(t)?"indeterminate":t?"checked":"unchecked"}var yG=pG,N1e=gG;const ix=S.forwardRef(({className:t,...e},n)=>w.jsx(yG,{ref:n,className:ie("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",t),...e,children:w.jsx(N1e,{className:ie("flex items-center justify-center text-current"),children:w.jsx(u_,{className:"h-4 w-4"})})}));ix.displayName=yG.displayName;var t5=1,T1e=.9,k1e=.8,D1e=.17,rk=.1,sk=.999,M1e=.9999,O1e=.99,I1e=/[\\\/_+.#"@\[\(\{&]/,j1e=/[\\\/_+.#"@\[\(\{&]/g,L1e=/[\s-]/,bG=/[\s-]/g;function IM(t,e,n,r,s,i,o){if(i===e.length)return s===t.length?t5:O1e;var a=`${s},${i}`;if(o[a]!==void 0)return o[a];for(var c=r.charAt(i),u=n.indexOf(c,s),f=0,l,d,p,h;u>=0;)l=IM(t,e,n,r,u+1,i+1,o),l>f&&(u===s?l*=t5:I1e.test(t.charAt(u-1))?(l*=k1e,p=t.slice(s,u-1).match(j1e),p&&s>0&&(l*=Math.pow(sk,p.length))):L1e.test(t.charAt(u-1))?(l*=T1e,h=t.slice(s,u-1).match(bG),h&&s>0&&(l*=Math.pow(sk,h.length))):(l*=D1e,s>0&&(l*=Math.pow(sk,u-s))),t.charAt(u)!==e.charAt(i)&&(l*=M1e)),(l l&&(l=d*rk)),l>f&&(f=l),u=n.indexOf(c,u+1);return o[a]=f,f}function n5(t){return t.toLowerCase().replace(bG," ")}function $1e(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,IM(t,e,n5(t),n5(e),0,0,{})}function ii(){return ii=Object.assign?Object.assign.bind():function(t){for(var e=1;e t.forEach(n=>F1e(n,e))}function w_(...t){return S.useCallback(xG(...t),t)}function z1e(t,e=[]){let n=[];function r(i,o){const a=S.createContext(o),c=n.length;n=[...n,o];function u(l){const{scope:d,children:p,...h}=l,m=(d==null?void 0:d[t][c])||a,y=S.useMemo(()=>h,Object.values(h));return S.createElement(m.Provider,{value:y},p)}function f(l,d){const p=(d==null?void 0:d[t][c])||a,h=S.useContext(p);if(h)return h;if(o!==void 0)return o;throw new Error(`\`${l}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const s=()=>{const i=n.map(o=>S.createContext(o));return function(a){const c=(a==null?void 0:a[t])||i;return S.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return s.scopeName=t,[r,B1e(s,...e)]}function B1e(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:c,scopeName:u})=>{const l=c(i)[`__scope${u}`];return{...a,...l}},{});return S.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}const jM=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},U1e=s_.useId||(()=>{});let H1e=0;function ik(t){const[e,n]=S.useState(U1e());return jM(()=>{t||n(r=>r??String(H1e++))},[t]),t||(e?`radix-${e}`:"")}function Cp(t){const e=S.useRef(t);return S.useEffect(()=>{e.current=t}),S.useMemo(()=>(...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function V1e({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,s]=q1e({defaultProp:e,onChange:n}),i=t!==void 0,o=i?t:r,a=Cp(n),c=S.useCallback(u=>{if(i){const l=typeof u=="function"?u(t):u;l!==t&&a(l)}else s(u)},[i,t,s,a]);return[o,c]}function q1e({defaultProp:t,onChange:e}){const n=S.useState(t),[r]=n,s=S.useRef(r),i=Cp(e);return S.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}const GL=S.forwardRef((t,e)=>{const{children:n,...r}=t,s=S.Children.toArray(n),i=s.find(G1e);if(i){const o=i.props.children,a=s.map(c=>c===i?S.Children.count(o)>1?S.Children.only(null):S.isValidElement(o)?o.props.children:null:c);return S.createElement(LM,ii({},r,{ref:e}),S.isValidElement(o)?S.cloneElement(o,void 0,a):null)}return S.createElement(LM,ii({},r,{ref:e}),n)});GL.displayName="Slot";const LM=S.forwardRef((t,e)=>{const{children:n,...r}=t;return S.isValidElement(n)?S.cloneElement(n,{...K1e(r,n.props),ref:e?xG(e,n.ref):n.ref}):S.Children.count(n)>1?S.Children.only(null):null});LM.displayName="SlotClone";const W1e=({children:t})=>S.createElement(S.Fragment,null,t);function G1e(t){return S.isValidElement(t)&&t.type===W1e}function K1e(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{i(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}const Y1e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],aa=Y1e.reduce((t,e)=>{const n=S.forwardRef((r,s)=>{const{asChild:i,...o}=r,a=i?GL:e;return S.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),S.createElement(a,ii({},o,{ref:s}))});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function X1e(t,e){t&&rs.flushSync(()=>t.dispatchEvent(e))}function Q1e(t,e=globalThis==null?void 0:globalThis.document){const n=Cp(t);S.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r),()=>e.removeEventListener("keydown",r)},[n,e])}const $M="dismissableLayer.update",Z1e="dismissableLayer.pointerDownOutside",J1e="dismissableLayer.focusOutside";let r5;const eCe=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),tCe=S.forwardRef((t,e)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:c,...u}=t,f=S.useContext(eCe),[l,d]=S.useState(null),p=(n=l==null?void 0:l.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=S.useState({}),m=w_(e,E=>d(E)),y=Array.from(f.layers),[g]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(g),b=l?y.indexOf(l):-1,_=f.layersWithOutsidePointerEventsDisabled.size>0,R=b>=v,P=nCe(E=>{const N=E.target,k=[...f.branches].some(M=>M.contains(N));!R||k||(i==null||i(E),a==null||a(E),E.defaultPrevented||c==null||c())},p),T=rCe(E=>{const N=E.target;[...f.branches].some(M=>M.contains(N))||(o==null||o(E),a==null||a(E),E.defaultPrevented||c==null||c())},p);return Q1e(E=>{b===f.layers.size-1&&(s==null||s(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},p),S.useEffect(()=>{if(l)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(r5=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(l)),f.layers.add(l),s5(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=r5)}},[l,p,r,f]),S.useEffect(()=>()=>{l&&(f.layers.delete(l),f.layersWithOutsidePointerEventsDisabled.delete(l),s5())},[l,f]),S.useEffect(()=>{const E=()=>h({});return document.addEventListener($M,E),()=>document.removeEventListener($M,E)},[]),S.createElement(aa.div,ii({},u,{ref:m,style:{pointerEvents:_?R?"auto":"none":void 0,...t.style},onFocusCapture:pg(t.onFocusCapture,T.onFocusCapture),onBlurCapture:pg(t.onBlurCapture,T.onBlurCapture),onPointerDownCapture:pg(t.onPointerDownCapture,P.onPointerDownCapture)}))});function nCe(t,e=globalThis==null?void 0:globalThis.document){const n=Cp(t),r=S.useRef(!1),s=S.useRef(()=>{});return S.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let f=function(){wG(Z1e,n,u,{discrete:!0})};var c=f;const u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=f,e.addEventListener("click",s.current,{once:!0})):f()}else e.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function rCe(t,e=globalThis==null?void 0:globalThis.document){const n=Cp(t),r=S.useRef(!1);return S.useEffect(()=>{const s=i=>{i.target&&!r.current&&wG(J1e,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function s5(){const t=new CustomEvent($M);document.dispatchEvent(t)}function wG(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?X1e(s,i):s.dispatchEvent(i)}const ok="focusScope.autoFocusOnMount",ak="focusScope.autoFocusOnUnmount",i5={bubbles:!1,cancelable:!0},sCe=S.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,c]=S.useState(null),u=Cp(s),f=Cp(i),l=S.useRef(null),d=w_(e,m=>c(m)),p=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(r){let v=function(P){if(p.paused||!a)return;const T=P.target;a.contains(T)?l.current=T:Yu(l.current,{select:!0})},b=function(P){if(p.paused||!a)return;const T=P.relatedTarget;T!==null&&(a.contains(T)||Yu(l.current,{select:!0}))},_=function(P){if(document.activeElement===document.body)for(const E of P)E.removedNodes.length>0&&Yu(a)};var m=v,y=b,g=_;document.addEventListener("focusin",v),document.addEventListener("focusout",b);const R=new MutationObserver(_);return a&&R.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),R.disconnect()}}},[r,a,p.paused]),S.useEffect(()=>{if(a){a5.add(p);const m=document.activeElement;if(!a.contains(m)){const g=new CustomEvent(ok,i5);a.addEventListener(ok,u),a.dispatchEvent(g),g.defaultPrevented||(iCe(uCe(_G(a)),{select:!0}),document.activeElement===m&&Yu(a))}return()=>{a.removeEventListener(ok,u),setTimeout(()=>{const g=new CustomEvent(ak,i5);a.addEventListener(ak,f),a.dispatchEvent(g),g.defaultPrevented||Yu(m??document.body,{select:!0}),a.removeEventListener(ak,f),a5.remove(p)},0)}}},[a,u,f,p]);const h=S.useCallback(m=>{if(!n&&!r||p.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(y&&g){const v=m.currentTarget,[b,_]=oCe(v);b&&_?!m.shiftKey&&g===_?(m.preventDefault(),n&&Yu(b,{select:!0})):m.shiftKey&&g===b&&(m.preventDefault(),n&&Yu(_,{select:!0})):g===v&&m.preventDefault()}},[n,r,p.paused]);return S.createElement(aa.div,ii({tabIndex:-1},o,{ref:d,onKeyDown:h}))});function iCe(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Yu(r,{select:e}),document.activeElement!==n)return}function oCe(t){const e=_G(t),n=o5(e,t),r=o5(e.reverse(),t);return[n,r]}function _G(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function o5(t,e){for(const n of t)if(!aCe(n,{upTo:e}))return n}function aCe(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function lCe(t){return t instanceof HTMLInputElement&&"select"in t}function Yu(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&lCe(t)&&e&&t.select()}}const a5=cCe();function cCe(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=l5(t,e),t.unshift(e)},remove(e){var n;t=l5(t,e),(n=t[0])===null||n===void 0||n.resume()}}}function l5(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function uCe(t){return t.filter(e=>e.tagName!=="A")}const dCe=S.forwardRef((t,e)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...s}=t;return r?GR.createPortal(S.createElement(aa.div,ii({},s,{ref:e})),r):null});function fCe(t,e){return S.useReducer((n,r)=>{const s=e[n][r];return s??n},t)}const DA=t=>{const{present:e,children:n}=t,r=hCe(e),s=typeof n=="function"?n({present:r.isPresent}):S.Children.only(n),i=w_(r.ref,s.ref);return typeof n=="function"||r.isPresent?S.cloneElement(s,{ref:i}):null};DA.displayName="Presence";function hCe(t){const[e,n]=S.useState(),r=S.useRef({}),s=S.useRef(t),i=S.useRef("none"),o=t?"mounted":"unmounted",[a,c]=fCe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const u=g1(r.current);i.current=a==="mounted"?u:"none"},[a]),jM(()=>{const u=r.current,f=s.current;if(f!==t){const d=i.current,p=g1(u);t?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&d!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),jM(()=>{if(e){const u=l=>{const p=g1(r.current).includes(l.animationName);l.target===e&&p&&rs.flushSync(()=>c("ANIMATION_END"))},f=l=>{l.target===e&&(i.current=g1(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",u),e.addEventListener("animationend",u),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",u),e.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:S.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function g1(t){return(t==null?void 0:t.animationName)||"none"}let lk=0;function pCe(){S.useEffect(()=>{var t,e;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=n[0])!==null&&t!==void 0?t:c5()),document.body.insertAdjacentElement("beforeend",(e=n[1])!==null&&e!==void 0?e:c5()),lk++,()=>{lk===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),lk--}},[])}function c5(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}var SG=$q(),ck=function(){},MA=S.forwardRef(function(t,e){var n=S.useRef(null),r=S.useState({onScrollCapture:ck,onWheelCapture:ck,onTouchMoveCapture:ck}),s=r[0],i=r[1],o=t.forwardProps,a=t.children,c=t.className,u=t.removeScrollBar,f=t.enabled,l=t.shards,d=t.sideCar,p=t.noIsolation,h=t.inert,m=t.allowPinchZoom,y=t.as,g=y===void 0?"div":y,v=bL(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),b=d,_=Lq([n,e]),R=Ms(Ms({},v),s);return S.createElement(S.Fragment,null,f&&S.createElement(b,{sideCar:SG,removeScrollBar:u,shards:l,noIsolation:p,inert:h,setCallbacks:i,allowPinchZoom:!!m,lockRef:n}),o?S.cloneElement(S.Children.only(a),Ms(Ms({},R),{ref:_})):S.createElement(g,Ms({},R,{className:c,ref:_}),a))});MA.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};MA.classNames={fullWidth:x0,zeroRight:b0};var FM=!1;if(typeof window<"u")try{var v1=Object.defineProperty({},"passive",{get:function(){return FM=!0,!0}});window.addEventListener("test",v1,v1),window.removeEventListener("test",v1,v1)}catch{FM=!1}var _m=FM?{passive:!1}:!1,mCe=function(t){return t.tagName==="TEXTAREA"},CG=function(t,e){var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!mCe(t)&&n[e]==="visible")},gCe=function(t){return CG(t,"overflowY")},vCe=function(t){return CG(t,"overflowX")},u5=function(t,e){var n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=EG(t,n);if(r){var s=RG(t,n),i=s[1],o=s[2];if(i>o)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},yCe=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},bCe=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},EG=function(t,e){return t==="v"?gCe(e):vCe(e)},RG=function(t,e){return t==="v"?yCe(e):bCe(e)},xCe=function(t,e){return t==="h"&&e==="rtl"?-1:1},wCe=function(t,e,n,r,s){var i=xCe(t,window.getComputedStyle(e).direction),o=i*r,a=n.target,c=e.contains(a),u=!1,f=o>0,l=0,d=0;do{var p=RG(t,a),h=p[0],m=p[1],y=p[2],g=m-y-i*h;(h||g)&&EG(t,a)&&(l+=g,d+=h),a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(f&&(l===0||!s)||!f&&(d===0||!s))&&(u=!0),u},y1=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},d5=function(t){return[t.deltaX,t.deltaY]},f5=function(t){return t&&"current"in t?t.current:t},_Ce=function(t,e){return t[0]===e[0]&&t[1]===e[1]},SCe=function(t){return` +`)}}):null},C1e=S.forwardRef(({active:t,payload:e,className:n,indicator:r="dot",hideLabel:s=!1,hideIndicator:i=!1,label:o,labelFormatter:a,labelClassName:c,formatter:u,color:f,nameKey:l,labelKey:d},p)=>{const{config:h}=pG(),m=S.useMemo(()=>{var R;if(s||!(e!=null&&e.length))return null;const[g]=e,v=`${d||g.dataKey||g.name||"value"}`,b=OM(h,g,v),_=!d&&typeof o=="string"?((R=h[o])==null?void 0:R.label)||o:b==null?void 0:b.label;return a?w.jsx("div",{className:ie("font-medium",c),children:a(_,e)}):_?w.jsx("div",{className:ie("font-medium",c),children:_}):null},[o,a,e,s,c,h,d]);if(!t||!(e!=null&&e.length))return null;const y=e.length===1&&r!=="dot";return w.jsxs("div",{ref:p,className:ie("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",n),children:[y?null:m,w.jsx("div",{className:"grid gap-1.5",children:e.map((g,v)=>{const b=`${l||g.name||g.dataKey||"value"}`,_=OM(h,g,b),R=f||g.payload.fill||g.color;return w.jsx("div",{className:ie("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",r==="dot"&&"items-center"),children:u&&(g==null?void 0:g.value)!==void 0&&g.name?u(g.value,g.name,g,v,g.payload):w.jsxs(w.Fragment,{children:[_!=null&&_.icon?w.jsx(_.icon,{}):!i&&w.jsx("div",{className:ie("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":y&&r==="dashed"}),style:{"--color-bg":R,"--color-border":R}}),w.jsxs("div",{className:ie("flex flex-1 justify-between leading-none",y?"items-end":"items-center"),children:[w.jsxs("div",{className:"grid gap-1.5",children:[y?m:null,w.jsx("span",{className:"text-muted-foreground",children:(_==null?void 0:_.label)||g.name})]}),g.value&&w.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:g.value.toLocaleString()})]})]})},g.dataKey)})})]})});C1e.displayName="ChartTooltip";const E1e=S.forwardRef(({className:t,hideIcon:e=!1,payload:n,verticalAlign:r="bottom",nameKey:s},i)=>{const{config:o}=pG();return n!=null&&n.length?w.jsx("div",{ref:i,className:ie("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",t),children:n.map(a=>{const c=`${s||a.dataKey||"value"}`,u=OM(o,a,c);return w.jsxs("div",{className:ie("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[u!=null&&u.icon&&!e?w.jsx(u.icon,{}):w.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:a.color}}),u==null?void 0:u.label]},a.value)})}):null});E1e.displayName="ChartLegend";function OM(t,e,n){if(typeof e!="object"||e===null)return;const r="payload"in e&&typeof e.payload=="object"&&e.payload!==null?e.payload:void 0;let s=n;return n in e&&typeof e[n]=="string"?s=e[n]:r&&n in r&&typeof r[n]=="string"&&(s=r[n]),s in t?t[s]:t[n]}function xy(t){const e=S.useRef({value:t,previous:t});return S.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function x_(t){const[e,n]=S.useState(void 0);return ir(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,a=u.blockSize}else o=t.offsetWidth,a=t.offsetHeight;n({width:o,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var WL="Checkbox",[R1e,DUe]=In(WL),[A1e,P1e]=R1e(WL),mG=S.forwardRef((t,e)=>{const{__scopeCheckbox:n,name:r,checked:s,defaultChecked:i,required:o,disabled:a,value:c="on",onCheckedChange:u,...f}=t,[l,d]=S.useState(null),p=Je(e,b=>d(b)),h=S.useRef(!1),m=l?!!l.closest("form"):!0,[y=!1,g]=mr({prop:s,defaultProp:i,onChange:u}),v=S.useRef(y);return S.useEffect(()=>{const b=l==null?void 0:l.form;if(b){const _=()=>g(v.current);return b.addEventListener("reset",_),()=>b.removeEventListener("reset",_)}},[l,g]),w.jsxs(A1e,{scope:n,state:y,disabled:a,children:[w.jsx(De.button,{type:"button",role:"checkbox","aria-checked":dp(y)?"mixed":y,"aria-required":o,"data-state":yG(y),"data-disabled":a?"":void 0,disabled:a,value:c,...f,ref:p,onKeyDown:ye(t.onKeyDown,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:ye(t.onClick,b=>{g(_=>dp(_)?!0:!_),m&&(h.current=b.isPropagationStopped(),h.current||b.stopPropagation())})}),m&&w.jsx(N1e,{control:l,bubbles:!h.current,name:r,value:c,checked:y,required:o,disabled:a,style:{transform:"translateX(-100%)"}})]})});mG.displayName=WL;var gG="CheckboxIndicator",vG=S.forwardRef((t,e)=>{const{__scopeCheckbox:n,forceMount:r,...s}=t,i=P1e(gG,n);return w.jsx(Kn,{present:r||dp(i.state)||i.state===!0,children:w.jsx(De.span,{"data-state":yG(i.state),"data-disabled":i.disabled?"":void 0,...s,ref:e,style:{pointerEvents:"none",...t.style}})})});vG.displayName=gG;var N1e=t=>{const{control:e,checked:n,bubbles:r=!0,...s}=t,i=S.useRef(null),o=xy(n),a=x_(e);return S.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==n&&l){const d=new Event("click",{bubbles:r});c.indeterminate=dp(n),l.call(c,dp(n)?!1:n),c.dispatchEvent(d)}},[o,n,r]),w.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:dp(n)?!1:n,...s,tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function dp(t){return t==="indeterminate"}function yG(t){return dp(t)?"indeterminate":t?"checked":"unchecked"}var bG=mG,T1e=vG;const ix=S.forwardRef(({className:t,...e},n)=>w.jsx(bG,{ref:n,className:ie("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",t),...e,children:w.jsx(T1e,{className:ie("flex items-center justify-center text-current"),children:w.jsx(u_,{className:"h-4 w-4"})})}));ix.displayName=bG.displayName;var e5=1,k1e=.9,D1e=.8,M1e=.17,sk=.1,ik=.999,O1e=.9999,I1e=.99,j1e=/[\\\/_+.#"@\[\(\{&]/,L1e=/[\\\/_+.#"@\[\(\{&]/g,$1e=/[\s-]/,xG=/[\s-]/g;function IM(t,e,n,r,s,i,o){if(i===e.length)return s===t.length?e5:I1e;var a=`${s},${i}`;if(o[a]!==void 0)return o[a];for(var c=r.charAt(i),u=n.indexOf(c,s),f=0,l,d,p,h;u>=0;)l=IM(t,e,n,r,u+1,i+1,o),l>f&&(u===s?l*=e5:j1e.test(t.charAt(u-1))?(l*=D1e,p=t.slice(s,u-1).match(L1e),p&&s>0&&(l*=Math.pow(ik,p.length))):$1e.test(t.charAt(u-1))?(l*=k1e,h=t.slice(s,u-1).match(xG),h&&s>0&&(l*=Math.pow(ik,h.length))):(l*=M1e,s>0&&(l*=Math.pow(ik,u-s))),t.charAt(u)!==e.charAt(i)&&(l*=O1e)),(l l&&(l=d*sk)),l>f&&(f=l),u=n.indexOf(c,u+1);return o[a]=f,f}function t5(t){return t.toLowerCase().replace(xG," ")}function F1e(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,IM(t,e,t5(t),t5(e),0,0,{})}function ii(){return ii=Object.assign?Object.assign.bind():function(t){for(var e=1;e t.forEach(n=>z1e(n,e))}function w_(...t){return S.useCallback(wG(...t),t)}function B1e(t,e=[]){let n=[];function r(i,o){const a=S.createContext(o),c=n.length;n=[...n,o];function u(l){const{scope:d,children:p,...h}=l,m=(d==null?void 0:d[t][c])||a,y=S.useMemo(()=>h,Object.values(h));return S.createElement(m.Provider,{value:y},p)}function f(l,d){const p=(d==null?void 0:d[t][c])||a,h=S.useContext(p);if(h)return h;if(o!==void 0)return o;throw new Error(`\`${l}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const s=()=>{const i=n.map(o=>S.createContext(o));return function(a){const c=(a==null?void 0:a[t])||i;return S.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return s.scopeName=t,[r,U1e(s,...e)]}function U1e(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:c,scopeName:u})=>{const l=c(i)[`__scope${u}`];return{...a,...l}},{});return S.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}const jM=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},H1e=s_.useId||(()=>{});let V1e=0;function ok(t){const[e,n]=S.useState(H1e());return jM(()=>{t||n(r=>r??String(V1e++))},[t]),t||(e?`radix-${e}`:"")}function Cp(t){const e=S.useRef(t);return S.useEffect(()=>{e.current=t}),S.useMemo(()=>(...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function q1e({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,s]=W1e({defaultProp:e,onChange:n}),i=t!==void 0,o=i?t:r,a=Cp(n),c=S.useCallback(u=>{if(i){const l=typeof u=="function"?u(t):u;l!==t&&a(l)}else s(u)},[i,t,s,a]);return[o,c]}function W1e({defaultProp:t,onChange:e}){const n=S.useState(t),[r]=n,s=S.useRef(r),i=Cp(e);return S.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}const GL=S.forwardRef((t,e)=>{const{children:n,...r}=t,s=S.Children.toArray(n),i=s.find(K1e);if(i){const o=i.props.children,a=s.map(c=>c===i?S.Children.count(o)>1?S.Children.only(null):S.isValidElement(o)?o.props.children:null:c);return S.createElement(LM,ii({},r,{ref:e}),S.isValidElement(o)?S.cloneElement(o,void 0,a):null)}return S.createElement(LM,ii({},r,{ref:e}),n)});GL.displayName="Slot";const LM=S.forwardRef((t,e)=>{const{children:n,...r}=t;return S.isValidElement(n)?S.cloneElement(n,{...Y1e(r,n.props),ref:e?wG(e,n.ref):n.ref}):S.Children.count(n)>1?S.Children.only(null):null});LM.displayName="SlotClone";const G1e=({children:t})=>S.createElement(S.Fragment,null,t);function K1e(t){return S.isValidElement(t)&&t.type===G1e}function Y1e(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{i(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}const X1e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],aa=X1e.reduce((t,e)=>{const n=S.forwardRef((r,s)=>{const{asChild:i,...o}=r,a=i?GL:e;return S.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),S.createElement(a,ii({},o,{ref:s}))});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function Q1e(t,e){t&&rs.flushSync(()=>t.dispatchEvent(e))}function Z1e(t,e=globalThis==null?void 0:globalThis.document){const n=Cp(t);S.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r),()=>e.removeEventListener("keydown",r)},[n,e])}const $M="dismissableLayer.update",J1e="dismissableLayer.pointerDownOutside",eCe="dismissableLayer.focusOutside";let n5;const tCe=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nCe=S.forwardRef((t,e)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:c,...u}=t,f=S.useContext(tCe),[l,d]=S.useState(null),p=(n=l==null?void 0:l.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=S.useState({}),m=w_(e,E=>d(E)),y=Array.from(f.layers),[g]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(g),b=l?y.indexOf(l):-1,_=f.layersWithOutsidePointerEventsDisabled.size>0,R=b>=v,P=rCe(E=>{const N=E.target,k=[...f.branches].some(M=>M.contains(N));!R||k||(i==null||i(E),a==null||a(E),E.defaultPrevented||c==null||c())},p),T=sCe(E=>{const N=E.target;[...f.branches].some(M=>M.contains(N))||(o==null||o(E),a==null||a(E),E.defaultPrevented||c==null||c())},p);return Z1e(E=>{b===f.layers.size-1&&(s==null||s(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},p),S.useEffect(()=>{if(l)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(n5=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(l)),f.layers.add(l),r5(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=n5)}},[l,p,r,f]),S.useEffect(()=>()=>{l&&(f.layers.delete(l),f.layersWithOutsidePointerEventsDisabled.delete(l),r5())},[l,f]),S.useEffect(()=>{const E=()=>h({});return document.addEventListener($M,E),()=>document.removeEventListener($M,E)},[]),S.createElement(aa.div,ii({},u,{ref:m,style:{pointerEvents:_?R?"auto":"none":void 0,...t.style},onFocusCapture:pg(t.onFocusCapture,T.onFocusCapture),onBlurCapture:pg(t.onBlurCapture,T.onBlurCapture),onPointerDownCapture:pg(t.onPointerDownCapture,P.onPointerDownCapture)}))});function rCe(t,e=globalThis==null?void 0:globalThis.document){const n=Cp(t),r=S.useRef(!1),s=S.useRef(()=>{});return S.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let f=function(){_G(J1e,n,u,{discrete:!0})};var c=f;const u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=f,e.addEventListener("click",s.current,{once:!0})):f()}else e.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function sCe(t,e=globalThis==null?void 0:globalThis.document){const n=Cp(t),r=S.useRef(!1);return S.useEffect(()=>{const s=i=>{i.target&&!r.current&&_G(eCe,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function r5(){const t=new CustomEvent($M);document.dispatchEvent(t)}function _G(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?Q1e(s,i):s.dispatchEvent(i)}const ak="focusScope.autoFocusOnMount",lk="focusScope.autoFocusOnUnmount",s5={bubbles:!1,cancelable:!0},iCe=S.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,c]=S.useState(null),u=Cp(s),f=Cp(i),l=S.useRef(null),d=w_(e,m=>c(m)),p=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(r){let v=function(P){if(p.paused||!a)return;const T=P.target;a.contains(T)?l.current=T:Yu(l.current,{select:!0})},b=function(P){if(p.paused||!a)return;const T=P.relatedTarget;T!==null&&(a.contains(T)||Yu(l.current,{select:!0}))},_=function(P){if(document.activeElement===document.body)for(const E of P)E.removedNodes.length>0&&Yu(a)};var m=v,y=b,g=_;document.addEventListener("focusin",v),document.addEventListener("focusout",b);const R=new MutationObserver(_);return a&&R.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),R.disconnect()}}},[r,a,p.paused]),S.useEffect(()=>{if(a){o5.add(p);const m=document.activeElement;if(!a.contains(m)){const g=new CustomEvent(ak,s5);a.addEventListener(ak,u),a.dispatchEvent(g),g.defaultPrevented||(oCe(dCe(SG(a)),{select:!0}),document.activeElement===m&&Yu(a))}return()=>{a.removeEventListener(ak,u),setTimeout(()=>{const g=new CustomEvent(lk,s5);a.addEventListener(lk,f),a.dispatchEvent(g),g.defaultPrevented||Yu(m??document.body,{select:!0}),a.removeEventListener(lk,f),o5.remove(p)},0)}}},[a,u,f,p]);const h=S.useCallback(m=>{if(!n&&!r||p.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(y&&g){const v=m.currentTarget,[b,_]=aCe(v);b&&_?!m.shiftKey&&g===_?(m.preventDefault(),n&&Yu(b,{select:!0})):m.shiftKey&&g===b&&(m.preventDefault(),n&&Yu(_,{select:!0})):g===v&&m.preventDefault()}},[n,r,p.paused]);return S.createElement(aa.div,ii({tabIndex:-1},o,{ref:d,onKeyDown:h}))});function oCe(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Yu(r,{select:e}),document.activeElement!==n)return}function aCe(t){const e=SG(t),n=i5(e,t),r=i5(e.reverse(),t);return[n,r]}function SG(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function i5(t,e){for(const n of t)if(!lCe(n,{upTo:e}))return n}function lCe(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function cCe(t){return t instanceof HTMLInputElement&&"select"in t}function Yu(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&cCe(t)&&e&&t.select()}}const o5=uCe();function uCe(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=a5(t,e),t.unshift(e)},remove(e){var n;t=a5(t,e),(n=t[0])===null||n===void 0||n.resume()}}}function a5(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function dCe(t){return t.filter(e=>e.tagName!=="A")}const fCe=S.forwardRef((t,e)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...s}=t;return r?KR.createPortal(S.createElement(aa.div,ii({},s,{ref:e})),r):null});function hCe(t,e){return S.useReducer((n,r)=>{const s=e[n][r];return s??n},t)}const MA=t=>{const{present:e,children:n}=t,r=pCe(e),s=typeof n=="function"?n({present:r.isPresent}):S.Children.only(n),i=w_(r.ref,s.ref);return typeof n=="function"||r.isPresent?S.cloneElement(s,{ref:i}):null};MA.displayName="Presence";function pCe(t){const[e,n]=S.useState(),r=S.useRef({}),s=S.useRef(t),i=S.useRef("none"),o=t?"mounted":"unmounted",[a,c]=hCe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const u=g1(r.current);i.current=a==="mounted"?u:"none"},[a]),jM(()=>{const u=r.current,f=s.current;if(f!==t){const d=i.current,p=g1(u);t?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&d!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),jM(()=>{if(e){const u=l=>{const p=g1(r.current).includes(l.animationName);l.target===e&&p&&rs.flushSync(()=>c("ANIMATION_END"))},f=l=>{l.target===e&&(i.current=g1(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",u),e.addEventListener("animationend",u),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",u),e.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:S.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function g1(t){return(t==null?void 0:t.animationName)||"none"}let ck=0;function mCe(){S.useEffect(()=>{var t,e;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=n[0])!==null&&t!==void 0?t:l5()),document.body.insertAdjacentElement("beforeend",(e=n[1])!==null&&e!==void 0?e:l5()),ck++,()=>{ck===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),ck--}},[])}function l5(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}var CG=Fq(),uk=function(){},OA=S.forwardRef(function(t,e){var n=S.useRef(null),r=S.useState({onScrollCapture:uk,onWheelCapture:uk,onTouchMoveCapture:uk}),s=r[0],i=r[1],o=t.forwardProps,a=t.children,c=t.className,u=t.removeScrollBar,f=t.enabled,l=t.shards,d=t.sideCar,p=t.noIsolation,h=t.inert,m=t.allowPinchZoom,y=t.as,g=y===void 0?"div":y,v=bL(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),b=d,_=$q([n,e]),R=Ms(Ms({},v),s);return S.createElement(S.Fragment,null,f&&S.createElement(b,{sideCar:CG,removeScrollBar:u,shards:l,noIsolation:p,inert:h,setCallbacks:i,allowPinchZoom:!!m,lockRef:n}),o?S.cloneElement(S.Children.only(a),Ms(Ms({},R),{ref:_})):S.createElement(g,Ms({},R,{className:c,ref:_}),a))});OA.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};OA.classNames={fullWidth:x0,zeroRight:b0};var FM=!1;if(typeof window<"u")try{var v1=Object.defineProperty({},"passive",{get:function(){return FM=!0,!0}});window.addEventListener("test",v1,v1),window.removeEventListener("test",v1,v1)}catch{FM=!1}var _m=FM?{passive:!1}:!1,gCe=function(t){return t.tagName==="TEXTAREA"},EG=function(t,e){var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!gCe(t)&&n[e]==="visible")},vCe=function(t){return EG(t,"overflowY")},yCe=function(t){return EG(t,"overflowX")},c5=function(t,e){var n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=RG(t,n);if(r){var s=AG(t,n),i=s[1],o=s[2];if(i>o)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},bCe=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},xCe=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},RG=function(t,e){return t==="v"?vCe(e):yCe(e)},AG=function(t,e){return t==="v"?bCe(e):xCe(e)},wCe=function(t,e){return t==="h"&&e==="rtl"?-1:1},_Ce=function(t,e,n,r,s){var i=wCe(t,window.getComputedStyle(e).direction),o=i*r,a=n.target,c=e.contains(a),u=!1,f=o>0,l=0,d=0;do{var p=AG(t,a),h=p[0],m=p[1],y=p[2],g=m-y-i*h;(h||g)&&RG(t,a)&&(l+=g,d+=h),a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(f&&(l===0||!s)||!f&&(d===0||!s))&&(u=!0),u},y1=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},u5=function(t){return[t.deltaX,t.deltaY]},d5=function(t){return t&&"current"in t?t.current:t},SCe=function(t,e){return t[0]===e[0]&&t[1]===e[1]},CCe=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},CCe=0,Sm=[];function ECe(t){var e=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),s=S.useState(CCe++)[0],i=S.useState(function(){return xL()})[0],o=S.useRef(t);S.useEffect(function(){o.current=t},[t]),S.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var m=jq([t.lockRef.current],(t.shards||[]).map(f5),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=S.useCallback(function(m,y){if("touches"in m&&m.touches.length===2)return!o.current.allowPinchZoom;var g=y1(m),v=n.current,b="deltaX"in m?m.deltaX:v[0]-g[0],_="deltaY"in m?m.deltaY:v[1]-g[1],R,P=m.target,T=Math.abs(b)>Math.abs(_)?"h":"v";if("touches"in m&&T==="h"&&P.type==="range")return!1;var E=u5(T,P);if(!E)return!0;if(E?R=T:(R=T==="v"?"h":"v",E=u5(T,P)),!E)return!1;if(!r.current&&"changedTouches"in m&&(b||_)&&(r.current=R),!R)return!0;var N=r.current||R;return wCe(N,y,m,N==="h"?b:_,!0)},[]),c=S.useCallback(function(m){var y=m;if(!(!Sm.length||Sm[Sm.length-1]!==i)){var g="deltaY"in y?d5(y):y1(y),v=e.current.filter(function(R){return R.name===y.type&&R.target===y.target&&_Ce(R.delta,g)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var b=(o.current.shards||[]).map(f5).filter(Boolean).filter(function(R){return R.contains(y.target)}),_=b.length>0?a(y,b[0]):!o.current.noIsolation;_&&y.cancelable&&y.preventDefault()}}},[]),u=S.useCallback(function(m,y,g,v){var b={name:m,delta:y,target:g,should:v};e.current.push(b),setTimeout(function(){e.current=e.current.filter(function(_){return _!==b})},1)},[]),f=S.useCallback(function(m){n.current=y1(m),r.current=void 0},[]),l=S.useCallback(function(m){u(m.type,d5(m),m.target,a(m,t.lockRef.current))},[]),d=S.useCallback(function(m){u(m.type,y1(m),m.target,a(m,t.lockRef.current))},[]);S.useEffect(function(){return Sm.push(i),t.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:d}),document.addEventListener("wheel",c,_m),document.addEventListener("touchmove",c,_m),document.addEventListener("touchstart",f,_m),function(){Sm=Sm.filter(function(m){return m!==i}),document.removeEventListener("wheel",c,_m),document.removeEventListener("touchmove",c,_m),document.removeEventListener("touchstart",f,_m)}},[]);var p=t.removeScrollBar,h=t.inert;return S.createElement(S.Fragment,null,h?S.createElement(i,{styles:SCe(s)}):null,p?S.createElement(Uq,{gapMode:"margin"}):null)}const RCe=zq(SG,ECe);var AG=S.forwardRef(function(t,e){return S.createElement(MA,Ms({},t,{ref:e,sideCar:RCe}))});AG.classNames=MA.classNames;const PG="Dialog",[NG,DUe]=z1e(PG),[ACe,Hp]=NG(PG),PCe=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!0}=t,a=S.useRef(null),c=S.useRef(null),[u=!1,f]=V1e({prop:r,defaultProp:s,onChange:i});return S.createElement(ACe,{scope:e,triggerRef:a,contentRef:c,contentId:ik(),titleId:ik(),descriptionId:ik(),open:u,onOpenChange:f,onOpenToggle:S.useCallback(()=>f(l=>!l),[f]),modal:o},n)},TG="DialogPortal",[NCe,kG]=NG(TG,{forceMount:void 0}),TCe=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,i=Hp(TG,e);return S.createElement(NCe,{scope:e,forceMount:n},S.Children.map(r,o=>S.createElement(DA,{present:n||i.open},S.createElement(dCe,{asChild:!0,container:s},o))))},zM="DialogOverlay",kCe=S.forwardRef((t,e)=>{const n=kG(zM,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Hp(zM,t.__scopeDialog);return i.modal?S.createElement(DA,{present:r||i.open},S.createElement(DCe,ii({},s,{ref:e}))):null}),DCe=S.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Hp(zM,n);return S.createElement(AG,{as:GL,allowPinchZoom:!0,shards:[s.contentRef]},S.createElement(aa.div,ii({"data-state":MG(s.open)},r,{ref:e,style:{pointerEvents:"auto",...r.style}})))}),ox="DialogContent",MCe=S.forwardRef((t,e)=>{const n=kG(ox,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Hp(ox,t.__scopeDialog);return S.createElement(DA,{present:r||i.open},i.modal?S.createElement(OCe,ii({},s,{ref:e})):S.createElement(ICe,ii({},s,{ref:e})))}),OCe=S.forwardRef((t,e)=>{const n=Hp(ox,t.__scopeDialog),r=S.useRef(null),s=w_(e,n.contentRef,r);return S.useEffect(()=>{const i=r.current;if(i)return p_(i)},[]),S.createElement(DG,ii({},t,{ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pg(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:pg(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:pg(t.onFocusOutside,i=>i.preventDefault())}))}),ICe=S.forwardRef((t,e)=>{const n=Hp(ox,t.__scopeDialog),r=S.useRef(!1),s=S.useRef(!1);return S.createElement(DG,ii({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1,s.current=!1},onInteractOutside:i=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}}))}),DG=S.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=Hp(ox,n),c=S.useRef(null),u=w_(e,c);return pCe(),S.createElement(S.Fragment,null,S.createElement(sCe,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i},S.createElement(tCe,ii({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":MG(a.open)},o,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)});function MG(t){return t?"open":"closed"}const jCe=PCe,LCe=TCe,$Ce=kCe,FCe=MCe;var wb='[cmdk-group=""]',uk='[cmdk-group-items=""]',zCe='[cmdk-group-heading=""]',KL='[cmdk-item=""]',h5=`${KL}:not([aria-disabled="true"])`,BM="cmdk-item-select",Gf="data-value",BCe=(t,e,n)=>$1e(t,e,n),OG=S.createContext(void 0),__=()=>S.useContext(OG),IG=S.createContext(void 0),YL=()=>S.useContext(IG),jG=S.createContext(void 0),LG=S.forwardRef((t,e)=>{let n=Dm(()=>{var G,Y;return{search:"",value:(Y=(G=t.value)!=null?G:t.defaultValue)!=null?Y:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=Dm(()=>new Set),s=Dm(()=>new Map),i=Dm(()=>new Map),o=Dm(()=>new Set),a=$G(t),{label:c,children:u,value:f,onValueChange:l,filter:d,shouldFilter:p,loop:h,disablePointerSelection:m=!1,vimBindings:y=!0,...g}=t,v=S.useId(),b=S.useId(),_=S.useId(),R=S.useRef(null),P=ZCe();Ep(()=>{if(f!==void 0){let G=f.trim();n.current.value=G,T.emit()}},[f]),Ep(()=>{P(6,j)},[]);let T=S.useMemo(()=>({subscribe:G=>(o.current.add(G),()=>o.current.delete(G)),snapshot:()=>n.current,setState:(G,Y,Q)=>{var he,fe,ce;if(!Object.is(n.current[G],Y)){if(n.current[G]=Y,G==="search")I(),k(),P(1,M);else if(G==="value"&&(Q||P(5,j),((he=a.current)==null?void 0:he.value)!==void 0)){let xe=Y??"";(ce=(fe=a.current).onValueChange)==null||ce.call(fe,xe);return}T.emit()}},emit:()=>{o.current.forEach(G=>G())}}),[]),E=S.useMemo(()=>({value:(G,Y,Q)=>{var he;Y!==((he=i.current.get(G))==null?void 0:he.value)&&(i.current.set(G,{value:Y,keywords:Q}),n.current.filtered.items.set(G,N(Y,Q)),P(2,()=>{k(),T.emit()}))},item:(G,Y)=>(r.current.add(G),Y&&(s.current.has(Y)?s.current.get(Y).add(G):s.current.set(Y,new Set([G]))),P(3,()=>{I(),k(),n.current.value||M(),T.emit()}),()=>{i.current.delete(G),r.current.delete(G),n.current.filtered.items.delete(G);let Q=L();P(4,()=>{I(),(Q==null?void 0:Q.getAttribute("id"))===G&&M(),T.emit()})}),group:G=>(s.current.has(G)||s.current.set(G,new Set),()=>{i.current.delete(G),s.current.delete(G)}),filter:()=>a.current.shouldFilter,label:c||t["aria-label"],disablePointerSelection:m,listId:v,inputId:_,labelId:b,listInnerRef:R}),[]);function N(G,Y){var Q,he;let fe=(he=(Q=a.current)==null?void 0:Q.filter)!=null?he:BCe;return G?fe(G,n.current.search,Y):0}function k(){if(!n.current.search||a.current.shouldFilter===!1)return;let G=n.current.filtered.items,Y=[];n.current.filtered.groups.forEach(he=>{let fe=s.current.get(he),ce=0;fe.forEach(xe=>{let Pe=G.get(xe);ce=Math.max(Pe,ce)}),Y.push([he,ce])});let Q=R.current;U().sort((he,fe)=>{var ce,xe;let Pe=he.getAttribute("id"),pe=fe.getAttribute("id");return((ce=G.get(pe))!=null?ce:0)-((xe=G.get(Pe))!=null?xe:0)}).forEach(he=>{let fe=he.closest(uk);fe?fe.appendChild(he.parentElement===fe?he:he.closest(`${uk} > *`)):Q.appendChild(he.parentElement===Q?he:he.closest(`${uk} > *`))}),Y.sort((he,fe)=>fe[1]-he[1]).forEach(he=>{let fe=R.current.querySelector(`${wb}[${Gf}="${encodeURIComponent(he[0])}"]`);fe==null||fe.parentElement.appendChild(fe)})}function M(){let G=U().find(Q=>Q.getAttribute("aria-disabled")!=="true"),Y=G==null?void 0:G.getAttribute(Gf);T.setState("value",Y||void 0)}function I(){var G,Y,Q,he;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let fe=0;for(let ce of r.current){let xe=(Y=(G=i.current.get(ce))==null?void 0:G.value)!=null?Y:"",Pe=(he=(Q=i.current.get(ce))==null?void 0:Q.keywords)!=null?he:[],pe=N(xe,Pe);n.current.filtered.items.set(ce,pe),pe>0&&fe++}for(let[ce,xe]of s.current)for(let Pe of xe)if(n.current.filtered.items.get(Pe)>0){n.current.filtered.groups.add(ce);break}n.current.filtered.count=fe}function j(){var G,Y,Q;let he=L();he&&(((G=he.parentElement)==null?void 0:G.firstChild)===he&&((Q=(Y=he.closest(wb))==null?void 0:Y.querySelector(zCe))==null||Q.scrollIntoView({block:"nearest"})),he.scrollIntoView({block:"nearest"}))}function L(){var G;return(G=R.current)==null?void 0:G.querySelector(`${KL}[aria-selected="true"]`)}function U(){var G;return Array.from((G=R.current)==null?void 0:G.querySelectorAll(h5))}function K(G){let Y=U()[G];Y&&T.setState("value",Y.getAttribute(Gf))}function H(G){var Y;let Q=L(),he=U(),fe=he.findIndex(xe=>xe===Q),ce=he[fe+G];(Y=a.current)!=null&&Y.loop&&(ce=fe+G<0?he[he.length-1]:fe+G===he.length?he[0]:he[fe+G]),ce&&T.setState("value",ce.getAttribute(Gf))}function q(G){let Y=L(),Q=Y==null?void 0:Y.closest(wb),he;for(;Q&&!he;)Q=G>0?XCe(Q,wb):QCe(Q,wb),he=Q==null?void 0:Q.querySelector(h5);he?T.setState("value",he.getAttribute(Gf)):H(G)}let ee=()=>K(U().length-1),se=G=>{G.preventDefault(),G.metaKey?ee():G.altKey?q(1):H(1)},X=G=>{G.preventDefault(),G.metaKey?K(0):G.altKey?q(-1):H(-1)};return S.createElement(aa.div,{ref:e,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:G=>{var Y;if((Y=g.onKeyDown)==null||Y.call(g,G),!G.defaultPrevented)switch(G.key){case"n":case"j":{y&&G.ctrlKey&&se(G);break}case"ArrowDown":{se(G);break}case"p":case"k":{y&&G.ctrlKey&&X(G);break}case"ArrowUp":{X(G);break}case"Home":{G.preventDefault(),K(0);break}case"End":{G.preventDefault(),ee();break}case"Enter":if(!G.nativeEvent.isComposing&&G.keyCode!==229){G.preventDefault();let Q=L();if(Q){let he=new Event(BM);Q.dispatchEvent(he)}}}}},S.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:eEe},c),OA(t,G=>S.createElement(IG.Provider,{value:T},S.createElement(OG.Provider,{value:E},G))))}),UCe=S.forwardRef((t,e)=>{var n,r;let s=S.useId(),i=S.useRef(null),o=S.useContext(jG),a=__(),c=$G(t),u=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:o==null?void 0:o.forceMount;Ep(()=>{if(!u)return a.item(s,o==null?void 0:o.id)},[u]);let f=FG(s,i,[t.value,t.children,i],t.keywords),l=YL(),d=Rp(P=>P.value&&P.value===f.current),p=Rp(P=>u||a.filter()===!1?!0:P.search?P.filtered.items.get(s)>0:!0);S.useEffect(()=>{let P=i.current;if(!(!P||t.disabled))return P.addEventListener(BM,h),()=>P.removeEventListener(BM,h)},[p,t.onSelect,t.disabled]);function h(){var P,T;m(),(T=(P=c.current).onSelect)==null||T.call(P,f.current)}function m(){l.setState("value",f.current,!0)}if(!p)return null;let{disabled:y,value:g,onSelect:v,forceMount:b,keywords:_,...R}=t;return S.createElement(aa.div,{ref:ax([i,e]),...R,id:s,"cmdk-item":"",role:"option","aria-disabled":!!y,"aria-selected":!!d,"data-disabled":!!y,"data-selected":!!d,onPointerMove:y||a.disablePointerSelection?void 0:m,onClick:y?void 0:h},t.children)}),HCe=S.forwardRef((t,e)=>{let{heading:n,children:r,forceMount:s,...i}=t,o=S.useId(),a=S.useRef(null),c=S.useRef(null),u=S.useId(),f=__(),l=Rp(p=>s||f.filter()===!1?!0:p.search?p.filtered.groups.has(o):!0);Ep(()=>f.group(o),[]),FG(o,a,[t.value,t.heading,c]);let d=S.useMemo(()=>({id:o,forceMount:s}),[s]);return S.createElement(aa.div,{ref:ax([a,e]),...i,"cmdk-group":"",role:"presentation",hidden:l?void 0:!0},n&&S.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),OA(t,p=>S.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},S.createElement(jG.Provider,{value:d},p))))}),VCe=S.forwardRef((t,e)=>{let{alwaysRender:n,...r}=t,s=S.useRef(null),i=Rp(o=>!o.search);return!n&&!i?null:S.createElement(aa.div,{ref:ax([s,e]),...r,"cmdk-separator":"",role:"separator"})}),qCe=S.forwardRef((t,e)=>{let{onValueChange:n,...r}=t,s=t.value!=null,i=YL(),o=Rp(f=>f.search),a=Rp(f=>f.value),c=__(),u=S.useMemo(()=>{var f;let l=(f=c.listInnerRef.current)==null?void 0:f.querySelector(`${KL}[${Gf}="${encodeURIComponent(a)}"]`);return l==null?void 0:l.getAttribute("id")},[]);return S.useEffect(()=>{t.value!=null&&i.setState("search",t.value)},[t.value]),S.createElement(aa.input,{ref:e,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":u,id:c.inputId,type:"text",value:s?t.value:o,onChange:f=>{s||i.setState("search",f.target.value),n==null||n(f.target.value)}})}),WCe=S.forwardRef((t,e)=>{let{children:n,label:r="Suggestions",...s}=t,i=S.useRef(null),o=S.useRef(null),a=__();return S.useEffect(()=>{if(o.current&&i.current){let c=o.current,u=i.current,f,l=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let d=c.offsetHeight;u.style.setProperty("--cmdk-list-height",d.toFixed(1)+"px")})});return l.observe(c),()=>{cancelAnimationFrame(f),l.unobserve(c)}}},[]),S.createElement(aa.div,{ref:ax([i,e]),...s,"cmdk-list":"",role:"listbox","aria-label":r,id:a.listId},OA(t,c=>S.createElement("div",{ref:ax([o,a.listInnerRef]),"cmdk-list-sizer":""},c)))}),GCe=S.forwardRef((t,e)=>{let{open:n,onOpenChange:r,overlayClassName:s,contentClassName:i,container:o,...a}=t;return S.createElement(jCe,{open:n,onOpenChange:r},S.createElement(LCe,{container:o},S.createElement($Ce,{"cmdk-overlay":"",className:s}),S.createElement(FCe,{"aria-label":t.label,"cmdk-dialog":"",className:i},S.createElement(LG,{ref:e,...a}))))}),KCe=S.forwardRef((t,e)=>Rp(n=>n.filtered.count===0)?S.createElement(aa.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),YCe=S.forwardRef((t,e)=>{let{progress:n,children:r,label:s="Loading...",...i}=t;return S.createElement(aa.div,{ref:e,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},OA(t,o=>S.createElement("div",{"aria-hidden":!0},o)))}),Fi=Object.assign(LG,{List:WCe,Item:UCe,Input:qCe,Group:HCe,Separator:VCe,Dialog:GCe,Empty:KCe,Loading:YCe});function XCe(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function QCe(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function $G(t){let e=S.useRef(t);return Ep(()=>{e.current=t}),e}var Ep=typeof window>"u"?S.useEffect:S.useLayoutEffect;function Dm(t){let e=S.useRef();return e.current===void 0&&(e.current=t()),e}function ax(t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}function Rp(t){let e=YL(),n=()=>t(e.snapshot());return S.useSyncExternalStore(e.subscribe,n,n)}function FG(t,e,n,r=[]){let s=S.useRef(),i=__();return Ep(()=>{var o;let a=(()=>{var u;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():s.current}})(),c=r.map(u=>u.trim());i.value(t,a,c),(o=e.current)==null||o.setAttribute(Gf,a),s.current=a}),s}var ZCe=()=>{let[t,e]=S.useState(),n=Dm(()=>new Map);return Ep(()=>{n.current.forEach(r=>r()),n.current=new Map},[t]),(r,s)=>{n.current.set(r,s),e({})}};function JCe(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function OA({asChild:t,children:e},n){return t&&S.isValidElement(e)?S.cloneElement(JCe(e),{ref:e.ref},n(e.props.children)):n(e)}var eEe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const S_=aA,XL=lA,tEe=cA,yE=gy,zG=S.forwardRef(({className:t,...e},n)=>w.jsx(fy,{ref:n,className:ie("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e}));zG.displayName=fy.displayName;const wy=S.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(tEe,{children:[w.jsx(zG,{}),w.jsxs(hy,{ref:r,className:ie("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...n,children:[e,w.jsxs(gy,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[w.jsx(sA,{className:"h-4 w-4"}),w.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));wy.displayName=hy.displayName;const _y=({className:t,...e})=>w.jsx("div",{className:ie("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});_y.displayName="DialogHeader";const Sy=({className:t,...e})=>w.jsx("div",{className:ie("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});Sy.displayName="DialogFooter";const Cy=S.forwardRef(({className:t,...e},n)=>w.jsx(py,{ref:n,className:ie("text-lg font-semibold leading-none tracking-tight",t),...e}));Cy.displayName=py.displayName;const IA=S.forwardRef(({className:t,...e},n)=>w.jsx(my,{ref:n,className:ie("text-sm text-muted-foreground",t),...e}));IA.displayName=my.displayName;const nEe=S.forwardRef(({className:t,...e},n)=>w.jsx(Fi,{ref:n,className:ie("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e}));nEe.displayName=Fi.displayName;const rEe=S.forwardRef(({className:t,...e},n)=>w.jsxs("div",{className:"flex items-center px-3 border-b","cmdk-input-wrapper":"",children:[w.jsx(Sq,{className:"w-4 h-4 mr-2 opacity-50 shrink-0"}),w.jsx(Fi.Input,{ref:n,className:ie("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]}));rEe.displayName=Fi.Input.displayName;const sEe=S.forwardRef(({className:t,...e},n)=>w.jsx(Fi.List,{ref:n,className:ie("max-h-[300px] overflow-y-auto overflow-x-hidden",t),...e}));sEe.displayName=Fi.List.displayName;const iEe=S.forwardRef((t,e)=>w.jsx(Fi.Empty,{ref:e,className:"py-6 text-sm text-center",...t}));iEe.displayName=Fi.Empty.displayName;const oEe=S.forwardRef(({className:t,...e},n)=>w.jsx(Fi.Group,{ref:n,className:ie("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...e}));oEe.displayName=Fi.Group.displayName;const aEe=S.forwardRef(({className:t,...e},n)=>w.jsx(Fi.Separator,{ref:n,className:ie("-mx-1 h-px bg-border",t),...e}));aEe.displayName=Fi.Separator.displayName;const lEe=S.forwardRef(({className:t,...e},n)=>w.jsx(Fi.Item,{ref:n,className:ie("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...e}));lEe.displayName=Fi.Item.displayName;const cEe=["top","right","bottom","left"],Dl=Math.min,po=Math.max,bE=Math.round,b1=Math.floor,rf=t=>({x:t,y:t}),uEe={left:"right",right:"left",bottom:"top",top:"bottom"},dEe={start:"end",end:"start"};function UM(t,e,n){return po(t,Dl(e,n))}function yu(t,e){return typeof t=="function"?t(e):t}function bu(t){return t.split("-")[0]}function Ey(t){return t.split("-")[1]}function QL(t){return t==="x"?"y":"x"}function ZL(t){return t==="y"?"height":"width"}function sf(t){return["top","bottom"].includes(bu(t))?"y":"x"}function JL(t){return QL(sf(t))}function fEe(t,e,n){n===void 0&&(n=!1);const r=Ey(t),s=JL(t),i=ZL(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=xE(o)),[o,xE(o)]}function hEe(t){const e=xE(t);return[HM(t),e,HM(e)]}function HM(t){return t.replace(/start|end/g,e=>dEe[e])}function pEe(t,e,n){const r=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:r:e?r:s;case"left":case"right":return e?i:o;default:return[]}}function mEe(t,e,n,r){const s=Ey(t);let i=pEe(bu(t),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(HM)))),i}function xE(t){return t.replace(/left|right|bottom|top/g,e=>uEe[e])}function gEe(t){return{top:0,right:0,bottom:0,left:0,...t}}function BG(t){return typeof t!="number"?gEe(t):{top:t,right:t,bottom:t,left:t}}function wE(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function p5(t,e,n){let{reference:r,floating:s}=t;const i=sf(e),o=JL(e),a=ZL(o),c=bu(e),u=i==="y",f=r.x+r.width/2-s.width/2,l=r.y+r.height/2-s.height/2,d=r[a]/2-s[a]/2;let p;switch(c){case"top":p={x:f,y:r.y-s.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:l};break;case"left":p={x:r.x-s.width,y:l};break;default:p={x:r.x,y:r.y}}switch(Ey(e)){case"start":p[o]-=d*(n&&u?-1:1);break;case"end":p[o]+=d*(n&&u?-1:1);break}return p}const vEe=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let u=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:l}=p5(u,r,c),d=r,p={},h=0;for(let m=0;m ({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:c}=e,{element:u,padding:f=0}=yu(t,e)||{};if(u==null)return{};const l=BG(f),d={x:n,y:r},p=JL(s),h=ZL(p),m=await o.getDimensions(u),y=p==="y",g=y?"top":"left",v=y?"bottom":"right",b=y?"clientHeight":"clientWidth",_=i.reference[h]+i.reference[p]-d[p]-i.floating[h],R=d[p]-i.reference[p],P=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let T=P?P[b]:0;(!T||!await(o.isElement==null?void 0:o.isElement(P)))&&(T=a.floating[b]||i.floating[h]);const E=_/2-R/2,N=T/2-m[h]/2-1,k=Dl(l[g],N),M=Dl(l[v],N),I=k,j=T-m[h]-M,L=T/2-m[h]/2+E,U=UM(I,L,j),K=!c.arrow&&Ey(s)!=null&&L!==U&&i.reference[h]/2-(LL<=0)){var M,I;const L=(((M=i.flip)==null?void 0:M.index)||0)+1,U=T[L];if(U)return{data:{index:L,overflows:k},reset:{placement:U}};let K=(I=k.filter(H=>H.overflows[0]<=0).sort((H,q)=>H.overflows[1]-q.overflows[1])[0])==null?void 0:I.placement;if(!K)switch(p){case"bestFit":{var j;const H=(j=k.filter(q=>{if(P){const ee=sf(q.placement);return ee===v||ee==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(ee=>ee>0).reduce((ee,se)=>ee+se,0)]).sort((q,ee)=>q[1]-ee[1])[0])==null?void 0:j[0];H&&(K=H);break}case"initialPlacement":K=a;break}if(s!==K)return{reset:{placement:K}}}return{}}}};function m5(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function g5(t){return cEe.some(e=>t[e]>=0)}const xEe=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...s}=yu(t,e);switch(r){case"referenceHidden":{const i=await lx(e,{...s,elementContext:"reference"}),o=m5(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:g5(o)}}}case"escaped":{const i=await lx(e,{...s,altBoundary:!0}),o=m5(i,n.floating);return{data:{escapedOffsets:o,escaped:g5(o)}}}default:return{}}}}};async function wEe(t,e){const{placement:n,platform:r,elements:s}=t,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=bu(n),a=Ey(n),c=sf(n)==="y",u=["left","top"].includes(o)?-1:1,f=i&&c?-1:1,l=yu(e,t);let{mainAxis:d,crossAxis:p,alignmentAxis:h}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...l};return a&&typeof h=="number"&&(p=a==="end"?h*-1:h),c?{x:p*f,y:d*u}:{x:d*u,y:p*f}}const _Ee=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=e,c=await wEe(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:o}}}}},SEe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:y=>{let{x:g,y:v}=y;return{x:g,y:v}}},...c}=yu(t,e),u={x:n,y:r},f=await lx(e,c),l=sf(bu(s)),d=QL(l);let p=u[d],h=u[l];if(i){const y=d==="y"?"top":"left",g=d==="y"?"bottom":"right",v=p+f[y],b=p-f[g];p=UM(v,p,b)}if(o){const y=l==="y"?"top":"left",g=l==="y"?"bottom":"right",v=h+f[y],b=h-f[g];h=UM(v,h,b)}const m=a.fn({...e,[d]:p,[l]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},CEe=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=yu(t,e),f={x:n,y:r},l=sf(s),d=QL(l);let p=f[d],h=f[l];const m=yu(a,e),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const b=d==="y"?"height":"width",_=i.reference[d]-i.floating[b]+y.mainAxis,R=i.reference[d]+i.reference[b]-y.mainAxis;p<_?p=_:p>R&&(p=R)}if(u){var g,v;const b=d==="y"?"width":"height",_=["top","left"].includes(bu(s)),R=i.reference[l]-i.floating[b]+(_&&((g=o.offset)==null?void 0:g[l])||0)+(_?0:y.crossAxis),P=i.reference[l]+i.reference[b]+(_?0:((v=o.offset)==null?void 0:v[l])||0)-(_?y.crossAxis:0);h P&&(h=P)}return{[d]:p,[l]:h}}}},EEe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:r,platform:s,elements:i}=e,{apply:o=()=>{},...a}=yu(t,e),c=await lx(e,a),u=bu(n),f=Ey(n),l=sf(n)==="y",{width:d,height:p}=r.floating;let h,m;u==="top"||u==="bottom"?(h=u,m=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(m=u,h=f==="end"?"top":"bottom");const y=p-c.top-c.bottom,g=d-c.left-c.right,v=Dl(p-c[h],y),b=Dl(d-c[m],g),_=!e.middlewareData.shift;let R=v,P=b;if(l?P=f||_?Dl(b,g):g:R=f||_?Dl(v,y):y,_&&!f){const E=po(c.left,0),N=po(c.right,0),k=po(c.top,0),M=po(c.bottom,0);l?P=d-2*(E!==0||N!==0?E+N:po(c.left,c.right)):R=p-2*(k!==0||M!==0?k+M:po(c.top,c.bottom))}await o({...e,availableWidth:P,availableHeight:R});const T=await s.getDimensions(i.floating);return d!==T.width||p!==T.height?{reset:{rects:!0}}:{}}}};function Ry(t){return UG(t)?(t.nodeName||"").toLowerCase():"#document"}function yo(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Pu(t){var e;return(e=(UG(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function UG(t){return t instanceof Node||t instanceof yo(t).Node}function Bl(t){return t instanceof Element||t instanceof yo(t).Element}function Ul(t){return t instanceof HTMLElement||t instanceof yo(t).HTMLElement}function v5(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof yo(t).ShadowRoot}function C_(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=Ka(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(s)}function REe(t){return["table","td","th"].includes(Ry(t))}function jA(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function e2(t){const e=t2(),n=Ka(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function AEe(t){let e=of(t);for(;Ul(e)&&!qv(e);){if(jA(e))return null;if(e2(e))return e;e=of(e)}return null}function t2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function qv(t){return["html","body","#document"].includes(Ry(t))}function Ka(t){return yo(t).getComputedStyle(t)}function LA(t){return Bl(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function of(t){if(Ry(t)==="html")return t;const e=t.assignedSlot||t.parentNode||v5(t)&&t.host||Pu(t);return v5(e)?e.host:e}function HG(t){const e=of(t);return qv(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ul(e)&&C_(e)?e:HG(e)}function cx(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=HG(t),i=s===((r=t.ownerDocument)==null?void 0:r.body),o=yo(s);return i?e.concat(o,o.visualViewport||[],C_(s)?s:[],o.frameElement&&n?cx(o.frameElement):[]):e.concat(s,cx(s,[],n))}function VG(t){const e=Ka(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=Ul(t),i=s?t.offsetWidth:n,o=s?t.offsetHeight:r,a=bE(n)!==i||bE(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function n2(t){return Bl(t)?t:t.contextElement}function mg(t){const e=n2(t);if(!Ul(e))return rf(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:i}=VG(e);let o=(i?bE(n.width):n.width)/r,a=(i?bE(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const PEe=rf(0);function qG(t){const e=yo(t);return!t2()||!e.visualViewport?PEe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function NEe(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==yo(t)?!1:e}function Ap(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),i=n2(t);let o=rf(1);e&&(r?Bl(r)&&(o=mg(r)):o=mg(t));const a=NEe(i,n,r)?qG(i):rf(0);let c=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,f=s.width/o.x,l=s.height/o.y;if(i){const d=yo(i),p=r&&Bl(r)?yo(r):r;let h=d,m=h.frameElement;for(;m&&r&&p!==h;){const y=mg(m),g=m.getBoundingClientRect(),v=Ka(m),b=g.left+(m.clientLeft+parseFloat(v.paddingLeft))*y.x,_=g.top+(m.clientTop+parseFloat(v.paddingTop))*y.y;c*=y.x,u*=y.y,f*=y.x,l*=y.y,c+=b,u+=_,h=yo(m),m=h.frameElement}}return wE({width:f,height:l,x:c,y:u})}function TEe(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const i=s==="fixed",o=Pu(r),a=e?jA(e.floating):!1;if(r===o||a&&i)return n;let c={scrollLeft:0,scrollTop:0},u=rf(1);const f=rf(0),l=Ul(r);if((l||!l&&!i)&&((Ry(r)!=="body"||C_(o))&&(c=LA(r)),Ul(r))){const d=Ap(r);u=mg(r),f.x=d.x+r.clientLeft,f.y=d.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x,y:n.y*u.y-c.scrollTop*u.y+f.y}}function kEe(t){return Array.from(t.getClientRects())}function WG(t){return Ap(Pu(t)).left+LA(t).scrollLeft}function DEe(t){const e=Pu(t),n=LA(t),r=t.ownerDocument.body,s=po(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=po(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+WG(t);const a=-n.scrollTop;return Ka(r).direction==="rtl"&&(o+=po(e.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function MEe(t,e){const n=yo(t),r=Pu(t),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,c=0;if(s){i=s.width,o=s.height;const u=t2();(!u||u&&e==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:i,height:o,x:a,y:c}}function OEe(t,e){const n=Ap(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,i=Ul(t)?mg(t):rf(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,c=s*i.x,u=r*i.y;return{width:o,height:a,x:c,y:u}}function y5(t,e,n){let r;if(e==="viewport")r=MEe(t,n);else if(e==="document")r=DEe(Pu(t));else if(Bl(e))r=OEe(e,n);else{const s=qG(t);r={...e,x:e.x-s.x,y:e.y-s.y}}return wE(r)}function GG(t,e){const n=of(t);return n===e||!Bl(n)||qv(n)?!1:Ka(n).position==="fixed"||GG(n,e)}function IEe(t,e){const n=e.get(t);if(n)return n;let r=cx(t,[],!1).filter(a=>Bl(a)&&Ry(a)!=="body"),s=null;const i=Ka(t).position==="fixed";let o=i?of(t):t;for(;Bl(o)&&!qv(o);){const a=Ka(o),c=e2(o);!c&&a.position==="fixed"&&(s=null),(i?!c&&!s:!c&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||C_(o)&&!c&&GG(t,o))?r=r.filter(f=>f!==o):s=a,o=of(o)}return e.set(t,r),r}function jEe(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const o=[...n==="clippingAncestors"?jA(e)?[]:IEe(e,this._c):[].concat(n),r],a=o[0],c=o.reduce((u,f)=>{const l=y5(e,f,s);return u.top=po(l.top,u.top),u.right=Dl(l.right,u.right),u.bottom=Dl(l.bottom,u.bottom),u.left=po(l.left,u.left),u},y5(e,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function LEe(t){const{width:e,height:n}=VG(t);return{width:e,height:n}}function $Ee(t,e,n){const r=Ul(e),s=Pu(e),i=n==="fixed",o=Ap(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=rf(0);if(r||!r&&!i)if((Ry(e)!=="body"||C_(s))&&(a=LA(e)),r){const l=Ap(e,!0,i,e);c.x=l.x+e.clientLeft,c.y=l.y+e.clientTop}else s&&(c.x=WG(s));const u=o.left+a.scrollLeft-c.x,f=o.top+a.scrollTop-c.y;return{x:u,y:f,width:o.width,height:o.height}}function dk(t){return Ka(t).position==="static"}function b5(t,e){return!Ul(t)||Ka(t).position==="fixed"?null:e?e(t):t.offsetParent}function KG(t,e){const n=yo(t);if(jA(t))return n;if(!Ul(t)){let s=of(t);for(;s&&!qv(s);){if(Bl(s)&&!dk(s))return s;s=of(s)}return n}let r=b5(t,e);for(;r&&REe(r)&&dk(r);)r=b5(r,e);return r&&qv(r)&&dk(r)&&!e2(r)?n:r||AEe(t)||n}const FEe=async function(t){const e=this.getOffsetParent||KG,n=this.getDimensions,r=await n(t.floating);return{reference:$Ee(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function zEe(t){return Ka(t).direction==="rtl"}const BEe={convertOffsetParentRelativeRectToViewportRelativeRect:TEe,getDocumentElement:Pu,getClippingRect:jEe,getOffsetParent:KG,getElementRects:FEe,getClientRects:kEe,getDimensions:LEe,getScale:mg,isElement:Bl,isRTL:zEe};function UEe(t,e){let n=null,r;const s=Pu(t);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:u,top:f,width:l,height:d}=t.getBoundingClientRect();if(a||e(),!l||!d)return;const p=b1(f),h=b1(s.clientWidth-(u+l)),m=b1(s.clientHeight-(f+d)),y=b1(u),v={rootMargin:-p+"px "+-h+"px "+-m+"px "+-y+"px",threshold:po(0,Dl(1,c))||1};let b=!0;function _(R){const P=R[0].intersectionRatio;if(P!==c){if(!b)return o();P?o(!1,P):r=setTimeout(()=>{o(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(_,{...v,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,v)}n.observe(t)}return o(!0),i}function HEe(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=n2(t),f=s||i?[...u?cx(u):[],...cx(e)]:[];f.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const l=u&&a?UEe(u,n):null;let d=-1,p=null;o&&(p=new ResizeObserver(g=>{let[v]=g;v&&v.target===u&&p&&(p.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(e)})),n()}),u&&!c&&p.observe(u),p.observe(e));let h,m=c?Ap(t):null;c&&y();function y(){const g=Ap(t);m&&(g.x!==m.x||g.y!==m.y||g.width!==m.width||g.height!==m.height)&&n(),m=g,h=requestAnimationFrame(y)}return n(),()=>{var g;f.forEach(v=>{s&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),l==null||l(),(g=p)==null||g.disconnect(),p=null,c&&cancelAnimationFrame(h)}}const VEe=_Ee,qEe=SEe,WEe=bEe,GEe=EEe,KEe=xEe,x5=yEe,YEe=CEe,XEe=(t,e,n)=>{const r=new Map,s={platform:BEe,...n},i={...s.platform,_c:r};return vEe(t,e,{...s,platform:i})};var iC=typeof document<"u"?S.useLayoutEffect:S.useEffect;function _E(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!_E(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&t.$$typeof)&&!_E(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function YG(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function w5(t,e){const n=YG(t);return Math.round(e*n)/n}function _5(t){const e=S.useRef(t);return iC(()=>{e.current=t}),e}function QEe(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:c,open:u}=t,[f,l]=S.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[d,p]=S.useState(r);_E(d,r)||p(r);const[h,m]=S.useState(null),[y,g]=S.useState(null),v=S.useCallback(H=>{H!==P.current&&(P.current=H,m(H))},[]),b=S.useCallback(H=>{H!==T.current&&(T.current=H,g(H))},[]),_=i||h,R=o||y,P=S.useRef(null),T=S.useRef(null),E=S.useRef(f),N=c!=null,k=_5(c),M=_5(s),I=S.useCallback(()=>{if(!P.current||!T.current)return;const H={placement:e,strategy:n,middleware:d};M.current&&(H.platform=M.current),XEe(P.current,T.current,H).then(q=>{const ee={...q,isPositioned:!0};j.current&&!_E(E.current,ee)&&(E.current=ee,rs.flushSync(()=>{l(ee)}))})},[d,e,n,M]);iC(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,l(H=>({...H,isPositioned:!1})))},[u]);const j=S.useRef(!1);iC(()=>(j.current=!0,()=>{j.current=!1}),[]),iC(()=>{if(_&&(P.current=_),R&&(T.current=R),_&&R){if(k.current)return k.current(_,R,I);I()}},[_,R,I,k,N]);const L=S.useMemo(()=>({reference:P,floating:T,setReference:v,setFloating:b}),[v,b]),U=S.useMemo(()=>({reference:_,floating:R}),[_,R]),K=S.useMemo(()=>{const H={position:n,left:0,top:0};if(!U.floating)return H;const q=w5(U.floating,f.x),ee=w5(U.floating,f.y);return a?{...H,transform:"translate("+q+"px, "+ee+"px)",...YG(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:ee}},[n,a,U.floating,f.x,f.y]);return S.useMemo(()=>({...f,update:I,refs:L,elements:U,floatingStyles:K}),[f,I,L,U,K])}const ZEe=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?x5({element:r.current,padding:s}).fn(n):{}:r?x5({element:r,padding:s}).fn(n):{}}}},JEe=(t,e)=>({...VEe(t),options:[t,e]}),eRe=(t,e)=>({...qEe(t),options:[t,e]}),tRe=(t,e)=>({...YEe(t),options:[t,e]}),nRe=(t,e)=>({...WEe(t),options:[t,e]}),rRe=(t,e)=>({...GEe(t),options:[t,e]}),sRe=(t,e)=>({...KEe(t),options:[t,e]}),iRe=(t,e)=>({...ZEe(t),options:[t,e]});var oRe="Arrow",XG=S.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...i}=t;return w.jsx(De.svg,{...i,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:w.jsx("polygon",{points:"0,0 30,0 15,10"})})});XG.displayName=oRe;var aRe=XG,r2="Popper",[QG,Yl]=In(r2),[lRe,ZG]=QG(r2),JG=t=>{const{__scopePopper:e,children:n}=t,[r,s]=S.useState(null);return w.jsx(lRe,{scope:e,anchor:r,onAnchorChange:s,children:n})};JG.displayName=r2;var e7="PopperAnchor",t7=S.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,i=ZG(e7,n),o=S.useRef(null),a=Je(e,o);return S.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:w.jsx(De.div,{...s,ref:a})});t7.displayName=e7;var s2="PopperContent",[cRe,uRe]=QG(s2),n7=S.forwardRef((t,e)=>{var ce,xe,Pe,pe,Le,Me;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:l="partial",hideWhenDetached:d=!1,updatePositionStrategy:p="optimized",onPlaced:h,...m}=t,y=ZG(s2,n),[g,v]=S.useState(null),b=Je(e,Oe=>v(Oe)),[_,R]=S.useState(null),P=x_(_),T=(P==null?void 0:P.width)??0,E=(P==null?void 0:P.height)??0,N=r+(i!=="center"?"-"+i:""),k=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},M=Array.isArray(u)?u:[u],I=M.length>0,j={padding:k,boundary:M.filter(fRe),altBoundary:I},{refs:L,floatingStyles:U,placement:K,isPositioned:H,middlewareData:q}=QEe({strategy:"fixed",placement:N,whileElementsMounted:(...Oe)=>HEe(...Oe,{animationFrame:p==="always"}),elements:{reference:y.anchor},middleware:[JEe({mainAxis:s+E,alignmentAxis:o}),c&&eRe({mainAxis:!0,crossAxis:!1,limiter:l==="partial"?tRe():void 0,...j}),c&&nRe({...j}),rRe({...j,apply:({elements:Oe,rects:Fe,availableWidth:ot,availableHeight:nt})=>{const{width:Et,height:J}=Fe.reference,de=Oe.floating.style;de.setProperty("--radix-popper-available-width",`${ot}px`),de.setProperty("--radix-popper-available-height",`${nt}px`),de.setProperty("--radix-popper-anchor-width",`${Et}px`),de.setProperty("--radix-popper-anchor-height",`${J}px`)}}),_&&iRe({element:_,padding:a}),hRe({arrowWidth:T,arrowHeight:E}),d&&sRe({strategy:"referenceHidden",...j})]}),[ee,se]=i7(K),X=on(h);ir(()=>{H&&(X==null||X())},[H,X]);const G=(ce=q.arrow)==null?void 0:ce.x,Y=(xe=q.arrow)==null?void 0:xe.y,Q=((Pe=q.arrow)==null?void 0:Pe.centerOffset)!==0,[he,fe]=S.useState();return ir(()=>{g&&fe(window.getComputedStyle(g).zIndex)},[g]),w.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:H?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:he,"--radix-popper-transform-origin":[(pe=q.transformOrigin)==null?void 0:pe.x,(Le=q.transformOrigin)==null?void 0:Le.y].join(" "),...((Me=q.hide)==null?void 0:Me.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:w.jsx(cRe,{scope:n,placedSide:ee,onArrowChange:R,arrowX:G,arrowY:Y,shouldHideArrow:Q,children:w.jsx(De.div,{"data-side":ee,"data-align":se,...m,ref:b,style:{...m.style,animation:H?void 0:"none"}})})})});n7.displayName=s2;var r7="PopperArrow",dRe={top:"bottom",right:"left",bottom:"top",left:"right"},s7=S.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,i=uRe(r7,r),o=dRe[i.placedSide];return w.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:w.jsx(aRe,{...s,ref:n,style:{...s.style,display:"block"}})})});s7.displayName=r7;function fRe(t){return t!==null}var hRe=t=>({name:"transformOrigin",options:t,fn(e){var y,g,v;const{placement:n,rects:r,middlewareData:s}=e,o=((y=s.arrow)==null?void 0:y.centerOffset)!==0,a=o?0:t.arrowWidth,c=o?0:t.arrowHeight,[u,f]=i7(n),l={start:"0%",center:"50%",end:"100%"}[f],d=(((g=s.arrow)==null?void 0:g.x)??0)+a/2,p=(((v=s.arrow)==null?void 0:v.y)??0)+c/2;let h="",m="";return u==="bottom"?(h=o?l:`${d}px`,m=`${-c}px`):u==="top"?(h=o?l:`${d}px`,m=`${r.floating.height+c}px`):u==="right"?(h=`${-c}px`,m=o?l:`${p}px`):u==="left"&&(h=`${r.floating.width+c}px`,m=o?l:`${p}px`),{data:{x:h,y:m}}}});function i7(t){const[e,n="center"]=t.split("-");return[e,n]}var $A=JG,Ay=t7,E_=n7,R_=s7,fk="rovingFocusGroup.onEntryFocus",pRe={bubbles:!1,cancelable:!0},FA="RovingFocusGroup",[VM,o7,mRe]=Cu(FA),[gRe,Xl]=In(FA,[mRe]),[vRe,yRe]=gRe(FA),a7=S.forwardRef((t,e)=>w.jsx(VM.Provider,{scope:t.__scopeRovingFocusGroup,children:w.jsx(VM.Slot,{scope:t.__scopeRovingFocusGroup,children:w.jsx(bRe,{...t,ref:e})})}));a7.displayName=FA;var bRe=S.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...l}=t,d=S.useRef(null),p=Je(e,d),h=Qa(i),[m=null,y]=mr({prop:o,defaultProp:a,onChange:c}),[g,v]=S.useState(!1),b=on(u),_=o7(n),R=S.useRef(!1),[P,T]=S.useState(0);return S.useEffect(()=>{const E=d.current;if(E)return E.addEventListener(fk,b),()=>E.removeEventListener(fk,b)},[b]),w.jsx(vRe,{scope:n,orientation:r,dir:h,loop:s,currentTabStopId:m,onItemFocus:S.useCallback(E=>y(E),[y]),onItemShiftTab:S.useCallback(()=>v(!0),[]),onFocusableItemAdd:S.useCallback(()=>T(E=>E+1),[]),onFocusableItemRemove:S.useCallback(()=>T(E=>E-1),[]),children:w.jsx(De.div,{tabIndex:g||P===0?-1:0,"data-orientation":r,...l,ref:p,style:{outline:"none",...t.style},onMouseDown:ye(t.onMouseDown,()=>{R.current=!0}),onFocus:ye(t.onFocus,E=>{const N=!R.current;if(E.target===E.currentTarget&&N&&!g){const k=new CustomEvent(fk,pRe);if(E.currentTarget.dispatchEvent(k),!k.defaultPrevented){const M=_().filter(K=>K.focusable),I=M.find(K=>K.active),j=M.find(K=>K.id===m),U=[I,j,...M].filter(Boolean).map(K=>K.ref.current);u7(U,f)}}R.current=!1}),onBlur:ye(t.onBlur,()=>v(!1))})})}),l7="RovingFocusGroupItem",c7=S.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:i,...o}=t,a=js(),c=i||a,u=yRe(l7,n),f=u.currentTabStopId===c,l=o7(n),{onFocusableItemAdd:d,onFocusableItemRemove:p}=u;return S.useEffect(()=>{if(r)return d(),()=>p()},[r,d,p]),w.jsx(VM.ItemSlot,{scope:n,id:c,focusable:r,active:s,children:w.jsx(De.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...o,ref:e,onMouseDown:ye(t.onMouseDown,h=>{r?u.onItemFocus(c):h.preventDefault()}),onFocus:ye(t.onFocus,()=>u.onItemFocus(c)),onKeyDown:ye(t.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){u.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const m=_Re(h,u.orientation,u.dir);if(m!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let g=l().filter(v=>v.focusable).map(v=>v.ref.current);if(m==="last")g.reverse();else if(m==="prev"||m==="next"){m==="prev"&&g.reverse();const v=g.indexOf(h.currentTarget);g=u.loop?SRe(g,v+1):g.slice(v+1)}setTimeout(()=>u7(g))}})})})});c7.displayName=l7;var xRe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wRe(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function _Re(t,e,n){const r=wRe(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return xRe[r]}function u7(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function SRe(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var A_=a7,P_=c7,qM=["Enter"," "],CRe=["ArrowDown","PageUp","Home"],d7=["ArrowUp","PageDown","End"],ERe=[...CRe,...d7],RRe={ltr:[...qM,"ArrowRight"],rtl:[...qM,"ArrowLeft"]},ARe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},N_="Menu",[ux,PRe,NRe]=Cu(N_),[Vp,T_]=In(N_,[NRe,Yl,Xl]),zA=Yl(),f7=Xl(),[TRe,qp]=Vp(N_),[kRe,k_]=Vp(N_),h7=t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:s,onOpenChange:i,modal:o=!0}=t,a=zA(e),[c,u]=S.useState(null),f=S.useRef(!1),l=on(i),d=Qa(s);return S.useEffect(()=>{const p=()=>{f.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>f.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),w.jsx($A,{...a,children:w.jsx(TRe,{scope:e,open:n,onOpenChange:l,content:c,onContentChange:u,children:w.jsx(kRe,{scope:e,onClose:S.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:f,dir:d,modal:o,children:r})})})};h7.displayName=N_;var DRe="MenuAnchor",i2=S.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,s=zA(n);return w.jsx(Ay,{...s,...r,ref:e})});i2.displayName=DRe;var o2="MenuPortal",[MRe,p7]=Vp(o2,{forceMount:void 0}),m7=t=>{const{__scopeMenu:e,forceMount:n,children:r,container:s}=t,i=qp(o2,e);return w.jsx(MRe,{scope:e,forceMount:n,children:w.jsx(Kn,{present:n||i.open,children:w.jsx(dy,{asChild:!0,container:s,children:r})})})};m7.displayName=o2;var ta="MenuContent",[ORe,a2]=Vp(ta),g7=S.forwardRef((t,e)=>{const n=p7(ta,t.__scopeMenu),{forceMount:r=n.forceMount,...s}=t,i=qp(ta,t.__scopeMenu),o=k_(ta,t.__scopeMenu);return w.jsx(ux.Provider,{scope:t.__scopeMenu,children:w.jsx(Kn,{present:r||i.open,children:w.jsx(ux.Slot,{scope:t.__scopeMenu,children:o.modal?w.jsx(IRe,{...s,ref:e}):w.jsx(jRe,{...s,ref:e})})})})}),IRe=S.forwardRef((t,e)=>{const n=qp(ta,t.__scopeMenu),r=S.useRef(null),s=Je(e,r);return S.useEffect(()=>{const i=r.current;if(i)return p_(i)},[]),w.jsx(l2,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ye(t.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),jRe=S.forwardRef((t,e)=>{const n=qp(ta,t.__scopeMenu);return w.jsx(l2,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),l2=S.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:d,onDismiss:p,disableOutsideScroll:h,...m}=t,y=qp(ta,n),g=k_(ta,n),v=zA(n),b=f7(n),_=PRe(n),[R,P]=S.useState(null),T=S.useRef(null),E=Je(e,T,y.onContentChange),N=S.useRef(0),k=S.useRef(""),M=S.useRef(0),I=S.useRef(null),j=S.useRef("right"),L=S.useRef(0),U=h?h_:S.Fragment,K=h?{as:qa,allowPinchZoom:!0}:void 0,H=ee=>{var ce,xe;const se=k.current+ee,X=_().filter(Pe=>!Pe.disabled),G=document.activeElement,Y=(ce=X.find(Pe=>Pe.ref.current===G))==null?void 0:ce.textValue,Q=X.map(Pe=>Pe.textValue),he=KRe(Q,se,Y),fe=(xe=X.find(Pe=>Pe.textValue===he))==null?void 0:xe.ref.current;(function Pe(pe){k.current=pe,window.clearTimeout(N.current),pe!==""&&(N.current=window.setTimeout(()=>Pe(""),1e3))})(se),fe&&setTimeout(()=>fe.focus())};S.useEffect(()=>()=>window.clearTimeout(N.current),[]),iA();const q=S.useCallback(ee=>{var X,G;return j.current===((X=I.current)==null?void 0:X.side)&&XRe(ee,(G=I.current)==null?void 0:G.area)},[]);return w.jsx(ORe,{scope:n,searchRef:k,onItemEnter:S.useCallback(ee=>{q(ee)&&ee.preventDefault()},[q]),onItemLeave:S.useCallback(ee=>{var se;q(ee)||((se=T.current)==null||se.focus(),P(null))},[q]),onTriggerLeave:S.useCallback(ee=>{q(ee)&&ee.preventDefault()},[q]),pointerGraceTimerRef:M,onPointerGraceIntentChange:S.useCallback(ee=>{I.current=ee},[]),children:w.jsx(U,{...K,children:w.jsx(f_,{asChild:!0,trapped:s,onMountAutoFocus:ye(i,ee=>{var se;ee.preventDefault(),(se=T.current)==null||se.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:w.jsx(Ru,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:d,onDismiss:p,children:w.jsx(A_,{asChild:!0,...b,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:R,onCurrentTabStopIdChange:P,onEntryFocus:ye(c,ee=>{g.isUsingKeyboardRef.current||ee.preventDefault()}),preventScrollOnEntryFocus:!0,children:w.jsx(E_,{role:"menu","aria-orientation":"vertical","data-state":D7(y.open),"data-radix-menu-content":"",dir:g.dir,...v,...m,ref:E,style:{outline:"none",...m.style},onKeyDown:ye(m.onKeyDown,ee=>{const X=ee.target.closest("[data-radix-menu-content]")===ee.currentTarget,G=ee.ctrlKey||ee.altKey||ee.metaKey,Y=ee.key.length===1;X&&(ee.key==="Tab"&&ee.preventDefault(),!G&&Y&&H(ee.key));const Q=T.current;if(ee.target!==Q||!ERe.includes(ee.key))return;ee.preventDefault();const fe=_().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);d7.includes(ee.key)&&fe.reverse(),WRe(fe)}),onBlur:ye(t.onBlur,ee=>{ee.currentTarget.contains(ee.target)||(window.clearTimeout(N.current),k.current="")}),onPointerMove:ye(t.onPointerMove,dx(ee=>{const se=ee.target,X=L.current!==ee.clientX;if(ee.currentTarget.contains(se)&&X){const G=ee.clientX>L.current?"right":"left";j.current=G,L.current=ee.clientX}}))})})})})})})});g7.displayName=ta;var LRe="MenuGroup",c2=S.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return w.jsx(De.div,{role:"group",...r,ref:e})});c2.displayName=LRe;var $Re="MenuLabel",v7=S.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return w.jsx(De.div,{...r,ref:e})});v7.displayName=$Re;var SE="MenuItem",S5="menu.itemSelect",BA=S.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...s}=t,i=S.useRef(null),o=k_(SE,t.__scopeMenu),a=a2(SE,t.__scopeMenu),c=Je(e,i),u=S.useRef(!1),f=()=>{const l=i.current;if(!n&&l){const d=new CustomEvent(S5,{bubbles:!0,cancelable:!0});l.addEventListener(S5,p=>r==null?void 0:r(p),{once:!0}),tx(l,d),d.defaultPrevented?u.current=!1:o.onClose()}};return w.jsx(y7,{...s,ref:c,disabled:n,onClick:ye(t.onClick,f),onPointerDown:l=>{var d;(d=t.onPointerDown)==null||d.call(t,l),u.current=!0},onPointerUp:ye(t.onPointerUp,l=>{var d;u.current||(d=l.currentTarget)==null||d.click()}),onKeyDown:ye(t.onKeyDown,l=>{const d=a.searchRef.current!=="";n||d&&l.key===" "||qM.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});BA.displayName=SE;var y7=S.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...i}=t,o=a2(SE,n),a=f7(n),c=S.useRef(null),u=Je(e,c),[f,l]=S.useState(!1),[d,p]=S.useState("");return S.useEffect(()=>{const h=c.current;h&&p((h.textContent??"").trim())},[i.children]),w.jsx(ux.ItemSlot,{scope:n,disabled:r,textValue:s??d,children:w.jsx(P_,{asChild:!0,...a,focusable:!r,children:w.jsx(De.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:ye(t.onPointerMove,dx(h=>{r?o.onItemLeave(h):(o.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ye(t.onPointerLeave,dx(h=>o.onItemLeave(h))),onFocus:ye(t.onFocus,()=>l(!0)),onBlur:ye(t.onBlur,()=>l(!1))})})})}),FRe="MenuCheckboxItem",b7=S.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:r,...s}=t;return w.jsx(C7,{scope:t.__scopeMenu,checked:n,children:w.jsx(BA,{role:"menuitemcheckbox","aria-checked":CE(n)?"mixed":n,...s,ref:e,"data-state":d2(n),onSelect:ye(s.onSelect,()=>r==null?void 0:r(CE(n)?!0:!n),{checkForDefaultPrevented:!1})})})});b7.displayName=FRe;var x7="MenuRadioGroup",[zRe,BRe]=Vp(x7,{value:void 0,onValueChange:()=>{}}),w7=S.forwardRef((t,e)=>{const{value:n,onValueChange:r,...s}=t,i=on(r);return w.jsx(zRe,{scope:t.__scopeMenu,value:n,onValueChange:i,children:w.jsx(c2,{...s,ref:e})})});w7.displayName=x7;var _7="MenuRadioItem",S7=S.forwardRef((t,e)=>{const{value:n,...r}=t,s=BRe(_7,t.__scopeMenu),i=n===s.value;return w.jsx(C7,{scope:t.__scopeMenu,checked:i,children:w.jsx(BA,{role:"menuitemradio","aria-checked":i,...r,ref:e,"data-state":d2(i),onSelect:ye(r.onSelect,()=>{var o;return(o=s.onValueChange)==null?void 0:o.call(s,n)},{checkForDefaultPrevented:!1})})})});S7.displayName=_7;var u2="MenuItemIndicator",[C7,URe]=Vp(u2,{checked:!1}),E7=S.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:r,...s}=t,i=URe(u2,n);return w.jsx(Kn,{present:r||CE(i.checked)||i.checked===!0,children:w.jsx(De.span,{...s,ref:e,"data-state":d2(i.checked)})})});E7.displayName=u2;var HRe="MenuSeparator",R7=S.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return w.jsx(De.div,{role:"separator","aria-orientation":"horizontal",...r,ref:e})});R7.displayName=HRe;var VRe="MenuArrow",A7=S.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,s=zA(n);return w.jsx(R_,{...s,...r,ref:e})});A7.displayName=VRe;var qRe="MenuSub",[MUe,P7]=Vp(qRe),Ub="MenuSubTrigger",N7=S.forwardRef((t,e)=>{const n=qp(Ub,t.__scopeMenu),r=k_(Ub,t.__scopeMenu),s=P7(Ub,t.__scopeMenu),i=a2(Ub,t.__scopeMenu),o=S.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=i,u={__scopeMenu:t.__scopeMenu},f=S.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return S.useEffect(()=>f,[f]),S.useEffect(()=>{const l=a.current;return()=>{window.clearTimeout(l),c(null)}},[a,c]),w.jsx(i2,{asChild:!0,...u,children:w.jsx(y7,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":D7(n.open),...t,ref:c_(e,s.onTriggerChange),onClick:l=>{var d;(d=t.onClick)==null||d.call(t,l),!(t.disabled||l.defaultPrevented)&&(l.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ye(t.onPointerMove,dx(l=>{i.onItemEnter(l),!l.defaultPrevented&&!t.disabled&&!n.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:ye(t.onPointerLeave,dx(l=>{var p,h;f();const d=(p=n.content)==null?void 0:p.getBoundingClientRect();if(d){const m=(h=n.content)==null?void 0:h.dataset.side,y=m==="right",g=y?-5:5,v=d[y?"left":"right"],b=d[y?"right":"left"];i.onPointerGraceIntentChange({area:[{x:l.clientX+g,y:l.clientY},{x:v,y:d.top},{x:b,y:d.top},{x:b,y:d.bottom},{x:v,y:d.bottom}],side:m}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(l),l.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:ye(t.onKeyDown,l=>{var p;const d=i.searchRef.current!=="";t.disabled||d&&l.key===" "||RRe[r.dir].includes(l.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),l.preventDefault())})})})});N7.displayName=Ub;var T7="MenuSubContent",k7=S.forwardRef((t,e)=>{const n=p7(ta,t.__scopeMenu),{forceMount:r=n.forceMount,...s}=t,i=qp(ta,t.__scopeMenu),o=k_(ta,t.__scopeMenu),a=P7(T7,t.__scopeMenu),c=S.useRef(null),u=Je(e,c);return w.jsx(ux.Provider,{scope:t.__scopeMenu,children:w.jsx(Kn,{present:r||i.open,children:w.jsx(ux.Slot,{scope:t.__scopeMenu,children:w.jsx(l2,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var l;o.isUsingKeyboardRef.current&&((l=c.current)==null||l.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:ye(t.onFocusOutside,f=>{f.target!==a.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:ye(t.onEscapeKeyDown,f=>{o.onClose(),f.preventDefault()}),onKeyDown:ye(t.onKeyDown,f=>{var p;const l=f.currentTarget.contains(f.target),d=ARe[o.dir].includes(f.key);l&&d&&(i.onOpenChange(!1),(p=a.trigger)==null||p.focus(),f.preventDefault())})})})})})});k7.displayName=T7;function D7(t){return t?"open":"closed"}function CE(t){return t==="indeterminate"}function d2(t){return CE(t)?"indeterminate":t?"checked":"unchecked"}function WRe(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function GRe(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function KRe(t,e,n){const s=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let o=GRe(t,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function YRe(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,o=e.length-1;i r!=f>r&&n<(u-a)*(r-c)/(f-c)+a&&(s=!s)}return s}function XRe(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return YRe(n,e)}function dx(t){return e=>e.pointerType==="mouse"?t(e):void 0}var QRe=h7,f2=i2,h2=m7,p2=g7,m2=c2,g2=v7,v2=BA,y2=b7,b2=w7,x2=S7,w2=E7,_2=R7,S2=A7,C2=N7,E2=k7,M7="ContextMenu",[ZRe,OUe]=In(M7,[T_]),zi=T_(),[IUe,O7]=ZRe(M7),I7="ContextMenuTrigger",JRe=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,disabled:r=!1,...s}=t,i=O7(I7,n),o=zi(n),a=S.useRef({x:0,y:0}),c=S.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),u=S.useRef(0),f=S.useCallback(()=>window.clearTimeout(u.current),[]),l=d=>{a.current={x:d.clientX,y:d.clientY},i.onOpenChange(!0)};return S.useEffect(()=>f,[f]),S.useEffect(()=>void(r&&f()),[r,f]),w.jsxs(w.Fragment,{children:[w.jsx(f2,{...o,virtualRef:c}),w.jsx(De.span,{"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,...s,ref:e,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:r?t.onContextMenu:ye(t.onContextMenu,d=>{f(),l(d),d.preventDefault()}),onPointerDown:r?t.onPointerDown:ye(t.onPointerDown,x1(d=>{f(),u.current=window.setTimeout(()=>l(d),700)})),onPointerMove:r?t.onPointerMove:ye(t.onPointerMove,x1(f)),onPointerCancel:r?t.onPointerCancel:ye(t.onPointerCancel,x1(f)),onPointerUp:r?t.onPointerUp:ye(t.onPointerUp,x1(f))})]})});JRe.displayName=I7;var eAe="ContextMenuPortal",j7=t=>{const{__scopeContextMenu:e,...n}=t,r=zi(e);return w.jsx(h2,{...r,...n})};j7.displayName=eAe;var L7="ContextMenuContent",$7=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=O7(L7,n),i=zi(n),o=S.useRef(!1);return w.jsx(p2,{...i,...r,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:a=>{var c;(c=t.onCloseAutoFocus)==null||c.call(t,a),!a.defaultPrevented&&o.current&&a.preventDefault(),o.current=!1},onInteractOutside:a=>{var c;(c=t.onInteractOutside)==null||c.call(t,a),!a.defaultPrevented&&!s.modal&&(o.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});$7.displayName=L7;var tAe="ContextMenuGroup",nAe=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(m2,{...s,...r,ref:e})});nAe.displayName=tAe;var rAe="ContextMenuLabel",F7=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(g2,{...s,...r,ref:e})});F7.displayName=rAe;var sAe="ContextMenuItem",z7=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(v2,{...s,...r,ref:e})});z7.displayName=sAe;var iAe="ContextMenuCheckboxItem",B7=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(y2,{...s,...r,ref:e})});B7.displayName=iAe;var oAe="ContextMenuRadioGroup",aAe=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(b2,{...s,...r,ref:e})});aAe.displayName=oAe;var lAe="ContextMenuRadioItem",U7=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(x2,{...s,...r,ref:e})});U7.displayName=lAe;var cAe="ContextMenuItemIndicator",H7=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(w2,{...s,...r,ref:e})});H7.displayName=cAe;var uAe="ContextMenuSeparator",V7=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(_2,{...s,...r,ref:e})});V7.displayName=uAe;var dAe="ContextMenuArrow",fAe=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(S2,{...s,...r,ref:e})});fAe.displayName=dAe;var hAe="ContextMenuSubTrigger",q7=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(C2,{...s,...r,ref:e})});q7.displayName=hAe;var pAe="ContextMenuSubContent",W7=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(E2,{...s,...r,ref:e,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});W7.displayName=pAe;function x1(t){return e=>e.pointerType!=="mouse"?t(e):void 0}var mAe=j7,G7=$7,K7=F7,Y7=z7,X7=B7,Q7=U7,Z7=H7,J7=V7,eK=q7,tK=W7;const gAe=S.forwardRef(({className:t,inset:e,children:n,...r},s)=>w.jsxs(eK,{ref:s,className:ie("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e&&"pl-8",t),...r,children:[n,w.jsx(ly,{className:"ml-auto h-4 w-4"})]}));gAe.displayName=eK.displayName;const vAe=S.forwardRef(({className:t,...e},n)=>w.jsx(tK,{ref:n,className:ie("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));vAe.displayName=tK.displayName;const yAe=S.forwardRef(({className:t,...e},n)=>w.jsx(mAe,{children:w.jsx(G7,{ref:n,className:ie("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e})}));yAe.displayName=G7.displayName;const bAe=S.forwardRef(({className:t,inset:e,...n},r)=>w.jsx(Y7,{ref:r,className:ie("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e&&"pl-8",t),...n}));bAe.displayName=Y7.displayName;const xAe=S.forwardRef(({className:t,children:e,checked:n,...r},s)=>w.jsxs(X7,{ref:s,className:ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n,...r,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(Z7,{children:w.jsx(u_,{className:"h-4 w-4"})})}),e]}));xAe.displayName=X7.displayName;const wAe=S.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(Q7,{ref:r,className:ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(Z7,{children:w.jsx(rA,{className:"h-2 w-2 fill-current"})})}),e]}));wAe.displayName=Q7.displayName;const _Ae=S.forwardRef(({className:t,inset:e,...n},r)=>w.jsx(K7,{ref:r,className:ie("px-2 py-1.5 text-sm font-semibold text-foreground",e&&"pl-8",t),...n}));_Ae.displayName=K7.displayName;const SAe=S.forwardRef(({className:t,...e},n)=>w.jsx(J7,{ref:n,className:ie("-mx-1 my-1 h-px bg-border",t),...e}));SAe.displayName=J7.displayName;function CAe(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}const nK=oe.createContext({drawerRef:{current:null},overlayRef:{current:null},scaleBackground:()=>{},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,handleOnly:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},visible:!1,closeDrawer:()=>{},setVisible:()=>{},direction:"bottom"}),UA=()=>{const t=oe.useContext(nK);if(!t)throw new Error("useDrawerContext must be used within a Drawer.Root");return t};CAe("[vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1)}[vaul-drawer][vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[vaul-drawer][vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[vaul-drawer][vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[vaul-drawer][vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}.vaul-dragging .vaul-scrollable [vault-drawer-direction=top]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=bottom]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=left]{overflow-x:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=right]{overflow-x:hidden!important}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-overlay]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[vaul-overlay][vaul-drawer-visible=true]{opacity:1}[vaul-drawer]::after{content:'';position:absolute;background:inherit;background-color:inherit}[vaul-drawer][vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[vaul-drawer][vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[vaul-handle]{display:block;position:relative;opacity:.8;margin-left:auto;margin-right:auto;height:5px;width:56px;border-radius:1rem;touch-action:pan-y;cursor:grab}[vaul-handle]:active,[vaul-handle]:hover{opacity:1}[vaul-handle]:active{cursor:grabbing}[vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}[vaul-overlay][vaul-snap-points=true]:not([vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[vaul-overlay][vaul-snap-points-overlay=true]:not([vaul-drawer-visible=false]){opacity:1}@media (hover:hover) and (pointer:fine){[vaul-drawer]{user-select:none}}@media (pointer:fine){[vaul-handle-hitarea]:{width:100%;height:100%}}");const EAe=typeof window<"u"?S.useLayoutEffect:S.useEffect;function WM(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}function RAe(){return R2(/^Mac/)}function AAe(){return R2(/^iPhone/)}function PAe(){return R2(/^iPad/)||RAe()&&navigator.maxTouchPoints>1}function rK(){return AAe()||PAe()}function R2(t){return typeof window<"u"&&window.navigator!=null?t.test(window.navigator.platform):void 0}const hk=typeof document<"u"&&window.visualViewport;function C5(t){let e=window.getComputedStyle(t);return/(auto|scroll)/.test(e.overflow+e.overflowX+e.overflowY)}function sK(t){for(C5(t)&&(t=t.parentElement);t&&!C5(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}const NAe=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let w1=0,pk;function TAe(t={}){let{isDisabled:e}=t;EAe(()=>{if(!e)return w1++,w1===1&&(rK()?pk=DAe():pk=kAe()),()=>{w1--,w1===0&&pk()}},[e])}function kAe(){return WM(iK(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`))}function DAe(){let t,e=0,n=l=>{t=sK(l.target),!(t===document.documentElement&&t===document.body)&&(e=l.changedTouches[0].pageY)},r=l=>{if(!t||t===document.documentElement||t===document.body){l.preventDefault();return}let d=l.changedTouches[0].pageY,p=t.scrollTop,h=t.scrollHeight-t.clientHeight;h!==0&&((p<=0&&d>e||p>=h&&d {let d=l.target;GM(d)&&d!==document.activeElement&&(l.preventDefault(),d.style.transform="translateY(-2000px)",d.focus(),requestAnimationFrame(()=>{d.style.transform=""}))},i=l=>{let d=l.target;GM(d)&&(d.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{d.style.transform="",hk&&(hk.height {E5(d)}):hk.addEventListener("resize",()=>E5(d),{once:!0}))}))},o=()=>{window.scrollTo(0,0)},a=window.pageXOffset,c=window.pageYOffset,u=WM(iK(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let f=WM(_b(document,"touchstart",n,{passive:!1,capture:!0}),_b(document,"touchmove",r,{passive:!1,capture:!0}),_b(document,"touchend",s,{passive:!1,capture:!0}),_b(document,"focus",i,!0),_b(window,"scroll",o));return()=>{u(),f(),window.scrollTo(a,c)}}function iK(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function _b(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function E5(t){let e=document.scrollingElement||document.documentElement;for(;t&&t!==e;){let n=sK(t);if(n!==document.documentElement&&n!==document.body&&n!==t){let r=n.getBoundingClientRect().top,s=t.getBoundingClientRect().top,i=t.getBoundingClientRect().bottom;const o=n.getBoundingClientRect().bottom;i>o&&(n.scrollTop+=s-r)}t=n.parentElement}}function GM(t){return t instanceof HTMLInputElement&&!NAe.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}function MAe(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function OAe(...t){return e=>t.forEach(n=>MAe(n,e))}function oK(...t){return S.useCallback(OAe(...t),t)}let Sb=null;function IAe({isOpen:t,modal:e,nested:n,hasBeenOpened:r,preventScrollRestoration:s,noBodyStyles:i}){const[o,a]=oe.useState(()=>typeof window<"u"?window.location.href:""),c=oe.useRef(0),u=oe.useCallback(()=>{if(Sb===null&&t&&!i){Sb={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:l,innerHeight:d}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-l}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const p=d-window.innerHeight;p&&c.current>=d&&(document.body.style.top=`${-(c.current+p)}px`)}),300)}},[t]),f=oe.useCallback(()=>{if(Sb!==null&&!i){const l=-parseInt(document.body.style.top,10),d=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Sb),window.requestAnimationFrame(()=>{if(s&&o!==window.location.href){a(window.location.href);return}window.scrollTo(d,l)}),Sb=null}},[o]);return oe.useEffect(()=>{function l(){c.current=window.scrollY}return l(),window.addEventListener("scroll",l),()=>{window.removeEventListener("scroll",l)}},[]),oe.useEffect(()=>{n||!r||(t?(!window.matchMedia("(display-mode: standalone)").matches&&u(),e||window.setTimeout(()=>{f()},500)):f())},[t,r,o,e,n,u,f]),{restorePositionSetting:f}}const aK=new WeakMap;function Wn(t,e,n=!1){if(!t||!(t instanceof HTMLElement))return;let r={};Object.entries(e).forEach(([s,i])=>{if(s.startsWith("--")){t.style.setProperty(s,i);return}r[s]=t.style[s],t.style[s]=i}),!n&&aK.set(t,r)}function _1(t,e){if(!t||!(t instanceof HTMLElement))return;let n=aK.get(t);n&&(e?t.style[e]=n[e]:Object.entries(n).forEach(([r,s])=>{t.style[r]=s}))}const Ar=t=>{switch(t){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return t}};function S1(t,e){if(!t)return null;const n=window.getComputedStyle(t),r=n.transform||n.webkitTransform||n.mozTransform;let s=r.match(/^matrix3d\((.+)\)$/);return s?parseFloat(s[1].split(", ")[Ar(e)?13:12]):(s=r.match(/^matrix\((.+)\)$/),s?parseFloat(s[1].split(", ")[Ar(e)?5:4]):null)}function jAe(t){return 8*(Math.log(t+1)-2)}const Dn={DURATION:.5,EASE:[.32,.72,0,1]},lK=.4;function cK(t){const e=oe.useRef(t);return oe.useEffect(()=>{e.current=t}),oe.useMemo(()=>(...n)=>e.current==null?void 0:e.current.call(e,...n),[])}function LAe({defaultProp:t,onChange:e}){const n=oe.useState(t),[r]=n,s=oe.useRef(r),i=cK(e);return oe.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}function $Ae({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,s]=LAe({defaultProp:e,onChange:n}),i=t!==void 0,o=i?t:r,a=cK(n),c=oe.useCallback(u=>{if(i){const l=typeof u=="function"?u(t):u;l!==t&&a(l)}else s(u)},[i,t,s,a]);return[o,c]}function FAe({activeSnapPointProp:t,setActiveSnapPointProp:e,snapPoints:n,drawerRef:r,overlayRef:s,fadeFromIndex:i,onSnapPointChange:o,direction:a="bottom"}){const[c,u]=$Ae({prop:t,defaultProp:n==null?void 0:n[0],onChange:e}),f=oe.useMemo(()=>c===(n==null?void 0:n[n.length-1])||null,[n,c]),l=n&&n.length>0&&(i||i===0)&&!Number.isNaN(i)&&n[i]===c||!n,d=oe.useMemo(()=>n==null?void 0:n.findIndex(b=>b===c),[n,c]),p=oe.useMemo(()=>{var b;return(b=n==null?void 0:n.map(_=>{const R=typeof window<"u",P=typeof _=="string";let T=0;if(P&&(T=parseInt(_,10)),Ar(a)){const N=P?T:R?_*window.innerHeight:0;return R?a==="bottom"?window.innerHeight-N:-window.innerHeight+N:N}const E=P?T:R?_*window.innerWidth:0;return R?a==="right"?window.innerWidth-E:-window.innerWidth+E:E}))!=null?b:[]},[n]),h=oe.useMemo(()=>d!==null?p==null?void 0:p[d]:null,[p,d]),m=oe.useCallback(b=>{var _;const R=(_=p==null?void 0:p.findIndex(P=>P===b))!=null?_:null;o(R),Wn(r.current,{transition:`transform ${Dn.DURATION}s cubic-bezier(${Dn.EASE.join(",")})`,transform:Ar(a)?`translate3d(0, ${b}px, 0)`:`translate3d(${b}px, 0, 0)`}),p&&R!==p.length-1&&R!==i?Wn(s.current,{transition:`opacity ${Dn.DURATION}s cubic-bezier(${Dn.EASE.join(",")})`,opacity:"0"}):Wn(s.current,{transition:`opacity ${Dn.DURATION}s cubic-bezier(${Dn.EASE.join(",")})`,opacity:"1"}),u(R!==null?n==null?void 0:n[R]:null)},[r.current,n,p,i,s,u]);oe.useEffect(()=>{if(c||t){var b;const _=(b=n==null?void 0:n.findIndex(R=>R===t||R===c))!=null?b:-1;p&&_!==-1&&typeof p[_]=="number"&&m(p[_])}},[c,t,n,p,m]);function y({draggedDistance:b,closeDrawer:_,velocity:R,dismissible:P}){if(i===void 0)return;const T=a==="bottom"||a==="right"?(h??0)-b:(h??0)+b,E=d===i-1,N=d===0,k=b>0;if(E&&Wn(s.current,{transition:`opacity ${Dn.DURATION}s cubic-bezier(${Dn.EASE.join(",")})`}),R>2&&!k){P?_():m(p[0]);return}if(R>2&&k&&p&&n){m(p[n.length-1]);return}const M=p==null?void 0:p.reduce((j,L)=>typeof j!="number"||typeof L!="number"?j:Math.abs(L-T) lK&&Math.abs(b)0&&f){m(p[n.length-1]);return}if(N&&j<0&&P&&_(),d===null)return;m(p[d+j]);return}m(M)}function g({draggedDistance:b}){if(h===null)return;const _=a==="bottom"||a==="right"?h-b:h+b;(a==="bottom"||a==="right")&&_ p[p.length-1]||Wn(r.current,{transform:Ar(a)?`translate3d(0, ${_}px, 0)`:`translate3d(${_}px, 0, 0)`})}function v(b,_){if(!n||typeof d!="number"||!p||i===void 0)return null;const R=d===i-1;if(d>=i&&_)return 0;if(R&&!_)return 1;if(!l&&!R)return null;const T=R?d+1:d-1,E=R?p[T]-p[T-1]:p[T+1]-p[T],N=b/Math.abs(E);return R?1-N:N}return{isLastSnapPoint:f,activeSnapPoint:c,shouldFade:l,getPercentageDragged:v,setActiveSnapPoint:u,activeSnapPointIndex:d,onRelease:y,onDrag:g,snapPointsOffset:p}}const zAe=.25,BAe=100,R5=8,jf=16,A5=26,mk="vaul-dragging";function uK({open:t,onOpenChange:e,children:n,shouldScaleBackground:r,onDrag:s,onRelease:i,snapPoints:o,nested:a=!1,setBackgroundColorOnScale:c=!0,closeThreshold:u=zAe,scrollLockTimeout:f=BAe,dismissible:l=!0,handleOnly:d=!1,fadeFromIndex:p=o&&o.length-1,activeSnapPoint:h,setActiveSnapPoint:m,fixed:y,modal:g=!0,onClose:v,noBodyStyles:b,direction:_="bottom",preventScrollRestoration:R=!0,disablePreventScroll:P=!1}){var T;const[E=!1,N]=oe.useState(!1),[k,M]=oe.useState(!1),[I,j]=oe.useState(!1),[L,U]=oe.useState(!1),[K,H]=oe.useState(!1),[q,ee]=oe.useState(!1),se=oe.useRef(null),X=oe.useRef(null),G=oe.useRef(null),Y=oe.useRef(null),Q=oe.useRef(null),he=oe.useRef(!1),fe=oe.useRef(null),ce=oe.useRef(0),xe=oe.useRef(!1),Pe=oe.useRef(0),pe=oe.useRef(null),Le=oe.useRef(((T=pe.current)==null?void 0:T.getBoundingClientRect().height)||0),Me=oe.useRef(0),Oe=oe.useCallback($e=>{o&&$e===J.length-1&&(X.current=new Date)},[]),{activeSnapPoint:Fe,activeSnapPointIndex:ot,setActiveSnapPoint:nt,onRelease:Et,snapPointsOffset:J,onDrag:de,shouldFade:me,getPercentageDragged:Ae}=FAe({snapPoints:o,activeSnapPointProp:h,setActiveSnapPointProp:m,drawerRef:pe,fadeFromIndex:p,overlayRef:se,onSnapPointChange:Oe,direction:_});TAe({isDisabled:!E||K||!g||q||!k||P});const{restorePositionSetting:Ne}=IAe({isOpen:E,modal:g,nested:a,hasBeenOpened:k,preventScrollRestoration:R,noBodyStyles:b});function Ee(){return(window.innerWidth-A5)/window.innerWidth}function Ve($e){var Ye;!l&&!o||pe.current&&!pe.current.contains($e.target)||(Le.current=((Ye=pe.current)==null?void 0:Ye.getBoundingClientRect().height)||0,H(!0),G.current=new Date,rK()&&window.addEventListener("touchend",()=>he.current=!1,{once:!0}),$e.target.setPointerCapture($e.pointerId),ce.current=Ar(_)?$e.clientY:$e.clientX)}function et($e,Ye){var ht;let Qe=$e;const yt=(ht=window.getSelection())==null?void 0:ht.toString(),Nt=pe.current?S1(pe.current,_):null,_t=new Date;if(Qe.hasAttribute("data-vaul-no-drag")||Qe.closest("[data-vaul-no-drag]"))return!1;if(_==="right"||_==="left")return!0;if(X.current&&_t.getTime()-X.current.getTime()<500)return!1;if(Nt!==null&&(_==="bottom"?Nt>0:Nt<0))return!0;if(yt&&yt.length>0)return!1;if(Q.current&&_t.getTime()-Q.current.getTime()
Qe.clientHeight){if(Qe.scrollTop!==0)return Q.current=new Date,!1;if(Qe.getAttribute("role")==="dialog")return!0}Qe=Qe.parentNode}return!0}function qt($e){if(pe.current&&K){const Ye=_==="bottom"||_==="right"?1:-1,ht=(ce.current-(Ar(_)?$e.clientY:$e.clientX))*Ye,Qe=ht>0,yt=o&&!l&&!Qe;if(yt&&ot===0)return;const Nt=Math.abs(ht),_t=document.querySelector("[vaul-drawer-wrapper]");let Wt=Nt/Le.current;const Zt=Ae(Nt,Qe);if(Zt!==null&&(Wt=Zt),yt&&Wt>=1||!he.current&&!et($e.target,Qe))return;if(pe.current.classList.add(mk),he.current=!0,Wn(pe.current,{transition:"none"}),Wn(se.current,{transition:"none"}),o&&de({draggedDistance:ht}),Qe&&!o){const Nn=jAe(ht),Cr=Math.min(Nn*-1,0)*Ye;Wn(pe.current,{transform:Ar(_)?`translate3d(0, ${Cr}px, 0)`:`translate3d(${Cr}px, 0, 0)`});return}const ar=1-Wt;if((me||p&&ot===p-1)&&(s==null||s($e,Wt),Wn(se.current,{opacity:`${ar}`,transition:"none"},!0)),_t&&se.current&&r){const Nn=Math.min(Ee()+Wt*(1-Ee()),1),Cr=8-Wt*8,Dr=Math.max(0,14-Wt*14);Wn(_t,{borderRadius:`${Cr}px`,transform:Ar(_)?`scale(${Nn}) translate3d(0, ${Dr}px, 0)`:`scale(${Nn}) translate3d(${Dr}px, 0, 0)`,transition:"none"},!0)}if(!o){const Nn=Nt*Ye;Wn(pe.current,{transform:Ar(_)?`translate3d(0, ${Nn}px, 0)`:`translate3d(${Nn}px, 0, 0)`})}}}oe.useEffect(()=>()=>{_n(!1),Ne()},[]),oe.useEffect(()=>{var $e;function Ye(){if(!pe.current)return;const ht=document.activeElement;if(GM(ht)||xe.current){var Qe;const yt=((Qe=window.visualViewport)==null?void 0:Qe.height)||0;let Nt=window.innerHeight-yt;const _t=pe.current.getBoundingClientRect().height||0;Me.current||(Me.current=_t);const Wt=pe.current.getBoundingClientRect().top;if(Math.abs(Pe.current-Nt)>60&&(xe.current=!xe.current),o&&o.length>0&&J&&ot){const Zt=J[ot]||0;Nt+=Zt}if(Pe.current=Nt,_t>yt||xe.current){const Zt=pe.current.getBoundingClientRect().height;let ar=Zt;Zt>yt&&(ar=yt-A5),y?pe.current.style.height=`${Zt-Math.max(Nt,0)}px`:pe.current.style.height=`${Math.max(ar,yt-Wt)}px`}else pe.current.style.height=`${Me.current}px`;o&&o.length>0&&!xe.current?pe.current.style.bottom="0px":pe.current.style.bottom=`${Math.max(Nt,0)}px`}}return($e=window.visualViewport)==null||$e.addEventListener("resize",Ye),()=>{var ht;return(ht=window.visualViewport)==null?void 0:ht.removeEventListener("resize",Ye)}},[ot,o,J]);function gt(){pe.current&&(an(),v==null||v(),Wn(pe.current,{transform:Ar(_)?`translate3d(0, ${_==="bottom"?"100%":"-100%"}, 0)`:`translate3d(${_==="right"?"100%":"-100%"}, 0, 0)`,transition:`transform ${Dn.DURATION}s cubic-bezier(${Dn.EASE.join(",")})`}),Wn(se.current,{opacity:"0",transition:`opacity ${Dn.DURATION}s cubic-bezier(${Dn.EASE.join(",")})`}),_n(!1),setTimeout(()=>{j(!1),N(!1)},300),setTimeout(()=>{o&&nt(o[0])},Dn.DURATION*1e3))}oe.useEffect(()=>{if(!E&&r){const $e=setTimeout(()=>{_1(document.body)},200);return()=>clearTimeout($e)}},[E,r]),oe.useLayoutEffect(()=>{t?(N(!0),M(!0)):gt()},[t]),oe.useEffect(()=>{L&&(e==null||e(E))},[E]),oe.useEffect(()=>{U(!0)},[]);function kt(){if(!pe.current)return;const $e=document.querySelector("[vaul-drawer-wrapper]"),Ye=S1(pe.current,_);Wn(pe.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Dn.DURATION}s cubic-bezier(${Dn.EASE.join(",")})`}),Wn(se.current,{transition:`opacity ${Dn.DURATION}s cubic-bezier(${Dn.EASE.join(",")})`,opacity:"1"}),r&&Ye&&Ye>0&&E&&Wn($e,{borderRadius:`${R5}px`,overflow:"hidden",...Ar(_)?{transform:`scale(${Ee()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Ee()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Dn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Dn.EASE.join(",")})`},!0)}function an(){!K||!pe.current||(pe.current.classList.remove(mk),he.current=!1,H(!1),Y.current=new Date)}function gr($e){if(!K||!pe.current)return;pe.current.classList.remove(mk),he.current=!1,H(!1),Y.current=new Date;const Ye=S1(pe.current,_);if(!et($e.target,!1)||!Ye||Number.isNaN(Ye)||G.current===null)return;const ht=Y.current.getTime()-G.current.getTime(),Qe=ce.current-(Ar(_)?$e.clientY:$e.clientX),yt=Math.abs(Qe)/ht;if(yt>.05&&(ee(!0),setTimeout(()=>{ee(!1)},200)),o){Et({draggedDistance:Qe*(_==="bottom"||_==="right"?1:-1),closeDrawer:gt,velocity:yt,dismissible:l}),i==null||i($e,!0);return}if(_==="bottom"||_==="right"?Qe>0:Qe<0){kt(),i==null||i($e,!0);return}if(yt>lK){gt(),i==null||i($e,!1);return}var Nt;const _t=Math.min((Nt=pe.current.getBoundingClientRect().height)!=null?Nt:0,window.innerHeight);if(Ye>=_t*u){gt(),i==null||i($e,!1);return}i==null||i($e,!0),kt()}oe.useEffect(()=>{E&&(Wn(document.documentElement,{scrollBehavior:"auto"}),X.current=new Date,_n(!0))},[E]),oe.useEffect(()=>{if(pe.current&&I){var $e;const Ye=pe==null||($e=pe.current)==null?void 0:$e.querySelectorAll("*");Ye==null||Ye.forEach(ht=>{const Qe=ht;(Qe.scrollHeight>Qe.clientHeight||Qe.scrollWidth>Qe.clientWidth)&&Qe.classList.add("vaul-scrollable")})}},[I]);function _n($e){const Ye=document.querySelector("[vaul-drawer-wrapper]");!Ye||!r||($e?(c&&(b||(Wn(document.body,{background:document.body.style.backgroundColor||document.body.style.background}),Wn(document.body,{background:"black"},!0))),Wn(Ye,{borderRadius:`${R5}px`,overflow:"hidden",...Ar(_)?{transform:`scale(${Ee()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Ee()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Dn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Dn.EASE.join(",")})`})):(_1(Ye,"overflow"),_1(Ye,"transform"),_1(Ye,"borderRadius"),Wn(Ye,{transitionProperty:"transform, border-radius",transitionDuration:`${Dn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Dn.EASE.join(",")})`})))}function di($e){const Ye=$e?(window.innerWidth-jf)/window.innerWidth:1,ht=$e?-jf:0;fe.current&&window.clearTimeout(fe.current),Wn(pe.current,{transition:`transform ${Dn.DURATION}s cubic-bezier(${Dn.EASE.join(",")})`,transform:`scale(${Ye}) translate3d(0, ${ht}px, 0)`}),!$e&&pe.current&&(fe.current=setTimeout(()=>{const Qe=S1(pe.current,_);Wn(pe.current,{transition:"none",transform:Ar(_)?`translate3d(0, ${Qe}px, 0)`:`translate3d(${Qe}px, 0, 0)`})},500))}function or($e,Ye){if(Ye<0)return;const ht=Ar(_)?window.innerHeight:window.innerWidth,Qe=(ht-jf)/ht,yt=Qe+Ye*(1-Qe),Nt=-jf+Ye*jf;Wn(pe.current,{transform:Ar(_)?`scale(${yt}) translate3d(0, ${Nt}px, 0)`:`scale(${yt}) translate3d(${Nt}px, 0, 0)`,transition:"none"})}function fi($e,Ye){const ht=Ar(_)?window.innerHeight:window.innerWidth,Qe=Ye?(ht-jf)/ht:1,yt=Ye?-jf:0;Ye&&Wn(pe.current,{transition:`transform ${Dn.DURATION}s cubic-bezier(${Dn.EASE.join(",")})`,transform:Ar(_)?`scale(${Qe}) translate3d(0, ${yt}px, 0)`:`scale(${Qe}) translate3d(${yt}px, 0, 0)`})}return oe.createElement(aA,{modal:g,onOpenChange:$e=>{if(t!==void 0){e==null||e($e);return}$e?(M(!0),N($e)):gt()},open:E},oe.createElement(nK.Provider,{value:{visible:I,activeSnapPoint:Fe,snapPoints:o,setActiveSnapPoint:nt,drawerRef:pe,overlayRef:se,scaleBackground:_n,onOpenChange:e,onPress:Ve,setVisible:j,onRelease:gr,onDrag:qt,dismissible:l,handleOnly:d,isOpen:E,isDragging:K,shouldFade:me,closeDrawer:gt,onNestedDrag:or,onNestedOpenChange:di,onNestedRelease:fi,keyboardIsOpen:xe,openProp:t,modal:g,snapPointsOffset:J,direction:_}},n))}const UAe=250,HAe=120,dK=oe.forwardRef(function({preventCycle:t=!1,children:e,...n},r){const{visible:s,closeDrawer:i,isDragging:o,snapPoints:a,activeSnapPoint:c,setActiveSnapPoint:u,dismissible:f,handleOnly:l,onPress:d,onDrag:p}=UA(),h=oe.useRef(null),m=oe.useRef(!1);function y(){if(m.current){b();return}window.setTimeout(()=>{g()},HAe)}function g(){if(o||t||m.current){b();return}if(b(),(!a||a.length===0)&&f){i();return}if(c===a[a.length-1]&&f){i();return}const R=a.findIndex(T=>T===c);if(R===-1)return;const P=a[R+1];u(P)}function v(){h.current=window.setTimeout(()=>{m.current=!0},UAe)}function b(){window.clearTimeout(h.current),m.current=!1}return oe.createElement("div",{onClick:y,onDoubleClick:()=>{m.current=!0,i()},onPointerCancel:b,onPointerDown:_=>{l&&d(_),v()},onPointerMove:_=>{l&&p(_)},ref:r,"vaul-drawer-visible":s?"true":"false","vaul-handle":"","aria-hidden":"true",...n},oe.createElement("span",{"vaul-handle-hitarea":"","aria-hidden":"true"},e))});dK.displayName="Drawer.Handle";const fK=oe.forwardRef(function({children:t,...e},n){const{overlayRef:r,snapPoints:s,onRelease:i,shouldFade:o,isOpen:a,visible:c}=UA(),u=oK(n,r),f=s&&s.length>0;return oe.createElement(fy,{onMouseUp:i,ref:u,"vaul-drawer-visible":c?"true":"false","vaul-overlay":"","vaul-snap-points":a&&f?"true":"false","vaul-snap-points-overlay":a&&o?"true":"false",...e})});fK.displayName="Drawer.Overlay";const hK=oe.forwardRef(function({onOpenAutoFocus:t,onPointerDownOutside:e,onAnimationEnd:n,style:r,...s},i){const{drawerRef:o,onPress:a,onRelease:c,onDrag:u,dismissible:f,keyboardIsOpen:l,snapPointsOffset:d,visible:p,closeDrawer:h,modal:m,openProp:y,onOpenChange:g,setVisible:v,handleOnly:b,direction:_}=UA(),R=oK(i,o),P=oe.useRef(null),T=oe.useRef(!1),E=(N,k,M=0)=>{if(T.current)return!0;const I=Math.abs(N.y),j=Math.abs(N.x),L=j>I,U=["bottom","right"].includes(k)?1:-1;if(k==="left"||k==="right"){if(!(N.x*U<0)&&j>=0&&j<=M)return L}else if(!(N.y*U<0)&&I>=0&&I<=M)return!L;return T.current=!0,!0};return oe.useEffect(()=>{v(!0)},[]),oe.createElement(hy,{"vaul-drawer":"","vaul-drawer-direction":_,"vaul-drawer-visible":p?"true":"false",...s,ref:R,style:d&&d.length>0?{"--snap-point-height":`${d[0]}px`,...r}:r,onOpenAutoFocus:N=>{if(t)t(N);else{var k;N.preventDefault(),(k=o.current)==null||k.focus()}},onPointerDown:N=>{b||(s.onPointerDown==null||s.onPointerDown.call(s,N),P.current={x:N.clientX,y:N.clientY},a(N))},onPointerDownOutside:N=>{if(e==null||e(N),!m||N.defaultPrevented){N.preventDefault();return}l.current&&(l.current=!1),N.preventDefault(),g==null||g(!1),!(!f||y!==void 0)&&h()},onFocusOutside:N=>{if(!m){N.preventDefault();return}},onEscapeKeyDown:N=>{if(!m){N.preventDefault();return}},onPointerMove:N=>{if(b||(s.onPointerMove==null||s.onPointerMove.call(s,N),!P.current))return;const k=N.clientY-P.current.y,M=N.clientX-P.current.x,I=N.pointerType==="touch"?10:2;E({x:M,y:k},_,I)?u(N):(Math.abs(M)>I||Math.abs(k)>I)&&(P.current=null)},onPointerUp:N=>{s.onPointerUp==null||s.onPointerUp.call(s,N),P.current=null,T.current=!1,c(N)}})});hK.displayName="Drawer.Content";function VAe({onDrag:t,onOpenChange:e,...n}){const{onNestedDrag:r,onNestedOpenChange:s,onNestedRelease:i}=UA();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return oe.createElement(uK,{nested:!0,onClose:()=>{s(!1)},onDrag:(o,a)=>{r(o,a),t==null||t(o,a)},onOpenChange:o=>{o&&s(o),e==null||e(o)},onRelease:i,...n})}const Ql={Root:uK,NestedRoot:VAe,Content:hK,Handle:dK,Overlay:fK,Trigger:lA,Portal:cA,Close:gy,Title:py,Description:my},pK=({shouldScaleBackground:t=!0,...e})=>w.jsx(Ql.Root,{shouldScaleBackground:t,...e});pK.displayName="Drawer";const qAe=Ql.Portal,WAe=Ql.Close,mK=S.forwardRef(({className:t,...e},n)=>w.jsx(Ql.Overlay,{ref:n,className:ie("fixed inset-0 z-50 bg-black/80",t),...e}));mK.displayName=Ql.Overlay.displayName;const gK=S.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(qAe,{children:[w.jsx(mK,{}),w.jsxs(Ql.Content,{ref:r,className:ie("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",t),...n,children:[w.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),e]})]}));gK.displayName="DrawerContent";const vK=({className:t,...e})=>w.jsx("div",{className:ie("grid gap-1.5 p-4 text-center sm:text-left",t),...e});vK.displayName="DrawerHeader";const yK=({className:t,...e})=>w.jsx("div",{className:ie("mt-auto flex flex-col gap-2 p-4",t),...e});yK.displayName="DrawerFooter";const bK=S.forwardRef(({className:t,...e},n)=>w.jsx(Ql.Title,{ref:n,className:ie("text-lg font-semibold leading-none tracking-tight",t),...e}));bK.displayName=Ql.Title.displayName;const xK=S.forwardRef(({className:t,...e},n)=>w.jsx(Ql.Description,{ref:n,className:ie("text-sm text-muted-foreground",t),...e}));xK.displayName=Ql.Description.displayName;var A2="DropdownMenu",[GAe,jUe]=In(A2,[T_]),ci=T_(),[KAe,wK]=GAe(A2),_K=t=>{const{__scopeDropdownMenu:e,children:n,dir:r,open:s,defaultOpen:i,onOpenChange:o,modal:a=!0}=t,c=ci(e),u=S.useRef(null),[f=!1,l]=mr({prop:s,defaultProp:i,onChange:o});return w.jsx(KAe,{scope:e,triggerId:js(),triggerRef:u,contentId:js(),open:f,onOpenChange:l,onOpenToggle:S.useCallback(()=>l(d=>!d),[l]),modal:a,children:w.jsx(QRe,{...c,open:f,onOpenChange:l,dir:r,modal:a,children:n})})};_K.displayName=A2;var SK="DropdownMenuTrigger",CK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=t,i=wK(SK,n),o=ci(n);return w.jsx(f2,{asChild:!0,...o,children:w.jsx(De.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:c_(e,i.triggerRef),onPointerDown:ye(t.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(i.onOpenToggle(),i.open||a.preventDefault())}),onKeyDown:ye(t.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&i.onOpenToggle(),a.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});CK.displayName=SK;var YAe="DropdownMenuPortal",EK=t=>{const{__scopeDropdownMenu:e,...n}=t,r=ci(e);return w.jsx(h2,{...r,...n})};EK.displayName=YAe;var RK="DropdownMenuContent",AK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=wK(RK,n),i=ci(n),o=S.useRef(!1);return w.jsx(p2,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...r,ref:e,onCloseAutoFocus:ye(t.onCloseAutoFocus,a=>{var c;o.current||(c=s.triggerRef.current)==null||c.focus(),o.current=!1,a.preventDefault()}),onInteractOutside:ye(t.onInteractOutside,a=>{const c=a.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!s.modal||f)&&(o.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});AK.displayName=RK;var XAe="DropdownMenuGroup",PK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(m2,{...s,...r,ref:e})});PK.displayName=XAe;var QAe="DropdownMenuLabel",NK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(g2,{...s,...r,ref:e})});NK.displayName=QAe;var ZAe="DropdownMenuItem",TK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(v2,{...s,...r,ref:e})});TK.displayName=ZAe;var JAe="DropdownMenuCheckboxItem",kK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(y2,{...s,...r,ref:e})});kK.displayName=JAe;var ePe="DropdownMenuRadioGroup",tPe=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(b2,{...s,...r,ref:e})});tPe.displayName=ePe;var nPe="DropdownMenuRadioItem",DK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(x2,{...s,...r,ref:e})});DK.displayName=nPe;var rPe="DropdownMenuItemIndicator",MK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(w2,{...s,...r,ref:e})});MK.displayName=rPe;var sPe="DropdownMenuSeparator",OK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(_2,{...s,...r,ref:e})});OK.displayName=sPe;var iPe="DropdownMenuArrow",oPe=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(S2,{...s,...r,ref:e})});oPe.displayName=iPe;var aPe="DropdownMenuSubTrigger",IK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(C2,{...s,...r,ref:e})});IK.displayName=aPe;var lPe="DropdownMenuSubContent",jK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(E2,{...s,...r,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});jK.displayName=lPe;var cPe=_K,uPe=CK,dPe=EK,LK=AK,fPe=PK,$K=NK,FK=TK,zK=kK,BK=DK,UK=MK,HK=OK,VK=IK,qK=jK;const D_=cPe,M_=uPe,hPe=fPe,pPe=S.forwardRef(({className:t,inset:e,children:n,...r},s)=>w.jsxs(VK,{ref:s,className:ie("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",e&&"pl-8",t),...r,children:[n,w.jsx(ly,{className:"w-4 h-4 ml-auto"})]}));pPe.displayName=VK.displayName;const mPe=S.forwardRef(({className:t,...e},n)=>w.jsx(qK,{ref:n,className:ie("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));mPe.displayName=qK.displayName;const Py=S.forwardRef(({className:t,sideOffset:e=4,...n},r)=>w.jsx(dPe,{children:w.jsx(LK,{ref:r,sideOffset:e,className:ie("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n})}));Py.displayName=LK.displayName;const iu=S.forwardRef(({className:t,inset:e,...n},r)=>w.jsx(FK,{ref:r,className:ie("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e&&"pl-8",t),...n}));iu.displayName=FK.displayName;const WK=S.forwardRef(({className:t,children:e,checked:n,...r},s)=>w.jsxs(zK,{ref:s,className:ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n,...r,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(UK,{children:w.jsx(u_,{className:"w-4 h-4"})})}),e]}));WK.displayName=zK.displayName;const gPe=S.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(BK,{ref:r,className:ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(UK,{children:w.jsx(rA,{className:"w-2 h-2 fill-current"})})}),e]}));gPe.displayName=BK.displayName;const HA=S.forwardRef(({className:t,inset:e,...n},r)=>w.jsx($K,{ref:r,className:ie("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...n}));HA.displayName=$K.displayName;const Pp=S.forwardRef(({className:t,...e},n)=>w.jsx(HK,{ref:n,className:ie("-mx-1 my-1 h-px bg-muted",t),...e}));Pp.displayName=HK.displayName;const GK=({className:t,...e})=>w.jsx("span",{className:ie("ml-auto text-xs tracking-widest opacity-60",t),...e});GK.displayName="DropdownMenuShortcut";var O_=t=>t.type==="checkbox",Jm=t=>t instanceof Date,Js=t=>t==null;const KK=t=>typeof t=="object";var Kr=t=>!Js(t)&&!Array.isArray(t)&&KK(t)&&!Jm(t),YK=t=>Kr(t)&&t.target?O_(t.target)?t.target.checked:t.target.value:t,vPe=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,XK=(t,e)=>t.has(vPe(e)),yPe=t=>{const e=t.constructor&&t.constructor.prototype;return Kr(e)&&e.hasOwnProperty("isPrototypeOf")},P2=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Br(t){let e;const n=Array.isArray(t);if(t instanceof Date)e=new Date(t);else if(t instanceof Set)e=new Set(t);else if(!(P2&&(t instanceof Blob||t instanceof FileList))&&(n||Kr(t)))if(e=n?[]:{},!n&&!yPe(t))e=t;else for(const r in t)t.hasOwnProperty(r)&&(e[r]=Br(t[r]));else return t;return e}var I_=t=>Array.isArray(t)?t.filter(Boolean):[],Fn=t=>t===void 0,Ie=(t,e,n)=>{if(!e||!Kr(t))return n;const r=I_(e.split(/[,[\].]+?/)).reduce((s,i)=>Js(s)?s:s[i],t);return Fn(r)||r===t?Fn(t[e])?n:t[e]:r},Tl=t=>typeof t=="boolean",N2=t=>/^\w*$/.test(t),QK=t=>I_(t.replace(/["|']|\]/g,"").split(/\.|\[/)),sn=(t,e,n)=>{let r=-1;const s=N2(e)?[e]:QK(e),i=s.length,o=i-1;for(;++roe.useContext(ZK),bPe=t=>{const{children:e,...n}=t;return oe.createElement(ZK.Provider,{value:n},e)};var JK=(t,e,n,r=!0)=>{const s={defaultValues:e._defaultValues};for(const i in t)Object.defineProperty(s,i,{get:()=>{const o=i;return e._proxyFormState[o]!==Ko.all&&(e._proxyFormState[o]=!r||Ko.all),n&&(n[o]=!0),t[o]}});return s},Xs=t=>Kr(t)&&!Object.keys(t).length,e9=(t,e,n,r)=>{n(t);const{name:s,...i}=t;return Xs(i)||Object.keys(i).length>=Object.keys(e).length||Object.keys(i).find(o=>e[o]===(!r||Ko.all))},Ti=t=>Array.isArray(t)?t:[t],t9=(t,e,n)=>!t||!e||t===e||Ti(t).some(r=>r&&(n?r===e:r.startsWith(e)||e.startsWith(r)));function VA(t){const e=oe.useRef(t);e.current=t,oe.useEffect(()=>{const n=!t.disabled&&e.current.subject&&e.current.subject.subscribe({next:e.current.next});return()=>{n&&n.unsubscribe()}},[t.disabled])}function n9(t){const e=Bi(),{control:n=e.control,disabled:r,name:s,exact:i}=t||{},[o,a]=oe.useState(n._formState),c=oe.useRef(!0),u=oe.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=oe.useRef(s);return f.current=s,VA({disabled:r,next:l=>c.current&&t9(f.current,l.name,i)&&e9(l,u.current,n._updateFormState)&&a({...n._formState,...l}),subject:n._subjects.state}),oe.useEffect(()=>(c.current=!0,u.current.isValid&&n._updateValid(!0),()=>{c.current=!1}),[n]),JK(o,n,u.current,!1)}var Ml=t=>typeof t=="string",r9=(t,e,n,r,s)=>Ml(t)?(r&&e.watch.add(t),Ie(n,t,s)):Array.isArray(t)?t.map(i=>(r&&e.watch.add(i),Ie(n,i))):(r&&(e.watchAll=!0),n);function xPe(t){const e=Bi(),{control:n=e.control,name:r,defaultValue:s,disabled:i,exact:o}=t||{},a=oe.useRef(r);a.current=r,VA({disabled:i,subject:n._subjects.values,next:f=>{t9(a.current,f.name,o)&&u(Br(r9(a.current,n._names,f.values||n._formValues,!1,s)))}});const[c,u]=oe.useState(n._getWatch(r,s));return oe.useEffect(()=>n._removeUnmounted()),c}function wPe(t){const e=Bi(),{name:n,disabled:r,control:s=e.control,shouldUnregister:i}=t,o=XK(s._names.array,n),a=xPe({control:s,name:n,defaultValue:Ie(s._formValues,n,Ie(s._defaultValues,n,t.defaultValue)),exact:!0}),c=n9({control:s,name:n,exact:!0}),u=oe.useRef(s.register(n,{...t.rules,value:a,...Tl(t.disabled)?{disabled:t.disabled}:{}}));return oe.useEffect(()=>{const f=s._options.shouldUnregister||i,l=(d,p)=>{const h=Ie(s._fields,d);h&&h._f&&(h._f.mount=p)};if(l(n,!0),f){const d=Br(Ie(s._options.defaultValues,n));sn(s._defaultValues,n,d),Fn(Ie(s._formValues,n))&&sn(s._formValues,n,d)}return()=>{(o?f&&!s._state.action:f)?s.unregister(n):l(n,!1)}},[n,s,o,i]),oe.useEffect(()=>{Ie(s._fields,n)&&s._updateDisabledField({disabled:r,fields:s._fields,name:n,value:Ie(s._fields,n)._f.value})},[r,n,s]),{field:{name:n,value:a,...Tl(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:oe.useCallback(f=>u.current.onChange({target:{value:YK(f),name:n},type:EE.CHANGE}),[n]),onBlur:oe.useCallback(()=>u.current.onBlur({target:{value:Ie(s._formValues,n),name:n},type:EE.BLUR}),[n,s]),ref:oe.useCallback(f=>{const l=Ie(s._fields,n);l&&f&&(l._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:d=>f.setCustomValidity(d),reportValidity:()=>f.reportValidity()})},[s._fields,n])},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ie(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!Ie(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Ie(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Ie(c.validatingFields,n)},error:{enumerable:!0,get:()=>Ie(c.errors,n)}})}}const _Pe=t=>t.render(wPe(t));var s9=(t,e,n,r,s)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[r]:s||!0}}:{},Vu=()=>{const t=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const n=(Math.random()*16+t)%16|0;return(e=="x"?n:n&3|8).toString(16)})},gk=(t,e,n={})=>n.shouldFocus||Fn(n.shouldFocus)?n.focusName||`${t}.${Fn(n.focusIndex)?e:n.focusIndex}.`:"",w0=t=>({isOnSubmit:!t||t===Ko.onSubmit,isOnBlur:t===Ko.onBlur,isOnChange:t===Ko.onChange,isOnAll:t===Ko.all,isOnTouch:t===Ko.onTouched}),KM=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some(r=>t.startsWith(r)&&/^\.\w+/.test(t.slice(r.length))));const gg=(t,e,n,r)=>{for(const s of n||Object.keys(t)){const i=Ie(t,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],s)&&!r)break;if(o.ref&&e(o.ref,o.name)&&!r)break;gg(a,e)}else Kr(a)&&gg(a,e)}}};var i9=(t,e,n)=>{const r=Ti(Ie(t,n));return sn(r,"root",e[n]),sn(t,n,r),t},T2=t=>t.type==="file",Vd=t=>typeof t=="function",RE=t=>{if(!P2)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},oC=t=>Ml(t),k2=t=>t.type==="radio",AE=t=>t instanceof RegExp;const P5={value:!1,isValid:!1},N5={value:!0,isValid:!0};var o9=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!Fn(t[0].attributes.value)?Fn(t[0].value)||t[0].value===""?N5:{value:t[0].value,isValid:!0}:N5:P5}return P5};const T5={isValid:!1,value:null};var a9=t=>Array.isArray(t)?t.reduce((e,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:e,T5):T5;function k5(t,e,n="validate"){if(oC(t)||Array.isArray(t)&&t.every(oC)||Tl(t)&&!t)return{type:n,message:oC(t)?t:"",ref:e}}var Cm=t=>Kr(t)&&!AE(t)?t:{value:t,message:""},YM=async(t,e,n,r,s)=>{const{ref:i,refs:o,required:a,maxLength:c,minLength:u,min:f,max:l,pattern:d,validate:p,name:h,valueAsNumber:m,mount:y,disabled:g}=t._f,v=Ie(e,h);if(!y||g)return{};const b=o?o[0]:i,_=I=>{r&&b.reportValidity&&(b.setCustomValidity(Tl(I)?"":I||""),b.reportValidity())},R={},P=k2(i),T=O_(i),E=P||T,N=(m||T2(i))&&Fn(i.value)&&Fn(v)||RE(i)&&i.value===""||v===""||Array.isArray(v)&&!v.length,k=s9.bind(null,h,n,R),M=(I,j,L,U=dc.maxLength,K=dc.minLength)=>{const H=I?j:L;R[h]={type:I?U:K,message:H,ref:i,...k(I?U:K,H)}};if(s?!Array.isArray(v)||!v.length:a&&(!E&&(N||Js(v))||Tl(v)&&!v||T&&!o9(o).isValid||P&&!a9(o).isValid)){const{value:I,message:j}=oC(a)?{value:!!a,message:a}:Cm(a);if(I&&(R[h]={type:dc.required,message:j,ref:b,...k(dc.required,j)},!n))return _(j),R}if(!N&&(!Js(f)||!Js(l))){let I,j;const L=Cm(l),U=Cm(f);if(!Js(v)&&!isNaN(v)){const K=i.valueAsNumber||v&&+v;Js(L.value)||(I=K>L.value),Js(U.value)||(j=K new Date(new Date().toDateString()+" "+se),q=i.type=="time",ee=i.type=="week";Ml(L.value)&&v&&(I=q?H(v)>H(L.value):ee?v>L.value:K>new Date(L.value)),Ml(U.value)&&v&&(j=q?H(v) +I.value,U=!Js(j.value)&&v.length<+j.value;if((L||U)&&(M(L,I.message,j.message),!n))return _(R[h].message),R}if(d&&!N&&Ml(v)){const{value:I,message:j}=Cm(d);if(AE(I)&&!v.match(I)&&(R[h]={type:dc.pattern,message:j,ref:i,...k(dc.pattern,j)},!n))return _(j),R}if(p){if(Vd(p)){const I=await p(v,e),j=k5(I,b);if(j&&(R[h]={...j,...k(dc.validate,j.message)},!n))return _(j.message),R}else if(Kr(p)){let I={};for(const j in p){if(!Xs(I)&&!n)break;const L=k5(await p[j](v,e),b,j);L&&(I={...L,...k(j,L.message)},_(L.message),n&&(R[h]=I))}if(!Xs(I)&&(R[h]={ref:b,...I},!n))return R}}return _(!0),R},vk=(t,e)=>[...t,...Ti(e)],yk=t=>Array.isArray(t)?t.map(()=>{}):void 0;function bk(t,e,n){return[...t.slice(0,e),...Ti(n),...t.slice(e)]}var xk=(t,e,n)=>Array.isArray(t)?(Fn(t[n])&&(t[n]=void 0),t.splice(n,0,t.splice(e,1)[0]),t):[],wk=(t,e)=>[...Ti(e),...Ti(t)];function SPe(t,e){let n=0;const r=[...t];for(const s of e)r.splice(s-n,1),n++;return I_(r).length?r:[]}var _k=(t,e)=>Fn(e)?[]:SPe(t,Ti(e).sort((n,r)=>n-r)),Sk=(t,e,n)=>{[t[e],t[n]]=[t[n],t[e]]};function CPe(t,e){const n=e.slice(0,-1).length;let r=0;for(;r (t[e]=n,t);function RPe(t){const e=Bi(),{control:n=e.control,name:r,keyName:s="id",shouldUnregister:i}=t,[o,a]=oe.useState(n._getFieldArray(r)),c=oe.useRef(n._getFieldArray(r).map(Vu)),u=oe.useRef(o),f=oe.useRef(r),l=oe.useRef(!1);f.current=r,u.current=o,n._names.array.add(r),t.rules&&n.register(r,t.rules),VA({next:({values:R,name:P})=>{if(P===f.current||!P){const T=Ie(R,f.current);Array.isArray(T)&&(a(T),c.current=T.map(Vu))}},subject:n._subjects.array});const d=oe.useCallback(R=>{l.current=!0,n._updateFieldArray(r,R)},[n,r]),p=(R,P)=>{const T=Ti(Br(R)),E=vk(n._getFieldArray(r),T);n._names.focus=gk(r,E.length-1,P),c.current=vk(c.current,T.map(Vu)),d(E),a(E),n._updateFieldArray(r,E,vk,{argA:yk(R)})},h=(R,P)=>{const T=Ti(Br(R)),E=wk(n._getFieldArray(r),T);n._names.focus=gk(r,0,P),c.current=wk(c.current,T.map(Vu)),d(E),a(E),n._updateFieldArray(r,E,wk,{argA:yk(R)})},m=R=>{const P=_k(n._getFieldArray(r),R);c.current=_k(c.current,R),d(P),a(P),n._updateFieldArray(r,P,_k,{argA:R})},y=(R,P,T)=>{const E=Ti(Br(P)),N=bk(n._getFieldArray(r),R,E);n._names.focus=gk(r,R,T),c.current=bk(c.current,R,E.map(Vu)),d(N),a(N),n._updateFieldArray(r,N,bk,{argA:R,argB:yk(P)})},g=(R,P)=>{const T=n._getFieldArray(r);Sk(T,R,P),Sk(c.current,R,P),d(T),a(T),n._updateFieldArray(r,T,Sk,{argA:R,argB:P},!1)},v=(R,P)=>{const T=n._getFieldArray(r);xk(T,R,P),xk(c.current,R,P),d(T),a(T),n._updateFieldArray(r,T,xk,{argA:R,argB:P},!1)},b=(R,P)=>{const T=Br(P),E=D5(n._getFieldArray(r),R,T);c.current=[...E].map((N,k)=>!N||k===R?Vu():c.current[k]),d(E),a([...E]),n._updateFieldArray(r,E,D5,{argA:R,argB:T},!0,!1)},_=R=>{const P=Ti(Br(R));c.current=P.map(Vu),d([...P]),a([...P]),n._updateFieldArray(r,[...P],T=>T,{},!0,!1)};return oe.useEffect(()=>{if(n._state.action=!1,KM(r,n._names)&&n._subjects.state.next({...n._formState}),l.current&&(!w0(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([r]).then(R=>{const P=Ie(R.errors,r),T=Ie(n._formState.errors,r);(T?!P&&T.type||P&&(T.type!==P.type||T.message!==P.message):P&&P.type)&&(P?sn(n._formState.errors,r,P):Rr(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const R=Ie(n._fields,r);R&&R._f&&!(w0(n._options.reValidateMode).isOnSubmit&&w0(n._options.mode).isOnSubmit)&&YM(R,n._formValues,n._options.criteriaMode===Ko.all,n._options.shouldUseNativeValidation,!0).then(P=>!Xs(P)&&n._subjects.state.next({errors:i9(n._formState.errors,P,r)}))}n._subjects.values.next({name:r,values:{...n._formValues}}),n._names.focus&&gg(n._fields,(R,P)=>{if(n._names.focus&&P.startsWith(n._names.focus)&&R.focus)return R.focus(),1}),n._names.focus="",n._updateValid(),l.current=!1},[o,r,n]),oe.useEffect(()=>(!Ie(n._formValues,r)&&n._updateFieldArray(r),()=>{(n._options.shouldUnregister||i)&&n.unregister(r)}),[r,n,s,i]),{swap:oe.useCallback(g,[d,r,n]),move:oe.useCallback(v,[d,r,n]),prepend:oe.useCallback(h,[d,r,n]),append:oe.useCallback(p,[d,r,n]),remove:oe.useCallback(m,[d,r,n]),insert:oe.useCallback(y,[d,r,n]),update:oe.useCallback(b,[d,r,n]),replace:oe.useCallback(_,[d,r,n]),fields:oe.useMemo(()=>o.map((R,P)=>({...R,[s]:c.current[P]||Vu()})),[o,s])}}var Ck=()=>{let t=[];return{get observers(){return t},next:s=>{for(const i of t)i.next&&i.next(s)},subscribe:s=>(t.push(s),{unsubscribe:()=>{t=t.filter(i=>i!==s)}}),unsubscribe:()=>{t=[]}}},PE=t=>Js(t)||!KK(t);function rh(t,e){if(PE(t)||PE(e))return t===e;if(Jm(t)&&Jm(e))return t.getTime()===e.getTime();const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const s of n){const i=t[s];if(!r.includes(s))return!1;if(s!=="ref"){const o=e[s];if(Jm(i)&&Jm(o)||Kr(i)&&Kr(o)||Array.isArray(i)&&Array.isArray(o)?!rh(i,o):i!==o)return!1}}return!0}var l9=t=>t.type==="select-multiple",APe=t=>k2(t)||O_(t),Ek=t=>RE(t)&&t.isConnected,c9=t=>{for(const e in t)if(Vd(t[e]))return!0;return!1};function NE(t,e={}){const n=Array.isArray(t);if(Kr(t)||n)for(const r in t)Array.isArray(t[r])||Kr(t[r])&&!c9(t[r])?(e[r]=Array.isArray(t[r])?[]:{},NE(t[r],e[r])):Js(t[r])||(e[r]=!0);return e}function u9(t,e,n){const r=Array.isArray(t);if(Kr(t)||r)for(const s in t)Array.isArray(t[s])||Kr(t[s])&&!c9(t[s])?Fn(e)||PE(n[s])?n[s]=Array.isArray(t[s])?NE(t[s],[]):{...NE(t[s])}:u9(t[s],Js(e)?{}:e[s],n[s]):n[s]=!rh(t[s],e[s]);return n}var C1=(t,e)=>u9(t,e,NE(e)),d9=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:r})=>Fn(t)?t:e?t===""?NaN:t&&+t:n&&Ml(t)?new Date(t):r?r(t):t;function Rk(t){const e=t.ref;if(!(t.refs?t.refs.every(n=>n.disabled):e.disabled))return T2(e)?e.files:k2(e)?a9(t.refs).value:l9(e)?[...e.selectedOptions].map(({value:n})=>n):O_(e)?o9(t.refs).value:d9(Fn(e.value)?t.ref.value:e.value,t)}var PPe=(t,e,n,r)=>{const s={};for(const i of t){const o=Ie(e,i);o&&sn(s,i,o._f)}return{criteriaMode:n,names:[...t],fields:s,shouldUseNativeValidation:r}},Cb=t=>Fn(t)?t:AE(t)?t.source:Kr(t)?AE(t.value)?t.value.source:t.value:t,NPe=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate);function M5(t,e,n){const r=Ie(t,n);if(r||N2(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=Ie(e,i),a=Ie(t,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};s.pop()}return{name:n}}var TPe=(t,e,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(e||t):(n?r.isOnBlur:s.isOnBlur)?!t:(n?r.isOnChange:s.isOnChange)?t:!0,kPe=(t,e)=>!I_(Ie(t,e)).length&&Rr(t,e);const DPe={mode:Ko.onSubmit,reValidateMode:Ko.onChange,shouldFocusError:!0};function MPe(t={}){let e={...DPe,...t},n={submitCount:0,isDirty:!1,isLoading:Vd(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},r={},s=Kr(e.defaultValues)||Kr(e.values)?Br(e.defaultValues||e.values)||{}:{},i=e.shouldUnregister?{}:Br(s),o={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},l={values:Ck(),array:Ck(),state:Ck()},d=w0(e.mode),p=w0(e.reValidateMode),h=e.criteriaMode===Ko.all,m=J=>de=>{clearTimeout(u),u=setTimeout(J,de)},y=async J=>{if(f.isValid||J){const de=e.resolver?Xs((await E()).errors):await k(r,!0);de!==n.isValid&&l.state.next({isValid:de})}},g=(J,de)=>{(f.isValidating||f.validatingFields)&&((J||Array.from(a.mount)).forEach(me=>{me&&(de?sn(n.validatingFields,me,de):Rr(n.validatingFields,me))}),l.state.next({validatingFields:n.validatingFields,isValidating:!Xs(n.validatingFields)}))},v=(J,de=[],me,Ae,Ne=!0,Ee=!0)=>{if(Ae&&me){if(o.action=!0,Ee&&Array.isArray(Ie(r,J))){const Ve=me(Ie(r,J),Ae.argA,Ae.argB);Ne&&sn(r,J,Ve)}if(Ee&&Array.isArray(Ie(n.errors,J))){const Ve=me(Ie(n.errors,J),Ae.argA,Ae.argB);Ne&&sn(n.errors,J,Ve),kPe(n.errors,J)}if(f.touchedFields&&Ee&&Array.isArray(Ie(n.touchedFields,J))){const Ve=me(Ie(n.touchedFields,J),Ae.argA,Ae.argB);Ne&&sn(n.touchedFields,J,Ve)}f.dirtyFields&&(n.dirtyFields=C1(s,i)),l.state.next({name:J,isDirty:I(J,de),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else sn(i,J,de)},b=(J,de)=>{sn(n.errors,J,de),l.state.next({errors:n.errors})},_=J=>{n.errors=J,l.state.next({errors:n.errors,isValid:!1})},R=(J,de,me,Ae)=>{const Ne=Ie(r,J);if(Ne){const Ee=Ie(i,J,Fn(me)?Ie(s,J):me);Fn(Ee)||Ae&&Ae.defaultChecked||de?sn(i,J,de?Ee:Rk(Ne._f)):U(J,Ee),o.mount&&y()}},P=(J,de,me,Ae,Ne)=>{let Ee=!1,Ve=!1;const et={name:J},qt=!!(Ie(r,J)&&Ie(r,J)._f&&Ie(r,J)._f.disabled);if(!me||Ae){f.isDirty&&(Ve=n.isDirty,n.isDirty=et.isDirty=I(),Ee=Ve!==et.isDirty);const gt=qt||rh(Ie(s,J),de);Ve=!!(!qt&&Ie(n.dirtyFields,J)),gt||qt?Rr(n.dirtyFields,J):sn(n.dirtyFields,J,!0),et.dirtyFields=n.dirtyFields,Ee=Ee||f.dirtyFields&&Ve!==!gt}if(me){const gt=Ie(n.touchedFields,J);gt||(sn(n.touchedFields,J,me),et.touchedFields=n.touchedFields,Ee=Ee||f.touchedFields&>!==me)}return Ee&&Ne&&l.state.next(et),Ee?et:{}},T=(J,de,me,Ae)=>{const Ne=Ie(n.errors,J),Ee=f.isValid&&Tl(de)&&n.isValid!==de;if(t.delayError&&me?(c=m(()=>b(J,me)),c(t.delayError)):(clearTimeout(u),c=null,me?sn(n.errors,J,me):Rr(n.errors,J)),(me?!rh(Ne,me):Ne)||!Xs(Ae)||Ee){const Ve={...Ae,...Ee&&Tl(de)?{isValid:de}:{},errors:n.errors,name:J};n={...n,...Ve},l.state.next(Ve)}},E=async J=>{g(J,!0);const de=await e.resolver(i,e.context,PPe(J||a.mount,r,e.criteriaMode,e.shouldUseNativeValidation));return g(J),de},N=async J=>{const{errors:de}=await E(J);if(J)for(const me of J){const Ae=Ie(de,me);Ae?sn(n.errors,me,Ae):Rr(n.errors,me)}else n.errors=de;return de},k=async(J,de,me={valid:!0})=>{for(const Ae in J){const Ne=J[Ae];if(Ne){const{_f:Ee,...Ve}=Ne;if(Ee){const et=a.array.has(Ee.name);g([Ae],!0);const qt=await YM(Ne,i,h,e.shouldUseNativeValidation&&!de,et);if(g([Ae]),qt[Ee.name]&&(me.valid=!1,de))break;!de&&(Ie(qt,Ee.name)?et?i9(n.errors,qt,Ee.name):sn(n.errors,Ee.name,qt[Ee.name]):Rr(n.errors,Ee.name))}!Xs(Ve)&&await k(Ve,de,me)}}return me.valid},M=()=>{for(const J of a.unMount){const de=Ie(r,J);de&&(de._f.refs?de._f.refs.every(me=>!Ek(me)):!Ek(de._f.ref))&&fe(J)}a.unMount=new Set},I=(J,de)=>(J&&de&&sn(i,J,de),!rh(X(),s)),j=(J,de,me)=>r9(J,a,{...o.mount?i:Fn(de)?s:Ml(J)?{[J]:de}:de},me,de),L=J=>I_(Ie(o.mount?i:s,J,t.shouldUnregister?Ie(s,J,[]):[])),U=(J,de,me={})=>{const Ae=Ie(r,J);let Ne=de;if(Ae){const Ee=Ae._f;Ee&&(!Ee.disabled&&sn(i,J,d9(de,Ee)),Ne=RE(Ee.ref)&&Js(de)?"":de,l9(Ee.ref)?[...Ee.ref.options].forEach(Ve=>Ve.selected=Ne.includes(Ve.value)):Ee.refs?O_(Ee.ref)?Ee.refs.length>1?Ee.refs.forEach(Ve=>(!Ve.defaultChecked||!Ve.disabled)&&(Ve.checked=Array.isArray(Ne)?!!Ne.find(et=>et===Ve.value):Ne===Ve.value)):Ee.refs[0]&&(Ee.refs[0].checked=!!Ne):Ee.refs.forEach(Ve=>Ve.checked=Ve.value===Ne):T2(Ee.ref)?Ee.ref.value="":(Ee.ref.value=Ne,Ee.ref.type||l.values.next({name:J,values:{...i}})))}(me.shouldDirty||me.shouldTouch)&&P(J,Ne,me.shouldTouch,me.shouldDirty,!0),me.shouldValidate&&se(J)},K=(J,de,me)=>{for(const Ae in de){const Ne=de[Ae],Ee=`${J}.${Ae}`,Ve=Ie(r,Ee);(a.array.has(J)||!PE(Ne)||Ve&&!Ve._f)&&!Jm(Ne)?K(Ee,Ne,me):U(Ee,Ne,me)}},H=(J,de,me={})=>{const Ae=Ie(r,J),Ne=a.array.has(J),Ee=Br(de);sn(i,J,Ee),Ne?(l.array.next({name:J,values:{...i}}),(f.isDirty||f.dirtyFields)&&me.shouldDirty&&l.state.next({name:J,dirtyFields:C1(s,i),isDirty:I(J,Ee)})):Ae&&!Ae._f&&!Js(Ee)?K(J,Ee,me):U(J,Ee,me),KM(J,a)&&l.state.next({...n}),l.values.next({name:o.mount?J:void 0,values:{...i}})},q=async J=>{o.mount=!0;const de=J.target;let me=de.name,Ae=!0;const Ne=Ie(r,me),Ee=()=>de.type?Rk(Ne._f):YK(J),Ve=et=>{Ae=Number.isNaN(et)||et===Ie(i,me,et)};if(Ne){let et,qt;const gt=Ee(),kt=J.type===EE.BLUR||J.type===EE.FOCUS_OUT,an=!NPe(Ne._f)&&!e.resolver&&!Ie(n.errors,me)&&!Ne._f.deps||TPe(kt,Ie(n.touchedFields,me),n.isSubmitted,p,d),gr=KM(me,a,kt);sn(i,me,gt),kt?(Ne._f.onBlur&&Ne._f.onBlur(J),c&&c(0)):Ne._f.onChange&&Ne._f.onChange(J);const _n=P(me,gt,kt,!1),di=!Xs(_n)||gr;if(!kt&&l.values.next({name:me,type:J.type,values:{...i}}),an)return f.isValid&&y(),di&&l.state.next({name:me,...gr?{}:_n});if(!kt&&gr&&l.state.next({...n}),e.resolver){const{errors:or}=await E([me]);if(Ve(gt),Ae){const fi=M5(n.errors,r,me),$e=M5(or,r,fi.name||me);et=$e.error,me=$e.name,qt=Xs(or)}}else g([me],!0),et=(await YM(Ne,i,h,e.shouldUseNativeValidation))[me],g([me]),Ve(gt),Ae&&(et?qt=!1:f.isValid&&(qt=await k(r,!0)));Ae&&(Ne._f.deps&&se(Ne._f.deps),T(me,qt,et,_n))}},ee=(J,de)=>{if(Ie(n.errors,de)&&J.focus)return J.focus(),1},se=async(J,de={})=>{let me,Ae;const Ne=Ti(J);if(e.resolver){const Ee=await N(Fn(J)?J:Ne);me=Xs(Ee),Ae=J?!Ne.some(Ve=>Ie(Ee,Ve)):me}else J?(Ae=(await Promise.all(Ne.map(async Ee=>{const Ve=Ie(r,Ee);return await k(Ve&&Ve._f?{[Ee]:Ve}:Ve)}))).every(Boolean),!(!Ae&&!n.isValid)&&y()):Ae=me=await k(r);return l.state.next({...!Ml(J)||f.isValid&&me!==n.isValid?{}:{name:J},...e.resolver||!J?{isValid:me}:{},errors:n.errors}),de.shouldFocus&&!Ae&&gg(r,ee,J?Ne:a.mount),Ae},X=J=>{const de={...o.mount?i:s};return Fn(J)?de:Ml(J)?Ie(de,J):J.map(me=>Ie(de,me))},G=(J,de)=>({invalid:!!Ie((de||n).errors,J),isDirty:!!Ie((de||n).dirtyFields,J),error:Ie((de||n).errors,J),isValidating:!!Ie(n.validatingFields,J),isTouched:!!Ie((de||n).touchedFields,J)}),Y=J=>{J&&Ti(J).forEach(de=>Rr(n.errors,de)),l.state.next({errors:J?n.errors:{}})},Q=(J,de,me)=>{const Ae=(Ie(r,J,{_f:{}})._f||{}).ref,Ne=Ie(n.errors,J)||{},{ref:Ee,message:Ve,type:et,...qt}=Ne;sn(n.errors,J,{...qt,...de,ref:Ae}),l.state.next({name:J,errors:n.errors,isValid:!1}),me&&me.shouldFocus&&Ae&&Ae.focus&&Ae.focus()},he=(J,de)=>Vd(J)?l.values.subscribe({next:me=>J(j(void 0,de),me)}):j(J,de,!0),fe=(J,de={})=>{for(const me of J?Ti(J):a.mount)a.mount.delete(me),a.array.delete(me),de.keepValue||(Rr(r,me),Rr(i,me)),!de.keepError&&Rr(n.errors,me),!de.keepDirty&&Rr(n.dirtyFields,me),!de.keepTouched&&Rr(n.touchedFields,me),!de.keepIsValidating&&Rr(n.validatingFields,me),!e.shouldUnregister&&!de.keepDefaultValue&&Rr(s,me);l.values.next({values:{...i}}),l.state.next({...n,...de.keepDirty?{isDirty:I()}:{}}),!de.keepIsValid&&y()},ce=({disabled:J,name:de,field:me,fields:Ae,value:Ne})=>{if(Tl(J)&&o.mount||J){const Ee=J?void 0:Fn(Ne)?Rk(me?me._f:Ie(Ae,de)._f):Ne;sn(i,de,Ee),P(de,Ee,!1,!1,!0)}},xe=(J,de={})=>{let me=Ie(r,J);const Ae=Tl(de.disabled);return sn(r,J,{...me||{},_f:{...me&&me._f?me._f:{ref:{name:J}},name:J,mount:!0,...de}}),a.mount.add(J),me?ce({field:me,disabled:de.disabled,name:J,value:de.value}):R(J,!0,de.value),{...Ae?{disabled:de.disabled}:{},...e.progressive?{required:!!de.required,min:Cb(de.min),max:Cb(de.max),minLength:Cb(de.minLength),maxLength:Cb(de.maxLength),pattern:Cb(de.pattern)}:{},name:J,onChange:q,onBlur:q,ref:Ne=>{if(Ne){xe(J,de),me=Ie(r,J);const Ee=Fn(Ne.value)&&Ne.querySelectorAll&&Ne.querySelectorAll("input,select,textarea")[0]||Ne,Ve=APe(Ee),et=me._f.refs||[];if(Ve?et.find(qt=>qt===Ee):Ee===me._f.ref)return;sn(r,J,{_f:{...me._f,...Ve?{refs:[...et.filter(Ek),Ee,...Array.isArray(Ie(s,J))?[{}]:[]],ref:{type:Ee.type,name:J}}:{ref:Ee}}}),R(J,!1,void 0,Ee)}else me=Ie(r,J,{}),me._f&&(me._f.mount=!1),(e.shouldUnregister||de.shouldUnregister)&&!(XK(a.array,J)&&o.action)&&a.unMount.add(J)}}},Pe=()=>e.shouldFocusError&&gg(r,ee,a.mount),pe=J=>{Tl(J)&&(l.state.next({disabled:J}),gg(r,(de,me)=>{const Ae=Ie(r,me);Ae&&(de.disabled=Ae._f.disabled||J,Array.isArray(Ae._f.refs)&&Ae._f.refs.forEach(Ne=>{Ne.disabled=Ae._f.disabled||J}))},0,!1))},Le=(J,de)=>async me=>{let Ae;me&&(me.preventDefault&&me.preventDefault(),me.persist&&me.persist());let Ne=Br(i);if(l.state.next({isSubmitting:!0}),e.resolver){const{errors:Ee,values:Ve}=await E();n.errors=Ee,Ne=Ve}else await k(r);if(Rr(n.errors,"root"),Xs(n.errors)){l.state.next({errors:{}});try{await J(Ne,me)}catch(Ee){Ae=Ee}}else de&&await de({...n.errors},me),Pe(),setTimeout(Pe);if(l.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Xs(n.errors)&&!Ae,submitCount:n.submitCount+1,errors:n.errors}),Ae)throw Ae},Me=(J,de={})=>{Ie(r,J)&&(Fn(de.defaultValue)?H(J,Br(Ie(s,J))):(H(J,de.defaultValue),sn(s,J,Br(de.defaultValue))),de.keepTouched||Rr(n.touchedFields,J),de.keepDirty||(Rr(n.dirtyFields,J),n.isDirty=de.defaultValue?I(J,Br(Ie(s,J))):I()),de.keepError||(Rr(n.errors,J),f.isValid&&y()),l.state.next({...n}))},Oe=(J,de={})=>{const me=J?Br(J):s,Ae=Br(me),Ne=Xs(J),Ee=Ne?s:Ae;if(de.keepDefaultValues||(s=me),!de.keepValues){if(de.keepDirtyValues)for(const Ve of a.mount)Ie(n.dirtyFields,Ve)?sn(Ee,Ve,Ie(i,Ve)):H(Ve,Ie(Ee,Ve));else{if(P2&&Fn(J))for(const Ve of a.mount){const et=Ie(r,Ve);if(et&&et._f){const qt=Array.isArray(et._f.refs)?et._f.refs[0]:et._f.ref;if(RE(qt)){const gt=qt.closest("form");if(gt){gt.reset();break}}}}r={}}i=t.shouldUnregister?de.keepDefaultValues?Br(s):{}:Br(Ee),l.array.next({values:{...Ee}}),l.values.next({values:{...Ee}})}a={mount:de.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!f.isValid||!!de.keepIsValid||!!de.keepDirtyValues,o.watch=!!t.shouldUnregister,l.state.next({submitCount:de.keepSubmitCount?n.submitCount:0,isDirty:Ne?!1:de.keepDirty?n.isDirty:!!(de.keepDefaultValues&&!rh(J,s)),isSubmitted:de.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Ne?{}:de.keepDirtyValues?de.keepDefaultValues&&i?C1(s,i):n.dirtyFields:de.keepDefaultValues&&J?C1(s,J):de.keepDirty?n.dirtyFields:{},touchedFields:de.keepTouched?n.touchedFields:{},errors:de.keepErrors?n.errors:{},isSubmitSuccessful:de.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Fe=(J,de)=>Oe(Vd(J)?J(i):J,de);return{control:{register:xe,unregister:fe,getFieldState:G,handleSubmit:Le,setError:Q,_executeSchema:E,_getWatch:j,_getDirty:I,_updateValid:y,_removeUnmounted:M,_updateFieldArray:v,_updateDisabledField:ce,_getFieldArray:L,_reset:Oe,_resetDefaultValues:()=>Vd(e.defaultValues)&&e.defaultValues().then(J=>{Fe(J,e.resetOptions),l.state.next({isLoading:!1})}),_updateFormState:J=>{n={...n,...J}},_disableForm:pe,_subjects:l,_proxyFormState:f,_setErrors:_,get _fields(){return r},get _formValues(){return i},get _state(){return o},set _state(J){o=J},get _defaultValues(){return s},get _names(){return a},set _names(J){a=J},get _formState(){return n},set _formState(J){n=J},get _options(){return e},set _options(J){e={...e,...J}}},trigger:se,register:xe,handleSubmit:Le,watch:he,setValue:H,getValues:X,reset:Fe,resetField:Me,clearErrors:Y,unregister:fe,setError:Q,setFocus:(J,de={})=>{const me=Ie(r,J),Ae=me&&me._f;if(Ae){const Ne=Ae.refs?Ae.refs[0]:Ae.ref;Ne.focus&&(Ne.focus(),de.shouldSelect&&Ne.select())}},getFieldState:G}}function j_(t={}){const e=oe.useRef(),n=oe.useRef(),[r,s]=oe.useState({isDirty:!1,isValidating:!1,isLoading:Vd(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,defaultValues:Vd(t.defaultValues)?void 0:t.defaultValues});e.current||(e.current={...MPe(t),formState:r});const i=e.current.control;return i._options=t,VA({subject:i._subjects.state,next:o=>{e9(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),oe.useEffect(()=>i._disableForm(t.disabled),[i,t.disabled]),oe.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==r.isDirty&&i._subjects.state.next({isDirty:o})}},[i,r.isDirty]),oe.useEffect(()=>{t.values&&!rh(t.values,n.current)?(i._reset(t.values,i._options.resetOptions),n.current=t.values,s(o=>({...o}))):i._resetDefaultValues()},[t.values,i]),oe.useEffect(()=>{t.errors&&i._setErrors(t.errors)},[t.errors,i]),oe.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),oe.useEffect(()=>{t.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[t.shouldUnregister,i]),e.current.formState=JK(r,i),e.current}var OPe="Label",f9=S.forwardRef((t,e)=>w.jsx(De.label,{...t,ref:e,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));f9.displayName=OPe;var h9=f9;const IPe=li("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Wp=S.forwardRef(({className:t,...e},n)=>w.jsx(h9,{ref:n,className:ie(IPe(),t),...e}));Wp.displayName=h9.displayName;const L_=bPe,p9=S.createContext({}),Ny=({...t})=>w.jsx(p9.Provider,{value:{name:t.name},children:w.jsx(_Pe,{...t})}),Ty=()=>{const t=S.useContext(p9),e=S.useContext(m9),{getFieldState:n,formState:r}=Bi(),s=n(t.name,r);if(!t)throw new Error("useFormField should be used within ");const{id:i}=e;return{id:i,name:t.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...s}},m9=S.createContext({}),Gp=S.forwardRef(({className:t,...e},n)=>{const r=S.useId();return w.jsx(m9.Provider,{value:{id:r},children:w.jsx("div",{ref:n,className:ie("space-y-2",t),...e})})});Gp.displayName="FormItem";const g9=S.forwardRef(({className:t,...e},n)=>{const{error:r,formItemId:s}=Ty();return w.jsx(Wp,{ref:n,className:ie(r&&"text-destructive",t),htmlFor:s,...e})});g9.displayName="FormLabel";const Kp=S.forwardRef(({...t},e)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:i}=Ty();return w.jsx(qa,{ref:e,id:r,"aria-describedby":n?`${s} ${i}`:`${s}`,"aria-invalid":!!n,...t})});Kp.displayName="FormControl";const Yp=S.forwardRef(({className:t,...e},n)=>{const{formDescriptionId:r}=Ty();return w.jsx("p",{ref:n,id:r,className:ie("text-sm text-muted-foreground",t),...e})});Yp.displayName="FormDescription";const v9=S.forwardRef(({className:t,children:e,...n},r)=>{var a;const{error:s,formMessageId:i}=Ty(),o=s&&s.message?String((s==null?void 0:s.message)||((a=s.root)==null?void 0:a.message)):e;return o?w.jsx("p",{ref:r,id:i,className:ie("text-sm font-medium text-destructive",t),...n,children:o}):null});v9.displayName="FormMessage";var Ak,y9="HoverCard",[b9,LUe]=In(y9,[Yl]),D2=Yl(),[$Ue,M2]=b9(y9),x9="HoverCardTrigger",jPe=S.forwardRef((t,e)=>{const{__scopeHoverCard:n,...r}=t,s=M2(x9,n),i=D2(n);return w.jsx(Ay,{asChild:!0,...i,children:w.jsx(De.a,{"data-state":s.open?"open":"closed",...r,ref:e,onPointerEnter:ye(t.onPointerEnter,kE(s.onOpen)),onPointerLeave:ye(t.onPointerLeave,kE(s.onClose)),onFocus:ye(t.onFocus,s.onOpen),onBlur:ye(t.onBlur,s.onClose),onTouchStart:ye(t.onTouchStart,o=>o.preventDefault())})})});jPe.displayName=x9;var LPe="HoverCardPortal",[FUe,$Pe]=b9(LPe,{forceMount:void 0}),TE="HoverCardContent",w9=S.forwardRef((t,e)=>{const n=$Pe(TE,t.__scopeHoverCard),{forceMount:r=n.forceMount,...s}=t,i=M2(TE,t.__scopeHoverCard);return w.jsx(Kn,{present:r||i.open,children:w.jsx(FPe,{"data-state":i.open?"open":"closed",...s,onPointerEnter:ye(t.onPointerEnter,kE(i.onOpen)),onPointerLeave:ye(t.onPointerLeave,kE(i.onClose)),ref:e})})});w9.displayName=TE;var FPe=S.forwardRef((t,e)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,...a}=t,c=M2(TE,n),u=D2(n),f=S.useRef(null),l=Je(e,f),[d,p]=S.useState(!1);return S.useEffect(()=>{if(d){const h=document.body;return Ak=h.style.userSelect||h.style.webkitUserSelect,h.style.userSelect="none",h.style.webkitUserSelect="none",()=>{h.style.userSelect=Ak,h.style.webkitUserSelect=Ak}}},[d]),S.useEffect(()=>{if(f.current){const h=()=>{p(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var y;((y=document.getSelection())==null?void 0:y.toString())!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",h),()=>{document.removeEventListener("pointerup",h),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),S.useEffect(()=>{f.current&&UPe(f.current).forEach(m=>m.setAttribute("tabindex","-1"))}),w.jsx(Ru,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:o,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:ye(i,h=>{h.preventDefault()}),onDismiss:c.onDismiss,children:w.jsx(E_,{...u,...a,onPointerDown:ye(a.onPointerDown,h=>{h.currentTarget.contains(h.target)&&p(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:l,style:{...a.style,userSelect:d?"text":void 0,WebkitUserSelect:d?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),zPe="HoverCardArrow",BPe=S.forwardRef((t,e)=>{const{__scopeHoverCard:n,...r}=t,s=D2(n);return w.jsx(R_,{...s,...r,ref:e})});BPe.displayName=zPe;function kE(t){return e=>e.pointerType==="touch"?void 0:t()}function UPe(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)e.push(n.currentNode);return e}var _9=w9;const HPe=S.forwardRef(({className:t,align:e="center",sideOffset:n=4,...r},s)=>w.jsx(_9,{ref:s,align:e,sideOffset:n,className:ie("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r}));HPe.displayName=_9.displayName;const qA=S.forwardRef(({className:t,type:e,...n},r)=>w.jsx("input",{type:e,className:ie("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:r,...n}));qA.displayName="Input";var WA="Menubar",[XM,VPe,qPe]=Cu(WA),[S9,zUe]=In(WA,[qPe,Xl]),Ui=T_(),C9=Xl(),[WPe,E9]=S9(WA),R9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,value:r,onValueChange:s,defaultValue:i,loop:o=!0,dir:a,...c}=t,u=Qa(a),f=C9(n),[l="",d]=mr({prop:r,onChange:s,defaultProp:i}),[p,h]=S.useState(null);return w.jsx(WPe,{scope:n,value:l,onMenuOpen:S.useCallback(m=>{d(m),h(m)},[d]),onMenuClose:S.useCallback(()=>d(""),[d]),onMenuToggle:S.useCallback(m=>{d(y=>y?"":m),h(m)},[d]),dir:u,loop:o,children:w.jsx(XM.Provider,{scope:n,children:w.jsx(XM.Slot,{scope:n,children:w.jsx(A_,{asChild:!0,...f,orientation:"horizontal",loop:o,dir:u,currentTabStopId:p,onCurrentTabStopIdChange:h,children:w.jsx(De.div,{role:"menubar",...c,ref:e})})})})})});R9.displayName=WA;var GPe="MenubarMenu",[BUe,A9]=S9(GPe),QM="MenubarTrigger",P9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,disabled:r=!1,...s}=t,i=C9(n),o=Ui(n),a=E9(QM,n),c=A9(QM,n),u=S.useRef(null),f=Je(e,u,c.triggerRef),[l,d]=S.useState(!1),p=a.value===c.value;return w.jsx(XM.ItemSlot,{scope:n,value:c.value,disabled:r,children:w.jsx(P_,{asChild:!0,...i,focusable:!r,tabStopId:c.value,children:w.jsx(f2,{asChild:!0,...o,children:w.jsx(De.button,{type:"button",role:"menuitem",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":p,"aria-controls":p?c.contentId:void 0,"data-highlighted":l?"":void 0,"data-state":p?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:f,onPointerDown:ye(t.onPointerDown,h=>{!r&&h.button===0&&h.ctrlKey===!1&&(a.onMenuOpen(c.value),p||h.preventDefault())}),onPointerEnter:ye(t.onPointerEnter,()=>{var m;!!a.value&&!p&&(a.onMenuOpen(c.value),(m=u.current)==null||m.focus())}),onKeyDown:ye(t.onKeyDown,h=>{r||(["Enter"," "].includes(h.key)&&a.onMenuToggle(c.value),h.key==="ArrowDown"&&a.onMenuOpen(c.value),["Enter"," ","ArrowDown"].includes(h.key)&&(c.wasKeyboardTriggerOpenRef.current=!0,h.preventDefault()))}),onFocus:ye(t.onFocus,()=>d(!0)),onBlur:ye(t.onBlur,()=>d(!1))})})})})});P9.displayName=QM;var KPe="MenubarPortal",N9=t=>{const{__scopeMenubar:e,...n}=t,r=Ui(e);return w.jsx(h2,{...r,...n})};N9.displayName=KPe;var ZM="MenubarContent",T9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,align:r="start",...s}=t,i=Ui(n),o=E9(ZM,n),a=A9(ZM,n),c=VPe(n),u=S.useRef(!1);return w.jsx(p2,{id:a.contentId,"aria-labelledby":a.triggerId,"data-radix-menubar-content":"",...i,...s,ref:e,align:r,onCloseAutoFocus:ye(t.onCloseAutoFocus,f=>{var d;!!!o.value&&!u.current&&((d=a.triggerRef.current)==null||d.focus()),u.current=!1,f.preventDefault()}),onFocusOutside:ye(t.onFocusOutside,f=>{const l=f.target;c().some(p=>{var h;return(h=p.ref.current)==null?void 0:h.contains(l)})&&f.preventDefault()}),onInteractOutside:ye(t.onInteractOutside,()=>{u.current=!0}),onEntryFocus:f=>{a.wasKeyboardTriggerOpenRef.current||f.preventDefault()},onKeyDown:ye(t.onKeyDown,f=>{if(["ArrowRight","ArrowLeft"].includes(f.key)){const l=f.target,d=l.hasAttribute("data-radix-menubar-subtrigger"),p=l.closest("[data-radix-menubar-content]")!==f.currentTarget,m=(o.dir==="rtl"?"ArrowRight":"ArrowLeft")===f.key;if(!m&&d||p&&m)return;let v=c().filter(R=>!R.disabled).map(R=>R.value);m&&v.reverse();const b=v.indexOf(a.value);v=o.loop?cNe(v,b+1):v.slice(b+1);const[_]=v;_&&o.onMenuOpen(_)}},{checkForDefaultPrevented:!1}),style:{...t.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});T9.displayName=ZM;var YPe="MenubarGroup",XPe=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(m2,{...s,...r,ref:e})});XPe.displayName=YPe;var QPe="MenubarLabel",k9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(g2,{...s,...r,ref:e})});k9.displayName=QPe;var ZPe="MenubarItem",D9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(v2,{...s,...r,ref:e})});D9.displayName=ZPe;var JPe="MenubarCheckboxItem",M9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(y2,{...s,...r,ref:e})});M9.displayName=JPe;var eNe="MenubarRadioGroup",tNe=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(b2,{...s,...r,ref:e})});tNe.displayName=eNe;var nNe="MenubarRadioItem",O9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(x2,{...s,...r,ref:e})});O9.displayName=nNe;var rNe="MenubarItemIndicator",I9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(w2,{...s,...r,ref:e})});I9.displayName=rNe;var sNe="MenubarSeparator",j9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(_2,{...s,...r,ref:e})});j9.displayName=sNe;var iNe="MenubarArrow",oNe=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(S2,{...s,...r,ref:e})});oNe.displayName=iNe;var aNe="MenubarSubTrigger",L9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(C2,{"data-radix-menubar-subtrigger":"",...s,...r,ref:e})});L9.displayName=aNe;var lNe="MenubarSubContent",$9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(E2,{...s,"data-radix-menubar-content":"",...r,ref:e,style:{...t.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});$9.displayName=lNe;function cNe(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var F9=R9,z9=P9,uNe=N9,B9=T9,U9=k9,H9=D9,V9=M9,q9=O9,W9=I9,G9=j9,K9=L9,Y9=$9;const dNe=S.forwardRef(({className:t,...e},n)=>w.jsx(F9,{ref:n,className:ie("flex h-10 items-center space-x-1 rounded-md border bg-background p-1",t),...e}));dNe.displayName=F9.displayName;const fNe=S.forwardRef(({className:t,...e},n)=>w.jsx(z9,{ref:n,className:ie("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t),...e}));fNe.displayName=z9.displayName;const hNe=S.forwardRef(({className:t,inset:e,children:n,...r},s)=>w.jsxs(K9,{ref:s,className:ie("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e&&"pl-8",t),...r,children:[n,w.jsx(ly,{className:"ml-auto h-4 w-4"})]}));hNe.displayName=K9.displayName;const pNe=S.forwardRef(({className:t,...e},n)=>w.jsx(Y9,{ref:n,className:ie("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));pNe.displayName=Y9.displayName;const mNe=S.forwardRef(({className:t,align:e="start",alignOffset:n=-4,sideOffset:r=8,...s},i)=>w.jsx(uNe,{children:w.jsx(B9,{ref:i,align:e,alignOffset:n,sideOffset:r,className:ie("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...s})}));mNe.displayName=B9.displayName;const gNe=S.forwardRef(({className:t,inset:e,...n},r)=>w.jsx(H9,{ref:r,className:ie("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e&&"pl-8",t),...n}));gNe.displayName=H9.displayName;const vNe=S.forwardRef(({className:t,children:e,checked:n,...r},s)=>w.jsxs(V9,{ref:s,className:ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n,...r,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(W9,{children:w.jsx(u_,{className:"h-4 w-4"})})}),e]}));vNe.displayName=V9.displayName;const yNe=S.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(q9,{ref:r,className:ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(W9,{children:w.jsx(rA,{className:"h-2 w-2 fill-current"})})}),e]}));yNe.displayName=q9.displayName;const bNe=S.forwardRef(({className:t,inset:e,...n},r)=>w.jsx(U9,{ref:r,className:ie("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...n}));bNe.displayName=U9.displayName;const xNe=S.forwardRef(({className:t,...e},n)=>w.jsx(G9,{ref:n,className:ie("-mx-1 my-1 h-px bg-muted",t),...e}));xNe.displayName=G9.displayName;var wNe="VisuallyHidden",$_=S.forwardRef((t,e)=>w.jsx(De.span,{...t,ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}));$_.displayName=wNe;var X9=$_,ky="NavigationMenu",[O2,Q9,_Ne]=Cu(ky),[JM,SNe,CNe]=Cu(ky),[I2,UUe]=In(ky,[_Ne,CNe]),[ENe,la]=I2(ky),[RNe,ANe]=I2(ky),Z9=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:s,defaultValue:i,delayDuration:o=200,skipDelayDuration:a=300,orientation:c="horizontal",dir:u,...f}=t,[l,d]=S.useState(null),p=Je(e,N=>d(N)),h=Qa(u),m=S.useRef(0),y=S.useRef(0),g=S.useRef(0),[v,b]=S.useState(!0),[_="",R]=mr({prop:r,onChange:N=>{const k=N!=="",M=a>0;k?(window.clearTimeout(g.current),M&&b(!1)):(window.clearTimeout(g.current),g.current=window.setTimeout(()=>b(!0),a)),s==null||s(N)},defaultProp:i}),P=S.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>R(""),150)},[R]),T=S.useCallback(N=>{window.clearTimeout(y.current),R(N)},[R]),E=S.useCallback(N=>{_===N?window.clearTimeout(y.current):m.current=window.setTimeout(()=>{window.clearTimeout(y.current),R(N)},o)},[_,R,o]);return S.useEffect(()=>()=>{window.clearTimeout(m.current),window.clearTimeout(y.current),window.clearTimeout(g.current)},[]),w.jsx(eY,{scope:n,isRootMenu:!0,value:_,dir:h,orientation:c,rootNavigationMenu:l,onTriggerEnter:N=>{window.clearTimeout(m.current),v?E(N):T(N)},onTriggerLeave:()=>{window.clearTimeout(m.current),P()},onContentEnter:()=>window.clearTimeout(y.current),onContentLeave:P,onItemSelect:N=>{R(k=>k===N?"":N)},onItemDismiss:()=>R(""),children:w.jsx(De.nav,{"aria-label":"Main","data-orientation":c,dir:h,...f,ref:p})})});Z9.displayName=ky;var J9="NavigationMenuSub",PNe=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:s,defaultValue:i,orientation:o="horizontal",...a}=t,c=la(J9,n),[u="",f]=mr({prop:r,onChange:s,defaultProp:i});return w.jsx(eY,{scope:n,isRootMenu:!1,value:u,dir:c.dir,orientation:o,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:l=>f(l),onItemSelect:l=>f(l),onItemDismiss:()=>f(""),children:w.jsx(De.div,{"data-orientation":o,...a,ref:e})})});PNe.displayName=J9;var eY=t=>{const{scope:e,isRootMenu:n,rootNavigationMenu:r,dir:s,orientation:i,children:o,value:a,onItemSelect:c,onItemDismiss:u,onTriggerEnter:f,onTriggerLeave:l,onContentEnter:d,onContentLeave:p}=t,[h,m]=S.useState(null),[y,g]=S.useState(new Map),[v,b]=S.useState(null);return w.jsx(ENe,{scope:e,isRootMenu:n,rootNavigationMenu:r,value:a,previousValue:xy(a),baseId:js(),dir:s,orientation:i,viewport:h,onViewportChange:m,indicatorTrack:v,onIndicatorTrackChange:b,onTriggerEnter:on(f),onTriggerLeave:on(l),onContentEnter:on(d),onContentLeave:on(p),onItemSelect:on(c),onItemDismiss:on(u),onViewportContentChange:S.useCallback((_,R)=>{g(P=>(P.set(_,R),new Map(P)))},[]),onViewportContentRemove:S.useCallback(_=>{g(R=>R.has(_)?(R.delete(_),new Map(R)):R)},[]),children:w.jsx(O2.Provider,{scope:e,children:w.jsx(RNe,{scope:e,items:y,children:o})})})},tY="NavigationMenuList",nY=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,...r}=t,s=la(tY,n),i=w.jsx(De.ul,{"data-orientation":s.orientation,...r,ref:e});return w.jsx(De.div,{style:{position:"relative"},ref:s.onIndicatorTrackChange,children:w.jsx(O2.Slot,{scope:n,children:s.isRootMenu?w.jsx(uY,{asChild:!0,children:i}):i})})});nY.displayName=tY;var rY="NavigationMenuItem",[NNe,sY]=I2(rY),TNe=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,value:r,...s}=t,i=js(),o=r||i||"LEGACY_REACT_AUTO_VALUE",a=S.useRef(null),c=S.useRef(null),u=S.useRef(null),f=S.useRef(()=>{}),l=S.useRef(!1),d=S.useCallback((h="start")=>{if(a.current){f.current();const m=tO(a.current);m.length&&$2(h==="start"?m:m.reverse())}},[]),p=S.useCallback(()=>{if(a.current){const h=tO(a.current);h.length&&(f.current=$Ne(h))}},[]);return w.jsx(NNe,{scope:n,value:o,triggerRef:c,contentRef:a,focusProxyRef:u,wasEscapeCloseRef:l,onEntryKeyDown:d,onFocusProxyEnter:d,onRootContentClose:p,onContentFocusOutside:p,children:w.jsx(De.li,{...s,ref:e})})});TNe.displayName=rY;var eO="NavigationMenuTrigger",iY=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,disabled:r,...s}=t,i=la(eO,t.__scopeNavigationMenu),o=sY(eO,t.__scopeNavigationMenu),a=S.useRef(null),c=Je(a,o.triggerRef,e),u=fY(i.baseId,o.value),f=hY(i.baseId,o.value),l=S.useRef(!1),d=S.useRef(!1),p=o.value===i.value;return w.jsxs(w.Fragment,{children:[w.jsx(O2.ItemSlot,{scope:n,value:o.value,children:w.jsx(dY,{asChild:!0,children:w.jsx(De.button,{id:u,disabled:r,"data-disabled":r?"":void 0,"data-state":F2(p),"aria-expanded":p,"aria-controls":f,...s,ref:c,onPointerEnter:ye(t.onPointerEnter,()=>{d.current=!1,o.wasEscapeCloseRef.current=!1}),onPointerMove:ye(t.onPointerMove,DE(()=>{r||d.current||o.wasEscapeCloseRef.current||l.current||(i.onTriggerEnter(o.value),l.current=!0)})),onPointerLeave:ye(t.onPointerLeave,DE(()=>{r||(i.onTriggerLeave(),l.current=!1)})),onClick:ye(t.onClick,()=>{i.onItemSelect(o.value),d.current=p}),onKeyDown:ye(t.onKeyDown,h=>{const y={horizontal:"ArrowDown",vertical:i.dir==="rtl"?"ArrowLeft":"ArrowRight"}[i.orientation];p&&h.key===y&&(o.onEntryKeyDown(),h.preventDefault())})})})}),p&&w.jsxs(w.Fragment,{children:[w.jsx(X9,{"aria-hidden":!0,tabIndex:0,ref:o.focusProxyRef,onFocus:h=>{const m=o.contentRef.current,y=h.relatedTarget,g=y===a.current,v=m==null?void 0:m.contains(y);(g||!v)&&o.onFocusProxyEnter(g?"start":"end")}}),i.viewport&&w.jsx("span",{"aria-owns":f})]})]})});iY.displayName=eO;var kNe="NavigationMenuLink",O5="navigationMenu.linkSelect",DNe=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,active:r,onSelect:s,...i}=t;return w.jsx(dY,{asChild:!0,children:w.jsx(De.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...i,ref:e,onClick:ye(t.onClick,o=>{const a=o.target,c=new CustomEvent(O5,{bubbles:!0,cancelable:!0});if(a.addEventListener(O5,u=>s==null?void 0:s(u),{once:!0}),tx(a,c),!c.defaultPrevented&&!o.metaKey){const u=new CustomEvent(aC,{bubbles:!0,cancelable:!0});tx(a,u)}},{checkForDefaultPrevented:!1})})})});DNe.displayName=kNe;var j2="NavigationMenuIndicator",oY=S.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=la(j2,t.__scopeNavigationMenu),i=!!s.value;return s.indicatorTrack?GR.createPortal(w.jsx(Kn,{present:n||i,children:w.jsx(MNe,{...r,ref:e})}),s.indicatorTrack):null});oY.displayName=j2;var MNe=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,...r}=t,s=la(j2,n),i=Q9(n),[o,a]=S.useState(null),[c,u]=S.useState(null),f=s.orientation==="horizontal",l=!!s.value;S.useEffect(()=>{var m;const h=(m=i().find(y=>y.value===s.value))==null?void 0:m.ref.current;h&&a(h)},[i,s.value]);const d=()=>{o&&u({size:f?o.offsetWidth:o.offsetHeight,offset:f?o.offsetLeft:o.offsetTop})};return nO(o,d),nO(s.indicatorTrack,d),c?w.jsx(De.div,{"aria-hidden":!0,"data-state":l?"visible":"hidden","data-orientation":s.orientation,...r,ref:e,style:{position:"absolute",...f?{left:0,width:c.size+"px",transform:`translateX(${c.offset}px)`}:{top:0,height:c.size+"px",transform:`translateY(${c.offset}px)`},...r.style}}):null}),Wv="NavigationMenuContent",aY=S.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=la(Wv,t.__scopeNavigationMenu),i=sY(Wv,t.__scopeNavigationMenu),o=Je(i.contentRef,e),a=i.value===s.value,c={value:i.value,triggerRef:i.triggerRef,focusProxyRef:i.focusProxyRef,wasEscapeCloseRef:i.wasEscapeCloseRef,onContentFocusOutside:i.onContentFocusOutside,onRootContentClose:i.onRootContentClose,...r};return s.viewport?w.jsx(ONe,{forceMount:n,...c,ref:o}):w.jsx(Kn,{present:n||a,children:w.jsx(lY,{"data-state":F2(a),...c,ref:o,onPointerEnter:ye(t.onPointerEnter,s.onContentEnter),onPointerLeave:ye(t.onPointerLeave,DE(s.onContentLeave)),style:{pointerEvents:!a&&s.isRootMenu?"none":void 0,...c.style}})})});aY.displayName=Wv;var ONe=S.forwardRef((t,e)=>{const n=la(Wv,t.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:s}=n;return ir(()=>{r(t.value,{ref:e,...t})},[t,e,r]),ir(()=>()=>s(t.value),[t.value,s]),null}),aC="navigationMenu.rootContentDismiss",lY=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:s,focusProxyRef:i,wasEscapeCloseRef:o,onRootContentClose:a,onContentFocusOutside:c,...u}=t,f=la(Wv,n),l=S.useRef(null),d=Je(l,e),p=fY(f.baseId,r),h=hY(f.baseId,r),m=Q9(n),y=S.useRef(null),{onItemDismiss:g}=f;S.useEffect(()=>{const b=l.current;if(f.isRootMenu&&b){const _=()=>{var R;g(),a(),b.contains(document.activeElement)&&((R=s.current)==null||R.focus())};return b.addEventListener(aC,_),()=>b.removeEventListener(aC,_)}},[f.isRootMenu,t.value,s,g,a]);const v=S.useMemo(()=>{const _=m().map(k=>k.value);f.dir==="rtl"&&_.reverse();const R=_.indexOf(f.value),P=_.indexOf(f.previousValue),T=r===f.value,E=P===_.indexOf(r);if(!T&&!E)return y.current;const N=(()=>{if(R!==P){if(T&&P!==-1)return R>P?"from-end":"from-start";if(E&&R!==-1)return R>P?"to-start":"to-end"}return null})();return y.current=N,N},[f.previousValue,f.value,f.dir,m,r]);return w.jsx(uY,{asChild:!0,children:w.jsx(Ru,{id:h,"aria-labelledby":p,"data-motion":v,"data-orientation":f.orientation,...u,ref:d,disableOutsidePointerEvents:!1,onDismiss:()=>{var _;const b=new Event(aC,{bubbles:!0,cancelable:!0});(_=l.current)==null||_.dispatchEvent(b)},onFocusOutside:ye(t.onFocusOutside,b=>{var R;c();const _=b.target;(R=f.rootNavigationMenu)!=null&&R.contains(_)&&b.preventDefault()}),onPointerDownOutside:ye(t.onPointerDownOutside,b=>{var T;const _=b.target,R=m().some(E=>{var N;return(N=E.ref.current)==null?void 0:N.contains(_)}),P=f.isRootMenu&&((T=f.viewport)==null?void 0:T.contains(_));(R||P||!f.isRootMenu)&&b.preventDefault()}),onKeyDown:ye(t.onKeyDown,b=>{var P;const _=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!_){const T=tO(b.currentTarget),E=document.activeElement,N=T.findIndex(I=>I===E),M=b.shiftKey?T.slice(0,N).reverse():T.slice(N+1,T.length);$2(M)?b.preventDefault():(P=i.current)==null||P.focus()}}),onEscapeKeyDown:ye(t.onEscapeKeyDown,b=>{o.current=!0})})})}),L2="NavigationMenuViewport",cY=S.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=!!la(L2,t.__scopeNavigationMenu).value;return w.jsx(Kn,{present:n||i,children:w.jsx(INe,{...r,ref:e})})});cY.displayName=L2;var INe=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,children:r,...s}=t,i=la(L2,n),o=Je(e,i.onViewportChange),a=ANe(Wv,t.__scopeNavigationMenu),[c,u]=S.useState(null),[f,l]=S.useState(null),d=c?(c==null?void 0:c.width)+"px":void 0,p=c?(c==null?void 0:c.height)+"px":void 0,h=!!i.value,m=h?i.value:i.previousValue;return nO(f,()=>{f&&u({width:f.offsetWidth,height:f.offsetHeight})}),w.jsx(De.div,{"data-state":F2(h),"data-orientation":i.orientation,...s,ref:o,style:{pointerEvents:!h&&i.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":d,"--radix-navigation-menu-viewport-height":p,...s.style},onPointerEnter:ye(t.onPointerEnter,i.onContentEnter),onPointerLeave:ye(t.onPointerLeave,DE(i.onContentLeave)),children:Array.from(a.items).map(([g,{ref:v,forceMount:b,..._}])=>{const R=m===g;return w.jsx(Kn,{present:b||R,children:w.jsx(lY,{..._,ref:c_(v,P=>{R&&P&&l(P)})})},g)})})}),jNe="FocusGroup",uY=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,...r}=t,s=la(jNe,n);return w.jsx(JM.Provider,{scope:n,children:w.jsx(JM.Slot,{scope:n,children:w.jsx(De.div,{dir:s.dir,...r,ref:e})})})}),I5=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],LNe="FocusGroupItem",dY=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,...r}=t,s=SNe(n),i=la(LNe,n);return w.jsx(JM.ItemSlot,{scope:n,children:w.jsx(De.button,{...r,ref:e,onKeyDown:ye(t.onKeyDown,o=>{if(["Home","End",...I5].includes(o.key)){let c=s().map(l=>l.ref.current);if([i.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(o.key)&&c.reverse(),I5.includes(o.key)){const l=c.indexOf(o.currentTarget);c=c.slice(l+1)}setTimeout(()=>$2(c)),o.preventDefault()}})})})});function tO(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function $2(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}function $Ne(t){return t.forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}),()=>{t.forEach(e=>{const n=e.dataset.tabindex;e.setAttribute("tabindex",n)})}}function nO(t,e){const n=on(e);ir(()=>{let r=0;if(t){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(t),()=>{window.cancelAnimationFrame(r),s.unobserve(t)}}},[t,n])}function F2(t){return t?"open":"closed"}function fY(t,e){return`${t}-trigger-${e}`}function hY(t,e){return`${t}-content-${e}`}function DE(t){return e=>e.pointerType==="mouse"?t(e):void 0}var pY=Z9,mY=nY,gY=iY,vY=oY,yY=aY,bY=cY;const FNe=S.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(pY,{ref:r,className:ie("relative z-10 flex max-w-max flex-1 items-center justify-center",t),...n,children:[e,w.jsx(xY,{})]}));FNe.displayName=pY.displayName;const zNe=S.forwardRef(({className:t,...e},n)=>w.jsx(mY,{ref:n,className:ie("group flex flex-1 list-none items-center justify-center space-x-1",t),...e}));zNe.displayName=mY.displayName;const BNe=li("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),UNe=S.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(gY,{ref:r,className:ie(BNe(),"group",t),...n,children:[e," ",w.jsx(d_,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));UNe.displayName=gY.displayName;const HNe=S.forwardRef(({className:t,...e},n)=>w.jsx(yY,{ref:n,className:ie("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",t),...e}));HNe.displayName=yY.displayName;const xY=S.forwardRef(({className:t,...e},n)=>w.jsx("div",{className:ie("absolute left-0 top-full flex justify-center"),children:w.jsx(bY,{className:ie("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",t),ref:n,...e})}));xY.displayName=bY.displayName;const VNe=S.forwardRef(({className:t,...e},n)=>w.jsx(vY,{ref:n,className:ie("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",t),...e,children:w.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));VNe.displayName=vY.displayName;var qNe=typeof window>"u",rO=qNe?oe.useEffect:oe.useLayoutEffect,WNe=0,j5=()=>++WNe,L5=!1;function GNe(){let[t,e]=oe.useState(L5?j5:void 0);return rO(()=>{t===void 0&&e(j5()),L5=!0},[]),t===void 0?t:`rwb-${t.toString(32)}`}function KNe(){return oe.useMemo(()=>"useId"in oe?oe.useId:GNe,[])()}var sO="__wrap_b",_0="__wrap_n",$5="__wrap_o",wY=(t,e,n)=>{n=n||document.querySelector(`[data-br="${t}"]`);let r=n==null?void 0:n.parentElement;if(!r)return;let s=f=>n.style.maxWidth=f+"px";n.style.maxWidth="";let i=r.clientWidth,o=r.clientHeight,a=i/2-.25,c=i+.5,u;if(i){for(s(a),a=Math.max(n.scrollWidth,a);a+1 {self.__wrap_b(0,+n.dataset.brr,n)})).observe(r)},YNe=wY.toString(),XNe='(self.CSS&&CSS.supports("text-wrap","balance")?1:2)',QNe=(t,e,n="")=>(n&&(n=`self.${_0}!=1&&${n}`),oe.createElement("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:(t?"":`self.${_0}=self.${_0}||${XNe};self.${sO}=${YNe};`)+n},nonce:e})),ZNe=oe.createContext({preferNative:!0,hasProvider:!1});oe.forwardRef(({ratio:t=1,preferNative:e,nonce:n,children:r,as:s,...i},o)=>{let a=KNe(),c=oe.useRef(),u=oe.useContext(ZNe),f=e??u.preferNative,l=s||"span";return oe.useImperativeHandle(o,()=>c.current,[]),rO(()=>{f&&self[_0]===1||c.current&&(self[sO]=wY)(0,t,c.current)},[r,f,t]),rO(()=>{if(!(f&&self[_0]===1))return()=>{if(!c.current)return;let d=c.current[$5];d&&(d.disconnect(),delete c.current[$5])}},[f]),oe.createElement(oe.Fragment,null,oe.createElement(l,{...i,"data-br":a,"data-brr":t,ref:c,style:{display:"inline-block",verticalAlign:"top",textDecoration:"inherit",textWrap:f?"balance":"initial"},suppressHydrationWarning:!0},r),QNe(u.hasProvider,n,`self.${sO}("${a}",${t})`))});var JNe="Separator",F5="horizontal",eTe=["horizontal","vertical"],_Y=S.forwardRef((t,e)=>{const{decorative:n,orientation:r=F5,...s}=t,i=tTe(r)?r:F5,a=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return w.jsx(De.div,{"data-orientation":i,...a,...s,ref:e})});_Y.displayName=JNe;function tTe(t){return eTe.includes(t)}var SY=_Y;const ou=S.forwardRef(({className:t,orientation:e="horizontal",decorative:n=!0,...r},s)=>w.jsx(SY,{ref:s,decorative:n,orientation:e,className:ie("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...r}));ou.displayName=SY.displayName;const nTe=S.forwardRef(({className:t,...e},n)=>w.jsx("ul",{ref:n,className:ie("flex flex-row items-center gap-1",t),...e}));nTe.displayName="PaginationContent";const rTe=S.forwardRef(({className:t,...e},n)=>w.jsx("li",{ref:n,className:ie("",t),...e}));rTe.displayName="PaginationItem";var z2="Popover",[CY,HUe]=In(z2,[Yl]),F_=Yl(),[sTe,bf]=CY(z2),EY=t=>{const{__scopePopover:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!1}=t,a=F_(e),c=S.useRef(null),[u,f]=S.useState(!1),[l=!1,d]=mr({prop:r,defaultProp:s,onChange:i});return w.jsx($A,{...a,children:w.jsx(sTe,{scope:e,contentId:js(),triggerRef:c,open:l,onOpenChange:d,onOpenToggle:S.useCallback(()=>d(p=>!p),[d]),hasCustomAnchor:u,onCustomAnchorAdd:S.useCallback(()=>f(!0),[]),onCustomAnchorRemove:S.useCallback(()=>f(!1),[]),modal:o,children:n})})};EY.displayName=z2;var RY="PopoverAnchor",iTe=S.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=bf(RY,n),i=F_(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:a}=s;return S.useEffect(()=>(o(),()=>a()),[o,a]),w.jsx(Ay,{...i,...r,ref:e})});iTe.displayName=RY;var AY="PopoverTrigger",PY=S.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=bf(AY,n),i=F_(n),o=Je(e,s.triggerRef),a=w.jsx(De.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":MY(s.open),...r,ref:o,onClick:ye(t.onClick,s.onOpenToggle)});return s.hasCustomAnchor?a:w.jsx(Ay,{asChild:!0,...i,children:a})});PY.displayName=AY;var B2="PopoverPortal",[oTe,aTe]=CY(B2,{forceMount:void 0}),NY=t=>{const{__scopePopover:e,forceMount:n,children:r,container:s}=t,i=bf(B2,e);return w.jsx(oTe,{scope:e,forceMount:n,children:w.jsx(Kn,{present:n||i.open,children:w.jsx(dy,{asChild:!0,container:s,children:r})})})};NY.displayName=B2;var Gv="PopoverContent",TY=S.forwardRef((t,e)=>{const n=aTe(Gv,t.__scopePopover),{forceMount:r=n.forceMount,...s}=t,i=bf(Gv,t.__scopePopover);return w.jsx(Kn,{present:r||i.open,children:i.modal?w.jsx(lTe,{...s,ref:e}):w.jsx(cTe,{...s,ref:e})})});TY.displayName=Gv;var lTe=S.forwardRef((t,e)=>{const n=bf(Gv,t.__scopePopover),r=S.useRef(null),s=Je(e,r),i=S.useRef(!1);return S.useEffect(()=>{const o=r.current;if(o)return p_(o)},[]),w.jsx(h_,{as:qa,allowPinchZoom:!0,children:w.jsx(kY,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ye(t.onCloseAutoFocus,o=>{var a;o.preventDefault(),i.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:ye(t.onPointerDownOutside,o=>{const a=o.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,u=a.button===2||c;i.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:ye(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),cTe=S.forwardRef((t,e)=>{const n=bf(Gv,t.__scopePopover),r=S.useRef(!1),s=S.useRef(!1);return w.jsx(kY,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=t.onInteractOutside)==null||c.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),kY=S.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...l}=t,d=bf(Gv,n),p=F_(n);return iA(),w.jsx(f_,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:w.jsx(Ru,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:f,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>d.onOpenChange(!1),children:w.jsx(E_,{"data-state":MY(d.open),role:"dialog",id:d.contentId,...p,...l,ref:e,style:{...l.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),DY="PopoverClose",uTe=S.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=bf(DY,n);return w.jsx(De.button,{type:"button",...r,ref:e,onClick:ye(t.onClick,()=>s.onOpenChange(!1))})});uTe.displayName=DY;var dTe="PopoverArrow",fTe=S.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=F_(n);return w.jsx(R_,{...s,...r,ref:e})});fTe.displayName=dTe;function MY(t){return t?"open":"closed"}var hTe=EY,pTe=PY,mTe=NY,OY=TY;const gTe=hTe,vTe=pTe,IY=S.forwardRef(({className:t,align:e="center",sideOffset:n=4,...r},s)=>w.jsx(mTe,{children:w.jsx(OY,{ref:s,align:e,sideOffset:n,className:ie("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r})}));IY.displayName=OY.displayName;var U2="Progress",H2=100,[yTe,VUe]=In(U2),[bTe,xTe]=yTe(U2),jY=S.forwardRef((t,e)=>{const{__scopeProgress:n,value:r=null,max:s,getValueLabel:i=wTe,...o}=t;(s||s===0)&&!z5(s)&&console.error(_Te(`${s}`,"Progress"));const a=z5(s)?s:H2;r!==null&&!B5(r,a)&&console.error(STe(`${r}`,"Progress"));const c=B5(r,a)?r:null,u=ME(c)?i(c,a):void 0;return w.jsx(bTe,{scope:n,value:c,max:a,children:w.jsx(De.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":ME(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":FY(c,a),"data-value":c??void 0,"data-max":a,...o,ref:e})})});jY.displayName=U2;var LY="ProgressIndicator",$Y=S.forwardRef((t,e)=>{const{__scopeProgress:n,...r}=t,s=xTe(LY,n);return w.jsx(De.div,{"data-state":FY(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...r,ref:e})});$Y.displayName=LY;function wTe(t,e){return`${Math.round(t/e*100)}%`}function FY(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function ME(t){return typeof t=="number"}function z5(t){return ME(t)&&!isNaN(t)&&t>0}function B5(t,e){return ME(t)&&!isNaN(t)&&t<=e&&t>=0}function _Te(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${H2}\`.`}function STe(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: +`)},ECe=0,Sm=[];function RCe(t){var e=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),s=S.useState(ECe++)[0],i=S.useState(function(){return xL()})[0],o=S.useRef(t);S.useEffect(function(){o.current=t},[t]),S.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var m=Lq([t.lockRef.current],(t.shards||[]).map(d5),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=S.useCallback(function(m,y){if("touches"in m&&m.touches.length===2)return!o.current.allowPinchZoom;var g=y1(m),v=n.current,b="deltaX"in m?m.deltaX:v[0]-g[0],_="deltaY"in m?m.deltaY:v[1]-g[1],R,P=m.target,T=Math.abs(b)>Math.abs(_)?"h":"v";if("touches"in m&&T==="h"&&P.type==="range")return!1;var E=c5(T,P);if(!E)return!0;if(E?R=T:(R=T==="v"?"h":"v",E=c5(T,P)),!E)return!1;if(!r.current&&"changedTouches"in m&&(b||_)&&(r.current=R),!R)return!0;var N=r.current||R;return _Ce(N,y,m,N==="h"?b:_,!0)},[]),c=S.useCallback(function(m){var y=m;if(!(!Sm.length||Sm[Sm.length-1]!==i)){var g="deltaY"in y?u5(y):y1(y),v=e.current.filter(function(R){return R.name===y.type&&R.target===y.target&&SCe(R.delta,g)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var b=(o.current.shards||[]).map(d5).filter(Boolean).filter(function(R){return R.contains(y.target)}),_=b.length>0?a(y,b[0]):!o.current.noIsolation;_&&y.cancelable&&y.preventDefault()}}},[]),u=S.useCallback(function(m,y,g,v){var b={name:m,delta:y,target:g,should:v};e.current.push(b),setTimeout(function(){e.current=e.current.filter(function(_){return _!==b})},1)},[]),f=S.useCallback(function(m){n.current=y1(m),r.current=void 0},[]),l=S.useCallback(function(m){u(m.type,u5(m),m.target,a(m,t.lockRef.current))},[]),d=S.useCallback(function(m){u(m.type,y1(m),m.target,a(m,t.lockRef.current))},[]);S.useEffect(function(){return Sm.push(i),t.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:d}),document.addEventListener("wheel",c,_m),document.addEventListener("touchmove",c,_m),document.addEventListener("touchstart",f,_m),function(){Sm=Sm.filter(function(m){return m!==i}),document.removeEventListener("wheel",c,_m),document.removeEventListener("touchmove",c,_m),document.removeEventListener("touchstart",f,_m)}},[]);var p=t.removeScrollBar,h=t.inert;return S.createElement(S.Fragment,null,h?S.createElement(i,{styles:CCe(s)}):null,p?S.createElement(Hq,{gapMode:"margin"}):null)}const ACe=Bq(CG,RCe);var PG=S.forwardRef(function(t,e){return S.createElement(OA,Ms({},t,{ref:e,sideCar:ACe}))});PG.classNames=OA.classNames;const NG="Dialog",[TG,MUe]=B1e(NG),[PCe,Hp]=TG(NG),NCe=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!0}=t,a=S.useRef(null),c=S.useRef(null),[u=!1,f]=q1e({prop:r,defaultProp:s,onChange:i});return S.createElement(PCe,{scope:e,triggerRef:a,contentRef:c,contentId:ok(),titleId:ok(),descriptionId:ok(),open:u,onOpenChange:f,onOpenToggle:S.useCallback(()=>f(l=>!l),[f]),modal:o},n)},kG="DialogPortal",[TCe,DG]=TG(kG,{forceMount:void 0}),kCe=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,i=Hp(kG,e);return S.createElement(TCe,{scope:e,forceMount:n},S.Children.map(r,o=>S.createElement(MA,{present:n||i.open},S.createElement(fCe,{asChild:!0,container:s},o))))},zM="DialogOverlay",DCe=S.forwardRef((t,e)=>{const n=DG(zM,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Hp(zM,t.__scopeDialog);return i.modal?S.createElement(MA,{present:r||i.open},S.createElement(MCe,ii({},s,{ref:e}))):null}),MCe=S.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Hp(zM,n);return S.createElement(PG,{as:GL,allowPinchZoom:!0,shards:[s.contentRef]},S.createElement(aa.div,ii({"data-state":OG(s.open)},r,{ref:e,style:{pointerEvents:"auto",...r.style}})))}),ox="DialogContent",OCe=S.forwardRef((t,e)=>{const n=DG(ox,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Hp(ox,t.__scopeDialog);return S.createElement(MA,{present:r||i.open},i.modal?S.createElement(ICe,ii({},s,{ref:e})):S.createElement(jCe,ii({},s,{ref:e})))}),ICe=S.forwardRef((t,e)=>{const n=Hp(ox,t.__scopeDialog),r=S.useRef(null),s=w_(e,n.contentRef,r);return S.useEffect(()=>{const i=r.current;if(i)return p_(i)},[]),S.createElement(MG,ii({},t,{ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pg(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:pg(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:pg(t.onFocusOutside,i=>i.preventDefault())}))}),jCe=S.forwardRef((t,e)=>{const n=Hp(ox,t.__scopeDialog),r=S.useRef(!1),s=S.useRef(!1);return S.createElement(MG,ii({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1,s.current=!1},onInteractOutside:i=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}}))}),MG=S.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=Hp(ox,n),c=S.useRef(null),u=w_(e,c);return mCe(),S.createElement(S.Fragment,null,S.createElement(iCe,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i},S.createElement(nCe,ii({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":OG(a.open)},o,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)});function OG(t){return t?"open":"closed"}const LCe=NCe,$Ce=kCe,FCe=DCe,zCe=OCe;var wb='[cmdk-group=""]',dk='[cmdk-group-items=""]',BCe='[cmdk-group-heading=""]',KL='[cmdk-item=""]',f5=`${KL}:not([aria-disabled="true"])`,BM="cmdk-item-select",Gf="data-value",UCe=(t,e,n)=>F1e(t,e,n),IG=S.createContext(void 0),__=()=>S.useContext(IG),jG=S.createContext(void 0),YL=()=>S.useContext(jG),LG=S.createContext(void 0),$G=S.forwardRef((t,e)=>{let n=Dm(()=>{var G,Y;return{search:"",value:(Y=(G=t.value)!=null?G:t.defaultValue)!=null?Y:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=Dm(()=>new Set),s=Dm(()=>new Map),i=Dm(()=>new Map),o=Dm(()=>new Set),a=FG(t),{label:c,children:u,value:f,onValueChange:l,filter:d,shouldFilter:p,loop:h,disablePointerSelection:m=!1,vimBindings:y=!0,...g}=t,v=S.useId(),b=S.useId(),_=S.useId(),R=S.useRef(null),P=JCe();Ep(()=>{if(f!==void 0){let G=f.trim();n.current.value=G,T.emit()}},[f]),Ep(()=>{P(6,j)},[]);let T=S.useMemo(()=>({subscribe:G=>(o.current.add(G),()=>o.current.delete(G)),snapshot:()=>n.current,setState:(G,Y,Q)=>{var he,fe,ce;if(!Object.is(n.current[G],Y)){if(n.current[G]=Y,G==="search")I(),k(),P(1,M);else if(G==="value"&&(Q||P(5,j),((he=a.current)==null?void 0:he.value)!==void 0)){let xe=Y??"";(ce=(fe=a.current).onValueChange)==null||ce.call(fe,xe);return}T.emit()}},emit:()=>{o.current.forEach(G=>G())}}),[]),E=S.useMemo(()=>({value:(G,Y,Q)=>{var he;Y!==((he=i.current.get(G))==null?void 0:he.value)&&(i.current.set(G,{value:Y,keywords:Q}),n.current.filtered.items.set(G,N(Y,Q)),P(2,()=>{k(),T.emit()}))},item:(G,Y)=>(r.current.add(G),Y&&(s.current.has(Y)?s.current.get(Y).add(G):s.current.set(Y,new Set([G]))),P(3,()=>{I(),k(),n.current.value||M(),T.emit()}),()=>{i.current.delete(G),r.current.delete(G),n.current.filtered.items.delete(G);let Q=L();P(4,()=>{I(),(Q==null?void 0:Q.getAttribute("id"))===G&&M(),T.emit()})}),group:G=>(s.current.has(G)||s.current.set(G,new Set),()=>{i.current.delete(G),s.current.delete(G)}),filter:()=>a.current.shouldFilter,label:c||t["aria-label"],disablePointerSelection:m,listId:v,inputId:_,labelId:b,listInnerRef:R}),[]);function N(G,Y){var Q,he;let fe=(he=(Q=a.current)==null?void 0:Q.filter)!=null?he:UCe;return G?fe(G,n.current.search,Y):0}function k(){if(!n.current.search||a.current.shouldFilter===!1)return;let G=n.current.filtered.items,Y=[];n.current.filtered.groups.forEach(he=>{let fe=s.current.get(he),ce=0;fe.forEach(xe=>{let Pe=G.get(xe);ce=Math.max(Pe,ce)}),Y.push([he,ce])});let Q=R.current;U().sort((he,fe)=>{var ce,xe;let Pe=he.getAttribute("id"),pe=fe.getAttribute("id");return((ce=G.get(pe))!=null?ce:0)-((xe=G.get(Pe))!=null?xe:0)}).forEach(he=>{let fe=he.closest(dk);fe?fe.appendChild(he.parentElement===fe?he:he.closest(`${dk} > *`)):Q.appendChild(he.parentElement===Q?he:he.closest(`${dk} > *`))}),Y.sort((he,fe)=>fe[1]-he[1]).forEach(he=>{let fe=R.current.querySelector(`${wb}[${Gf}="${encodeURIComponent(he[0])}"]`);fe==null||fe.parentElement.appendChild(fe)})}function M(){let G=U().find(Q=>Q.getAttribute("aria-disabled")!=="true"),Y=G==null?void 0:G.getAttribute(Gf);T.setState("value",Y||void 0)}function I(){var G,Y,Q,he;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let fe=0;for(let ce of r.current){let xe=(Y=(G=i.current.get(ce))==null?void 0:G.value)!=null?Y:"",Pe=(he=(Q=i.current.get(ce))==null?void 0:Q.keywords)!=null?he:[],pe=N(xe,Pe);n.current.filtered.items.set(ce,pe),pe>0&&fe++}for(let[ce,xe]of s.current)for(let Pe of xe)if(n.current.filtered.items.get(Pe)>0){n.current.filtered.groups.add(ce);break}n.current.filtered.count=fe}function j(){var G,Y,Q;let he=L();he&&(((G=he.parentElement)==null?void 0:G.firstChild)===he&&((Q=(Y=he.closest(wb))==null?void 0:Y.querySelector(BCe))==null||Q.scrollIntoView({block:"nearest"})),he.scrollIntoView({block:"nearest"}))}function L(){var G;return(G=R.current)==null?void 0:G.querySelector(`${KL}[aria-selected="true"]`)}function U(){var G;return Array.from((G=R.current)==null?void 0:G.querySelectorAll(f5))}function K(G){let Y=U()[G];Y&&T.setState("value",Y.getAttribute(Gf))}function H(G){var Y;let Q=L(),he=U(),fe=he.findIndex(xe=>xe===Q),ce=he[fe+G];(Y=a.current)!=null&&Y.loop&&(ce=fe+G<0?he[he.length-1]:fe+G===he.length?he[0]:he[fe+G]),ce&&T.setState("value",ce.getAttribute(Gf))}function q(G){let Y=L(),Q=Y==null?void 0:Y.closest(wb),he;for(;Q&&!he;)Q=G>0?QCe(Q,wb):ZCe(Q,wb),he=Q==null?void 0:Q.querySelector(f5);he?T.setState("value",he.getAttribute(Gf)):H(G)}let ee=()=>K(U().length-1),se=G=>{G.preventDefault(),G.metaKey?ee():G.altKey?q(1):H(1)},X=G=>{G.preventDefault(),G.metaKey?K(0):G.altKey?q(-1):H(-1)};return S.createElement(aa.div,{ref:e,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:G=>{var Y;if((Y=g.onKeyDown)==null||Y.call(g,G),!G.defaultPrevented)switch(G.key){case"n":case"j":{y&&G.ctrlKey&&se(G);break}case"ArrowDown":{se(G);break}case"p":case"k":{y&&G.ctrlKey&&X(G);break}case"ArrowUp":{X(G);break}case"Home":{G.preventDefault(),K(0);break}case"End":{G.preventDefault(),ee();break}case"Enter":if(!G.nativeEvent.isComposing&&G.keyCode!==229){G.preventDefault();let Q=L();if(Q){let he=new Event(BM);Q.dispatchEvent(he)}}}}},S.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:tEe},c),IA(t,G=>S.createElement(jG.Provider,{value:T},S.createElement(IG.Provider,{value:E},G))))}),HCe=S.forwardRef((t,e)=>{var n,r;let s=S.useId(),i=S.useRef(null),o=S.useContext(LG),a=__(),c=FG(t),u=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:o==null?void 0:o.forceMount;Ep(()=>{if(!u)return a.item(s,o==null?void 0:o.id)},[u]);let f=zG(s,i,[t.value,t.children,i],t.keywords),l=YL(),d=Rp(P=>P.value&&P.value===f.current),p=Rp(P=>u||a.filter()===!1?!0:P.search?P.filtered.items.get(s)>0:!0);S.useEffect(()=>{let P=i.current;if(!(!P||t.disabled))return P.addEventListener(BM,h),()=>P.removeEventListener(BM,h)},[p,t.onSelect,t.disabled]);function h(){var P,T;m(),(T=(P=c.current).onSelect)==null||T.call(P,f.current)}function m(){l.setState("value",f.current,!0)}if(!p)return null;let{disabled:y,value:g,onSelect:v,forceMount:b,keywords:_,...R}=t;return S.createElement(aa.div,{ref:ax([i,e]),...R,id:s,"cmdk-item":"",role:"option","aria-disabled":!!y,"aria-selected":!!d,"data-disabled":!!y,"data-selected":!!d,onPointerMove:y||a.disablePointerSelection?void 0:m,onClick:y?void 0:h},t.children)}),VCe=S.forwardRef((t,e)=>{let{heading:n,children:r,forceMount:s,...i}=t,o=S.useId(),a=S.useRef(null),c=S.useRef(null),u=S.useId(),f=__(),l=Rp(p=>s||f.filter()===!1?!0:p.search?p.filtered.groups.has(o):!0);Ep(()=>f.group(o),[]),zG(o,a,[t.value,t.heading,c]);let d=S.useMemo(()=>({id:o,forceMount:s}),[s]);return S.createElement(aa.div,{ref:ax([a,e]),...i,"cmdk-group":"",role:"presentation",hidden:l?void 0:!0},n&&S.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),IA(t,p=>S.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},S.createElement(LG.Provider,{value:d},p))))}),qCe=S.forwardRef((t,e)=>{let{alwaysRender:n,...r}=t,s=S.useRef(null),i=Rp(o=>!o.search);return!n&&!i?null:S.createElement(aa.div,{ref:ax([s,e]),...r,"cmdk-separator":"",role:"separator"})}),WCe=S.forwardRef((t,e)=>{let{onValueChange:n,...r}=t,s=t.value!=null,i=YL(),o=Rp(f=>f.search),a=Rp(f=>f.value),c=__(),u=S.useMemo(()=>{var f;let l=(f=c.listInnerRef.current)==null?void 0:f.querySelector(`${KL}[${Gf}="${encodeURIComponent(a)}"]`);return l==null?void 0:l.getAttribute("id")},[]);return S.useEffect(()=>{t.value!=null&&i.setState("search",t.value)},[t.value]),S.createElement(aa.input,{ref:e,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":u,id:c.inputId,type:"text",value:s?t.value:o,onChange:f=>{s||i.setState("search",f.target.value),n==null||n(f.target.value)}})}),GCe=S.forwardRef((t,e)=>{let{children:n,label:r="Suggestions",...s}=t,i=S.useRef(null),o=S.useRef(null),a=__();return S.useEffect(()=>{if(o.current&&i.current){let c=o.current,u=i.current,f,l=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let d=c.offsetHeight;u.style.setProperty("--cmdk-list-height",d.toFixed(1)+"px")})});return l.observe(c),()=>{cancelAnimationFrame(f),l.unobserve(c)}}},[]),S.createElement(aa.div,{ref:ax([i,e]),...s,"cmdk-list":"",role:"listbox","aria-label":r,id:a.listId},IA(t,c=>S.createElement("div",{ref:ax([o,a.listInnerRef]),"cmdk-list-sizer":""},c)))}),KCe=S.forwardRef((t,e)=>{let{open:n,onOpenChange:r,overlayClassName:s,contentClassName:i,container:o,...a}=t;return S.createElement(LCe,{open:n,onOpenChange:r},S.createElement($Ce,{container:o},S.createElement(FCe,{"cmdk-overlay":"",className:s}),S.createElement(zCe,{"aria-label":t.label,"cmdk-dialog":"",className:i},S.createElement($G,{ref:e,...a}))))}),YCe=S.forwardRef((t,e)=>Rp(n=>n.filtered.count===0)?S.createElement(aa.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),XCe=S.forwardRef((t,e)=>{let{progress:n,children:r,label:s="Loading...",...i}=t;return S.createElement(aa.div,{ref:e,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},IA(t,o=>S.createElement("div",{"aria-hidden":!0},o)))}),Fi=Object.assign($G,{List:GCe,Item:HCe,Input:WCe,Group:VCe,Separator:qCe,Dialog:KCe,Empty:YCe,Loading:XCe});function QCe(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function ZCe(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function FG(t){let e=S.useRef(t);return Ep(()=>{e.current=t}),e}var Ep=typeof window>"u"?S.useEffect:S.useLayoutEffect;function Dm(t){let e=S.useRef();return e.current===void 0&&(e.current=t()),e}function ax(t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}function Rp(t){let e=YL(),n=()=>t(e.snapshot());return S.useSyncExternalStore(e.subscribe,n,n)}function zG(t,e,n,r=[]){let s=S.useRef(),i=__();return Ep(()=>{var o;let a=(()=>{var u;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():s.current}})(),c=r.map(u=>u.trim());i.value(t,a,c),(o=e.current)==null||o.setAttribute(Gf,a),s.current=a}),s}var JCe=()=>{let[t,e]=S.useState(),n=Dm(()=>new Map);return Ep(()=>{n.current.forEach(r=>r()),n.current=new Map},[t]),(r,s)=>{n.current.set(r,s),e({})}};function eEe(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function IA({asChild:t,children:e},n){return t&&S.isValidElement(e)?S.cloneElement(eEe(e),{ref:e.ref},n(e.props.children)):n(e)}var tEe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const S_=lA,XL=cA,nEe=uA,yE=gy,BG=S.forwardRef(({className:t,...e},n)=>w.jsx(fy,{ref:n,className:ie("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e}));BG.displayName=fy.displayName;const wy=S.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(nEe,{children:[w.jsx(BG,{}),w.jsxs(hy,{ref:r,className:ie("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...n,children:[e,w.jsxs(gy,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[w.jsx(iA,{className:"h-4 w-4"}),w.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));wy.displayName=hy.displayName;const _y=({className:t,...e})=>w.jsx("div",{className:ie("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});_y.displayName="DialogHeader";const Sy=({className:t,...e})=>w.jsx("div",{className:ie("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});Sy.displayName="DialogFooter";const Cy=S.forwardRef(({className:t,...e},n)=>w.jsx(py,{ref:n,className:ie("text-lg font-semibold leading-none tracking-tight",t),...e}));Cy.displayName=py.displayName;const jA=S.forwardRef(({className:t,...e},n)=>w.jsx(my,{ref:n,className:ie("text-sm text-muted-foreground",t),...e}));jA.displayName=my.displayName;const rEe=S.forwardRef(({className:t,...e},n)=>w.jsx(Fi,{ref:n,className:ie("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e}));rEe.displayName=Fi.displayName;const sEe=S.forwardRef(({className:t,...e},n)=>w.jsxs("div",{className:"flex items-center px-3 border-b","cmdk-input-wrapper":"",children:[w.jsx(Sq,{className:"w-4 h-4 mr-2 opacity-50 shrink-0"}),w.jsx(Fi.Input,{ref:n,className:ie("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]}));sEe.displayName=Fi.Input.displayName;const iEe=S.forwardRef(({className:t,...e},n)=>w.jsx(Fi.List,{ref:n,className:ie("max-h-[300px] overflow-y-auto overflow-x-hidden",t),...e}));iEe.displayName=Fi.List.displayName;const oEe=S.forwardRef((t,e)=>w.jsx(Fi.Empty,{ref:e,className:"py-6 text-sm text-center",...t}));oEe.displayName=Fi.Empty.displayName;const aEe=S.forwardRef(({className:t,...e},n)=>w.jsx(Fi.Group,{ref:n,className:ie("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...e}));aEe.displayName=Fi.Group.displayName;const lEe=S.forwardRef(({className:t,...e},n)=>w.jsx(Fi.Separator,{ref:n,className:ie("-mx-1 h-px bg-border",t),...e}));lEe.displayName=Fi.Separator.displayName;const cEe=S.forwardRef(({className:t,...e},n)=>w.jsx(Fi.Item,{ref:n,className:ie("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...e}));cEe.displayName=Fi.Item.displayName;const uEe=["top","right","bottom","left"],Dl=Math.min,po=Math.max,bE=Math.round,b1=Math.floor,rf=t=>({x:t,y:t}),dEe={left:"right",right:"left",bottom:"top",top:"bottom"},fEe={start:"end",end:"start"};function UM(t,e,n){return po(t,Dl(e,n))}function yu(t,e){return typeof t=="function"?t(e):t}function bu(t){return t.split("-")[0]}function Ey(t){return t.split("-")[1]}function QL(t){return t==="x"?"y":"x"}function ZL(t){return t==="y"?"height":"width"}function sf(t){return["top","bottom"].includes(bu(t))?"y":"x"}function JL(t){return QL(sf(t))}function hEe(t,e,n){n===void 0&&(n=!1);const r=Ey(t),s=JL(t),i=ZL(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=xE(o)),[o,xE(o)]}function pEe(t){const e=xE(t);return[HM(t),e,HM(e)]}function HM(t){return t.replace(/start|end/g,e=>fEe[e])}function mEe(t,e,n){const r=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:r:e?r:s;case"left":case"right":return e?i:o;default:return[]}}function gEe(t,e,n,r){const s=Ey(t);let i=mEe(bu(t),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(HM)))),i}function xE(t){return t.replace(/left|right|bottom|top/g,e=>dEe[e])}function vEe(t){return{top:0,right:0,bottom:0,left:0,...t}}function UG(t){return typeof t!="number"?vEe(t):{top:t,right:t,bottom:t,left:t}}function wE(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function h5(t,e,n){let{reference:r,floating:s}=t;const i=sf(e),o=JL(e),a=ZL(o),c=bu(e),u=i==="y",f=r.x+r.width/2-s.width/2,l=r.y+r.height/2-s.height/2,d=r[a]/2-s[a]/2;let p;switch(c){case"top":p={x:f,y:r.y-s.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:l};break;case"left":p={x:r.x-s.width,y:l};break;default:p={x:r.x,y:r.y}}switch(Ey(e)){case"start":p[o]-=d*(n&&u?-1:1);break;case"end":p[o]+=d*(n&&u?-1:1);break}return p}const yEe=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let u=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:l}=h5(u,r,c),d=r,p={},h=0;for(let m=0;m ({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:c}=e,{element:u,padding:f=0}=yu(t,e)||{};if(u==null)return{};const l=UG(f),d={x:n,y:r},p=JL(s),h=ZL(p),m=await o.getDimensions(u),y=p==="y",g=y?"top":"left",v=y?"bottom":"right",b=y?"clientHeight":"clientWidth",_=i.reference[h]+i.reference[p]-d[p]-i.floating[h],R=d[p]-i.reference[p],P=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let T=P?P[b]:0;(!T||!await(o.isElement==null?void 0:o.isElement(P)))&&(T=a.floating[b]||i.floating[h]);const E=_/2-R/2,N=T/2-m[h]/2-1,k=Dl(l[g],N),M=Dl(l[v],N),I=k,j=T-m[h]-M,L=T/2-m[h]/2+E,U=UM(I,L,j),K=!c.arrow&&Ey(s)!=null&&L!==U&&i.reference[h]/2-(LL<=0)){var M,I;const L=(((M=i.flip)==null?void 0:M.index)||0)+1,U=T[L];if(U)return{data:{index:L,overflows:k},reset:{placement:U}};let K=(I=k.filter(H=>H.overflows[0]<=0).sort((H,q)=>H.overflows[1]-q.overflows[1])[0])==null?void 0:I.placement;if(!K)switch(p){case"bestFit":{var j;const H=(j=k.filter(q=>{if(P){const ee=sf(q.placement);return ee===v||ee==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(ee=>ee>0).reduce((ee,se)=>ee+se,0)]).sort((q,ee)=>q[1]-ee[1])[0])==null?void 0:j[0];H&&(K=H);break}case"initialPlacement":K=a;break}if(s!==K)return{reset:{placement:K}}}return{}}}};function p5(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function m5(t){return uEe.some(e=>t[e]>=0)}const wEe=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...s}=yu(t,e);switch(r){case"referenceHidden":{const i=await lx(e,{...s,elementContext:"reference"}),o=p5(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:m5(o)}}}case"escaped":{const i=await lx(e,{...s,altBoundary:!0}),o=p5(i,n.floating);return{data:{escapedOffsets:o,escaped:m5(o)}}}default:return{}}}}};async function _Ee(t,e){const{placement:n,platform:r,elements:s}=t,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=bu(n),a=Ey(n),c=sf(n)==="y",u=["left","top"].includes(o)?-1:1,f=i&&c?-1:1,l=yu(e,t);let{mainAxis:d,crossAxis:p,alignmentAxis:h}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...l};return a&&typeof h=="number"&&(p=a==="end"?h*-1:h),c?{x:p*f,y:d*u}:{x:d*u,y:p*f}}const SEe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=e,c=await _Ee(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:o}}}}},CEe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:y=>{let{x:g,y:v}=y;return{x:g,y:v}}},...c}=yu(t,e),u={x:n,y:r},f=await lx(e,c),l=sf(bu(s)),d=QL(l);let p=u[d],h=u[l];if(i){const y=d==="y"?"top":"left",g=d==="y"?"bottom":"right",v=p+f[y],b=p-f[g];p=UM(v,p,b)}if(o){const y=l==="y"?"top":"left",g=l==="y"?"bottom":"right",v=h+f[y],b=h-f[g];h=UM(v,h,b)}const m=a.fn({...e,[d]:p,[l]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},EEe=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=yu(t,e),f={x:n,y:r},l=sf(s),d=QL(l);let p=f[d],h=f[l];const m=yu(a,e),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const b=d==="y"?"height":"width",_=i.reference[d]-i.floating[b]+y.mainAxis,R=i.reference[d]+i.reference[b]-y.mainAxis;p<_?p=_:p>R&&(p=R)}if(u){var g,v;const b=d==="y"?"width":"height",_=["top","left"].includes(bu(s)),R=i.reference[l]-i.floating[b]+(_&&((g=o.offset)==null?void 0:g[l])||0)+(_?0:y.crossAxis),P=i.reference[l]+i.reference[b]+(_?0:((v=o.offset)==null?void 0:v[l])||0)-(_?y.crossAxis:0);h P&&(h=P)}return{[d]:p,[l]:h}}}},REe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:r,platform:s,elements:i}=e,{apply:o=()=>{},...a}=yu(t,e),c=await lx(e,a),u=bu(n),f=Ey(n),l=sf(n)==="y",{width:d,height:p}=r.floating;let h,m;u==="top"||u==="bottom"?(h=u,m=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(m=u,h=f==="end"?"top":"bottom");const y=p-c.top-c.bottom,g=d-c.left-c.right,v=Dl(p-c[h],y),b=Dl(d-c[m],g),_=!e.middlewareData.shift;let R=v,P=b;if(l?P=f||_?Dl(b,g):g:R=f||_?Dl(v,y):y,_&&!f){const E=po(c.left,0),N=po(c.right,0),k=po(c.top,0),M=po(c.bottom,0);l?P=d-2*(E!==0||N!==0?E+N:po(c.left,c.right)):R=p-2*(k!==0||M!==0?k+M:po(c.top,c.bottom))}await o({...e,availableWidth:P,availableHeight:R});const T=await s.getDimensions(i.floating);return d!==T.width||p!==T.height?{reset:{rects:!0}}:{}}}};function Ry(t){return HG(t)?(t.nodeName||"").toLowerCase():"#document"}function yo(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Pu(t){var e;return(e=(HG(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function HG(t){return t instanceof Node||t instanceof yo(t).Node}function Bl(t){return t instanceof Element||t instanceof yo(t).Element}function Ul(t){return t instanceof HTMLElement||t instanceof yo(t).HTMLElement}function g5(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof yo(t).ShadowRoot}function C_(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=Ka(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(s)}function AEe(t){return["table","td","th"].includes(Ry(t))}function LA(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function e2(t){const e=t2(),n=Ka(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function PEe(t){let e=of(t);for(;Ul(e)&&!qv(e);){if(LA(e))return null;if(e2(e))return e;e=of(e)}return null}function t2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function qv(t){return["html","body","#document"].includes(Ry(t))}function Ka(t){return yo(t).getComputedStyle(t)}function $A(t){return Bl(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function of(t){if(Ry(t)==="html")return t;const e=t.assignedSlot||t.parentNode||g5(t)&&t.host||Pu(t);return g5(e)?e.host:e}function VG(t){const e=of(t);return qv(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ul(e)&&C_(e)?e:VG(e)}function cx(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=VG(t),i=s===((r=t.ownerDocument)==null?void 0:r.body),o=yo(s);return i?e.concat(o,o.visualViewport||[],C_(s)?s:[],o.frameElement&&n?cx(o.frameElement):[]):e.concat(s,cx(s,[],n))}function qG(t){const e=Ka(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=Ul(t),i=s?t.offsetWidth:n,o=s?t.offsetHeight:r,a=bE(n)!==i||bE(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function n2(t){return Bl(t)?t:t.contextElement}function mg(t){const e=n2(t);if(!Ul(e))return rf(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:i}=qG(e);let o=(i?bE(n.width):n.width)/r,a=(i?bE(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const NEe=rf(0);function WG(t){const e=yo(t);return!t2()||!e.visualViewport?NEe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function TEe(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==yo(t)?!1:e}function Ap(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),i=n2(t);let o=rf(1);e&&(r?Bl(r)&&(o=mg(r)):o=mg(t));const a=TEe(i,n,r)?WG(i):rf(0);let c=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,f=s.width/o.x,l=s.height/o.y;if(i){const d=yo(i),p=r&&Bl(r)?yo(r):r;let h=d,m=h.frameElement;for(;m&&r&&p!==h;){const y=mg(m),g=m.getBoundingClientRect(),v=Ka(m),b=g.left+(m.clientLeft+parseFloat(v.paddingLeft))*y.x,_=g.top+(m.clientTop+parseFloat(v.paddingTop))*y.y;c*=y.x,u*=y.y,f*=y.x,l*=y.y,c+=b,u+=_,h=yo(m),m=h.frameElement}}return wE({width:f,height:l,x:c,y:u})}function kEe(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const i=s==="fixed",o=Pu(r),a=e?LA(e.floating):!1;if(r===o||a&&i)return n;let c={scrollLeft:0,scrollTop:0},u=rf(1);const f=rf(0),l=Ul(r);if((l||!l&&!i)&&((Ry(r)!=="body"||C_(o))&&(c=$A(r)),Ul(r))){const d=Ap(r);u=mg(r),f.x=d.x+r.clientLeft,f.y=d.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x,y:n.y*u.y-c.scrollTop*u.y+f.y}}function DEe(t){return Array.from(t.getClientRects())}function GG(t){return Ap(Pu(t)).left+$A(t).scrollLeft}function MEe(t){const e=Pu(t),n=$A(t),r=t.ownerDocument.body,s=po(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=po(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+GG(t);const a=-n.scrollTop;return Ka(r).direction==="rtl"&&(o+=po(e.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function OEe(t,e){const n=yo(t),r=Pu(t),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,c=0;if(s){i=s.width,o=s.height;const u=t2();(!u||u&&e==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:i,height:o,x:a,y:c}}function IEe(t,e){const n=Ap(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,i=Ul(t)?mg(t):rf(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,c=s*i.x,u=r*i.y;return{width:o,height:a,x:c,y:u}}function v5(t,e,n){let r;if(e==="viewport")r=OEe(t,n);else if(e==="document")r=MEe(Pu(t));else if(Bl(e))r=IEe(e,n);else{const s=WG(t);r={...e,x:e.x-s.x,y:e.y-s.y}}return wE(r)}function KG(t,e){const n=of(t);return n===e||!Bl(n)||qv(n)?!1:Ka(n).position==="fixed"||KG(n,e)}function jEe(t,e){const n=e.get(t);if(n)return n;let r=cx(t,[],!1).filter(a=>Bl(a)&&Ry(a)!=="body"),s=null;const i=Ka(t).position==="fixed";let o=i?of(t):t;for(;Bl(o)&&!qv(o);){const a=Ka(o),c=e2(o);!c&&a.position==="fixed"&&(s=null),(i?!c&&!s:!c&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||C_(o)&&!c&&KG(t,o))?r=r.filter(f=>f!==o):s=a,o=of(o)}return e.set(t,r),r}function LEe(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const o=[...n==="clippingAncestors"?LA(e)?[]:jEe(e,this._c):[].concat(n),r],a=o[0],c=o.reduce((u,f)=>{const l=v5(e,f,s);return u.top=po(l.top,u.top),u.right=Dl(l.right,u.right),u.bottom=Dl(l.bottom,u.bottom),u.left=po(l.left,u.left),u},v5(e,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function $Ee(t){const{width:e,height:n}=qG(t);return{width:e,height:n}}function FEe(t,e,n){const r=Ul(e),s=Pu(e),i=n==="fixed",o=Ap(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=rf(0);if(r||!r&&!i)if((Ry(e)!=="body"||C_(s))&&(a=$A(e)),r){const l=Ap(e,!0,i,e);c.x=l.x+e.clientLeft,c.y=l.y+e.clientTop}else s&&(c.x=GG(s));const u=o.left+a.scrollLeft-c.x,f=o.top+a.scrollTop-c.y;return{x:u,y:f,width:o.width,height:o.height}}function fk(t){return Ka(t).position==="static"}function y5(t,e){return!Ul(t)||Ka(t).position==="fixed"?null:e?e(t):t.offsetParent}function YG(t,e){const n=yo(t);if(LA(t))return n;if(!Ul(t)){let s=of(t);for(;s&&!qv(s);){if(Bl(s)&&!fk(s))return s;s=of(s)}return n}let r=y5(t,e);for(;r&&AEe(r)&&fk(r);)r=y5(r,e);return r&&qv(r)&&fk(r)&&!e2(r)?n:r||PEe(t)||n}const zEe=async function(t){const e=this.getOffsetParent||YG,n=this.getDimensions,r=await n(t.floating);return{reference:FEe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function BEe(t){return Ka(t).direction==="rtl"}const UEe={convertOffsetParentRelativeRectToViewportRelativeRect:kEe,getDocumentElement:Pu,getClippingRect:LEe,getOffsetParent:YG,getElementRects:zEe,getClientRects:DEe,getDimensions:$Ee,getScale:mg,isElement:Bl,isRTL:BEe};function HEe(t,e){let n=null,r;const s=Pu(t);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:u,top:f,width:l,height:d}=t.getBoundingClientRect();if(a||e(),!l||!d)return;const p=b1(f),h=b1(s.clientWidth-(u+l)),m=b1(s.clientHeight-(f+d)),y=b1(u),v={rootMargin:-p+"px "+-h+"px "+-m+"px "+-y+"px",threshold:po(0,Dl(1,c))||1};let b=!0;function _(R){const P=R[0].intersectionRatio;if(P!==c){if(!b)return o();P?o(!1,P):r=setTimeout(()=>{o(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(_,{...v,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,v)}n.observe(t)}return o(!0),i}function VEe(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=n2(t),f=s||i?[...u?cx(u):[],...cx(e)]:[];f.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const l=u&&a?HEe(u,n):null;let d=-1,p=null;o&&(p=new ResizeObserver(g=>{let[v]=g;v&&v.target===u&&p&&(p.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(e)})),n()}),u&&!c&&p.observe(u),p.observe(e));let h,m=c?Ap(t):null;c&&y();function y(){const g=Ap(t);m&&(g.x!==m.x||g.y!==m.y||g.width!==m.width||g.height!==m.height)&&n(),m=g,h=requestAnimationFrame(y)}return n(),()=>{var g;f.forEach(v=>{s&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),l==null||l(),(g=p)==null||g.disconnect(),p=null,c&&cancelAnimationFrame(h)}}const qEe=SEe,WEe=CEe,GEe=xEe,KEe=REe,YEe=wEe,b5=bEe,XEe=EEe,QEe=(t,e,n)=>{const r=new Map,s={platform:UEe,...n},i={...s.platform,_c:r};return yEe(t,e,{...s,platform:i})};var iC=typeof document<"u"?S.useLayoutEffect:S.useEffect;function _E(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!_E(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&t.$$typeof)&&!_E(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function XG(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function x5(t,e){const n=XG(t);return Math.round(e*n)/n}function w5(t){const e=S.useRef(t);return iC(()=>{e.current=t}),e}function ZEe(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:c,open:u}=t,[f,l]=S.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[d,p]=S.useState(r);_E(d,r)||p(r);const[h,m]=S.useState(null),[y,g]=S.useState(null),v=S.useCallback(H=>{H!==P.current&&(P.current=H,m(H))},[]),b=S.useCallback(H=>{H!==T.current&&(T.current=H,g(H))},[]),_=i||h,R=o||y,P=S.useRef(null),T=S.useRef(null),E=S.useRef(f),N=c!=null,k=w5(c),M=w5(s),I=S.useCallback(()=>{if(!P.current||!T.current)return;const H={placement:e,strategy:n,middleware:d};M.current&&(H.platform=M.current),QEe(P.current,T.current,H).then(q=>{const ee={...q,isPositioned:!0};j.current&&!_E(E.current,ee)&&(E.current=ee,rs.flushSync(()=>{l(ee)}))})},[d,e,n,M]);iC(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,l(H=>({...H,isPositioned:!1})))},[u]);const j=S.useRef(!1);iC(()=>(j.current=!0,()=>{j.current=!1}),[]),iC(()=>{if(_&&(P.current=_),R&&(T.current=R),_&&R){if(k.current)return k.current(_,R,I);I()}},[_,R,I,k,N]);const L=S.useMemo(()=>({reference:P,floating:T,setReference:v,setFloating:b}),[v,b]),U=S.useMemo(()=>({reference:_,floating:R}),[_,R]),K=S.useMemo(()=>{const H={position:n,left:0,top:0};if(!U.floating)return H;const q=x5(U.floating,f.x),ee=x5(U.floating,f.y);return a?{...H,transform:"translate("+q+"px, "+ee+"px)",...XG(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:ee}},[n,a,U.floating,f.x,f.y]);return S.useMemo(()=>({...f,update:I,refs:L,elements:U,floatingStyles:K}),[f,I,L,U,K])}const JEe=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?b5({element:r.current,padding:s}).fn(n):{}:r?b5({element:r,padding:s}).fn(n):{}}}},eRe=(t,e)=>({...qEe(t),options:[t,e]}),tRe=(t,e)=>({...WEe(t),options:[t,e]}),nRe=(t,e)=>({...XEe(t),options:[t,e]}),rRe=(t,e)=>({...GEe(t),options:[t,e]}),sRe=(t,e)=>({...KEe(t),options:[t,e]}),iRe=(t,e)=>({...YEe(t),options:[t,e]}),oRe=(t,e)=>({...JEe(t),options:[t,e]});var aRe="Arrow",QG=S.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...i}=t;return w.jsx(De.svg,{...i,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:w.jsx("polygon",{points:"0,0 30,0 15,10"})})});QG.displayName=aRe;var lRe=QG,r2="Popper",[ZG,Yl]=In(r2),[cRe,JG]=ZG(r2),e7=t=>{const{__scopePopper:e,children:n}=t,[r,s]=S.useState(null);return w.jsx(cRe,{scope:e,anchor:r,onAnchorChange:s,children:n})};e7.displayName=r2;var t7="PopperAnchor",n7=S.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,i=JG(t7,n),o=S.useRef(null),a=Je(e,o);return S.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:w.jsx(De.div,{...s,ref:a})});n7.displayName=t7;var s2="PopperContent",[uRe,dRe]=ZG(s2),r7=S.forwardRef((t,e)=>{var ce,xe,Pe,pe,Le,Me;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:l="partial",hideWhenDetached:d=!1,updatePositionStrategy:p="optimized",onPlaced:h,...m}=t,y=JG(s2,n),[g,v]=S.useState(null),b=Je(e,Oe=>v(Oe)),[_,R]=S.useState(null),P=x_(_),T=(P==null?void 0:P.width)??0,E=(P==null?void 0:P.height)??0,N=r+(i!=="center"?"-"+i:""),k=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},M=Array.isArray(u)?u:[u],I=M.length>0,j={padding:k,boundary:M.filter(hRe),altBoundary:I},{refs:L,floatingStyles:U,placement:K,isPositioned:H,middlewareData:q}=ZEe({strategy:"fixed",placement:N,whileElementsMounted:(...Oe)=>VEe(...Oe,{animationFrame:p==="always"}),elements:{reference:y.anchor},middleware:[eRe({mainAxis:s+E,alignmentAxis:o}),c&&tRe({mainAxis:!0,crossAxis:!1,limiter:l==="partial"?nRe():void 0,...j}),c&&rRe({...j}),sRe({...j,apply:({elements:Oe,rects:Fe,availableWidth:ot,availableHeight:nt})=>{const{width:Rt,height:J}=Fe.reference,de=Oe.floating.style;de.setProperty("--radix-popper-available-width",`${ot}px`),de.setProperty("--radix-popper-available-height",`${nt}px`),de.setProperty("--radix-popper-anchor-width",`${Rt}px`),de.setProperty("--radix-popper-anchor-height",`${J}px`)}}),_&&oRe({element:_,padding:a}),pRe({arrowWidth:T,arrowHeight:E}),d&&iRe({strategy:"referenceHidden",...j})]}),[ee,se]=o7(K),X=on(h);ir(()=>{H&&(X==null||X())},[H,X]);const G=(ce=q.arrow)==null?void 0:ce.x,Y=(xe=q.arrow)==null?void 0:xe.y,Q=((Pe=q.arrow)==null?void 0:Pe.centerOffset)!==0,[he,fe]=S.useState();return ir(()=>{g&&fe(window.getComputedStyle(g).zIndex)},[g]),w.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:H?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:he,"--radix-popper-transform-origin":[(pe=q.transformOrigin)==null?void 0:pe.x,(Le=q.transformOrigin)==null?void 0:Le.y].join(" "),...((Me=q.hide)==null?void 0:Me.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:w.jsx(uRe,{scope:n,placedSide:ee,onArrowChange:R,arrowX:G,arrowY:Y,shouldHideArrow:Q,children:w.jsx(De.div,{"data-side":ee,"data-align":se,...m,ref:b,style:{...m.style,animation:H?void 0:"none"}})})})});r7.displayName=s2;var s7="PopperArrow",fRe={top:"bottom",right:"left",bottom:"top",left:"right"},i7=S.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,i=dRe(s7,r),o=fRe[i.placedSide];return w.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:w.jsx(lRe,{...s,ref:n,style:{...s.style,display:"block"}})})});i7.displayName=s7;function hRe(t){return t!==null}var pRe=t=>({name:"transformOrigin",options:t,fn(e){var y,g,v;const{placement:n,rects:r,middlewareData:s}=e,o=((y=s.arrow)==null?void 0:y.centerOffset)!==0,a=o?0:t.arrowWidth,c=o?0:t.arrowHeight,[u,f]=o7(n),l={start:"0%",center:"50%",end:"100%"}[f],d=(((g=s.arrow)==null?void 0:g.x)??0)+a/2,p=(((v=s.arrow)==null?void 0:v.y)??0)+c/2;let h="",m="";return u==="bottom"?(h=o?l:`${d}px`,m=`${-c}px`):u==="top"?(h=o?l:`${d}px`,m=`${r.floating.height+c}px`):u==="right"?(h=`${-c}px`,m=o?l:`${p}px`):u==="left"&&(h=`${r.floating.width+c}px`,m=o?l:`${p}px`),{data:{x:h,y:m}}}});function o7(t){const[e,n="center"]=t.split("-");return[e,n]}var FA=e7,Ay=n7,E_=r7,R_=i7,hk="rovingFocusGroup.onEntryFocus",mRe={bubbles:!1,cancelable:!0},zA="RovingFocusGroup",[VM,a7,gRe]=Cu(zA),[vRe,Xl]=In(zA,[gRe]),[yRe,bRe]=vRe(zA),l7=S.forwardRef((t,e)=>w.jsx(VM.Provider,{scope:t.__scopeRovingFocusGroup,children:w.jsx(VM.Slot,{scope:t.__scopeRovingFocusGroup,children:w.jsx(xRe,{...t,ref:e})})}));l7.displayName=zA;var xRe=S.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...l}=t,d=S.useRef(null),p=Je(e,d),h=Qa(i),[m=null,y]=mr({prop:o,defaultProp:a,onChange:c}),[g,v]=S.useState(!1),b=on(u),_=a7(n),R=S.useRef(!1),[P,T]=S.useState(0);return S.useEffect(()=>{const E=d.current;if(E)return E.addEventListener(hk,b),()=>E.removeEventListener(hk,b)},[b]),w.jsx(yRe,{scope:n,orientation:r,dir:h,loop:s,currentTabStopId:m,onItemFocus:S.useCallback(E=>y(E),[y]),onItemShiftTab:S.useCallback(()=>v(!0),[]),onFocusableItemAdd:S.useCallback(()=>T(E=>E+1),[]),onFocusableItemRemove:S.useCallback(()=>T(E=>E-1),[]),children:w.jsx(De.div,{tabIndex:g||P===0?-1:0,"data-orientation":r,...l,ref:p,style:{outline:"none",...t.style},onMouseDown:ye(t.onMouseDown,()=>{R.current=!0}),onFocus:ye(t.onFocus,E=>{const N=!R.current;if(E.target===E.currentTarget&&N&&!g){const k=new CustomEvent(hk,mRe);if(E.currentTarget.dispatchEvent(k),!k.defaultPrevented){const M=_().filter(K=>K.focusable),I=M.find(K=>K.active),j=M.find(K=>K.id===m),U=[I,j,...M].filter(Boolean).map(K=>K.ref.current);d7(U,f)}}R.current=!1}),onBlur:ye(t.onBlur,()=>v(!1))})})}),c7="RovingFocusGroupItem",u7=S.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:i,...o}=t,a=js(),c=i||a,u=bRe(c7,n),f=u.currentTabStopId===c,l=a7(n),{onFocusableItemAdd:d,onFocusableItemRemove:p}=u;return S.useEffect(()=>{if(r)return d(),()=>p()},[r,d,p]),w.jsx(VM.ItemSlot,{scope:n,id:c,focusable:r,active:s,children:w.jsx(De.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...o,ref:e,onMouseDown:ye(t.onMouseDown,h=>{r?u.onItemFocus(c):h.preventDefault()}),onFocus:ye(t.onFocus,()=>u.onItemFocus(c)),onKeyDown:ye(t.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){u.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const m=SRe(h,u.orientation,u.dir);if(m!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let g=l().filter(v=>v.focusable).map(v=>v.ref.current);if(m==="last")g.reverse();else if(m==="prev"||m==="next"){m==="prev"&&g.reverse();const v=g.indexOf(h.currentTarget);g=u.loop?CRe(g,v+1):g.slice(v+1)}setTimeout(()=>d7(g))}})})})});u7.displayName=c7;var wRe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _Re(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function SRe(t,e,n){const r=_Re(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return wRe[r]}function d7(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function CRe(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var A_=l7,P_=u7,qM=["Enter"," "],ERe=["ArrowDown","PageUp","Home"],f7=["ArrowUp","PageDown","End"],RRe=[...ERe,...f7],ARe={ltr:[...qM,"ArrowRight"],rtl:[...qM,"ArrowLeft"]},PRe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},N_="Menu",[ux,NRe,TRe]=Cu(N_),[Vp,T_]=In(N_,[TRe,Yl,Xl]),BA=Yl(),h7=Xl(),[kRe,qp]=Vp(N_),[DRe,k_]=Vp(N_),p7=t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:s,onOpenChange:i,modal:o=!0}=t,a=BA(e),[c,u]=S.useState(null),f=S.useRef(!1),l=on(i),d=Qa(s);return S.useEffect(()=>{const p=()=>{f.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>f.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),w.jsx(FA,{...a,children:w.jsx(kRe,{scope:e,open:n,onOpenChange:l,content:c,onContentChange:u,children:w.jsx(DRe,{scope:e,onClose:S.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:f,dir:d,modal:o,children:r})})})};p7.displayName=N_;var MRe="MenuAnchor",i2=S.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,s=BA(n);return w.jsx(Ay,{...s,...r,ref:e})});i2.displayName=MRe;var o2="MenuPortal",[ORe,m7]=Vp(o2,{forceMount:void 0}),g7=t=>{const{__scopeMenu:e,forceMount:n,children:r,container:s}=t,i=qp(o2,e);return w.jsx(ORe,{scope:e,forceMount:n,children:w.jsx(Kn,{present:n||i.open,children:w.jsx(dy,{asChild:!0,container:s,children:r})})})};g7.displayName=o2;var ta="MenuContent",[IRe,a2]=Vp(ta),v7=S.forwardRef((t,e)=>{const n=m7(ta,t.__scopeMenu),{forceMount:r=n.forceMount,...s}=t,i=qp(ta,t.__scopeMenu),o=k_(ta,t.__scopeMenu);return w.jsx(ux.Provider,{scope:t.__scopeMenu,children:w.jsx(Kn,{present:r||i.open,children:w.jsx(ux.Slot,{scope:t.__scopeMenu,children:o.modal?w.jsx(jRe,{...s,ref:e}):w.jsx(LRe,{...s,ref:e})})})})}),jRe=S.forwardRef((t,e)=>{const n=qp(ta,t.__scopeMenu),r=S.useRef(null),s=Je(e,r);return S.useEffect(()=>{const i=r.current;if(i)return p_(i)},[]),w.jsx(l2,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ye(t.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),LRe=S.forwardRef((t,e)=>{const n=qp(ta,t.__scopeMenu);return w.jsx(l2,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),l2=S.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:d,onDismiss:p,disableOutsideScroll:h,...m}=t,y=qp(ta,n),g=k_(ta,n),v=BA(n),b=h7(n),_=NRe(n),[R,P]=S.useState(null),T=S.useRef(null),E=Je(e,T,y.onContentChange),N=S.useRef(0),k=S.useRef(""),M=S.useRef(0),I=S.useRef(null),j=S.useRef("right"),L=S.useRef(0),U=h?h_:S.Fragment,K=h?{as:qa,allowPinchZoom:!0}:void 0,H=ee=>{var ce,xe;const se=k.current+ee,X=_().filter(Pe=>!Pe.disabled),G=document.activeElement,Y=(ce=X.find(Pe=>Pe.ref.current===G))==null?void 0:ce.textValue,Q=X.map(Pe=>Pe.textValue),he=YRe(Q,se,Y),fe=(xe=X.find(Pe=>Pe.textValue===he))==null?void 0:xe.ref.current;(function Pe(pe){k.current=pe,window.clearTimeout(N.current),pe!==""&&(N.current=window.setTimeout(()=>Pe(""),1e3))})(se),fe&&setTimeout(()=>fe.focus())};S.useEffect(()=>()=>window.clearTimeout(N.current),[]),oA();const q=S.useCallback(ee=>{var X,G;return j.current===((X=I.current)==null?void 0:X.side)&&QRe(ee,(G=I.current)==null?void 0:G.area)},[]);return w.jsx(IRe,{scope:n,searchRef:k,onItemEnter:S.useCallback(ee=>{q(ee)&&ee.preventDefault()},[q]),onItemLeave:S.useCallback(ee=>{var se;q(ee)||((se=T.current)==null||se.focus(),P(null))},[q]),onTriggerLeave:S.useCallback(ee=>{q(ee)&&ee.preventDefault()},[q]),pointerGraceTimerRef:M,onPointerGraceIntentChange:S.useCallback(ee=>{I.current=ee},[]),children:w.jsx(U,{...K,children:w.jsx(f_,{asChild:!0,trapped:s,onMountAutoFocus:ye(i,ee=>{var se;ee.preventDefault(),(se=T.current)==null||se.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:w.jsx(Ru,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:d,onDismiss:p,children:w.jsx(A_,{asChild:!0,...b,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:R,onCurrentTabStopIdChange:P,onEntryFocus:ye(c,ee=>{g.isUsingKeyboardRef.current||ee.preventDefault()}),preventScrollOnEntryFocus:!0,children:w.jsx(E_,{role:"menu","aria-orientation":"vertical","data-state":M7(y.open),"data-radix-menu-content":"",dir:g.dir,...v,...m,ref:E,style:{outline:"none",...m.style},onKeyDown:ye(m.onKeyDown,ee=>{const X=ee.target.closest("[data-radix-menu-content]")===ee.currentTarget,G=ee.ctrlKey||ee.altKey||ee.metaKey,Y=ee.key.length===1;X&&(ee.key==="Tab"&&ee.preventDefault(),!G&&Y&&H(ee.key));const Q=T.current;if(ee.target!==Q||!RRe.includes(ee.key))return;ee.preventDefault();const fe=_().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);f7.includes(ee.key)&&fe.reverse(),GRe(fe)}),onBlur:ye(t.onBlur,ee=>{ee.currentTarget.contains(ee.target)||(window.clearTimeout(N.current),k.current="")}),onPointerMove:ye(t.onPointerMove,dx(ee=>{const se=ee.target,X=L.current!==ee.clientX;if(ee.currentTarget.contains(se)&&X){const G=ee.clientX>L.current?"right":"left";j.current=G,L.current=ee.clientX}}))})})})})})})});v7.displayName=ta;var $Re="MenuGroup",c2=S.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return w.jsx(De.div,{role:"group",...r,ref:e})});c2.displayName=$Re;var FRe="MenuLabel",y7=S.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return w.jsx(De.div,{...r,ref:e})});y7.displayName=FRe;var SE="MenuItem",_5="menu.itemSelect",UA=S.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...s}=t,i=S.useRef(null),o=k_(SE,t.__scopeMenu),a=a2(SE,t.__scopeMenu),c=Je(e,i),u=S.useRef(!1),f=()=>{const l=i.current;if(!n&&l){const d=new CustomEvent(_5,{bubbles:!0,cancelable:!0});l.addEventListener(_5,p=>r==null?void 0:r(p),{once:!0}),tx(l,d),d.defaultPrevented?u.current=!1:o.onClose()}};return w.jsx(b7,{...s,ref:c,disabled:n,onClick:ye(t.onClick,f),onPointerDown:l=>{var d;(d=t.onPointerDown)==null||d.call(t,l),u.current=!0},onPointerUp:ye(t.onPointerUp,l=>{var d;u.current||(d=l.currentTarget)==null||d.click()}),onKeyDown:ye(t.onKeyDown,l=>{const d=a.searchRef.current!=="";n||d&&l.key===" "||qM.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});UA.displayName=SE;var b7=S.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...i}=t,o=a2(SE,n),a=h7(n),c=S.useRef(null),u=Je(e,c),[f,l]=S.useState(!1),[d,p]=S.useState("");return S.useEffect(()=>{const h=c.current;h&&p((h.textContent??"").trim())},[i.children]),w.jsx(ux.ItemSlot,{scope:n,disabled:r,textValue:s??d,children:w.jsx(P_,{asChild:!0,...a,focusable:!r,children:w.jsx(De.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:ye(t.onPointerMove,dx(h=>{r?o.onItemLeave(h):(o.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ye(t.onPointerLeave,dx(h=>o.onItemLeave(h))),onFocus:ye(t.onFocus,()=>l(!0)),onBlur:ye(t.onBlur,()=>l(!1))})})})}),zRe="MenuCheckboxItem",x7=S.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:r,...s}=t;return w.jsx(E7,{scope:t.__scopeMenu,checked:n,children:w.jsx(UA,{role:"menuitemcheckbox","aria-checked":CE(n)?"mixed":n,...s,ref:e,"data-state":d2(n),onSelect:ye(s.onSelect,()=>r==null?void 0:r(CE(n)?!0:!n),{checkForDefaultPrevented:!1})})})});x7.displayName=zRe;var w7="MenuRadioGroup",[BRe,URe]=Vp(w7,{value:void 0,onValueChange:()=>{}}),_7=S.forwardRef((t,e)=>{const{value:n,onValueChange:r,...s}=t,i=on(r);return w.jsx(BRe,{scope:t.__scopeMenu,value:n,onValueChange:i,children:w.jsx(c2,{...s,ref:e})})});_7.displayName=w7;var S7="MenuRadioItem",C7=S.forwardRef((t,e)=>{const{value:n,...r}=t,s=URe(S7,t.__scopeMenu),i=n===s.value;return w.jsx(E7,{scope:t.__scopeMenu,checked:i,children:w.jsx(UA,{role:"menuitemradio","aria-checked":i,...r,ref:e,"data-state":d2(i),onSelect:ye(r.onSelect,()=>{var o;return(o=s.onValueChange)==null?void 0:o.call(s,n)},{checkForDefaultPrevented:!1})})})});C7.displayName=S7;var u2="MenuItemIndicator",[E7,HRe]=Vp(u2,{checked:!1}),R7=S.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:r,...s}=t,i=HRe(u2,n);return w.jsx(Kn,{present:r||CE(i.checked)||i.checked===!0,children:w.jsx(De.span,{...s,ref:e,"data-state":d2(i.checked)})})});R7.displayName=u2;var VRe="MenuSeparator",A7=S.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return w.jsx(De.div,{role:"separator","aria-orientation":"horizontal",...r,ref:e})});A7.displayName=VRe;var qRe="MenuArrow",P7=S.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,s=BA(n);return w.jsx(R_,{...s,...r,ref:e})});P7.displayName=qRe;var WRe="MenuSub",[OUe,N7]=Vp(WRe),Ub="MenuSubTrigger",T7=S.forwardRef((t,e)=>{const n=qp(Ub,t.__scopeMenu),r=k_(Ub,t.__scopeMenu),s=N7(Ub,t.__scopeMenu),i=a2(Ub,t.__scopeMenu),o=S.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=i,u={__scopeMenu:t.__scopeMenu},f=S.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return S.useEffect(()=>f,[f]),S.useEffect(()=>{const l=a.current;return()=>{window.clearTimeout(l),c(null)}},[a,c]),w.jsx(i2,{asChild:!0,...u,children:w.jsx(b7,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":M7(n.open),...t,ref:c_(e,s.onTriggerChange),onClick:l=>{var d;(d=t.onClick)==null||d.call(t,l),!(t.disabled||l.defaultPrevented)&&(l.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ye(t.onPointerMove,dx(l=>{i.onItemEnter(l),!l.defaultPrevented&&!t.disabled&&!n.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:ye(t.onPointerLeave,dx(l=>{var p,h;f();const d=(p=n.content)==null?void 0:p.getBoundingClientRect();if(d){const m=(h=n.content)==null?void 0:h.dataset.side,y=m==="right",g=y?-5:5,v=d[y?"left":"right"],b=d[y?"right":"left"];i.onPointerGraceIntentChange({area:[{x:l.clientX+g,y:l.clientY},{x:v,y:d.top},{x:b,y:d.top},{x:b,y:d.bottom},{x:v,y:d.bottom}],side:m}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(l),l.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:ye(t.onKeyDown,l=>{var p;const d=i.searchRef.current!=="";t.disabled||d&&l.key===" "||ARe[r.dir].includes(l.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),l.preventDefault())})})})});T7.displayName=Ub;var k7="MenuSubContent",D7=S.forwardRef((t,e)=>{const n=m7(ta,t.__scopeMenu),{forceMount:r=n.forceMount,...s}=t,i=qp(ta,t.__scopeMenu),o=k_(ta,t.__scopeMenu),a=N7(k7,t.__scopeMenu),c=S.useRef(null),u=Je(e,c);return w.jsx(ux.Provider,{scope:t.__scopeMenu,children:w.jsx(Kn,{present:r||i.open,children:w.jsx(ux.Slot,{scope:t.__scopeMenu,children:w.jsx(l2,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var l;o.isUsingKeyboardRef.current&&((l=c.current)==null||l.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:ye(t.onFocusOutside,f=>{f.target!==a.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:ye(t.onEscapeKeyDown,f=>{o.onClose(),f.preventDefault()}),onKeyDown:ye(t.onKeyDown,f=>{var p;const l=f.currentTarget.contains(f.target),d=PRe[o.dir].includes(f.key);l&&d&&(i.onOpenChange(!1),(p=a.trigger)==null||p.focus(),f.preventDefault())})})})})})});D7.displayName=k7;function M7(t){return t?"open":"closed"}function CE(t){return t==="indeterminate"}function d2(t){return CE(t)?"indeterminate":t?"checked":"unchecked"}function GRe(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function KRe(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function YRe(t,e,n){const s=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let o=KRe(t,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function XRe(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,o=e.length-1;i r!=f>r&&n<(u-a)*(r-c)/(f-c)+a&&(s=!s)}return s}function QRe(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return XRe(n,e)}function dx(t){return e=>e.pointerType==="mouse"?t(e):void 0}var ZRe=p7,f2=i2,h2=g7,p2=v7,m2=c2,g2=y7,v2=UA,y2=x7,b2=_7,x2=C7,w2=R7,_2=A7,S2=P7,C2=T7,E2=D7,O7="ContextMenu",[JRe,IUe]=In(O7,[T_]),zi=T_(),[jUe,I7]=JRe(O7),j7="ContextMenuTrigger",eAe=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,disabled:r=!1,...s}=t,i=I7(j7,n),o=zi(n),a=S.useRef({x:0,y:0}),c=S.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),u=S.useRef(0),f=S.useCallback(()=>window.clearTimeout(u.current),[]),l=d=>{a.current={x:d.clientX,y:d.clientY},i.onOpenChange(!0)};return S.useEffect(()=>f,[f]),S.useEffect(()=>void(r&&f()),[r,f]),w.jsxs(w.Fragment,{children:[w.jsx(f2,{...o,virtualRef:c}),w.jsx(De.span,{"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,...s,ref:e,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:r?t.onContextMenu:ye(t.onContextMenu,d=>{f(),l(d),d.preventDefault()}),onPointerDown:r?t.onPointerDown:ye(t.onPointerDown,x1(d=>{f(),u.current=window.setTimeout(()=>l(d),700)})),onPointerMove:r?t.onPointerMove:ye(t.onPointerMove,x1(f)),onPointerCancel:r?t.onPointerCancel:ye(t.onPointerCancel,x1(f)),onPointerUp:r?t.onPointerUp:ye(t.onPointerUp,x1(f))})]})});eAe.displayName=j7;var tAe="ContextMenuPortal",L7=t=>{const{__scopeContextMenu:e,...n}=t,r=zi(e);return w.jsx(h2,{...r,...n})};L7.displayName=tAe;var $7="ContextMenuContent",F7=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=I7($7,n),i=zi(n),o=S.useRef(!1);return w.jsx(p2,{...i,...r,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:a=>{var c;(c=t.onCloseAutoFocus)==null||c.call(t,a),!a.defaultPrevented&&o.current&&a.preventDefault(),o.current=!1},onInteractOutside:a=>{var c;(c=t.onInteractOutside)==null||c.call(t,a),!a.defaultPrevented&&!s.modal&&(o.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});F7.displayName=$7;var nAe="ContextMenuGroup",rAe=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(m2,{...s,...r,ref:e})});rAe.displayName=nAe;var sAe="ContextMenuLabel",z7=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(g2,{...s,...r,ref:e})});z7.displayName=sAe;var iAe="ContextMenuItem",B7=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(v2,{...s,...r,ref:e})});B7.displayName=iAe;var oAe="ContextMenuCheckboxItem",U7=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(y2,{...s,...r,ref:e})});U7.displayName=oAe;var aAe="ContextMenuRadioGroup",lAe=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(b2,{...s,...r,ref:e})});lAe.displayName=aAe;var cAe="ContextMenuRadioItem",H7=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(x2,{...s,...r,ref:e})});H7.displayName=cAe;var uAe="ContextMenuItemIndicator",V7=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(w2,{...s,...r,ref:e})});V7.displayName=uAe;var dAe="ContextMenuSeparator",q7=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(_2,{...s,...r,ref:e})});q7.displayName=dAe;var fAe="ContextMenuArrow",hAe=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(S2,{...s,...r,ref:e})});hAe.displayName=fAe;var pAe="ContextMenuSubTrigger",W7=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(C2,{...s,...r,ref:e})});W7.displayName=pAe;var mAe="ContextMenuSubContent",G7=S.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=zi(n);return w.jsx(E2,{...s,...r,ref:e,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});G7.displayName=mAe;function x1(t){return e=>e.pointerType!=="mouse"?t(e):void 0}var gAe=L7,K7=F7,Y7=z7,X7=B7,Q7=U7,Z7=H7,J7=V7,eK=q7,tK=W7,nK=G7;const vAe=S.forwardRef(({className:t,inset:e,children:n,...r},s)=>w.jsxs(tK,{ref:s,className:ie("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e&&"pl-8",t),...r,children:[n,w.jsx(ly,{className:"ml-auto h-4 w-4"})]}));vAe.displayName=tK.displayName;const yAe=S.forwardRef(({className:t,...e},n)=>w.jsx(nK,{ref:n,className:ie("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));yAe.displayName=nK.displayName;const bAe=S.forwardRef(({className:t,...e},n)=>w.jsx(gAe,{children:w.jsx(K7,{ref:n,className:ie("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e})}));bAe.displayName=K7.displayName;const xAe=S.forwardRef(({className:t,inset:e,...n},r)=>w.jsx(X7,{ref:r,className:ie("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e&&"pl-8",t),...n}));xAe.displayName=X7.displayName;const wAe=S.forwardRef(({className:t,children:e,checked:n,...r},s)=>w.jsxs(Q7,{ref:s,className:ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n,...r,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(J7,{children:w.jsx(u_,{className:"h-4 w-4"})})}),e]}));wAe.displayName=Q7.displayName;const _Ae=S.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(Z7,{ref:r,className:ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(J7,{children:w.jsx(sA,{className:"h-2 w-2 fill-current"})})}),e]}));_Ae.displayName=Z7.displayName;const SAe=S.forwardRef(({className:t,inset:e,...n},r)=>w.jsx(Y7,{ref:r,className:ie("px-2 py-1.5 text-sm font-semibold text-foreground",e&&"pl-8",t),...n}));SAe.displayName=Y7.displayName;const CAe=S.forwardRef(({className:t,...e},n)=>w.jsx(eK,{ref:n,className:ie("-mx-1 my-1 h-px bg-border",t),...e}));CAe.displayName=eK.displayName;function EAe(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}const rK=oe.createContext({drawerRef:{current:null},overlayRef:{current:null},scaleBackground:()=>{},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,handleOnly:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},visible:!1,closeDrawer:()=>{},setVisible:()=>{},direction:"bottom"}),HA=()=>{const t=oe.useContext(rK);if(!t)throw new Error("useDrawerContext must be used within a Drawer.Root");return t};EAe("[vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1)}[vaul-drawer][vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[vaul-drawer][vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[vaul-drawer][vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[vaul-drawer][vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}.vaul-dragging .vaul-scrollable [vault-drawer-direction=top]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=bottom]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=left]{overflow-x:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=right]{overflow-x:hidden!important}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-overlay]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[vaul-overlay][vaul-drawer-visible=true]{opacity:1}[vaul-drawer]::after{content:'';position:absolute;background:inherit;background-color:inherit}[vaul-drawer][vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[vaul-drawer][vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[vaul-handle]{display:block;position:relative;opacity:.8;margin-left:auto;margin-right:auto;height:5px;width:56px;border-radius:1rem;touch-action:pan-y;cursor:grab}[vaul-handle]:active,[vaul-handle]:hover{opacity:1}[vaul-handle]:active{cursor:grabbing}[vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}[vaul-overlay][vaul-snap-points=true]:not([vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[vaul-overlay][vaul-snap-points-overlay=true]:not([vaul-drawer-visible=false]){opacity:1}@media (hover:hover) and (pointer:fine){[vaul-drawer]{user-select:none}}@media (pointer:fine){[vaul-handle-hitarea]:{width:100%;height:100%}}");const RAe=typeof window<"u"?S.useLayoutEffect:S.useEffect;function WM(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}function AAe(){return R2(/^Mac/)}function PAe(){return R2(/^iPhone/)}function NAe(){return R2(/^iPad/)||AAe()&&navigator.maxTouchPoints>1}function sK(){return PAe()||NAe()}function R2(t){return typeof window<"u"&&window.navigator!=null?t.test(window.navigator.platform):void 0}const pk=typeof document<"u"&&window.visualViewport;function S5(t){let e=window.getComputedStyle(t);return/(auto|scroll)/.test(e.overflow+e.overflowX+e.overflowY)}function iK(t){for(S5(t)&&(t=t.parentElement);t&&!S5(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}const TAe=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let w1=0,mk;function kAe(t={}){let{isDisabled:e}=t;RAe(()=>{if(!e)return w1++,w1===1&&(sK()?mk=MAe():mk=DAe()),()=>{w1--,w1===0&&mk()}},[e])}function DAe(){return WM(oK(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`))}function MAe(){let t,e=0,n=l=>{t=iK(l.target),!(t===document.documentElement&&t===document.body)&&(e=l.changedTouches[0].pageY)},r=l=>{if(!t||t===document.documentElement||t===document.body){l.preventDefault();return}let d=l.changedTouches[0].pageY,p=t.scrollTop,h=t.scrollHeight-t.clientHeight;h!==0&&((p<=0&&d>e||p>=h&&d {let d=l.target;GM(d)&&d!==document.activeElement&&(l.preventDefault(),d.style.transform="translateY(-2000px)",d.focus(),requestAnimationFrame(()=>{d.style.transform=""}))},i=l=>{let d=l.target;GM(d)&&(d.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{d.style.transform="",pk&&(pk.height {C5(d)}):pk.addEventListener("resize",()=>C5(d),{once:!0}))}))},o=()=>{window.scrollTo(0,0)},a=window.pageXOffset,c=window.pageYOffset,u=WM(oK(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let f=WM(_b(document,"touchstart",n,{passive:!1,capture:!0}),_b(document,"touchmove",r,{passive:!1,capture:!0}),_b(document,"touchend",s,{passive:!1,capture:!0}),_b(document,"focus",i,!0),_b(window,"scroll",o));return()=>{u(),f(),window.scrollTo(a,c)}}function oK(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function _b(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function C5(t){let e=document.scrollingElement||document.documentElement;for(;t&&t!==e;){let n=iK(t);if(n!==document.documentElement&&n!==document.body&&n!==t){let r=n.getBoundingClientRect().top,s=t.getBoundingClientRect().top,i=t.getBoundingClientRect().bottom;const o=n.getBoundingClientRect().bottom;i>o&&(n.scrollTop+=s-r)}t=n.parentElement}}function GM(t){return t instanceof HTMLInputElement&&!TAe.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}function OAe(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function IAe(...t){return e=>t.forEach(n=>OAe(n,e))}function aK(...t){return S.useCallback(IAe(...t),t)}let Sb=null;function jAe({isOpen:t,modal:e,nested:n,hasBeenOpened:r,preventScrollRestoration:s,noBodyStyles:i}){const[o,a]=oe.useState(()=>typeof window<"u"?window.location.href:""),c=oe.useRef(0),u=oe.useCallback(()=>{if(Sb===null&&t&&!i){Sb={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:l,innerHeight:d}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-l}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const p=d-window.innerHeight;p&&c.current>=d&&(document.body.style.top=`${-(c.current+p)}px`)}),300)}},[t]),f=oe.useCallback(()=>{if(Sb!==null&&!i){const l=-parseInt(document.body.style.top,10),d=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Sb),window.requestAnimationFrame(()=>{if(s&&o!==window.location.href){a(window.location.href);return}window.scrollTo(d,l)}),Sb=null}},[o]);return oe.useEffect(()=>{function l(){c.current=window.scrollY}return l(),window.addEventListener("scroll",l),()=>{window.removeEventListener("scroll",l)}},[]),oe.useEffect(()=>{n||!r||(t?(!window.matchMedia("(display-mode: standalone)").matches&&u(),e||window.setTimeout(()=>{f()},500)):f())},[t,r,o,e,n,u,f]),{restorePositionSetting:f}}const lK=new WeakMap;function Wn(t,e,n=!1){if(!t||!(t instanceof HTMLElement))return;let r={};Object.entries(e).forEach(([s,i])=>{if(s.startsWith("--")){t.style.setProperty(s,i);return}r[s]=t.style[s],t.style[s]=i}),!n&&lK.set(t,r)}function _1(t,e){if(!t||!(t instanceof HTMLElement))return;let n=lK.get(t);n&&(e?t.style[e]=n[e]:Object.entries(n).forEach(([r,s])=>{t.style[r]=s}))}const Ar=t=>{switch(t){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return t}};function S1(t,e){if(!t)return null;const n=window.getComputedStyle(t),r=n.transform||n.webkitTransform||n.mozTransform;let s=r.match(/^matrix3d\((.+)\)$/);return s?parseFloat(s[1].split(", ")[Ar(e)?13:12]):(s=r.match(/^matrix\((.+)\)$/),s?parseFloat(s[1].split(", ")[Ar(e)?5:4]):null)}function LAe(t){return 8*(Math.log(t+1)-2)}const Dn={DURATION:.5,EASE:[.32,.72,0,1]},cK=.4;function uK(t){const e=oe.useRef(t);return oe.useEffect(()=>{e.current=t}),oe.useMemo(()=>(...n)=>e.current==null?void 0:e.current.call(e,...n),[])}function $Ae({defaultProp:t,onChange:e}){const n=oe.useState(t),[r]=n,s=oe.useRef(r),i=uK(e);return oe.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}function FAe({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,s]=$Ae({defaultProp:e,onChange:n}),i=t!==void 0,o=i?t:r,a=uK(n),c=oe.useCallback(u=>{if(i){const l=typeof u=="function"?u(t):u;l!==t&&a(l)}else s(u)},[i,t,s,a]);return[o,c]}function zAe({activeSnapPointProp:t,setActiveSnapPointProp:e,snapPoints:n,drawerRef:r,overlayRef:s,fadeFromIndex:i,onSnapPointChange:o,direction:a="bottom"}){const[c,u]=FAe({prop:t,defaultProp:n==null?void 0:n[0],onChange:e}),f=oe.useMemo(()=>c===(n==null?void 0:n[n.length-1])||null,[n,c]),l=n&&n.length>0&&(i||i===0)&&!Number.isNaN(i)&&n[i]===c||!n,d=oe.useMemo(()=>n==null?void 0:n.findIndex(b=>b===c),[n,c]),p=oe.useMemo(()=>{var b;return(b=n==null?void 0:n.map(_=>{const R=typeof window<"u",P=typeof _=="string";let T=0;if(P&&(T=parseInt(_,10)),Ar(a)){const N=P?T:R?_*window.innerHeight:0;return R?a==="bottom"?window.innerHeight-N:-window.innerHeight+N:N}const E=P?T:R?_*window.innerWidth:0;return R?a==="right"?window.innerWidth-E:-window.innerWidth+E:E}))!=null?b:[]},[n]),h=oe.useMemo(()=>d!==null?p==null?void 0:p[d]:null,[p,d]),m=oe.useCallback(b=>{var _;const R=(_=p==null?void 0:p.findIndex(P=>P===b))!=null?_:null;o(R),Wn(r.current,{transition:`transform ${Dn.DURATION}s cubic-bezier(${Dn.EASE.join(",")})`,transform:Ar(a)?`translate3d(0, ${b}px, 0)`:`translate3d(${b}px, 0, 0)`}),p&&R!==p.length-1&&R!==i?Wn(s.current,{transition:`opacity ${Dn.DURATION}s cubic-bezier(${Dn.EASE.join(",")})`,opacity:"0"}):Wn(s.current,{transition:`opacity ${Dn.DURATION}s cubic-bezier(${Dn.EASE.join(",")})`,opacity:"1"}),u(R!==null?n==null?void 0:n[R]:null)},[r.current,n,p,i,s,u]);oe.useEffect(()=>{if(c||t){var b;const _=(b=n==null?void 0:n.findIndex(R=>R===t||R===c))!=null?b:-1;p&&_!==-1&&typeof p[_]=="number"&&m(p[_])}},[c,t,n,p,m]);function y({draggedDistance:b,closeDrawer:_,velocity:R,dismissible:P}){if(i===void 0)return;const T=a==="bottom"||a==="right"?(h??0)-b:(h??0)+b,E=d===i-1,N=d===0,k=b>0;if(E&&Wn(s.current,{transition:`opacity ${Dn.DURATION}s cubic-bezier(${Dn.EASE.join(",")})`}),R>2&&!k){P?_():m(p[0]);return}if(R>2&&k&&p&&n){m(p[n.length-1]);return}const M=p==null?void 0:p.reduce((j,L)=>typeof j!="number"||typeof L!="number"?j:Math.abs(L-T) cK&&Math.abs(b)0&&f){m(p[n.length-1]);return}if(N&&j<0&&P&&_(),d===null)return;m(p[d+j]);return}m(M)}function g({draggedDistance:b}){if(h===null)return;const _=a==="bottom"||a==="right"?h-b:h+b;(a==="bottom"||a==="right")&&_ p[p.length-1]||Wn(r.current,{transform:Ar(a)?`translate3d(0, ${_}px, 0)`:`translate3d(${_}px, 0, 0)`})}function v(b,_){if(!n||typeof d!="number"||!p||i===void 0)return null;const R=d===i-1;if(d>=i&&_)return 0;if(R&&!_)return 1;if(!l&&!R)return null;const T=R?d+1:d-1,E=R?p[T]-p[T-1]:p[T+1]-p[T],N=b/Math.abs(E);return R?1-N:N}return{isLastSnapPoint:f,activeSnapPoint:c,shouldFade:l,getPercentageDragged:v,setActiveSnapPoint:u,activeSnapPointIndex:d,onRelease:y,onDrag:g,snapPointsOffset:p}}const BAe=.25,UAe=100,E5=8,jf=16,R5=26,gk="vaul-dragging";function dK({open:t,onOpenChange:e,children:n,shouldScaleBackground:r,onDrag:s,onRelease:i,snapPoints:o,nested:a=!1,setBackgroundColorOnScale:c=!0,closeThreshold:u=BAe,scrollLockTimeout:f=UAe,dismissible:l=!0,handleOnly:d=!1,fadeFromIndex:p=o&&o.length-1,activeSnapPoint:h,setActiveSnapPoint:m,fixed:y,modal:g=!0,onClose:v,noBodyStyles:b,direction:_="bottom",preventScrollRestoration:R=!0,disablePreventScroll:P=!1}){var T;const[E=!1,N]=oe.useState(!1),[k,M]=oe.useState(!1),[I,j]=oe.useState(!1),[L,U]=oe.useState(!1),[K,H]=oe.useState(!1),[q,ee]=oe.useState(!1),se=oe.useRef(null),X=oe.useRef(null),G=oe.useRef(null),Y=oe.useRef(null),Q=oe.useRef(null),he=oe.useRef(!1),fe=oe.useRef(null),ce=oe.useRef(0),xe=oe.useRef(!1),Pe=oe.useRef(0),pe=oe.useRef(null),Le=oe.useRef(((T=pe.current)==null?void 0:T.getBoundingClientRect().height)||0),Me=oe.useRef(0),Oe=oe.useCallback($e=>{o&&$e===J.length-1&&(X.current=new Date)},[]),{activeSnapPoint:Fe,activeSnapPointIndex:ot,setActiveSnapPoint:nt,onRelease:Rt,snapPointsOffset:J,onDrag:de,shouldFade:me,getPercentageDragged:Ae}=zAe({snapPoints:o,activeSnapPointProp:h,setActiveSnapPointProp:m,drawerRef:pe,fadeFromIndex:p,overlayRef:se,onSnapPointChange:Oe,direction:_});kAe({isDisabled:!E||K||!g||q||!k||P});const{restorePositionSetting:Ne}=jAe({isOpen:E,modal:g,nested:a,hasBeenOpened:k,preventScrollRestoration:R,noBodyStyles:b});function Ee(){return(window.innerWidth-R5)/window.innerWidth}function Ve($e){var Ye;!l&&!o||pe.current&&!pe.current.contains($e.target)||(Le.current=((Ye=pe.current)==null?void 0:Ye.getBoundingClientRect().height)||0,H(!0),G.current=new Date,sK()&&window.addEventListener("touchend",()=>he.current=!1,{once:!0}),$e.target.setPointerCapture($e.pointerId),ce.current=Ar(_)?$e.clientY:$e.clientX)}function et($e,Ye){var ht;let Qe=$e;const yt=(ht=window.getSelection())==null?void 0:ht.toString(),Nt=pe.current?S1(pe.current,_):null,_t=new Date;if(Qe.hasAttribute("data-vaul-no-drag")||Qe.closest("[data-vaul-no-drag]"))return!1;if(_==="right"||_==="left")return!0;if(X.current&&_t.getTime()-X.current.getTime()<500)return!1;if(Nt!==null&&(_==="bottom"?Nt>0:Nt<0))return!0;if(yt&&yt.length>0)return!1;if(Q.current&&_t.getTime()-Q.current.getTime()
Qe.clientHeight){if(Qe.scrollTop!==0)return Q.current=new Date,!1;if(Qe.getAttribute("role")==="dialog")return!0}Qe=Qe.parentNode}return!0}function qt($e){if(pe.current&&K){const Ye=_==="bottom"||_==="right"?1:-1,ht=(ce.current-(Ar(_)?$e.clientY:$e.clientX))*Ye,Qe=ht>0,yt=o&&!l&&!Qe;if(yt&&ot===0)return;const Nt=Math.abs(ht),_t=document.querySelector("[vaul-drawer-wrapper]");let Wt=Nt/Le.current;const Zt=Ae(Nt,Qe);if(Zt!==null&&(Wt=Zt),yt&&Wt>=1||!he.current&&!et($e.target,Qe))return;if(pe.current.classList.add(gk),he.current=!0,Wn(pe.current,{transition:"none"}),Wn(se.current,{transition:"none"}),o&&de({draggedDistance:ht}),Qe&&!o){const Nn=LAe(ht),Cr=Math.min(Nn*-1,0)*Ye;Wn(pe.current,{transform:Ar(_)?`translate3d(0, ${Cr}px, 0)`:`translate3d(${Cr}px, 0, 0)`});return}const ar=1-Wt;if((me||p&&ot===p-1)&&(s==null||s($e,Wt),Wn(se.current,{opacity:`${ar}`,transition:"none"},!0)),_t&&se.current&&r){const Nn=Math.min(Ee()+Wt*(1-Ee()),1),Cr=8-Wt*8,Dr=Math.max(0,14-Wt*14);Wn(_t,{borderRadius:`${Cr}px`,transform:Ar(_)?`scale(${Nn}) translate3d(0, ${Dr}px, 0)`:`scale(${Nn}) translate3d(${Dr}px, 0, 0)`,transition:"none"},!0)}if(!o){const Nn=Nt*Ye;Wn(pe.current,{transform:Ar(_)?`translate3d(0, ${Nn}px, 0)`:`translate3d(${Nn}px, 0, 0)`})}}}oe.useEffect(()=>()=>{_n(!1),Ne()},[]),oe.useEffect(()=>{var $e;function Ye(){if(!pe.current)return;const ht=document.activeElement;if(GM(ht)||xe.current){var Qe;const yt=((Qe=window.visualViewport)==null?void 0:Qe.height)||0;let Nt=window.innerHeight-yt;const _t=pe.current.getBoundingClientRect().height||0;Me.current||(Me.current=_t);const Wt=pe.current.getBoundingClientRect().top;if(Math.abs(Pe.current-Nt)>60&&(xe.current=!xe.current),o&&o.length>0&&J&&ot){const Zt=J[ot]||0;Nt+=Zt}if(Pe.current=Nt,_t>yt||xe.current){const Zt=pe.current.getBoundingClientRect().height;let ar=Zt;Zt>yt&&(ar=yt-R5),y?pe.current.style.height=`${Zt-Math.max(Nt,0)}px`:pe.current.style.height=`${Math.max(ar,yt-Wt)}px`}else pe.current.style.height=`${Me.current}px`;o&&o.length>0&&!xe.current?pe.current.style.bottom="0px":pe.current.style.bottom=`${Math.max(Nt,0)}px`}}return($e=window.visualViewport)==null||$e.addEventListener("resize",Ye),()=>{var ht;return(ht=window.visualViewport)==null?void 0:ht.removeEventListener("resize",Ye)}},[ot,o,J]);function gt(){pe.current&&(an(),v==null||v(),Wn(pe.current,{transform:Ar(_)?`translate3d(0, ${_==="bottom"?"100%":"-100%"}, 0)`:`translate3d(${_==="right"?"100%":"-100%"}, 0, 0)`,transition:`transform ${Dn.DURATION}s cubic-bezier(${Dn.EASE.join(",")})`}),Wn(se.current,{opacity:"0",transition:`opacity ${Dn.DURATION}s cubic-bezier(${Dn.EASE.join(",")})`}),_n(!1),setTimeout(()=>{j(!1),N(!1)},300),setTimeout(()=>{o&&nt(o[0])},Dn.DURATION*1e3))}oe.useEffect(()=>{if(!E&&r){const $e=setTimeout(()=>{_1(document.body)},200);return()=>clearTimeout($e)}},[E,r]),oe.useLayoutEffect(()=>{t?(N(!0),M(!0)):gt()},[t]),oe.useEffect(()=>{L&&(e==null||e(E))},[E]),oe.useEffect(()=>{U(!0)},[]);function kt(){if(!pe.current)return;const $e=document.querySelector("[vaul-drawer-wrapper]"),Ye=S1(pe.current,_);Wn(pe.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Dn.DURATION}s cubic-bezier(${Dn.EASE.join(",")})`}),Wn(se.current,{transition:`opacity ${Dn.DURATION}s cubic-bezier(${Dn.EASE.join(",")})`,opacity:"1"}),r&&Ye&&Ye>0&&E&&Wn($e,{borderRadius:`${E5}px`,overflow:"hidden",...Ar(_)?{transform:`scale(${Ee()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Ee()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Dn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Dn.EASE.join(",")})`},!0)}function an(){!K||!pe.current||(pe.current.classList.remove(gk),he.current=!1,H(!1),Y.current=new Date)}function gr($e){if(!K||!pe.current)return;pe.current.classList.remove(gk),he.current=!1,H(!1),Y.current=new Date;const Ye=S1(pe.current,_);if(!et($e.target,!1)||!Ye||Number.isNaN(Ye)||G.current===null)return;const ht=Y.current.getTime()-G.current.getTime(),Qe=ce.current-(Ar(_)?$e.clientY:$e.clientX),yt=Math.abs(Qe)/ht;if(yt>.05&&(ee(!0),setTimeout(()=>{ee(!1)},200)),o){Rt({draggedDistance:Qe*(_==="bottom"||_==="right"?1:-1),closeDrawer:gt,velocity:yt,dismissible:l}),i==null||i($e,!0);return}if(_==="bottom"||_==="right"?Qe>0:Qe<0){kt(),i==null||i($e,!0);return}if(yt>cK){gt(),i==null||i($e,!1);return}var Nt;const _t=Math.min((Nt=pe.current.getBoundingClientRect().height)!=null?Nt:0,window.innerHeight);if(Ye>=_t*u){gt(),i==null||i($e,!1);return}i==null||i($e,!0),kt()}oe.useEffect(()=>{E&&(Wn(document.documentElement,{scrollBehavior:"auto"}),X.current=new Date,_n(!0))},[E]),oe.useEffect(()=>{if(pe.current&&I){var $e;const Ye=pe==null||($e=pe.current)==null?void 0:$e.querySelectorAll("*");Ye==null||Ye.forEach(ht=>{const Qe=ht;(Qe.scrollHeight>Qe.clientHeight||Qe.scrollWidth>Qe.clientWidth)&&Qe.classList.add("vaul-scrollable")})}},[I]);function _n($e){const Ye=document.querySelector("[vaul-drawer-wrapper]");!Ye||!r||($e?(c&&(b||(Wn(document.body,{background:document.body.style.backgroundColor||document.body.style.background}),Wn(document.body,{background:"black"},!0))),Wn(Ye,{borderRadius:`${E5}px`,overflow:"hidden",...Ar(_)?{transform:`scale(${Ee()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Ee()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Dn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Dn.EASE.join(",")})`})):(_1(Ye,"overflow"),_1(Ye,"transform"),_1(Ye,"borderRadius"),Wn(Ye,{transitionProperty:"transform, border-radius",transitionDuration:`${Dn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Dn.EASE.join(",")})`})))}function di($e){const Ye=$e?(window.innerWidth-jf)/window.innerWidth:1,ht=$e?-jf:0;fe.current&&window.clearTimeout(fe.current),Wn(pe.current,{transition:`transform ${Dn.DURATION}s cubic-bezier(${Dn.EASE.join(",")})`,transform:`scale(${Ye}) translate3d(0, ${ht}px, 0)`}),!$e&&pe.current&&(fe.current=setTimeout(()=>{const Qe=S1(pe.current,_);Wn(pe.current,{transition:"none",transform:Ar(_)?`translate3d(0, ${Qe}px, 0)`:`translate3d(${Qe}px, 0, 0)`})},500))}function or($e,Ye){if(Ye<0)return;const ht=Ar(_)?window.innerHeight:window.innerWidth,Qe=(ht-jf)/ht,yt=Qe+Ye*(1-Qe),Nt=-jf+Ye*jf;Wn(pe.current,{transform:Ar(_)?`scale(${yt}) translate3d(0, ${Nt}px, 0)`:`scale(${yt}) translate3d(${Nt}px, 0, 0)`,transition:"none"})}function fi($e,Ye){const ht=Ar(_)?window.innerHeight:window.innerWidth,Qe=Ye?(ht-jf)/ht:1,yt=Ye?-jf:0;Ye&&Wn(pe.current,{transition:`transform ${Dn.DURATION}s cubic-bezier(${Dn.EASE.join(",")})`,transform:Ar(_)?`scale(${Qe}) translate3d(0, ${yt}px, 0)`:`scale(${Qe}) translate3d(${yt}px, 0, 0)`})}return oe.createElement(lA,{modal:g,onOpenChange:$e=>{if(t!==void 0){e==null||e($e);return}$e?(M(!0),N($e)):gt()},open:E},oe.createElement(rK.Provider,{value:{visible:I,activeSnapPoint:Fe,snapPoints:o,setActiveSnapPoint:nt,drawerRef:pe,overlayRef:se,scaleBackground:_n,onOpenChange:e,onPress:Ve,setVisible:j,onRelease:gr,onDrag:qt,dismissible:l,handleOnly:d,isOpen:E,isDragging:K,shouldFade:me,closeDrawer:gt,onNestedDrag:or,onNestedOpenChange:di,onNestedRelease:fi,keyboardIsOpen:xe,openProp:t,modal:g,snapPointsOffset:J,direction:_}},n))}const HAe=250,VAe=120,fK=oe.forwardRef(function({preventCycle:t=!1,children:e,...n},r){const{visible:s,closeDrawer:i,isDragging:o,snapPoints:a,activeSnapPoint:c,setActiveSnapPoint:u,dismissible:f,handleOnly:l,onPress:d,onDrag:p}=HA(),h=oe.useRef(null),m=oe.useRef(!1);function y(){if(m.current){b();return}window.setTimeout(()=>{g()},VAe)}function g(){if(o||t||m.current){b();return}if(b(),(!a||a.length===0)&&f){i();return}if(c===a[a.length-1]&&f){i();return}const R=a.findIndex(T=>T===c);if(R===-1)return;const P=a[R+1];u(P)}function v(){h.current=window.setTimeout(()=>{m.current=!0},HAe)}function b(){window.clearTimeout(h.current),m.current=!1}return oe.createElement("div",{onClick:y,onDoubleClick:()=>{m.current=!0,i()},onPointerCancel:b,onPointerDown:_=>{l&&d(_),v()},onPointerMove:_=>{l&&p(_)},ref:r,"vaul-drawer-visible":s?"true":"false","vaul-handle":"","aria-hidden":"true",...n},oe.createElement("span",{"vaul-handle-hitarea":"","aria-hidden":"true"},e))});fK.displayName="Drawer.Handle";const hK=oe.forwardRef(function({children:t,...e},n){const{overlayRef:r,snapPoints:s,onRelease:i,shouldFade:o,isOpen:a,visible:c}=HA(),u=aK(n,r),f=s&&s.length>0;return oe.createElement(fy,{onMouseUp:i,ref:u,"vaul-drawer-visible":c?"true":"false","vaul-overlay":"","vaul-snap-points":a&&f?"true":"false","vaul-snap-points-overlay":a&&o?"true":"false",...e})});hK.displayName="Drawer.Overlay";const pK=oe.forwardRef(function({onOpenAutoFocus:t,onPointerDownOutside:e,onAnimationEnd:n,style:r,...s},i){const{drawerRef:o,onPress:a,onRelease:c,onDrag:u,dismissible:f,keyboardIsOpen:l,snapPointsOffset:d,visible:p,closeDrawer:h,modal:m,openProp:y,onOpenChange:g,setVisible:v,handleOnly:b,direction:_}=HA(),R=aK(i,o),P=oe.useRef(null),T=oe.useRef(!1),E=(N,k,M=0)=>{if(T.current)return!0;const I=Math.abs(N.y),j=Math.abs(N.x),L=j>I,U=["bottom","right"].includes(k)?1:-1;if(k==="left"||k==="right"){if(!(N.x*U<0)&&j>=0&&j<=M)return L}else if(!(N.y*U<0)&&I>=0&&I<=M)return!L;return T.current=!0,!0};return oe.useEffect(()=>{v(!0)},[]),oe.createElement(hy,{"vaul-drawer":"","vaul-drawer-direction":_,"vaul-drawer-visible":p?"true":"false",...s,ref:R,style:d&&d.length>0?{"--snap-point-height":`${d[0]}px`,...r}:r,onOpenAutoFocus:N=>{if(t)t(N);else{var k;N.preventDefault(),(k=o.current)==null||k.focus()}},onPointerDown:N=>{b||(s.onPointerDown==null||s.onPointerDown.call(s,N),P.current={x:N.clientX,y:N.clientY},a(N))},onPointerDownOutside:N=>{if(e==null||e(N),!m||N.defaultPrevented){N.preventDefault();return}l.current&&(l.current=!1),N.preventDefault(),g==null||g(!1),!(!f||y!==void 0)&&h()},onFocusOutside:N=>{if(!m){N.preventDefault();return}},onEscapeKeyDown:N=>{if(!m){N.preventDefault();return}},onPointerMove:N=>{if(b||(s.onPointerMove==null||s.onPointerMove.call(s,N),!P.current))return;const k=N.clientY-P.current.y,M=N.clientX-P.current.x,I=N.pointerType==="touch"?10:2;E({x:M,y:k},_,I)?u(N):(Math.abs(M)>I||Math.abs(k)>I)&&(P.current=null)},onPointerUp:N=>{s.onPointerUp==null||s.onPointerUp.call(s,N),P.current=null,T.current=!1,c(N)}})});pK.displayName="Drawer.Content";function qAe({onDrag:t,onOpenChange:e,...n}){const{onNestedDrag:r,onNestedOpenChange:s,onNestedRelease:i}=HA();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return oe.createElement(dK,{nested:!0,onClose:()=>{s(!1)},onDrag:(o,a)=>{r(o,a),t==null||t(o,a)},onOpenChange:o=>{o&&s(o),e==null||e(o)},onRelease:i,...n})}const Ql={Root:dK,NestedRoot:qAe,Content:pK,Handle:fK,Overlay:hK,Trigger:cA,Portal:uA,Close:gy,Title:py,Description:my},mK=({shouldScaleBackground:t=!0,...e})=>w.jsx(Ql.Root,{shouldScaleBackground:t,...e});mK.displayName="Drawer";const WAe=Ql.Portal,GAe=Ql.Close,gK=S.forwardRef(({className:t,...e},n)=>w.jsx(Ql.Overlay,{ref:n,className:ie("fixed inset-0 z-50 bg-black/80",t),...e}));gK.displayName=Ql.Overlay.displayName;const vK=S.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(WAe,{children:[w.jsx(gK,{}),w.jsxs(Ql.Content,{ref:r,className:ie("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",t),...n,children:[w.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),e]})]}));vK.displayName="DrawerContent";const yK=({className:t,...e})=>w.jsx("div",{className:ie("grid gap-1.5 p-4 text-center sm:text-left",t),...e});yK.displayName="DrawerHeader";const bK=({className:t,...e})=>w.jsx("div",{className:ie("mt-auto flex flex-col gap-2 p-4",t),...e});bK.displayName="DrawerFooter";const xK=S.forwardRef(({className:t,...e},n)=>w.jsx(Ql.Title,{ref:n,className:ie("text-lg font-semibold leading-none tracking-tight",t),...e}));xK.displayName=Ql.Title.displayName;const wK=S.forwardRef(({className:t,...e},n)=>w.jsx(Ql.Description,{ref:n,className:ie("text-sm text-muted-foreground",t),...e}));wK.displayName=Ql.Description.displayName;var A2="DropdownMenu",[KAe,LUe]=In(A2,[T_]),ci=T_(),[YAe,_K]=KAe(A2),SK=t=>{const{__scopeDropdownMenu:e,children:n,dir:r,open:s,defaultOpen:i,onOpenChange:o,modal:a=!0}=t,c=ci(e),u=S.useRef(null),[f=!1,l]=mr({prop:s,defaultProp:i,onChange:o});return w.jsx(YAe,{scope:e,triggerId:js(),triggerRef:u,contentId:js(),open:f,onOpenChange:l,onOpenToggle:S.useCallback(()=>l(d=>!d),[l]),modal:a,children:w.jsx(ZRe,{...c,open:f,onOpenChange:l,dir:r,modal:a,children:n})})};SK.displayName=A2;var CK="DropdownMenuTrigger",EK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=t,i=_K(CK,n),o=ci(n);return w.jsx(f2,{asChild:!0,...o,children:w.jsx(De.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:c_(e,i.triggerRef),onPointerDown:ye(t.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(i.onOpenToggle(),i.open||a.preventDefault())}),onKeyDown:ye(t.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&i.onOpenToggle(),a.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});EK.displayName=CK;var XAe="DropdownMenuPortal",RK=t=>{const{__scopeDropdownMenu:e,...n}=t,r=ci(e);return w.jsx(h2,{...r,...n})};RK.displayName=XAe;var AK="DropdownMenuContent",PK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=_K(AK,n),i=ci(n),o=S.useRef(!1);return w.jsx(p2,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...r,ref:e,onCloseAutoFocus:ye(t.onCloseAutoFocus,a=>{var c;o.current||(c=s.triggerRef.current)==null||c.focus(),o.current=!1,a.preventDefault()}),onInteractOutside:ye(t.onInteractOutside,a=>{const c=a.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!s.modal||f)&&(o.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});PK.displayName=AK;var QAe="DropdownMenuGroup",NK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(m2,{...s,...r,ref:e})});NK.displayName=QAe;var ZAe="DropdownMenuLabel",TK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(g2,{...s,...r,ref:e})});TK.displayName=ZAe;var JAe="DropdownMenuItem",kK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(v2,{...s,...r,ref:e})});kK.displayName=JAe;var ePe="DropdownMenuCheckboxItem",DK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(y2,{...s,...r,ref:e})});DK.displayName=ePe;var tPe="DropdownMenuRadioGroup",nPe=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(b2,{...s,...r,ref:e})});nPe.displayName=tPe;var rPe="DropdownMenuRadioItem",MK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(x2,{...s,...r,ref:e})});MK.displayName=rPe;var sPe="DropdownMenuItemIndicator",OK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(w2,{...s,...r,ref:e})});OK.displayName=sPe;var iPe="DropdownMenuSeparator",IK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(_2,{...s,...r,ref:e})});IK.displayName=iPe;var oPe="DropdownMenuArrow",aPe=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(S2,{...s,...r,ref:e})});aPe.displayName=oPe;var lPe="DropdownMenuSubTrigger",jK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(C2,{...s,...r,ref:e})});jK.displayName=lPe;var cPe="DropdownMenuSubContent",LK=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ci(n);return w.jsx(E2,{...s,...r,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});LK.displayName=cPe;var uPe=SK,dPe=EK,fPe=RK,$K=PK,hPe=NK,FK=TK,zK=kK,BK=DK,UK=MK,HK=OK,VK=IK,qK=jK,WK=LK;const D_=uPe,M_=dPe,pPe=hPe,mPe=S.forwardRef(({className:t,inset:e,children:n,...r},s)=>w.jsxs(qK,{ref:s,className:ie("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",e&&"pl-8",t),...r,children:[n,w.jsx(ly,{className:"w-4 h-4 ml-auto"})]}));mPe.displayName=qK.displayName;const gPe=S.forwardRef(({className:t,...e},n)=>w.jsx(WK,{ref:n,className:ie("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));gPe.displayName=WK.displayName;const Py=S.forwardRef(({className:t,sideOffset:e=4,...n},r)=>w.jsx(fPe,{children:w.jsx($K,{ref:r,sideOffset:e,className:ie("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n})}));Py.displayName=$K.displayName;const iu=S.forwardRef(({className:t,inset:e,...n},r)=>w.jsx(zK,{ref:r,className:ie("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e&&"pl-8",t),...n}));iu.displayName=zK.displayName;const GK=S.forwardRef(({className:t,children:e,checked:n,...r},s)=>w.jsxs(BK,{ref:s,className:ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n,...r,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(HK,{children:w.jsx(u_,{className:"w-4 h-4"})})}),e]}));GK.displayName=BK.displayName;const vPe=S.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(UK,{ref:r,className:ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(HK,{children:w.jsx(sA,{className:"w-2 h-2 fill-current"})})}),e]}));vPe.displayName=UK.displayName;const VA=S.forwardRef(({className:t,inset:e,...n},r)=>w.jsx(FK,{ref:r,className:ie("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...n}));VA.displayName=FK.displayName;const Pp=S.forwardRef(({className:t,...e},n)=>w.jsx(VK,{ref:n,className:ie("-mx-1 my-1 h-px bg-muted",t),...e}));Pp.displayName=VK.displayName;const KK=({className:t,...e})=>w.jsx("span",{className:ie("ml-auto text-xs tracking-widest opacity-60",t),...e});KK.displayName="DropdownMenuShortcut";var O_=t=>t.type==="checkbox",Jm=t=>t instanceof Date,Js=t=>t==null;const YK=t=>typeof t=="object";var Kr=t=>!Js(t)&&!Array.isArray(t)&&YK(t)&&!Jm(t),XK=t=>Kr(t)&&t.target?O_(t.target)?t.target.checked:t.target.value:t,yPe=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,QK=(t,e)=>t.has(yPe(e)),bPe=t=>{const e=t.constructor&&t.constructor.prototype;return Kr(e)&&e.hasOwnProperty("isPrototypeOf")},P2=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Br(t){let e;const n=Array.isArray(t);if(t instanceof Date)e=new Date(t);else if(t instanceof Set)e=new Set(t);else if(!(P2&&(t instanceof Blob||t instanceof FileList))&&(n||Kr(t)))if(e=n?[]:{},!n&&!bPe(t))e=t;else for(const r in t)t.hasOwnProperty(r)&&(e[r]=Br(t[r]));else return t;return e}var I_=t=>Array.isArray(t)?t.filter(Boolean):[],Fn=t=>t===void 0,Ie=(t,e,n)=>{if(!e||!Kr(t))return n;const r=I_(e.split(/[,[\].]+?/)).reduce((s,i)=>Js(s)?s:s[i],t);return Fn(r)||r===t?Fn(t[e])?n:t[e]:r},Tl=t=>typeof t=="boolean",N2=t=>/^\w*$/.test(t),ZK=t=>I_(t.replace(/["|']|\]/g,"").split(/\.|\[/)),sn=(t,e,n)=>{let r=-1;const s=N2(e)?[e]:ZK(e),i=s.length,o=i-1;for(;++roe.useContext(JK),xPe=t=>{const{children:e,...n}=t;return oe.createElement(JK.Provider,{value:n},e)};var e9=(t,e,n,r=!0)=>{const s={defaultValues:e._defaultValues};for(const i in t)Object.defineProperty(s,i,{get:()=>{const o=i;return e._proxyFormState[o]!==Ko.all&&(e._proxyFormState[o]=!r||Ko.all),n&&(n[o]=!0),t[o]}});return s},Xs=t=>Kr(t)&&!Object.keys(t).length,t9=(t,e,n,r)=>{n(t);const{name:s,...i}=t;return Xs(i)||Object.keys(i).length>=Object.keys(e).length||Object.keys(i).find(o=>e[o]===(!r||Ko.all))},Ti=t=>Array.isArray(t)?t:[t],n9=(t,e,n)=>!t||!e||t===e||Ti(t).some(r=>r&&(n?r===e:r.startsWith(e)||e.startsWith(r)));function qA(t){const e=oe.useRef(t);e.current=t,oe.useEffect(()=>{const n=!t.disabled&&e.current.subject&&e.current.subject.subscribe({next:e.current.next});return()=>{n&&n.unsubscribe()}},[t.disabled])}function r9(t){const e=Bi(),{control:n=e.control,disabled:r,name:s,exact:i}=t||{},[o,a]=oe.useState(n._formState),c=oe.useRef(!0),u=oe.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=oe.useRef(s);return f.current=s,qA({disabled:r,next:l=>c.current&&n9(f.current,l.name,i)&&t9(l,u.current,n._updateFormState)&&a({...n._formState,...l}),subject:n._subjects.state}),oe.useEffect(()=>(c.current=!0,u.current.isValid&&n._updateValid(!0),()=>{c.current=!1}),[n]),e9(o,n,u.current,!1)}var Ml=t=>typeof t=="string",s9=(t,e,n,r,s)=>Ml(t)?(r&&e.watch.add(t),Ie(n,t,s)):Array.isArray(t)?t.map(i=>(r&&e.watch.add(i),Ie(n,i))):(r&&(e.watchAll=!0),n);function wPe(t){const e=Bi(),{control:n=e.control,name:r,defaultValue:s,disabled:i,exact:o}=t||{},a=oe.useRef(r);a.current=r,qA({disabled:i,subject:n._subjects.values,next:f=>{n9(a.current,f.name,o)&&u(Br(s9(a.current,n._names,f.values||n._formValues,!1,s)))}});const[c,u]=oe.useState(n._getWatch(r,s));return oe.useEffect(()=>n._removeUnmounted()),c}function _Pe(t){const e=Bi(),{name:n,disabled:r,control:s=e.control,shouldUnregister:i}=t,o=QK(s._names.array,n),a=wPe({control:s,name:n,defaultValue:Ie(s._formValues,n,Ie(s._defaultValues,n,t.defaultValue)),exact:!0}),c=r9({control:s,name:n,exact:!0}),u=oe.useRef(s.register(n,{...t.rules,value:a,...Tl(t.disabled)?{disabled:t.disabled}:{}}));return oe.useEffect(()=>{const f=s._options.shouldUnregister||i,l=(d,p)=>{const h=Ie(s._fields,d);h&&h._f&&(h._f.mount=p)};if(l(n,!0),f){const d=Br(Ie(s._options.defaultValues,n));sn(s._defaultValues,n,d),Fn(Ie(s._formValues,n))&&sn(s._formValues,n,d)}return()=>{(o?f&&!s._state.action:f)?s.unregister(n):l(n,!1)}},[n,s,o,i]),oe.useEffect(()=>{Ie(s._fields,n)&&s._updateDisabledField({disabled:r,fields:s._fields,name:n,value:Ie(s._fields,n)._f.value})},[r,n,s]),{field:{name:n,value:a,...Tl(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:oe.useCallback(f=>u.current.onChange({target:{value:XK(f),name:n},type:EE.CHANGE}),[n]),onBlur:oe.useCallback(()=>u.current.onBlur({target:{value:Ie(s._formValues,n),name:n},type:EE.BLUR}),[n,s]),ref:oe.useCallback(f=>{const l=Ie(s._fields,n);l&&f&&(l._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:d=>f.setCustomValidity(d),reportValidity:()=>f.reportValidity()})},[s._fields,n])},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ie(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!Ie(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Ie(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Ie(c.validatingFields,n)},error:{enumerable:!0,get:()=>Ie(c.errors,n)}})}}const SPe=t=>t.render(_Pe(t));var i9=(t,e,n,r,s)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[r]:s||!0}}:{},Vu=()=>{const t=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const n=(Math.random()*16+t)%16|0;return(e=="x"?n:n&3|8).toString(16)})},vk=(t,e,n={})=>n.shouldFocus||Fn(n.shouldFocus)?n.focusName||`${t}.${Fn(n.focusIndex)?e:n.focusIndex}.`:"",w0=t=>({isOnSubmit:!t||t===Ko.onSubmit,isOnBlur:t===Ko.onBlur,isOnChange:t===Ko.onChange,isOnAll:t===Ko.all,isOnTouch:t===Ko.onTouched}),KM=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some(r=>t.startsWith(r)&&/^\.\w+/.test(t.slice(r.length))));const gg=(t,e,n,r)=>{for(const s of n||Object.keys(t)){const i=Ie(t,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],s)&&!r)break;if(o.ref&&e(o.ref,o.name)&&!r)break;gg(a,e)}else Kr(a)&&gg(a,e)}}};var o9=(t,e,n)=>{const r=Ti(Ie(t,n));return sn(r,"root",e[n]),sn(t,n,r),t},T2=t=>t.type==="file",Vd=t=>typeof t=="function",RE=t=>{if(!P2)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},oC=t=>Ml(t),k2=t=>t.type==="radio",AE=t=>t instanceof RegExp;const A5={value:!1,isValid:!1},P5={value:!0,isValid:!0};var a9=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!Fn(t[0].attributes.value)?Fn(t[0].value)||t[0].value===""?P5:{value:t[0].value,isValid:!0}:P5:A5}return A5};const N5={isValid:!1,value:null};var l9=t=>Array.isArray(t)?t.reduce((e,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:e,N5):N5;function T5(t,e,n="validate"){if(oC(t)||Array.isArray(t)&&t.every(oC)||Tl(t)&&!t)return{type:n,message:oC(t)?t:"",ref:e}}var Cm=t=>Kr(t)&&!AE(t)?t:{value:t,message:""},YM=async(t,e,n,r,s)=>{const{ref:i,refs:o,required:a,maxLength:c,minLength:u,min:f,max:l,pattern:d,validate:p,name:h,valueAsNumber:m,mount:y,disabled:g}=t._f,v=Ie(e,h);if(!y||g)return{};const b=o?o[0]:i,_=I=>{r&&b.reportValidity&&(b.setCustomValidity(Tl(I)?"":I||""),b.reportValidity())},R={},P=k2(i),T=O_(i),E=P||T,N=(m||T2(i))&&Fn(i.value)&&Fn(v)||RE(i)&&i.value===""||v===""||Array.isArray(v)&&!v.length,k=i9.bind(null,h,n,R),M=(I,j,L,U=dc.maxLength,K=dc.minLength)=>{const H=I?j:L;R[h]={type:I?U:K,message:H,ref:i,...k(I?U:K,H)}};if(s?!Array.isArray(v)||!v.length:a&&(!E&&(N||Js(v))||Tl(v)&&!v||T&&!a9(o).isValid||P&&!l9(o).isValid)){const{value:I,message:j}=oC(a)?{value:!!a,message:a}:Cm(a);if(I&&(R[h]={type:dc.required,message:j,ref:b,...k(dc.required,j)},!n))return _(j),R}if(!N&&(!Js(f)||!Js(l))){let I,j;const L=Cm(l),U=Cm(f);if(!Js(v)&&!isNaN(v)){const K=i.valueAsNumber||v&&+v;Js(L.value)||(I=K>L.value),Js(U.value)||(j=K new Date(new Date().toDateString()+" "+se),q=i.type=="time",ee=i.type=="week";Ml(L.value)&&v&&(I=q?H(v)>H(L.value):ee?v>L.value:K>new Date(L.value)),Ml(U.value)&&v&&(j=q?H(v) +I.value,U=!Js(j.value)&&v.length<+j.value;if((L||U)&&(M(L,I.message,j.message),!n))return _(R[h].message),R}if(d&&!N&&Ml(v)){const{value:I,message:j}=Cm(d);if(AE(I)&&!v.match(I)&&(R[h]={type:dc.pattern,message:j,ref:i,...k(dc.pattern,j)},!n))return _(j),R}if(p){if(Vd(p)){const I=await p(v,e),j=T5(I,b);if(j&&(R[h]={...j,...k(dc.validate,j.message)},!n))return _(j.message),R}else if(Kr(p)){let I={};for(const j in p){if(!Xs(I)&&!n)break;const L=T5(await p[j](v,e),b,j);L&&(I={...L,...k(j,L.message)},_(L.message),n&&(R[h]=I))}if(!Xs(I)&&(R[h]={ref:b,...I},!n))return R}}return _(!0),R},yk=(t,e)=>[...t,...Ti(e)],bk=t=>Array.isArray(t)?t.map(()=>{}):void 0;function xk(t,e,n){return[...t.slice(0,e),...Ti(n),...t.slice(e)]}var wk=(t,e,n)=>Array.isArray(t)?(Fn(t[n])&&(t[n]=void 0),t.splice(n,0,t.splice(e,1)[0]),t):[],_k=(t,e)=>[...Ti(e),...Ti(t)];function CPe(t,e){let n=0;const r=[...t];for(const s of e)r.splice(s-n,1),n++;return I_(r).length?r:[]}var Sk=(t,e)=>Fn(e)?[]:CPe(t,Ti(e).sort((n,r)=>n-r)),Ck=(t,e,n)=>{[t[e],t[n]]=[t[n],t[e]]};function EPe(t,e){const n=e.slice(0,-1).length;let r=0;for(;r (t[e]=n,t);function APe(t){const e=Bi(),{control:n=e.control,name:r,keyName:s="id",shouldUnregister:i}=t,[o,a]=oe.useState(n._getFieldArray(r)),c=oe.useRef(n._getFieldArray(r).map(Vu)),u=oe.useRef(o),f=oe.useRef(r),l=oe.useRef(!1);f.current=r,u.current=o,n._names.array.add(r),t.rules&&n.register(r,t.rules),qA({next:({values:R,name:P})=>{if(P===f.current||!P){const T=Ie(R,f.current);Array.isArray(T)&&(a(T),c.current=T.map(Vu))}},subject:n._subjects.array});const d=oe.useCallback(R=>{l.current=!0,n._updateFieldArray(r,R)},[n,r]),p=(R,P)=>{const T=Ti(Br(R)),E=yk(n._getFieldArray(r),T);n._names.focus=vk(r,E.length-1,P),c.current=yk(c.current,T.map(Vu)),d(E),a(E),n._updateFieldArray(r,E,yk,{argA:bk(R)})},h=(R,P)=>{const T=Ti(Br(R)),E=_k(n._getFieldArray(r),T);n._names.focus=vk(r,0,P),c.current=_k(c.current,T.map(Vu)),d(E),a(E),n._updateFieldArray(r,E,_k,{argA:bk(R)})},m=R=>{const P=Sk(n._getFieldArray(r),R);c.current=Sk(c.current,R),d(P),a(P),n._updateFieldArray(r,P,Sk,{argA:R})},y=(R,P,T)=>{const E=Ti(Br(P)),N=xk(n._getFieldArray(r),R,E);n._names.focus=vk(r,R,T),c.current=xk(c.current,R,E.map(Vu)),d(N),a(N),n._updateFieldArray(r,N,xk,{argA:R,argB:bk(P)})},g=(R,P)=>{const T=n._getFieldArray(r);Ck(T,R,P),Ck(c.current,R,P),d(T),a(T),n._updateFieldArray(r,T,Ck,{argA:R,argB:P},!1)},v=(R,P)=>{const T=n._getFieldArray(r);wk(T,R,P),wk(c.current,R,P),d(T),a(T),n._updateFieldArray(r,T,wk,{argA:R,argB:P},!1)},b=(R,P)=>{const T=Br(P),E=k5(n._getFieldArray(r),R,T);c.current=[...E].map((N,k)=>!N||k===R?Vu():c.current[k]),d(E),a([...E]),n._updateFieldArray(r,E,k5,{argA:R,argB:T},!0,!1)},_=R=>{const P=Ti(Br(R));c.current=P.map(Vu),d([...P]),a([...P]),n._updateFieldArray(r,[...P],T=>T,{},!0,!1)};return oe.useEffect(()=>{if(n._state.action=!1,KM(r,n._names)&&n._subjects.state.next({...n._formState}),l.current&&(!w0(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([r]).then(R=>{const P=Ie(R.errors,r),T=Ie(n._formState.errors,r);(T?!P&&T.type||P&&(T.type!==P.type||T.message!==P.message):P&&P.type)&&(P?sn(n._formState.errors,r,P):Rr(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const R=Ie(n._fields,r);R&&R._f&&!(w0(n._options.reValidateMode).isOnSubmit&&w0(n._options.mode).isOnSubmit)&&YM(R,n._formValues,n._options.criteriaMode===Ko.all,n._options.shouldUseNativeValidation,!0).then(P=>!Xs(P)&&n._subjects.state.next({errors:o9(n._formState.errors,P,r)}))}n._subjects.values.next({name:r,values:{...n._formValues}}),n._names.focus&&gg(n._fields,(R,P)=>{if(n._names.focus&&P.startsWith(n._names.focus)&&R.focus)return R.focus(),1}),n._names.focus="",n._updateValid(),l.current=!1},[o,r,n]),oe.useEffect(()=>(!Ie(n._formValues,r)&&n._updateFieldArray(r),()=>{(n._options.shouldUnregister||i)&&n.unregister(r)}),[r,n,s,i]),{swap:oe.useCallback(g,[d,r,n]),move:oe.useCallback(v,[d,r,n]),prepend:oe.useCallback(h,[d,r,n]),append:oe.useCallback(p,[d,r,n]),remove:oe.useCallback(m,[d,r,n]),insert:oe.useCallback(y,[d,r,n]),update:oe.useCallback(b,[d,r,n]),replace:oe.useCallback(_,[d,r,n]),fields:oe.useMemo(()=>o.map((R,P)=>({...R,[s]:c.current[P]||Vu()})),[o,s])}}var Ek=()=>{let t=[];return{get observers(){return t},next:s=>{for(const i of t)i.next&&i.next(s)},subscribe:s=>(t.push(s),{unsubscribe:()=>{t=t.filter(i=>i!==s)}}),unsubscribe:()=>{t=[]}}},PE=t=>Js(t)||!YK(t);function rh(t,e){if(PE(t)||PE(e))return t===e;if(Jm(t)&&Jm(e))return t.getTime()===e.getTime();const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const s of n){const i=t[s];if(!r.includes(s))return!1;if(s!=="ref"){const o=e[s];if(Jm(i)&&Jm(o)||Kr(i)&&Kr(o)||Array.isArray(i)&&Array.isArray(o)?!rh(i,o):i!==o)return!1}}return!0}var c9=t=>t.type==="select-multiple",PPe=t=>k2(t)||O_(t),Rk=t=>RE(t)&&t.isConnected,u9=t=>{for(const e in t)if(Vd(t[e]))return!0;return!1};function NE(t,e={}){const n=Array.isArray(t);if(Kr(t)||n)for(const r in t)Array.isArray(t[r])||Kr(t[r])&&!u9(t[r])?(e[r]=Array.isArray(t[r])?[]:{},NE(t[r],e[r])):Js(t[r])||(e[r]=!0);return e}function d9(t,e,n){const r=Array.isArray(t);if(Kr(t)||r)for(const s in t)Array.isArray(t[s])||Kr(t[s])&&!u9(t[s])?Fn(e)||PE(n[s])?n[s]=Array.isArray(t[s])?NE(t[s],[]):{...NE(t[s])}:d9(t[s],Js(e)?{}:e[s],n[s]):n[s]=!rh(t[s],e[s]);return n}var C1=(t,e)=>d9(t,e,NE(e)),f9=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:r})=>Fn(t)?t:e?t===""?NaN:t&&+t:n&&Ml(t)?new Date(t):r?r(t):t;function Ak(t){const e=t.ref;if(!(t.refs?t.refs.every(n=>n.disabled):e.disabled))return T2(e)?e.files:k2(e)?l9(t.refs).value:c9(e)?[...e.selectedOptions].map(({value:n})=>n):O_(e)?a9(t.refs).value:f9(Fn(e.value)?t.ref.value:e.value,t)}var NPe=(t,e,n,r)=>{const s={};for(const i of t){const o=Ie(e,i);o&&sn(s,i,o._f)}return{criteriaMode:n,names:[...t],fields:s,shouldUseNativeValidation:r}},Cb=t=>Fn(t)?t:AE(t)?t.source:Kr(t)?AE(t.value)?t.value.source:t.value:t,TPe=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate);function D5(t,e,n){const r=Ie(t,n);if(r||N2(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=Ie(e,i),a=Ie(t,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};s.pop()}return{name:n}}var kPe=(t,e,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(e||t):(n?r.isOnBlur:s.isOnBlur)?!t:(n?r.isOnChange:s.isOnChange)?t:!0,DPe=(t,e)=>!I_(Ie(t,e)).length&&Rr(t,e);const MPe={mode:Ko.onSubmit,reValidateMode:Ko.onChange,shouldFocusError:!0};function OPe(t={}){let e={...MPe,...t},n={submitCount:0,isDirty:!1,isLoading:Vd(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},r={},s=Kr(e.defaultValues)||Kr(e.values)?Br(e.defaultValues||e.values)||{}:{},i=e.shouldUnregister?{}:Br(s),o={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},l={values:Ek(),array:Ek(),state:Ek()},d=w0(e.mode),p=w0(e.reValidateMode),h=e.criteriaMode===Ko.all,m=J=>de=>{clearTimeout(u),u=setTimeout(J,de)},y=async J=>{if(f.isValid||J){const de=e.resolver?Xs((await E()).errors):await k(r,!0);de!==n.isValid&&l.state.next({isValid:de})}},g=(J,de)=>{(f.isValidating||f.validatingFields)&&((J||Array.from(a.mount)).forEach(me=>{me&&(de?sn(n.validatingFields,me,de):Rr(n.validatingFields,me))}),l.state.next({validatingFields:n.validatingFields,isValidating:!Xs(n.validatingFields)}))},v=(J,de=[],me,Ae,Ne=!0,Ee=!0)=>{if(Ae&&me){if(o.action=!0,Ee&&Array.isArray(Ie(r,J))){const Ve=me(Ie(r,J),Ae.argA,Ae.argB);Ne&&sn(r,J,Ve)}if(Ee&&Array.isArray(Ie(n.errors,J))){const Ve=me(Ie(n.errors,J),Ae.argA,Ae.argB);Ne&&sn(n.errors,J,Ve),DPe(n.errors,J)}if(f.touchedFields&&Ee&&Array.isArray(Ie(n.touchedFields,J))){const Ve=me(Ie(n.touchedFields,J),Ae.argA,Ae.argB);Ne&&sn(n.touchedFields,J,Ve)}f.dirtyFields&&(n.dirtyFields=C1(s,i)),l.state.next({name:J,isDirty:I(J,de),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else sn(i,J,de)},b=(J,de)=>{sn(n.errors,J,de),l.state.next({errors:n.errors})},_=J=>{n.errors=J,l.state.next({errors:n.errors,isValid:!1})},R=(J,de,me,Ae)=>{const Ne=Ie(r,J);if(Ne){const Ee=Ie(i,J,Fn(me)?Ie(s,J):me);Fn(Ee)||Ae&&Ae.defaultChecked||de?sn(i,J,de?Ee:Ak(Ne._f)):U(J,Ee),o.mount&&y()}},P=(J,de,me,Ae,Ne)=>{let Ee=!1,Ve=!1;const et={name:J},qt=!!(Ie(r,J)&&Ie(r,J)._f&&Ie(r,J)._f.disabled);if(!me||Ae){f.isDirty&&(Ve=n.isDirty,n.isDirty=et.isDirty=I(),Ee=Ve!==et.isDirty);const gt=qt||rh(Ie(s,J),de);Ve=!!(!qt&&Ie(n.dirtyFields,J)),gt||qt?Rr(n.dirtyFields,J):sn(n.dirtyFields,J,!0),et.dirtyFields=n.dirtyFields,Ee=Ee||f.dirtyFields&&Ve!==!gt}if(me){const gt=Ie(n.touchedFields,J);gt||(sn(n.touchedFields,J,me),et.touchedFields=n.touchedFields,Ee=Ee||f.touchedFields&>!==me)}return Ee&&Ne&&l.state.next(et),Ee?et:{}},T=(J,de,me,Ae)=>{const Ne=Ie(n.errors,J),Ee=f.isValid&&Tl(de)&&n.isValid!==de;if(t.delayError&&me?(c=m(()=>b(J,me)),c(t.delayError)):(clearTimeout(u),c=null,me?sn(n.errors,J,me):Rr(n.errors,J)),(me?!rh(Ne,me):Ne)||!Xs(Ae)||Ee){const Ve={...Ae,...Ee&&Tl(de)?{isValid:de}:{},errors:n.errors,name:J};n={...n,...Ve},l.state.next(Ve)}},E=async J=>{g(J,!0);const de=await e.resolver(i,e.context,NPe(J||a.mount,r,e.criteriaMode,e.shouldUseNativeValidation));return g(J),de},N=async J=>{const{errors:de}=await E(J);if(J)for(const me of J){const Ae=Ie(de,me);Ae?sn(n.errors,me,Ae):Rr(n.errors,me)}else n.errors=de;return de},k=async(J,de,me={valid:!0})=>{for(const Ae in J){const Ne=J[Ae];if(Ne){const{_f:Ee,...Ve}=Ne;if(Ee){const et=a.array.has(Ee.name);g([Ae],!0);const qt=await YM(Ne,i,h,e.shouldUseNativeValidation&&!de,et);if(g([Ae]),qt[Ee.name]&&(me.valid=!1,de))break;!de&&(Ie(qt,Ee.name)?et?o9(n.errors,qt,Ee.name):sn(n.errors,Ee.name,qt[Ee.name]):Rr(n.errors,Ee.name))}!Xs(Ve)&&await k(Ve,de,me)}}return me.valid},M=()=>{for(const J of a.unMount){const de=Ie(r,J);de&&(de._f.refs?de._f.refs.every(me=>!Rk(me)):!Rk(de._f.ref))&&fe(J)}a.unMount=new Set},I=(J,de)=>(J&&de&&sn(i,J,de),!rh(X(),s)),j=(J,de,me)=>s9(J,a,{...o.mount?i:Fn(de)?s:Ml(J)?{[J]:de}:de},me,de),L=J=>I_(Ie(o.mount?i:s,J,t.shouldUnregister?Ie(s,J,[]):[])),U=(J,de,me={})=>{const Ae=Ie(r,J);let Ne=de;if(Ae){const Ee=Ae._f;Ee&&(!Ee.disabled&&sn(i,J,f9(de,Ee)),Ne=RE(Ee.ref)&&Js(de)?"":de,c9(Ee.ref)?[...Ee.ref.options].forEach(Ve=>Ve.selected=Ne.includes(Ve.value)):Ee.refs?O_(Ee.ref)?Ee.refs.length>1?Ee.refs.forEach(Ve=>(!Ve.defaultChecked||!Ve.disabled)&&(Ve.checked=Array.isArray(Ne)?!!Ne.find(et=>et===Ve.value):Ne===Ve.value)):Ee.refs[0]&&(Ee.refs[0].checked=!!Ne):Ee.refs.forEach(Ve=>Ve.checked=Ve.value===Ne):T2(Ee.ref)?Ee.ref.value="":(Ee.ref.value=Ne,Ee.ref.type||l.values.next({name:J,values:{...i}})))}(me.shouldDirty||me.shouldTouch)&&P(J,Ne,me.shouldTouch,me.shouldDirty,!0),me.shouldValidate&&se(J)},K=(J,de,me)=>{for(const Ae in de){const Ne=de[Ae],Ee=`${J}.${Ae}`,Ve=Ie(r,Ee);(a.array.has(J)||!PE(Ne)||Ve&&!Ve._f)&&!Jm(Ne)?K(Ee,Ne,me):U(Ee,Ne,me)}},H=(J,de,me={})=>{const Ae=Ie(r,J),Ne=a.array.has(J),Ee=Br(de);sn(i,J,Ee),Ne?(l.array.next({name:J,values:{...i}}),(f.isDirty||f.dirtyFields)&&me.shouldDirty&&l.state.next({name:J,dirtyFields:C1(s,i),isDirty:I(J,Ee)})):Ae&&!Ae._f&&!Js(Ee)?K(J,Ee,me):U(J,Ee,me),KM(J,a)&&l.state.next({...n}),l.values.next({name:o.mount?J:void 0,values:{...i}})},q=async J=>{o.mount=!0;const de=J.target;let me=de.name,Ae=!0;const Ne=Ie(r,me),Ee=()=>de.type?Ak(Ne._f):XK(J),Ve=et=>{Ae=Number.isNaN(et)||et===Ie(i,me,et)};if(Ne){let et,qt;const gt=Ee(),kt=J.type===EE.BLUR||J.type===EE.FOCUS_OUT,an=!TPe(Ne._f)&&!e.resolver&&!Ie(n.errors,me)&&!Ne._f.deps||kPe(kt,Ie(n.touchedFields,me),n.isSubmitted,p,d),gr=KM(me,a,kt);sn(i,me,gt),kt?(Ne._f.onBlur&&Ne._f.onBlur(J),c&&c(0)):Ne._f.onChange&&Ne._f.onChange(J);const _n=P(me,gt,kt,!1),di=!Xs(_n)||gr;if(!kt&&l.values.next({name:me,type:J.type,values:{...i}}),an)return f.isValid&&y(),di&&l.state.next({name:me,...gr?{}:_n});if(!kt&&gr&&l.state.next({...n}),e.resolver){const{errors:or}=await E([me]);if(Ve(gt),Ae){const fi=D5(n.errors,r,me),$e=D5(or,r,fi.name||me);et=$e.error,me=$e.name,qt=Xs(or)}}else g([me],!0),et=(await YM(Ne,i,h,e.shouldUseNativeValidation))[me],g([me]),Ve(gt),Ae&&(et?qt=!1:f.isValid&&(qt=await k(r,!0)));Ae&&(Ne._f.deps&&se(Ne._f.deps),T(me,qt,et,_n))}},ee=(J,de)=>{if(Ie(n.errors,de)&&J.focus)return J.focus(),1},se=async(J,de={})=>{let me,Ae;const Ne=Ti(J);if(e.resolver){const Ee=await N(Fn(J)?J:Ne);me=Xs(Ee),Ae=J?!Ne.some(Ve=>Ie(Ee,Ve)):me}else J?(Ae=(await Promise.all(Ne.map(async Ee=>{const Ve=Ie(r,Ee);return await k(Ve&&Ve._f?{[Ee]:Ve}:Ve)}))).every(Boolean),!(!Ae&&!n.isValid)&&y()):Ae=me=await k(r);return l.state.next({...!Ml(J)||f.isValid&&me!==n.isValid?{}:{name:J},...e.resolver||!J?{isValid:me}:{},errors:n.errors}),de.shouldFocus&&!Ae&&gg(r,ee,J?Ne:a.mount),Ae},X=J=>{const de={...o.mount?i:s};return Fn(J)?de:Ml(J)?Ie(de,J):J.map(me=>Ie(de,me))},G=(J,de)=>({invalid:!!Ie((de||n).errors,J),isDirty:!!Ie((de||n).dirtyFields,J),error:Ie((de||n).errors,J),isValidating:!!Ie(n.validatingFields,J),isTouched:!!Ie((de||n).touchedFields,J)}),Y=J=>{J&&Ti(J).forEach(de=>Rr(n.errors,de)),l.state.next({errors:J?n.errors:{}})},Q=(J,de,me)=>{const Ae=(Ie(r,J,{_f:{}})._f||{}).ref,Ne=Ie(n.errors,J)||{},{ref:Ee,message:Ve,type:et,...qt}=Ne;sn(n.errors,J,{...qt,...de,ref:Ae}),l.state.next({name:J,errors:n.errors,isValid:!1}),me&&me.shouldFocus&&Ae&&Ae.focus&&Ae.focus()},he=(J,de)=>Vd(J)?l.values.subscribe({next:me=>J(j(void 0,de),me)}):j(J,de,!0),fe=(J,de={})=>{for(const me of J?Ti(J):a.mount)a.mount.delete(me),a.array.delete(me),de.keepValue||(Rr(r,me),Rr(i,me)),!de.keepError&&Rr(n.errors,me),!de.keepDirty&&Rr(n.dirtyFields,me),!de.keepTouched&&Rr(n.touchedFields,me),!de.keepIsValidating&&Rr(n.validatingFields,me),!e.shouldUnregister&&!de.keepDefaultValue&&Rr(s,me);l.values.next({values:{...i}}),l.state.next({...n,...de.keepDirty?{isDirty:I()}:{}}),!de.keepIsValid&&y()},ce=({disabled:J,name:de,field:me,fields:Ae,value:Ne})=>{if(Tl(J)&&o.mount||J){const Ee=J?void 0:Fn(Ne)?Ak(me?me._f:Ie(Ae,de)._f):Ne;sn(i,de,Ee),P(de,Ee,!1,!1,!0)}},xe=(J,de={})=>{let me=Ie(r,J);const Ae=Tl(de.disabled);return sn(r,J,{...me||{},_f:{...me&&me._f?me._f:{ref:{name:J}},name:J,mount:!0,...de}}),a.mount.add(J),me?ce({field:me,disabled:de.disabled,name:J,value:de.value}):R(J,!0,de.value),{...Ae?{disabled:de.disabled}:{},...e.progressive?{required:!!de.required,min:Cb(de.min),max:Cb(de.max),minLength:Cb(de.minLength),maxLength:Cb(de.maxLength),pattern:Cb(de.pattern)}:{},name:J,onChange:q,onBlur:q,ref:Ne=>{if(Ne){xe(J,de),me=Ie(r,J);const Ee=Fn(Ne.value)&&Ne.querySelectorAll&&Ne.querySelectorAll("input,select,textarea")[0]||Ne,Ve=PPe(Ee),et=me._f.refs||[];if(Ve?et.find(qt=>qt===Ee):Ee===me._f.ref)return;sn(r,J,{_f:{...me._f,...Ve?{refs:[...et.filter(Rk),Ee,...Array.isArray(Ie(s,J))?[{}]:[]],ref:{type:Ee.type,name:J}}:{ref:Ee}}}),R(J,!1,void 0,Ee)}else me=Ie(r,J,{}),me._f&&(me._f.mount=!1),(e.shouldUnregister||de.shouldUnregister)&&!(QK(a.array,J)&&o.action)&&a.unMount.add(J)}}},Pe=()=>e.shouldFocusError&&gg(r,ee,a.mount),pe=J=>{Tl(J)&&(l.state.next({disabled:J}),gg(r,(de,me)=>{const Ae=Ie(r,me);Ae&&(de.disabled=Ae._f.disabled||J,Array.isArray(Ae._f.refs)&&Ae._f.refs.forEach(Ne=>{Ne.disabled=Ae._f.disabled||J}))},0,!1))},Le=(J,de)=>async me=>{let Ae;me&&(me.preventDefault&&me.preventDefault(),me.persist&&me.persist());let Ne=Br(i);if(l.state.next({isSubmitting:!0}),e.resolver){const{errors:Ee,values:Ve}=await E();n.errors=Ee,Ne=Ve}else await k(r);if(Rr(n.errors,"root"),Xs(n.errors)){l.state.next({errors:{}});try{await J(Ne,me)}catch(Ee){Ae=Ee}}else de&&await de({...n.errors},me),Pe(),setTimeout(Pe);if(l.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Xs(n.errors)&&!Ae,submitCount:n.submitCount+1,errors:n.errors}),Ae)throw Ae},Me=(J,de={})=>{Ie(r,J)&&(Fn(de.defaultValue)?H(J,Br(Ie(s,J))):(H(J,de.defaultValue),sn(s,J,Br(de.defaultValue))),de.keepTouched||Rr(n.touchedFields,J),de.keepDirty||(Rr(n.dirtyFields,J),n.isDirty=de.defaultValue?I(J,Br(Ie(s,J))):I()),de.keepError||(Rr(n.errors,J),f.isValid&&y()),l.state.next({...n}))},Oe=(J,de={})=>{const me=J?Br(J):s,Ae=Br(me),Ne=Xs(J),Ee=Ne?s:Ae;if(de.keepDefaultValues||(s=me),!de.keepValues){if(de.keepDirtyValues)for(const Ve of a.mount)Ie(n.dirtyFields,Ve)?sn(Ee,Ve,Ie(i,Ve)):H(Ve,Ie(Ee,Ve));else{if(P2&&Fn(J))for(const Ve of a.mount){const et=Ie(r,Ve);if(et&&et._f){const qt=Array.isArray(et._f.refs)?et._f.refs[0]:et._f.ref;if(RE(qt)){const gt=qt.closest("form");if(gt){gt.reset();break}}}}r={}}i=t.shouldUnregister?de.keepDefaultValues?Br(s):{}:Br(Ee),l.array.next({values:{...Ee}}),l.values.next({values:{...Ee}})}a={mount:de.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!f.isValid||!!de.keepIsValid||!!de.keepDirtyValues,o.watch=!!t.shouldUnregister,l.state.next({submitCount:de.keepSubmitCount?n.submitCount:0,isDirty:Ne?!1:de.keepDirty?n.isDirty:!!(de.keepDefaultValues&&!rh(J,s)),isSubmitted:de.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Ne?{}:de.keepDirtyValues?de.keepDefaultValues&&i?C1(s,i):n.dirtyFields:de.keepDefaultValues&&J?C1(s,J):de.keepDirty?n.dirtyFields:{},touchedFields:de.keepTouched?n.touchedFields:{},errors:de.keepErrors?n.errors:{},isSubmitSuccessful:de.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Fe=(J,de)=>Oe(Vd(J)?J(i):J,de);return{control:{register:xe,unregister:fe,getFieldState:G,handleSubmit:Le,setError:Q,_executeSchema:E,_getWatch:j,_getDirty:I,_updateValid:y,_removeUnmounted:M,_updateFieldArray:v,_updateDisabledField:ce,_getFieldArray:L,_reset:Oe,_resetDefaultValues:()=>Vd(e.defaultValues)&&e.defaultValues().then(J=>{Fe(J,e.resetOptions),l.state.next({isLoading:!1})}),_updateFormState:J=>{n={...n,...J}},_disableForm:pe,_subjects:l,_proxyFormState:f,_setErrors:_,get _fields(){return r},get _formValues(){return i},get _state(){return o},set _state(J){o=J},get _defaultValues(){return s},get _names(){return a},set _names(J){a=J},get _formState(){return n},set _formState(J){n=J},get _options(){return e},set _options(J){e={...e,...J}}},trigger:se,register:xe,handleSubmit:Le,watch:he,setValue:H,getValues:X,reset:Fe,resetField:Me,clearErrors:Y,unregister:fe,setError:Q,setFocus:(J,de={})=>{const me=Ie(r,J),Ae=me&&me._f;if(Ae){const Ne=Ae.refs?Ae.refs[0]:Ae.ref;Ne.focus&&(Ne.focus(),de.shouldSelect&&Ne.select())}},getFieldState:G}}function j_(t={}){const e=oe.useRef(),n=oe.useRef(),[r,s]=oe.useState({isDirty:!1,isValidating:!1,isLoading:Vd(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,defaultValues:Vd(t.defaultValues)?void 0:t.defaultValues});e.current||(e.current={...OPe(t),formState:r});const i=e.current.control;return i._options=t,qA({subject:i._subjects.state,next:o=>{t9(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),oe.useEffect(()=>i._disableForm(t.disabled),[i,t.disabled]),oe.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==r.isDirty&&i._subjects.state.next({isDirty:o})}},[i,r.isDirty]),oe.useEffect(()=>{t.values&&!rh(t.values,n.current)?(i._reset(t.values,i._options.resetOptions),n.current=t.values,s(o=>({...o}))):i._resetDefaultValues()},[t.values,i]),oe.useEffect(()=>{t.errors&&i._setErrors(t.errors)},[t.errors,i]),oe.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),oe.useEffect(()=>{t.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[t.shouldUnregister,i]),e.current.formState=e9(r,i),e.current}var IPe="Label",h9=S.forwardRef((t,e)=>w.jsx(De.label,{...t,ref:e,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));h9.displayName=IPe;var p9=h9;const jPe=li("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Wp=S.forwardRef(({className:t,...e},n)=>w.jsx(p9,{ref:n,className:ie(jPe(),t),...e}));Wp.displayName=p9.displayName;const L_=xPe,m9=S.createContext({}),Ny=({...t})=>w.jsx(m9.Provider,{value:{name:t.name},children:w.jsx(SPe,{...t})}),Ty=()=>{const t=S.useContext(m9),e=S.useContext(g9),{getFieldState:n,formState:r}=Bi(),s=n(t.name,r);if(!t)throw new Error("useFormField should be used within ");const{id:i}=e;return{id:i,name:t.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...s}},g9=S.createContext({}),Gp=S.forwardRef(({className:t,...e},n)=>{const r=S.useId();return w.jsx(g9.Provider,{value:{id:r},children:w.jsx("div",{ref:n,className:ie("space-y-2",t),...e})})});Gp.displayName="FormItem";const v9=S.forwardRef(({className:t,...e},n)=>{const{error:r,formItemId:s}=Ty();return w.jsx(Wp,{ref:n,className:ie(r&&"text-destructive",t),htmlFor:s,...e})});v9.displayName="FormLabel";const Kp=S.forwardRef(({...t},e)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:i}=Ty();return w.jsx(qa,{ref:e,id:r,"aria-describedby":n?`${s} ${i}`:`${s}`,"aria-invalid":!!n,...t})});Kp.displayName="FormControl";const Yp=S.forwardRef(({className:t,...e},n)=>{const{formDescriptionId:r}=Ty();return w.jsx("p",{ref:n,id:r,className:ie("text-sm text-muted-foreground",t),...e})});Yp.displayName="FormDescription";const y9=S.forwardRef(({className:t,children:e,...n},r)=>{var a;const{error:s,formMessageId:i}=Ty(),o=s&&s.message?String((s==null?void 0:s.message)||((a=s.root)==null?void 0:a.message)):e;return o?w.jsx("p",{ref:r,id:i,className:ie("text-sm font-medium text-destructive",t),...n,children:o}):null});y9.displayName="FormMessage";var Pk,b9="HoverCard",[x9,$Ue]=In(b9,[Yl]),D2=Yl(),[FUe,M2]=x9(b9),w9="HoverCardTrigger",LPe=S.forwardRef((t,e)=>{const{__scopeHoverCard:n,...r}=t,s=M2(w9,n),i=D2(n);return w.jsx(Ay,{asChild:!0,...i,children:w.jsx(De.a,{"data-state":s.open?"open":"closed",...r,ref:e,onPointerEnter:ye(t.onPointerEnter,kE(s.onOpen)),onPointerLeave:ye(t.onPointerLeave,kE(s.onClose)),onFocus:ye(t.onFocus,s.onOpen),onBlur:ye(t.onBlur,s.onClose),onTouchStart:ye(t.onTouchStart,o=>o.preventDefault())})})});LPe.displayName=w9;var $Pe="HoverCardPortal",[zUe,FPe]=x9($Pe,{forceMount:void 0}),TE="HoverCardContent",_9=S.forwardRef((t,e)=>{const n=FPe(TE,t.__scopeHoverCard),{forceMount:r=n.forceMount,...s}=t,i=M2(TE,t.__scopeHoverCard);return w.jsx(Kn,{present:r||i.open,children:w.jsx(zPe,{"data-state":i.open?"open":"closed",...s,onPointerEnter:ye(t.onPointerEnter,kE(i.onOpen)),onPointerLeave:ye(t.onPointerLeave,kE(i.onClose)),ref:e})})});_9.displayName=TE;var zPe=S.forwardRef((t,e)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,...a}=t,c=M2(TE,n),u=D2(n),f=S.useRef(null),l=Je(e,f),[d,p]=S.useState(!1);return S.useEffect(()=>{if(d){const h=document.body;return Pk=h.style.userSelect||h.style.webkitUserSelect,h.style.userSelect="none",h.style.webkitUserSelect="none",()=>{h.style.userSelect=Pk,h.style.webkitUserSelect=Pk}}},[d]),S.useEffect(()=>{if(f.current){const h=()=>{p(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var y;((y=document.getSelection())==null?void 0:y.toString())!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",h),()=>{document.removeEventListener("pointerup",h),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),S.useEffect(()=>{f.current&&HPe(f.current).forEach(m=>m.setAttribute("tabindex","-1"))}),w.jsx(Ru,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:o,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:ye(i,h=>{h.preventDefault()}),onDismiss:c.onDismiss,children:w.jsx(E_,{...u,...a,onPointerDown:ye(a.onPointerDown,h=>{h.currentTarget.contains(h.target)&&p(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:l,style:{...a.style,userSelect:d?"text":void 0,WebkitUserSelect:d?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),BPe="HoverCardArrow",UPe=S.forwardRef((t,e)=>{const{__scopeHoverCard:n,...r}=t,s=D2(n);return w.jsx(R_,{...s,...r,ref:e})});UPe.displayName=BPe;function kE(t){return e=>e.pointerType==="touch"?void 0:t()}function HPe(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)e.push(n.currentNode);return e}var S9=_9;const VPe=S.forwardRef(({className:t,align:e="center",sideOffset:n=4,...r},s)=>w.jsx(S9,{ref:s,align:e,sideOffset:n,className:ie("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r}));VPe.displayName=S9.displayName;const WA=S.forwardRef(({className:t,type:e,...n},r)=>w.jsx("input",{type:e,className:ie("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:r,...n}));WA.displayName="Input";var GA="Menubar",[XM,qPe,WPe]=Cu(GA),[C9,BUe]=In(GA,[WPe,Xl]),Ui=T_(),E9=Xl(),[GPe,R9]=C9(GA),A9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,value:r,onValueChange:s,defaultValue:i,loop:o=!0,dir:a,...c}=t,u=Qa(a),f=E9(n),[l="",d]=mr({prop:r,onChange:s,defaultProp:i}),[p,h]=S.useState(null);return w.jsx(GPe,{scope:n,value:l,onMenuOpen:S.useCallback(m=>{d(m),h(m)},[d]),onMenuClose:S.useCallback(()=>d(""),[d]),onMenuToggle:S.useCallback(m=>{d(y=>y?"":m),h(m)},[d]),dir:u,loop:o,children:w.jsx(XM.Provider,{scope:n,children:w.jsx(XM.Slot,{scope:n,children:w.jsx(A_,{asChild:!0,...f,orientation:"horizontal",loop:o,dir:u,currentTabStopId:p,onCurrentTabStopIdChange:h,children:w.jsx(De.div,{role:"menubar",...c,ref:e})})})})})});A9.displayName=GA;var KPe="MenubarMenu",[UUe,P9]=C9(KPe),QM="MenubarTrigger",N9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,disabled:r=!1,...s}=t,i=E9(n),o=Ui(n),a=R9(QM,n),c=P9(QM,n),u=S.useRef(null),f=Je(e,u,c.triggerRef),[l,d]=S.useState(!1),p=a.value===c.value;return w.jsx(XM.ItemSlot,{scope:n,value:c.value,disabled:r,children:w.jsx(P_,{asChild:!0,...i,focusable:!r,tabStopId:c.value,children:w.jsx(f2,{asChild:!0,...o,children:w.jsx(De.button,{type:"button",role:"menuitem",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":p,"aria-controls":p?c.contentId:void 0,"data-highlighted":l?"":void 0,"data-state":p?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:f,onPointerDown:ye(t.onPointerDown,h=>{!r&&h.button===0&&h.ctrlKey===!1&&(a.onMenuOpen(c.value),p||h.preventDefault())}),onPointerEnter:ye(t.onPointerEnter,()=>{var m;!!a.value&&!p&&(a.onMenuOpen(c.value),(m=u.current)==null||m.focus())}),onKeyDown:ye(t.onKeyDown,h=>{r||(["Enter"," "].includes(h.key)&&a.onMenuToggle(c.value),h.key==="ArrowDown"&&a.onMenuOpen(c.value),["Enter"," ","ArrowDown"].includes(h.key)&&(c.wasKeyboardTriggerOpenRef.current=!0,h.preventDefault()))}),onFocus:ye(t.onFocus,()=>d(!0)),onBlur:ye(t.onBlur,()=>d(!1))})})})})});N9.displayName=QM;var YPe="MenubarPortal",T9=t=>{const{__scopeMenubar:e,...n}=t,r=Ui(e);return w.jsx(h2,{...r,...n})};T9.displayName=YPe;var ZM="MenubarContent",k9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,align:r="start",...s}=t,i=Ui(n),o=R9(ZM,n),a=P9(ZM,n),c=qPe(n),u=S.useRef(!1);return w.jsx(p2,{id:a.contentId,"aria-labelledby":a.triggerId,"data-radix-menubar-content":"",...i,...s,ref:e,align:r,onCloseAutoFocus:ye(t.onCloseAutoFocus,f=>{var d;!!!o.value&&!u.current&&((d=a.triggerRef.current)==null||d.focus()),u.current=!1,f.preventDefault()}),onFocusOutside:ye(t.onFocusOutside,f=>{const l=f.target;c().some(p=>{var h;return(h=p.ref.current)==null?void 0:h.contains(l)})&&f.preventDefault()}),onInteractOutside:ye(t.onInteractOutside,()=>{u.current=!0}),onEntryFocus:f=>{a.wasKeyboardTriggerOpenRef.current||f.preventDefault()},onKeyDown:ye(t.onKeyDown,f=>{if(["ArrowRight","ArrowLeft"].includes(f.key)){const l=f.target,d=l.hasAttribute("data-radix-menubar-subtrigger"),p=l.closest("[data-radix-menubar-content]")!==f.currentTarget,m=(o.dir==="rtl"?"ArrowRight":"ArrowLeft")===f.key;if(!m&&d||p&&m)return;let v=c().filter(R=>!R.disabled).map(R=>R.value);m&&v.reverse();const b=v.indexOf(a.value);v=o.loop?uNe(v,b+1):v.slice(b+1);const[_]=v;_&&o.onMenuOpen(_)}},{checkForDefaultPrevented:!1}),style:{...t.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});k9.displayName=ZM;var XPe="MenubarGroup",QPe=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(m2,{...s,...r,ref:e})});QPe.displayName=XPe;var ZPe="MenubarLabel",D9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(g2,{...s,...r,ref:e})});D9.displayName=ZPe;var JPe="MenubarItem",M9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(v2,{...s,...r,ref:e})});M9.displayName=JPe;var eNe="MenubarCheckboxItem",O9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(y2,{...s,...r,ref:e})});O9.displayName=eNe;var tNe="MenubarRadioGroup",nNe=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(b2,{...s,...r,ref:e})});nNe.displayName=tNe;var rNe="MenubarRadioItem",I9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(x2,{...s,...r,ref:e})});I9.displayName=rNe;var sNe="MenubarItemIndicator",j9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(w2,{...s,...r,ref:e})});j9.displayName=sNe;var iNe="MenubarSeparator",L9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(_2,{...s,...r,ref:e})});L9.displayName=iNe;var oNe="MenubarArrow",aNe=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(S2,{...s,...r,ref:e})});aNe.displayName=oNe;var lNe="MenubarSubTrigger",$9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(C2,{"data-radix-menubar-subtrigger":"",...s,...r,ref:e})});$9.displayName=lNe;var cNe="MenubarSubContent",F9=S.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Ui(n);return w.jsx(E2,{...s,"data-radix-menubar-content":"",...r,ref:e,style:{...t.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});F9.displayName=cNe;function uNe(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var z9=A9,B9=N9,dNe=T9,U9=k9,H9=D9,V9=M9,q9=O9,W9=I9,G9=j9,K9=L9,Y9=$9,X9=F9;const fNe=S.forwardRef(({className:t,...e},n)=>w.jsx(z9,{ref:n,className:ie("flex h-10 items-center space-x-1 rounded-md border bg-background p-1",t),...e}));fNe.displayName=z9.displayName;const hNe=S.forwardRef(({className:t,...e},n)=>w.jsx(B9,{ref:n,className:ie("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t),...e}));hNe.displayName=B9.displayName;const pNe=S.forwardRef(({className:t,inset:e,children:n,...r},s)=>w.jsxs(Y9,{ref:s,className:ie("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e&&"pl-8",t),...r,children:[n,w.jsx(ly,{className:"ml-auto h-4 w-4"})]}));pNe.displayName=Y9.displayName;const mNe=S.forwardRef(({className:t,...e},n)=>w.jsx(X9,{ref:n,className:ie("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));mNe.displayName=X9.displayName;const gNe=S.forwardRef(({className:t,align:e="start",alignOffset:n=-4,sideOffset:r=8,...s},i)=>w.jsx(dNe,{children:w.jsx(U9,{ref:i,align:e,alignOffset:n,sideOffset:r,className:ie("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...s})}));gNe.displayName=U9.displayName;const vNe=S.forwardRef(({className:t,inset:e,...n},r)=>w.jsx(V9,{ref:r,className:ie("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e&&"pl-8",t),...n}));vNe.displayName=V9.displayName;const yNe=S.forwardRef(({className:t,children:e,checked:n,...r},s)=>w.jsxs(q9,{ref:s,className:ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n,...r,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(G9,{children:w.jsx(u_,{className:"h-4 w-4"})})}),e]}));yNe.displayName=q9.displayName;const bNe=S.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(W9,{ref:r,className:ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(G9,{children:w.jsx(sA,{className:"h-2 w-2 fill-current"})})}),e]}));bNe.displayName=W9.displayName;const xNe=S.forwardRef(({className:t,inset:e,...n},r)=>w.jsx(H9,{ref:r,className:ie("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...n}));xNe.displayName=H9.displayName;const wNe=S.forwardRef(({className:t,...e},n)=>w.jsx(K9,{ref:n,className:ie("-mx-1 my-1 h-px bg-muted",t),...e}));wNe.displayName=K9.displayName;var _Ne="VisuallyHidden",$_=S.forwardRef((t,e)=>w.jsx(De.span,{...t,ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}));$_.displayName=_Ne;var Q9=$_,ky="NavigationMenu",[O2,Z9,SNe]=Cu(ky),[JM,CNe,ENe]=Cu(ky),[I2,HUe]=In(ky,[SNe,ENe]),[RNe,la]=I2(ky),[ANe,PNe]=I2(ky),J9=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:s,defaultValue:i,delayDuration:o=200,skipDelayDuration:a=300,orientation:c="horizontal",dir:u,...f}=t,[l,d]=S.useState(null),p=Je(e,N=>d(N)),h=Qa(u),m=S.useRef(0),y=S.useRef(0),g=S.useRef(0),[v,b]=S.useState(!0),[_="",R]=mr({prop:r,onChange:N=>{const k=N!=="",M=a>0;k?(window.clearTimeout(g.current),M&&b(!1)):(window.clearTimeout(g.current),g.current=window.setTimeout(()=>b(!0),a)),s==null||s(N)},defaultProp:i}),P=S.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>R(""),150)},[R]),T=S.useCallback(N=>{window.clearTimeout(y.current),R(N)},[R]),E=S.useCallback(N=>{_===N?window.clearTimeout(y.current):m.current=window.setTimeout(()=>{window.clearTimeout(y.current),R(N)},o)},[_,R,o]);return S.useEffect(()=>()=>{window.clearTimeout(m.current),window.clearTimeout(y.current),window.clearTimeout(g.current)},[]),w.jsx(tY,{scope:n,isRootMenu:!0,value:_,dir:h,orientation:c,rootNavigationMenu:l,onTriggerEnter:N=>{window.clearTimeout(m.current),v?E(N):T(N)},onTriggerLeave:()=>{window.clearTimeout(m.current),P()},onContentEnter:()=>window.clearTimeout(y.current),onContentLeave:P,onItemSelect:N=>{R(k=>k===N?"":N)},onItemDismiss:()=>R(""),children:w.jsx(De.nav,{"aria-label":"Main","data-orientation":c,dir:h,...f,ref:p})})});J9.displayName=ky;var eY="NavigationMenuSub",NNe=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:s,defaultValue:i,orientation:o="horizontal",...a}=t,c=la(eY,n),[u="",f]=mr({prop:r,onChange:s,defaultProp:i});return w.jsx(tY,{scope:n,isRootMenu:!1,value:u,dir:c.dir,orientation:o,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:l=>f(l),onItemSelect:l=>f(l),onItemDismiss:()=>f(""),children:w.jsx(De.div,{"data-orientation":o,...a,ref:e})})});NNe.displayName=eY;var tY=t=>{const{scope:e,isRootMenu:n,rootNavigationMenu:r,dir:s,orientation:i,children:o,value:a,onItemSelect:c,onItemDismiss:u,onTriggerEnter:f,onTriggerLeave:l,onContentEnter:d,onContentLeave:p}=t,[h,m]=S.useState(null),[y,g]=S.useState(new Map),[v,b]=S.useState(null);return w.jsx(RNe,{scope:e,isRootMenu:n,rootNavigationMenu:r,value:a,previousValue:xy(a),baseId:js(),dir:s,orientation:i,viewport:h,onViewportChange:m,indicatorTrack:v,onIndicatorTrackChange:b,onTriggerEnter:on(f),onTriggerLeave:on(l),onContentEnter:on(d),onContentLeave:on(p),onItemSelect:on(c),onItemDismiss:on(u),onViewportContentChange:S.useCallback((_,R)=>{g(P=>(P.set(_,R),new Map(P)))},[]),onViewportContentRemove:S.useCallback(_=>{g(R=>R.has(_)?(R.delete(_),new Map(R)):R)},[]),children:w.jsx(O2.Provider,{scope:e,children:w.jsx(ANe,{scope:e,items:y,children:o})})})},nY="NavigationMenuList",rY=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,...r}=t,s=la(nY,n),i=w.jsx(De.ul,{"data-orientation":s.orientation,...r,ref:e});return w.jsx(De.div,{style:{position:"relative"},ref:s.onIndicatorTrackChange,children:w.jsx(O2.Slot,{scope:n,children:s.isRootMenu?w.jsx(dY,{asChild:!0,children:i}):i})})});rY.displayName=nY;var sY="NavigationMenuItem",[TNe,iY]=I2(sY),kNe=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,value:r,...s}=t,i=js(),o=r||i||"LEGACY_REACT_AUTO_VALUE",a=S.useRef(null),c=S.useRef(null),u=S.useRef(null),f=S.useRef(()=>{}),l=S.useRef(!1),d=S.useCallback((h="start")=>{if(a.current){f.current();const m=tO(a.current);m.length&&$2(h==="start"?m:m.reverse())}},[]),p=S.useCallback(()=>{if(a.current){const h=tO(a.current);h.length&&(f.current=FNe(h))}},[]);return w.jsx(TNe,{scope:n,value:o,triggerRef:c,contentRef:a,focusProxyRef:u,wasEscapeCloseRef:l,onEntryKeyDown:d,onFocusProxyEnter:d,onRootContentClose:p,onContentFocusOutside:p,children:w.jsx(De.li,{...s,ref:e})})});kNe.displayName=sY;var eO="NavigationMenuTrigger",oY=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,disabled:r,...s}=t,i=la(eO,t.__scopeNavigationMenu),o=iY(eO,t.__scopeNavigationMenu),a=S.useRef(null),c=Je(a,o.triggerRef,e),u=hY(i.baseId,o.value),f=pY(i.baseId,o.value),l=S.useRef(!1),d=S.useRef(!1),p=o.value===i.value;return w.jsxs(w.Fragment,{children:[w.jsx(O2.ItemSlot,{scope:n,value:o.value,children:w.jsx(fY,{asChild:!0,children:w.jsx(De.button,{id:u,disabled:r,"data-disabled":r?"":void 0,"data-state":F2(p),"aria-expanded":p,"aria-controls":f,...s,ref:c,onPointerEnter:ye(t.onPointerEnter,()=>{d.current=!1,o.wasEscapeCloseRef.current=!1}),onPointerMove:ye(t.onPointerMove,DE(()=>{r||d.current||o.wasEscapeCloseRef.current||l.current||(i.onTriggerEnter(o.value),l.current=!0)})),onPointerLeave:ye(t.onPointerLeave,DE(()=>{r||(i.onTriggerLeave(),l.current=!1)})),onClick:ye(t.onClick,()=>{i.onItemSelect(o.value),d.current=p}),onKeyDown:ye(t.onKeyDown,h=>{const y={horizontal:"ArrowDown",vertical:i.dir==="rtl"?"ArrowLeft":"ArrowRight"}[i.orientation];p&&h.key===y&&(o.onEntryKeyDown(),h.preventDefault())})})})}),p&&w.jsxs(w.Fragment,{children:[w.jsx(Q9,{"aria-hidden":!0,tabIndex:0,ref:o.focusProxyRef,onFocus:h=>{const m=o.contentRef.current,y=h.relatedTarget,g=y===a.current,v=m==null?void 0:m.contains(y);(g||!v)&&o.onFocusProxyEnter(g?"start":"end")}}),i.viewport&&w.jsx("span",{"aria-owns":f})]})]})});oY.displayName=eO;var DNe="NavigationMenuLink",M5="navigationMenu.linkSelect",MNe=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,active:r,onSelect:s,...i}=t;return w.jsx(fY,{asChild:!0,children:w.jsx(De.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...i,ref:e,onClick:ye(t.onClick,o=>{const a=o.target,c=new CustomEvent(M5,{bubbles:!0,cancelable:!0});if(a.addEventListener(M5,u=>s==null?void 0:s(u),{once:!0}),tx(a,c),!c.defaultPrevented&&!o.metaKey){const u=new CustomEvent(aC,{bubbles:!0,cancelable:!0});tx(a,u)}},{checkForDefaultPrevented:!1})})})});MNe.displayName=DNe;var j2="NavigationMenuIndicator",aY=S.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=la(j2,t.__scopeNavigationMenu),i=!!s.value;return s.indicatorTrack?KR.createPortal(w.jsx(Kn,{present:n||i,children:w.jsx(ONe,{...r,ref:e})}),s.indicatorTrack):null});aY.displayName=j2;var ONe=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,...r}=t,s=la(j2,n),i=Z9(n),[o,a]=S.useState(null),[c,u]=S.useState(null),f=s.orientation==="horizontal",l=!!s.value;S.useEffect(()=>{var m;const h=(m=i().find(y=>y.value===s.value))==null?void 0:m.ref.current;h&&a(h)},[i,s.value]);const d=()=>{o&&u({size:f?o.offsetWidth:o.offsetHeight,offset:f?o.offsetLeft:o.offsetTop})};return nO(o,d),nO(s.indicatorTrack,d),c?w.jsx(De.div,{"aria-hidden":!0,"data-state":l?"visible":"hidden","data-orientation":s.orientation,...r,ref:e,style:{position:"absolute",...f?{left:0,width:c.size+"px",transform:`translateX(${c.offset}px)`}:{top:0,height:c.size+"px",transform:`translateY(${c.offset}px)`},...r.style}}):null}),Wv="NavigationMenuContent",lY=S.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=la(Wv,t.__scopeNavigationMenu),i=iY(Wv,t.__scopeNavigationMenu),o=Je(i.contentRef,e),a=i.value===s.value,c={value:i.value,triggerRef:i.triggerRef,focusProxyRef:i.focusProxyRef,wasEscapeCloseRef:i.wasEscapeCloseRef,onContentFocusOutside:i.onContentFocusOutside,onRootContentClose:i.onRootContentClose,...r};return s.viewport?w.jsx(INe,{forceMount:n,...c,ref:o}):w.jsx(Kn,{present:n||a,children:w.jsx(cY,{"data-state":F2(a),...c,ref:o,onPointerEnter:ye(t.onPointerEnter,s.onContentEnter),onPointerLeave:ye(t.onPointerLeave,DE(s.onContentLeave)),style:{pointerEvents:!a&&s.isRootMenu?"none":void 0,...c.style}})})});lY.displayName=Wv;var INe=S.forwardRef((t,e)=>{const n=la(Wv,t.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:s}=n;return ir(()=>{r(t.value,{ref:e,...t})},[t,e,r]),ir(()=>()=>s(t.value),[t.value,s]),null}),aC="navigationMenu.rootContentDismiss",cY=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:s,focusProxyRef:i,wasEscapeCloseRef:o,onRootContentClose:a,onContentFocusOutside:c,...u}=t,f=la(Wv,n),l=S.useRef(null),d=Je(l,e),p=hY(f.baseId,r),h=pY(f.baseId,r),m=Z9(n),y=S.useRef(null),{onItemDismiss:g}=f;S.useEffect(()=>{const b=l.current;if(f.isRootMenu&&b){const _=()=>{var R;g(),a(),b.contains(document.activeElement)&&((R=s.current)==null||R.focus())};return b.addEventListener(aC,_),()=>b.removeEventListener(aC,_)}},[f.isRootMenu,t.value,s,g,a]);const v=S.useMemo(()=>{const _=m().map(k=>k.value);f.dir==="rtl"&&_.reverse();const R=_.indexOf(f.value),P=_.indexOf(f.previousValue),T=r===f.value,E=P===_.indexOf(r);if(!T&&!E)return y.current;const N=(()=>{if(R!==P){if(T&&P!==-1)return R>P?"from-end":"from-start";if(E&&R!==-1)return R>P?"to-start":"to-end"}return null})();return y.current=N,N},[f.previousValue,f.value,f.dir,m,r]);return w.jsx(dY,{asChild:!0,children:w.jsx(Ru,{id:h,"aria-labelledby":p,"data-motion":v,"data-orientation":f.orientation,...u,ref:d,disableOutsidePointerEvents:!1,onDismiss:()=>{var _;const b=new Event(aC,{bubbles:!0,cancelable:!0});(_=l.current)==null||_.dispatchEvent(b)},onFocusOutside:ye(t.onFocusOutside,b=>{var R;c();const _=b.target;(R=f.rootNavigationMenu)!=null&&R.contains(_)&&b.preventDefault()}),onPointerDownOutside:ye(t.onPointerDownOutside,b=>{var T;const _=b.target,R=m().some(E=>{var N;return(N=E.ref.current)==null?void 0:N.contains(_)}),P=f.isRootMenu&&((T=f.viewport)==null?void 0:T.contains(_));(R||P||!f.isRootMenu)&&b.preventDefault()}),onKeyDown:ye(t.onKeyDown,b=>{var P;const _=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!_){const T=tO(b.currentTarget),E=document.activeElement,N=T.findIndex(I=>I===E),M=b.shiftKey?T.slice(0,N).reverse():T.slice(N+1,T.length);$2(M)?b.preventDefault():(P=i.current)==null||P.focus()}}),onEscapeKeyDown:ye(t.onEscapeKeyDown,b=>{o.current=!0})})})}),L2="NavigationMenuViewport",uY=S.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=!!la(L2,t.__scopeNavigationMenu).value;return w.jsx(Kn,{present:n||i,children:w.jsx(jNe,{...r,ref:e})})});uY.displayName=L2;var jNe=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,children:r,...s}=t,i=la(L2,n),o=Je(e,i.onViewportChange),a=PNe(Wv,t.__scopeNavigationMenu),[c,u]=S.useState(null),[f,l]=S.useState(null),d=c?(c==null?void 0:c.width)+"px":void 0,p=c?(c==null?void 0:c.height)+"px":void 0,h=!!i.value,m=h?i.value:i.previousValue;return nO(f,()=>{f&&u({width:f.offsetWidth,height:f.offsetHeight})}),w.jsx(De.div,{"data-state":F2(h),"data-orientation":i.orientation,...s,ref:o,style:{pointerEvents:!h&&i.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":d,"--radix-navigation-menu-viewport-height":p,...s.style},onPointerEnter:ye(t.onPointerEnter,i.onContentEnter),onPointerLeave:ye(t.onPointerLeave,DE(i.onContentLeave)),children:Array.from(a.items).map(([g,{ref:v,forceMount:b,..._}])=>{const R=m===g;return w.jsx(Kn,{present:b||R,children:w.jsx(cY,{..._,ref:c_(v,P=>{R&&P&&l(P)})})},g)})})}),LNe="FocusGroup",dY=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,...r}=t,s=la(LNe,n);return w.jsx(JM.Provider,{scope:n,children:w.jsx(JM.Slot,{scope:n,children:w.jsx(De.div,{dir:s.dir,...r,ref:e})})})}),O5=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],$Ne="FocusGroupItem",fY=S.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,...r}=t,s=CNe(n),i=la($Ne,n);return w.jsx(JM.ItemSlot,{scope:n,children:w.jsx(De.button,{...r,ref:e,onKeyDown:ye(t.onKeyDown,o=>{if(["Home","End",...O5].includes(o.key)){let c=s().map(l=>l.ref.current);if([i.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(o.key)&&c.reverse(),O5.includes(o.key)){const l=c.indexOf(o.currentTarget);c=c.slice(l+1)}setTimeout(()=>$2(c)),o.preventDefault()}})})})});function tO(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function $2(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}function FNe(t){return t.forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}),()=>{t.forEach(e=>{const n=e.dataset.tabindex;e.setAttribute("tabindex",n)})}}function nO(t,e){const n=on(e);ir(()=>{let r=0;if(t){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(t),()=>{window.cancelAnimationFrame(r),s.unobserve(t)}}},[t,n])}function F2(t){return t?"open":"closed"}function hY(t,e){return`${t}-trigger-${e}`}function pY(t,e){return`${t}-content-${e}`}function DE(t){return e=>e.pointerType==="mouse"?t(e):void 0}var mY=J9,gY=rY,vY=oY,yY=aY,bY=lY,xY=uY;const zNe=S.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(mY,{ref:r,className:ie("relative z-10 flex max-w-max flex-1 items-center justify-center",t),...n,children:[e,w.jsx(wY,{})]}));zNe.displayName=mY.displayName;const BNe=S.forwardRef(({className:t,...e},n)=>w.jsx(gY,{ref:n,className:ie("group flex flex-1 list-none items-center justify-center space-x-1",t),...e}));BNe.displayName=gY.displayName;const UNe=li("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),HNe=S.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(vY,{ref:r,className:ie(UNe(),"group",t),...n,children:[e," ",w.jsx(d_,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));HNe.displayName=vY.displayName;const VNe=S.forwardRef(({className:t,...e},n)=>w.jsx(bY,{ref:n,className:ie("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",t),...e}));VNe.displayName=bY.displayName;const wY=S.forwardRef(({className:t,...e},n)=>w.jsx("div",{className:ie("absolute left-0 top-full flex justify-center"),children:w.jsx(xY,{className:ie("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",t),ref:n,...e})}));wY.displayName=xY.displayName;const qNe=S.forwardRef(({className:t,...e},n)=>w.jsx(yY,{ref:n,className:ie("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",t),...e,children:w.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));qNe.displayName=yY.displayName;var WNe=typeof window>"u",rO=WNe?oe.useEffect:oe.useLayoutEffect,GNe=0,I5=()=>++GNe,j5=!1;function KNe(){let[t,e]=oe.useState(j5?I5:void 0);return rO(()=>{t===void 0&&e(I5()),j5=!0},[]),t===void 0?t:`rwb-${t.toString(32)}`}function YNe(){return oe.useMemo(()=>"useId"in oe?oe.useId:KNe,[])()}var sO="__wrap_b",_0="__wrap_n",L5="__wrap_o",_Y=(t,e,n)=>{n=n||document.querySelector(`[data-br="${t}"]`);let r=n==null?void 0:n.parentElement;if(!r)return;let s=f=>n.style.maxWidth=f+"px";n.style.maxWidth="";let i=r.clientWidth,o=r.clientHeight,a=i/2-.25,c=i+.5,u;if(i){for(s(a),a=Math.max(n.scrollWidth,a);a+1 {self.__wrap_b(0,+n.dataset.brr,n)})).observe(r)},XNe=_Y.toString(),QNe='(self.CSS&&CSS.supports("text-wrap","balance")?1:2)',ZNe=(t,e,n="")=>(n&&(n=`self.${_0}!=1&&${n}`),oe.createElement("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:(t?"":`self.${_0}=self.${_0}||${QNe};self.${sO}=${XNe};`)+n},nonce:e})),JNe=oe.createContext({preferNative:!0,hasProvider:!1});oe.forwardRef(({ratio:t=1,preferNative:e,nonce:n,children:r,as:s,...i},o)=>{let a=YNe(),c=oe.useRef(),u=oe.useContext(JNe),f=e??u.preferNative,l=s||"span";return oe.useImperativeHandle(o,()=>c.current,[]),rO(()=>{f&&self[_0]===1||c.current&&(self[sO]=_Y)(0,t,c.current)},[r,f,t]),rO(()=>{if(!(f&&self[_0]===1))return()=>{if(!c.current)return;let d=c.current[L5];d&&(d.disconnect(),delete c.current[L5])}},[f]),oe.createElement(oe.Fragment,null,oe.createElement(l,{...i,"data-br":a,"data-brr":t,ref:c,style:{display:"inline-block",verticalAlign:"top",textDecoration:"inherit",textWrap:f?"balance":"initial"},suppressHydrationWarning:!0},r),ZNe(u.hasProvider,n,`self.${sO}("${a}",${t})`))});var eTe="Separator",$5="horizontal",tTe=["horizontal","vertical"],SY=S.forwardRef((t,e)=>{const{decorative:n,orientation:r=$5,...s}=t,i=nTe(r)?r:$5,a=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return w.jsx(De.div,{"data-orientation":i,...a,...s,ref:e})});SY.displayName=eTe;function nTe(t){return tTe.includes(t)}var CY=SY;const ou=S.forwardRef(({className:t,orientation:e="horizontal",decorative:n=!0,...r},s)=>w.jsx(CY,{ref:s,decorative:n,orientation:e,className:ie("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...r}));ou.displayName=CY.displayName;const rTe=S.forwardRef(({className:t,...e},n)=>w.jsx("ul",{ref:n,className:ie("flex flex-row items-center gap-1",t),...e}));rTe.displayName="PaginationContent";const sTe=S.forwardRef(({className:t,...e},n)=>w.jsx("li",{ref:n,className:ie("",t),...e}));sTe.displayName="PaginationItem";var z2="Popover",[EY,VUe]=In(z2,[Yl]),F_=Yl(),[iTe,bf]=EY(z2),RY=t=>{const{__scopePopover:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!1}=t,a=F_(e),c=S.useRef(null),[u,f]=S.useState(!1),[l=!1,d]=mr({prop:r,defaultProp:s,onChange:i});return w.jsx(FA,{...a,children:w.jsx(iTe,{scope:e,contentId:js(),triggerRef:c,open:l,onOpenChange:d,onOpenToggle:S.useCallback(()=>d(p=>!p),[d]),hasCustomAnchor:u,onCustomAnchorAdd:S.useCallback(()=>f(!0),[]),onCustomAnchorRemove:S.useCallback(()=>f(!1),[]),modal:o,children:n})})};RY.displayName=z2;var AY="PopoverAnchor",oTe=S.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=bf(AY,n),i=F_(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:a}=s;return S.useEffect(()=>(o(),()=>a()),[o,a]),w.jsx(Ay,{...i,...r,ref:e})});oTe.displayName=AY;var PY="PopoverTrigger",NY=S.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=bf(PY,n),i=F_(n),o=Je(e,s.triggerRef),a=w.jsx(De.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":OY(s.open),...r,ref:o,onClick:ye(t.onClick,s.onOpenToggle)});return s.hasCustomAnchor?a:w.jsx(Ay,{asChild:!0,...i,children:a})});NY.displayName=PY;var B2="PopoverPortal",[aTe,lTe]=EY(B2,{forceMount:void 0}),TY=t=>{const{__scopePopover:e,forceMount:n,children:r,container:s}=t,i=bf(B2,e);return w.jsx(aTe,{scope:e,forceMount:n,children:w.jsx(Kn,{present:n||i.open,children:w.jsx(dy,{asChild:!0,container:s,children:r})})})};TY.displayName=B2;var Gv="PopoverContent",kY=S.forwardRef((t,e)=>{const n=lTe(Gv,t.__scopePopover),{forceMount:r=n.forceMount,...s}=t,i=bf(Gv,t.__scopePopover);return w.jsx(Kn,{present:r||i.open,children:i.modal?w.jsx(cTe,{...s,ref:e}):w.jsx(uTe,{...s,ref:e})})});kY.displayName=Gv;var cTe=S.forwardRef((t,e)=>{const n=bf(Gv,t.__scopePopover),r=S.useRef(null),s=Je(e,r),i=S.useRef(!1);return S.useEffect(()=>{const o=r.current;if(o)return p_(o)},[]),w.jsx(h_,{as:qa,allowPinchZoom:!0,children:w.jsx(DY,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ye(t.onCloseAutoFocus,o=>{var a;o.preventDefault(),i.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:ye(t.onPointerDownOutside,o=>{const a=o.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,u=a.button===2||c;i.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:ye(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),uTe=S.forwardRef((t,e)=>{const n=bf(Gv,t.__scopePopover),r=S.useRef(!1),s=S.useRef(!1);return w.jsx(DY,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=t.onInteractOutside)==null||c.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),DY=S.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...l}=t,d=bf(Gv,n),p=F_(n);return oA(),w.jsx(f_,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:w.jsx(Ru,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:f,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>d.onOpenChange(!1),children:w.jsx(E_,{"data-state":OY(d.open),role:"dialog",id:d.contentId,...p,...l,ref:e,style:{...l.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),MY="PopoverClose",dTe=S.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=bf(MY,n);return w.jsx(De.button,{type:"button",...r,ref:e,onClick:ye(t.onClick,()=>s.onOpenChange(!1))})});dTe.displayName=MY;var fTe="PopoverArrow",hTe=S.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=F_(n);return w.jsx(R_,{...s,...r,ref:e})});hTe.displayName=fTe;function OY(t){return t?"open":"closed"}var pTe=RY,mTe=NY,gTe=TY,IY=kY;const vTe=pTe,yTe=mTe,jY=S.forwardRef(({className:t,align:e="center",sideOffset:n=4,...r},s)=>w.jsx(gTe,{children:w.jsx(IY,{ref:s,align:e,sideOffset:n,className:ie("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r})}));jY.displayName=IY.displayName;var U2="Progress",H2=100,[bTe,qUe]=In(U2),[xTe,wTe]=bTe(U2),LY=S.forwardRef((t,e)=>{const{__scopeProgress:n,value:r=null,max:s,getValueLabel:i=_Te,...o}=t;(s||s===0)&&!F5(s)&&console.error(STe(`${s}`,"Progress"));const a=F5(s)?s:H2;r!==null&&!z5(r,a)&&console.error(CTe(`${r}`,"Progress"));const c=z5(r,a)?r:null,u=ME(c)?i(c,a):void 0;return w.jsx(xTe,{scope:n,value:c,max:a,children:w.jsx(De.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":ME(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":zY(c,a),"data-value":c??void 0,"data-max":a,...o,ref:e})})});LY.displayName=U2;var $Y="ProgressIndicator",FY=S.forwardRef((t,e)=>{const{__scopeProgress:n,...r}=t,s=wTe($Y,n);return w.jsx(De.div,{"data-state":zY(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...r,ref:e})});FY.displayName=$Y;function _Te(t,e){return`${Math.round(t/e*100)}%`}function zY(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function ME(t){return typeof t=="number"}function F5(t){return ME(t)&&!isNaN(t)&&t>0}function z5(t,e){return ME(t)&&!isNaN(t)&&t<=e&&t>=0}function STe(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${H2}\`.`}function CTe(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: - a positive number - less than the value passed to \`max\` (or ${H2} if no \`max\` prop is set) - \`null\` or \`undefined\` if the progress is indeterminate. -Defaulting to \`null\`.`}var zY=jY,CTe=$Y;const V2=S.forwardRef(({className:t,value:e,...n},r)=>w.jsx(zY,{ref:r,className:ie("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...n,children:w.jsx(CTe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(e||0)}%)`}})}));V2.displayName=zY.displayName;var q2="Radio",[ETe,BY]=In(q2),[RTe,ATe]=ETe(q2),UY=S.forwardRef((t,e)=>{const{__scopeRadio:n,name:r,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:c,...u}=t,[f,l]=S.useState(null),d=Je(e,m=>l(m)),p=S.useRef(!1),h=f?!!f.closest("form"):!0;return w.jsxs(RTe,{scope:n,checked:s,disabled:o,children:[w.jsx(De.button,{type:"button",role:"radio","aria-checked":s,"data-state":qY(s),"data-disabled":o?"":void 0,disabled:o,value:a,...u,ref:d,onClick:ye(t.onClick,m=>{s||c==null||c(),h&&(p.current=m.isPropagationStopped(),p.current||m.stopPropagation())})}),h&&w.jsx(PTe,{control:f,bubbles:!p.current,name:r,value:a,checked:s,required:i,disabled:o,style:{transform:"translateX(-100%)"}})]})});UY.displayName=q2;var HY="RadioIndicator",VY=S.forwardRef((t,e)=>{const{__scopeRadio:n,forceMount:r,...s}=t,i=ATe(HY,n);return w.jsx(Kn,{present:r||i.checked,children:w.jsx(De.span,{"data-state":qY(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:e})})});VY.displayName=HY;var PTe=t=>{const{control:e,checked:n,bubbles:r=!0,...s}=t,i=S.useRef(null),o=xy(n),a=x_(e);return S.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==n&&l){const d=new Event("click",{bubbles:r});l.call(c,n),c.dispatchEvent(d)}},[o,n,r]),w.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function qY(t){return t?"checked":"unchecked"}var NTe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],W2="RadioGroup",[TTe,qUe]=In(W2,[Xl,BY]),WY=Xl(),GY=BY(),[kTe,DTe]=TTe(W2),KY=S.forwardRef((t,e)=>{const{__scopeRadioGroup:n,name:r,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:c,dir:u,loop:f=!0,onValueChange:l,...d}=t,p=WY(n),h=Qa(u),[m,y]=mr({prop:i,defaultProp:s,onChange:l});return w.jsx(kTe,{scope:n,name:r,required:o,disabled:a,value:m,onValueChange:y,children:w.jsx(A_,{asChild:!0,...p,orientation:c,dir:h,loop:f,children:w.jsx(De.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":a?"":void 0,dir:h,...d,ref:e})})})});KY.displayName=W2;var YY="RadioGroupItem",XY=S.forwardRef((t,e)=>{const{__scopeRadioGroup:n,disabled:r,...s}=t,i=DTe(YY,n),o=i.disabled||r,a=WY(n),c=GY(n),u=S.useRef(null),f=Je(e,u),l=i.value===s.value,d=S.useRef(!1);return S.useEffect(()=>{const p=m=>{NTe.includes(m.key)&&(d.current=!0)},h=()=>d.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",h),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",h)}},[]),w.jsx(P_,{asChild:!0,...a,focusable:!o,active:l,children:w.jsx(UY,{disabled:o,required:i.required,checked:l,...c,...s,name:i.name,ref:f,onCheck:()=>i.onValueChange(s.value),onKeyDown:ye(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:ye(s.onFocus,()=>{var p;d.current&&((p=u.current)==null||p.click())})})})});XY.displayName=YY;var MTe="RadioGroupIndicator",QY=S.forwardRef((t,e)=>{const{__scopeRadioGroup:n,...r}=t,s=GY(n);return w.jsx(VY,{...s,...r,ref:e})});QY.displayName=MTe;var ZY=KY,JY=XY,OTe=QY;const ITe=S.forwardRef(({className:t,...e},n)=>w.jsx(ZY,{className:ie("grid gap-2",t),...e,ref:n}));ITe.displayName=ZY.displayName;const jTe=S.forwardRef(({className:t,...e},n)=>w.jsx(JY,{ref:n,className:ie("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:w.jsx(OTe,{className:"flex items-center justify-center",children:w.jsx(rA,{className:"h-2.5 w-2.5 fill-current text-current"})})}));jTe.displayName=JY.displayName;const{createElement:Kv,createContext:LTe,createRef:WUe,forwardRef:eX,useCallback:yi,useContext:tX,useEffect:fp,useImperativeHandle:nX,useLayoutEffect:$Te,useMemo:FTe,useRef:Ri,useState:vg}=s_,U5=s_[`useId${Math.random()}`.slice(0,5)],zTe=$Te,GA=LTe(null);GA.displayName="PanelGroupContext";const hp=zTe,BTe=typeof U5=="function"?U5:()=>null;let UTe=0;function G2(t=null){const e=BTe(),n=Ri(t||e||null);return n.current===null&&(n.current=""+UTe++),t??n.current}function rX({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:s,forwardedRef:i,id:o,maxSize:a,minSize:c,onCollapse:u,onExpand:f,onResize:l,order:d,style:p,tagName:h="div",...m}){const y=tX(GA);if(y===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:g,expandPanel:v,getPanelSize:b,getPanelStyle:_,groupId:R,isPanelCollapsed:P,reevaluatePanelConstraints:T,registerPanel:E,resizePanel:N,unregisterPanel:k}=y,M=G2(o),I=Ri({callbacks:{onCollapse:u,onExpand:f,onResize:l},constraints:{collapsedSize:n,collapsible:r,defaultSize:s,maxSize:a,minSize:c},id:M,idIsFromProps:o!==void 0,order:d});Ri({didLogMissingDefaultSizeWarning:!1}),hp(()=>{const{callbacks:L,constraints:U}=I.current,K={...U};I.current.id=M,I.current.idIsFromProps=o!==void 0,I.current.order=d,L.onCollapse=u,L.onExpand=f,L.onResize=l,U.collapsedSize=n,U.collapsible=r,U.defaultSize=s,U.maxSize=a,U.minSize=c,(K.collapsedSize!==U.collapsedSize||K.collapsible!==U.collapsible||K.maxSize!==U.maxSize||K.minSize!==U.minSize)&&T(I.current,K)}),hp(()=>{const L=I.current;return E(L),()=>{k(L)}},[d,M,E,k]),nX(i,()=>({collapse:()=>{g(I.current)},expand:L=>{v(I.current,L)},getId(){return M},getSize(){return b(I.current)},isCollapsed(){return P(I.current)},isExpanded(){return!P(I.current)},resize:L=>{N(I.current,L)}}),[g,v,b,P,M,N]);const j=_(I.current,s);return Kv(h,{...m,children:t,className:e,id:o,style:{...j,...p},"data-panel":"","data-panel-collapsible":r||void 0,"data-panel-group-id":R,"data-panel-id":M,"data-panel-size":parseFloat(""+j.flexGrow).toFixed(1)})}const sX=eX((t,e)=>Kv(rX,{...t,forwardedRef:e}));rX.displayName="Panel";sX.displayName="forwardRef(Panel)";let iO=null,sh=null;function HTe(t,e){if(e){const n=(e&cX)!==0,r=(e&uX)!==0,s=(e&dX)!==0,i=(e&fX)!==0;if(n)return s?"se-resize":i?"ne-resize":"e-resize";if(r)return s?"sw-resize":i?"nw-resize":"w-resize";if(s)return"s-resize";if(i)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function VTe(){sh!==null&&(document.head.removeChild(sh),iO=null,sh=null)}function Pk(t,e){const n=HTe(t,e);iO!==n&&(iO=n,sh===null&&(sh=document.createElement("style"),document.head.appendChild(sh)),sh.innerHTML=`*{cursor: ${n}!important;}`)}function iX(t){return t.type==="keydown"}function oX(t){return t.type.startsWith("pointer")}function aX(t){return t.type.startsWith("mouse")}function KA(t){if(oX(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(aX(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function qTe(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function WTe(t,e,n){return t.x e.x&&t.y e.y}function GTe(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:q5(t),b:q5(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;It(r,"Stacking order can only be calculated for elements with a common ancestor");const s={a:V5(H5(n.a)),b:V5(H5(n.b))};if(s.a===s.b){const i=r.childNodes,o={a:n.a.at(-1),b:n.b.at(-1)};let a=i.length;for(;a--;){const c=i[a];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(s.a-s.b)}const KTe=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function YTe(t){var e;const n=getComputedStyle((e=lX(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function XTe(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||YTe(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||KTe.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function H5(t){let e=t.length;for(;e--;){const n=t[e];if(It(n,"Missing node"),XTe(n))return n}return null}function V5(t){return t&&Number(getComputedStyle(t).zIndex)||0}function q5(t){const e=[];for(;t;)e.push(t),t=lX(t);return e}function lX(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const cX=1,uX=2,dX=4,fX=8,QTe=qTe()==="coarse";let Ba=[],fx=!1,ad=new Map,YA=new Map;const hx=new Set;function ZTe(t,e,n,r,s){var i;const{ownerDocument:o}=e,a={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:s},c=(i=ad.get(o))!==null&&i!==void 0?i:0;return ad.set(o,c+1),hx.add(a),OE(),function(){var f;YA.delete(t),hx.delete(a);const l=(f=ad.get(o))!==null&&f!==void 0?f:1;if(ad.set(o,l-1),OE(),l===1&&ad.delete(o),Ba.includes(a)){const d=Ba.indexOf(a);d>=0&&Ba.splice(d,1),Y2()}}}function W5(t){const{target:e}=t,{x:n,y:r}=KA(t);fx=!0,K2({target:e,x:n,y:r}),OE(),Ba.length>0&&(IE("down",t),t.preventDefault(),t.stopPropagation())}function Eb(t){const{x:e,y:n}=KA(t);if(t.buttons===0&&(fx=!1,IE("up",t)),!fx){const{target:r}=t;K2({target:r,x:e,y:n})}IE("move",t),Y2(),Ba.length>0&&t.preventDefault()}function Em(t){const{target:e}=t,{x:n,y:r}=KA(t);YA.clear(),fx=!1,Ba.length>0&&t.preventDefault(),IE("up",t),K2({target:e,x:n,y:r}),Y2(),OE()}function K2({target:t,x:e,y:n}){Ba.splice(0);let r=null;t instanceof HTMLElement&&(r=t),hx.forEach(s=>{const{element:i,hitAreaMargins:o}=s,a=i.getBoundingClientRect(),{bottom:c,left:u,right:f,top:l}=a,d=QTe?o.coarse:o.fine;if(e>=u-d&&e<=f+d&&n>=l-d&&n<=c+d){if(r!==null&&i!==r&&!i.contains(r)&&!r.contains(i)&>e(r,i)>0){let h=r,m=!1;for(;h&&!h.contains(i);){if(WTe(h.getBoundingClientRect(),a)){m=!0;break}h=h.parentElement}if(m)return}Ba.push(s)}})}function Nk(t,e){YA.set(t,e)}function Y2(){let t=!1,e=!1;Ba.forEach(r=>{const{direction:s}=r;s==="horizontal"?t=!0:e=!0});let n=0;YA.forEach(r=>{n|=r}),t&&e?Pk("intersection",n):t?Pk("horizontal",n):e?Pk("vertical",n):VTe()}function OE(){ad.forEach((t,e)=>{const{body:n}=e;n.removeEventListener("contextmenu",Em),n.removeEventListener("pointerdown",W5),n.removeEventListener("pointerleave",Eb),n.removeEventListener("pointermove",Eb)}),window.removeEventListener("pointerup",Em),window.removeEventListener("pointercancel",Em),hx.size>0&&(fx?(Ba.length>0&&ad.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("contextmenu",Em),n.addEventListener("pointerleave",Eb),n.addEventListener("pointermove",Eb))}),window.addEventListener("pointerup",Em),window.addEventListener("pointercancel",Em)):ad.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("pointerdown",W5,{capture:!0}),n.addEventListener("pointermove",Eb))}))}function IE(t,e){hx.forEach(n=>{const{setResizeHandlerState:r}=n,s=Ba.includes(n);r(t,s,e)})}function JTe(){const[t,e]=vg(0);return yi(()=>e(n=>n+1),[])}function It(t,e){if(!t)throw console.error(e),Error(e)}const X2=10;function Np(t,e,n=X2){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function Xc(t,e,n=X2){return Np(t,e,n)===0}function fo(t,e,n){return Np(t,e,n)===0}function eke(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r 0&&(t=t<0?0-g:g)}}}{const l=t<0?a:c,d=n[l];It(d,`No panel constraints found for index ${l}`);const{collapsedSize:p=0,collapsible:h,minSize:m=0}=d;if(h){const y=e[l];if(It(y!=null,`Previous layout not found for panel index ${l}`),fo(y,m)){const g=y-p;Np(g,Math.abs(t))>0&&(t=t<0?0-g:g)}}}}{const l=t<0?1:-1;let d=t<0?c:a,p=0;for(;;){const m=e[d];It(m!=null,`Previous layout not found for panel index ${d}`);const g=eg({panelConstraints:n,panelIndex:d,size:100})-m;if(p+=g,d+=l,d<0||d>=n.length)break}const h=Math.min(Math.abs(t),Math.abs(p));t=t<0?0-h:h}{let d=t<0?a:c;for(;d>=0&&d =0))break;t<0?d--:d++}}if(eke(s,o))return s;{const l=t<0?c:a,d=e[l];It(d!=null,`Previous layout not found for panel index ${l}`);const p=d+u,h=eg({panelConstraints:n,panelIndex:l,size:p});if(o[l]=h,!fo(h,p)){let m=p-h,g=t<0?c:a;for(;g>=0&&g 0?g--:g++}}}const f=o.reduce((l,d)=>d+l,0);return fo(f,100)?o:s}function tke({layout:t,panelsArray:e,pivotIndices:n}){let r=0,s=100,i=0,o=0;const a=n[0];It(a!=null,"No pivot index found"),e.forEach((l,d)=>{const{constraints:p}=l,{maxSize:h=100,minSize:m=0}=p;d===a?(r=m,s=h):(i+=m,o+=h)});const c=Math.min(s,100-i),u=Math.max(r,100-o),f=t[a];return{valueMax:c,valueMin:u,valueNow:f}}function px(t,e=document){return Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`))}function hX(t,e,n=document){const s=px(t,n).findIndex(i=>i.getAttribute("data-panel-resize-handle-id")===e);return s??null}function pX(t,e,n){const r=hX(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function mX(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function XA(t,e=document){const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function nke(t,e,n,r=document){var s,i,o,a;const c=XA(e,r),u=px(t,r),f=c?u.indexOf(c):-1,l=(s=(i=n[f])===null||i===void 0?void 0:i.id)!==null&&s!==void 0?s:null,d=(o=(a=n[f+1])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null;return[l,d]}function rke({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:s,panelGroupElement:i,setLayout:o}){Ri({didWarnAboutMissingResizeHandle:!1}),hp(()=>{if(!i)return;const a=px(n,i);for(let c=0;c {a.forEach((c,u)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[n,r,s,i]),fp(()=>{if(!i)return;const a=e.current;It(a,"Eager values not found");const{panelDataArray:c}=a,u=mX(n,i);It(u!=null,`No group found for id "${n}"`);const f=px(n,i);It(f,`No resize handles found for group id "${n}"`);const l=f.map(d=>{const p=d.getAttribute("data-panel-resize-handle-id");It(p,"Resize handle element has no handle id attribute");const[h,m]=nke(n,p,c,i);if(h==null||m==null)return()=>{};const y=g=>{if(!g.defaultPrevented)switch(g.key){case"Enter":{g.preventDefault();const v=c.findIndex(b=>b.id===h);if(v>=0){const b=c[v];It(b,`No panel data found for index ${v}`);const _=r[v],{collapsedSize:R=0,collapsible:P,minSize:T=0}=b.constraints;if(_!=null&&P){const E=Hb({delta:fo(_,R)?T-R:R-_,initialLayout:r,panelConstraints:c.map(N=>N.constraints),pivotIndices:pX(n,p,i),prevLayout:r,trigger:"keyboard"});r!==E&&o(E)}}break}}};return d.addEventListener("keydown",y),()=>{d.removeEventListener("keydown",y)}});return()=>{l.forEach(d=>d())}},[i,t,e,n,r,s,o])}function G5(t,e){if(t.length!==e.length)return!1;for(let n=0;n i.constraints);let r=0,s=100;for(let i=0;i {const i=t[s];It(i,`Panel data not found for index ${s}`);const{callbacks:o,constraints:a,id:c}=i,{collapsedSize:u=0,collapsible:f}=a,l=n[c];if(l==null||r!==l){n[c]=r;const{onCollapse:d,onExpand:p,onResize:h}=o;h&&h(r,l),f&&(d||p)&&(p&&(l==null||Xc(l,u))&&!Xc(r,u)&&p(),d&&(l==null||!Xc(l,u))&&Xc(r,u)&&d())}})}function E1(t,e){if(t.length!==e.length)return!1;for(let n=0;n {n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...s)},e)}}function K5(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function vX(t){return`react-resizable-panels:${t}`}function yX(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:s,order:i}=e;return s?r:i?`${i}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function bX(t,e){try{const n=vX(t),r=e.getItem(n);if(r){const s=JSON.parse(r);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function cke(t,e,n){var r,s;const i=(r=bX(t,n))!==null&&r!==void 0?r:{},o=yX(e);return(s=i[o])!==null&&s!==void 0?s:null}function uke(t,e,n,r,s){var i;const o=vX(t),a=yX(e),c=(i=bX(t,s))!==null&&i!==void 0?i:{};c[a]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{s.setItem(o,JSON.stringify(c))}catch(u){console.error(u)}}function Y5({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((i,o)=>i+o,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(i=>`${i}%`).join(", ")}`);if(!fo(r,100))for(let i=0;i (K5(Vb),Vb.getItem(t)),setItem:(t,e)=>{K5(Vb),Vb.setItem(t,e)}},X5={};function xX({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:s,id:i=null,onLayout:o=null,keyboardResizeBy:a=null,storage:c=Vb,style:u,tagName:f="div",...l}){const d=G2(i),p=Ri(null),[h,m]=vg(null),[y,g]=vg([]),v=JTe(),b=Ri({}),_=Ri(new Map),R=Ri(0),P=Ri({autoSaveId:t,direction:r,dragState:h,id:d,keyboardResizeBy:a,onLayout:o,storage:c}),T=Ri({layout:y,panelDataArray:[],panelDataArrayChanged:!1});Ri({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),nX(s,()=>({getId:()=>P.current.id,getLayout:()=>{const{layout:Y}=T.current;return Y},setLayout:Y=>{const{onLayout:Q}=P.current,{layout:he,panelDataArray:fe}=T.current,ce=Y5({layout:Y,panelConstraints:fe.map(xe=>xe.constraints)});G5(he,ce)||(g(ce),T.current.layout=ce,Q&&Q(ce),Rm(fe,ce,b.current))}}),[]),hp(()=>{P.current.autoSaveId=t,P.current.direction=r,P.current.dragState=h,P.current.id=d,P.current.onLayout=o,P.current.storage=c}),rke({committedValuesRef:P,eagerValuesRef:T,groupId:d,layout:y,panelDataArray:T.current.panelDataArray,setLayout:g,panelGroupElement:p.current}),fp(()=>{const{panelDataArray:Y}=T.current;if(t){if(y.length===0||y.length!==Y.length)return;let Q=X5[t];Q==null&&(Q=lke(uke,dke),X5[t]=Q);const he=[...Y],fe=new Map(_.current);Q(t,he,fe,y,c)}},[t,y,c]),fp(()=>{});const E=yi(Y=>{const{onLayout:Q}=P.current,{layout:he,panelDataArray:fe}=T.current;if(Y.constraints.collapsible){const ce=fe.map(Le=>Le.constraints),{collapsedSize:xe=0,panelSize:Pe,pivotIndices:pe}=Lf(fe,Y,he);if(It(Pe!=null,`Panel size not found for panel "${Y.id}"`),!Xc(Pe,xe)){_.current.set(Y.id,Pe);const Me=Mm(fe,Y)===fe.length-1?Pe-xe:xe-Pe,Oe=Hb({delta:Me,initialLayout:he,panelConstraints:ce,pivotIndices:pe,prevLayout:he,trigger:"imperative-api"});E1(he,Oe)||(g(Oe),T.current.layout=Oe,Q&&Q(Oe),Rm(fe,Oe,b.current))}}},[]),N=yi((Y,Q)=>{const{onLayout:he}=P.current,{layout:fe,panelDataArray:ce}=T.current;if(Y.constraints.collapsible){const xe=ce.map(Fe=>Fe.constraints),{collapsedSize:Pe=0,panelSize:pe=0,minSize:Le=0,pivotIndices:Me}=Lf(ce,Y,fe),Oe=Q??Le;if(Xc(pe,Pe)){const Fe=_.current.get(Y.id),ot=Fe!=null&&Fe>=Oe?Fe:Oe,Et=Mm(ce,Y)===ce.length-1?pe-ot:ot-pe,J=Hb({delta:Et,initialLayout:fe,panelConstraints:xe,pivotIndices:Me,prevLayout:fe,trigger:"imperative-api"});E1(fe,J)||(g(J),T.current.layout=J,he&&he(J),Rm(ce,J,b.current))}}},[]),k=yi(Y=>{const{layout:Q,panelDataArray:he}=T.current,{panelSize:fe}=Lf(he,Y,Q);return It(fe!=null,`Panel size not found for panel "${Y.id}"`),fe},[]),M=yi((Y,Q)=>{const{panelDataArray:he}=T.current,fe=Mm(he,Y);return ake({defaultSize:Q,dragState:h,layout:y,panelData:he,panelIndex:fe})},[h,y]),I=yi(Y=>{const{layout:Q,panelDataArray:he}=T.current,{collapsedSize:fe=0,collapsible:ce,panelSize:xe}=Lf(he,Y,Q);return It(xe!=null,`Panel size not found for panel "${Y.id}"`),ce===!0&&Xc(xe,fe)},[]),j=yi(Y=>{const{layout:Q,panelDataArray:he}=T.current,{collapsedSize:fe=0,collapsible:ce,panelSize:xe}=Lf(he,Y,Q);return It(xe!=null,`Panel size not found for panel "${Y.id}"`),!ce||Np(xe,fe)>0},[]),L=yi(Y=>{const{panelDataArray:Q}=T.current;Q.push(Y),Q.sort((he,fe)=>{const ce=he.order,xe=fe.order;return ce==null&&xe==null?0:ce==null?-1:xe==null?1:ce-xe}),T.current.panelDataArrayChanged=!0,v()},[v]);hp(()=>{if(T.current.panelDataArrayChanged){T.current.panelDataArrayChanged=!1;const{autoSaveId:Y,onLayout:Q,storage:he}=P.current,{layout:fe,panelDataArray:ce}=T.current;let xe=null;if(Y){const pe=cke(Y,ce,he);pe&&(_.current=new Map(Object.entries(pe.expandToSizes)),xe=pe.layout)}xe==null&&(xe=oke({panelDataArray:ce}));const Pe=Y5({layout:xe,panelConstraints:ce.map(pe=>pe.constraints)});G5(fe,Pe)||(g(Pe),T.current.layout=Pe,Q&&Q(Pe),Rm(ce,Pe,b.current))}}),hp(()=>{const Y=T.current;return()=>{Y.layout=[]}},[]);const U=yi(Y=>function(he){he.preventDefault();const fe=p.current;if(!fe)return()=>null;const{direction:ce,dragState:xe,id:Pe,keyboardResizeBy:pe,onLayout:Le}=P.current,{layout:Me,panelDataArray:Oe}=T.current,{initialLayout:Fe}=xe??{},ot=pX(Pe,Y,fe);let nt=ike(he,Y,ce,xe,pe,fe);const Et=ce==="horizontal";document.dir==="rtl"&&Et&&(nt=-nt);const J=Oe.map(Ae=>Ae.constraints),de=Hb({delta:nt,initialLayout:Fe??Me,panelConstraints:J,pivotIndices:ot,prevLayout:Me,trigger:iX(he)?"keyboard":"mouse-or-touch"}),me=!E1(Me,de);(oX(he)||aX(he))&&R.current!=nt&&(R.current=nt,me?Nk(Y,0):Et?Nk(Y,nt<0?cX:uX):Nk(Y,nt<0?dX:fX)),me&&(g(de),T.current.layout=de,Le&&Le(de),Rm(Oe,de,b.current))},[]),K=yi((Y,Q)=>{const{onLayout:he}=P.current,{layout:fe,panelDataArray:ce}=T.current,xe=ce.map(Fe=>Fe.constraints),{panelSize:Pe,pivotIndices:pe}=Lf(ce,Y,fe);It(Pe!=null,`Panel size not found for panel "${Y.id}"`);const Me=Mm(ce,Y)===ce.length-1?Pe-Q:Q-Pe,Oe=Hb({delta:Me,initialLayout:fe,panelConstraints:xe,pivotIndices:pe,prevLayout:fe,trigger:"imperative-api"});E1(fe,Oe)||(g(Oe),T.current.layout=Oe,he&&he(Oe),Rm(ce,Oe,b.current))},[]),H=yi((Y,Q)=>{const{layout:he,panelDataArray:fe}=T.current,{collapsedSize:ce=0,collapsible:xe}=Q,{collapsedSize:Pe=0,collapsible:pe,maxSize:Le=100,minSize:Me=0}=Y.constraints,{panelSize:Oe}=Lf(fe,Y,he);Oe!=null&&(xe&&pe&&Xc(Oe,ce)?Xc(ce,Pe)||K(Y,Pe):Oe Le&&K(Y,Le))},[K]),q=yi((Y,Q)=>{const{direction:he}=P.current,{layout:fe}=T.current;if(!p.current)return;const ce=XA(Y,p.current);It(ce,`Drag handle element not found for id "${Y}"`);const xe=gX(he,Q);m({dragHandleId:Y,dragHandleRect:ce.getBoundingClientRect(),initialCursorPosition:xe,initialLayout:fe})},[]),ee=yi(()=>{m(null)},[]),se=yi(Y=>{const{panelDataArray:Q}=T.current,he=Mm(Q,Y);he>=0&&(Q.splice(he,1),delete b.current[Y.id],T.current.panelDataArrayChanged=!0,v())},[v]),X=FTe(()=>({collapsePanel:E,direction:r,dragState:h,expandPanel:N,getPanelSize:k,getPanelStyle:M,groupId:d,isPanelCollapsed:I,isPanelExpanded:j,reevaluatePanelConstraints:H,registerPanel:L,registerResizeHandle:U,resizePanel:K,startDragging:q,stopDragging:ee,unregisterPanel:se,panelGroupElement:p.current}),[E,h,r,N,k,M,d,I,j,H,L,U,K,q,ee,se]),G={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return Kv(GA.Provider,{value:X},Kv(f,{...l,children:e,className:n,id:i,ref:p,style:{...G,...u},"data-panel-group":"","data-panel-group-direction":r,"data-panel-group-id":d}))}const wX=eX((t,e)=>Kv(xX,{...t,forwardedRef:e}));xX.displayName="PanelGroup";wX.displayName="forwardRef(PanelGroup)";function Mm(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function Lf(t,e,n){const r=Mm(t,e),i=r===t.length-1?[r-1,r]:[r,r+1],o=n[r];return{...e.constraints,panelSize:o,pivotIndices:i}}function fke({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){fp(()=>{if(t||n==null||r==null)return;const s=XA(e,r);if(s==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),n(o);break}case"F6":{o.preventDefault();const a=s.getAttribute("data-panel-group-id");It(a,`No group element found for id "${a}"`);const c=px(a,r),u=hX(a,e,r);It(u!==null,`No resize element found for id "${e}"`);const f=o.shiftKey?u>0?u-1:c.length-1:u+1 {s.removeEventListener("keydown",i)}},[r,t,e,n])}function _X({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:s,onBlur:i,onDragging:o,onFocus:a,style:c={},tabIndex:u=0,tagName:f="div",...l}){var d,p;const h=Ri(null),m=Ri({onDragging:o});fp(()=>{m.current.onDragging=o});const y=tX(GA);if(y===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:g,groupId:v,registerResizeHandle:b,startDragging:_,stopDragging:R,panelGroupElement:P}=y,T=G2(s),[E,N]=vg("inactive"),[k,M]=vg(!1),[I,j]=vg(null),L=Ri({state:E});hp(()=>{L.current.state=E}),fp(()=>{if(n)j(null);else{const q=b(T);j(()=>q)}},[n,T,b]);const U=(d=r==null?void 0:r.coarse)!==null&&d!==void 0?d:15,K=(p=r==null?void 0:r.fine)!==null&&p!==void 0?p:5;return fp(()=>{if(n||I==null)return;const q=h.current;return It(q,"Element ref not attached"),ZTe(T,q,g,{coarse:U,fine:K},(se,X,G)=>{if(X)switch(se){case"down":{N("drag"),_(T,G);const{onDragging:Y}=m.current;Y&&Y(!0);break}case"move":{const{state:Y}=L.current;Y!=="drag"&&N("hover"),I(G);break}case"up":{N("hover"),R();const{onDragging:Y}=m.current;Y&&Y(!1);break}}else N("inactive")})},[U,g,n,K,b,T,I,_,R]),fke({disabled:n,handleId:T,resizeHandler:I,panelGroupElement:P}),Kv(f,{...l,children:t,className:e,id:s,onBlur:()=>{M(!1),i==null||i()},onFocus:()=>{M(!0),a==null||a()},ref:h,role:"separator",style:{...{touchAction:"none",userSelect:"none"},...c},tabIndex:u,"data-panel-group-direction":g,"data-panel-group-id":v,"data-resize-handle":"","data-resize-handle-active":E==="drag"?"pointer":k?"keyboard":void 0,"data-resize-handle-state":E,"data-panel-resize-handle-enabled":!n,"data-panel-resize-handle-id":T})}_X.displayName="PanelResizeHandle";const hke=({className:t,...e})=>w.jsx(wX,{className:ie("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),...e}),Q5=sX,pke=({withHandle:t,className:e,...n})=>w.jsx(_X,{className:ie("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",e),...n,children:t&&w.jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:w.jsx(xq,{className:"h-2.5 w-2.5"})})});function mx(t,[e,n]){return Math.min(n,Math.max(e,t))}function mke(t,e){return S.useReducer((n,r)=>e[n][r]??n,t)}var Q2="ScrollArea",[SX,GUe]=In(Q2),[gke,ca]=SX(Q2),CX=S.forwardRef((t,e)=>{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:i=600,...o}=t,[a,c]=S.useState(null),[u,f]=S.useState(null),[l,d]=S.useState(null),[p,h]=S.useState(null),[m,y]=S.useState(null),[g,v]=S.useState(0),[b,_]=S.useState(0),[R,P]=S.useState(!1),[T,E]=S.useState(!1),N=Je(e,M=>c(M)),k=Qa(s);return w.jsx(gke,{scope:n,type:r,dir:k,scrollHideDelay:i,scrollArea:a,viewport:u,onViewportChange:f,content:l,onContentChange:d,scrollbarX:p,onScrollbarXChange:h,scrollbarXEnabled:R,onScrollbarXEnabledChange:P,scrollbarY:m,onScrollbarYChange:y,scrollbarYEnabled:T,onScrollbarYEnabledChange:E,onCornerWidthChange:v,onCornerHeightChange:_,children:w.jsx(De.div,{dir:k,...o,ref:N,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":b+"px",...t.style}})})});CX.displayName=Q2;var EX="ScrollAreaViewport",RX=S.forwardRef((t,e)=>{const{__scopeScrollArea:n,children:r,nonce:s,...i}=t,o=ca(EX,n),a=S.useRef(null),c=Je(e,a,o.onViewportChange);return w.jsxs(w.Fragment,{children:[w.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),w.jsx(De.div,{"data-radix-scroll-area-viewport":"",...i,ref:c,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t.style},children:w.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});RX.displayName=EX;var Zl="ScrollAreaScrollbar",Z2=S.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=ca(Zl,t.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=s,a=t.orientation==="horizontal";return S.useEffect(()=>(a?i(!0):o(!0),()=>{a?i(!1):o(!1)}),[a,i,o]),s.type==="hover"?w.jsx(vke,{...r,ref:e,forceMount:n}):s.type==="scroll"?w.jsx(yke,{...r,ref:e,forceMount:n}):s.type==="auto"?w.jsx(AX,{...r,ref:e,forceMount:n}):s.type==="always"?w.jsx(J2,{...r,ref:e}):null});Z2.displayName=Zl;var vke=S.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=ca(Zl,t.__scopeScrollArea),[i,o]=S.useState(!1);return S.useEffect(()=>{const a=s.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),o(!0)},f=()=>{c=window.setTimeout(()=>o(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",f),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",f)}}},[s.scrollArea,s.scrollHideDelay]),w.jsx(Kn,{present:n||i,children:w.jsx(AX,{"data-state":i?"visible":"hidden",...r,ref:e})})}),yke=S.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=ca(Zl,t.__scopeScrollArea),i=t.orientation==="horizontal",o=ZA(()=>c("SCROLL_END"),100),[a,c]=mke("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return S.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,s.scrollHideDelay,c]),S.useEffect(()=>{const u=s.viewport,f=i?"scrollLeft":"scrollTop";if(u){let l=u[f];const d=()=>{const p=u[f];l!==p&&(c("SCROLL"),o()),l=p};return u.addEventListener("scroll",d),()=>u.removeEventListener("scroll",d)}},[s.viewport,i,c,o]),w.jsx(Kn,{present:n||a!=="hidden",children:w.jsx(J2,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:e,onPointerEnter:ye(t.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ye(t.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),AX=S.forwardRef((t,e)=>{const n=ca(Zl,t.__scopeScrollArea),{forceMount:r,...s}=t,[i,o]=S.useState(!1),a=t.orientation==="horizontal",c=ZA(()=>{if(n.viewport){const u=n.viewport.offsetWidth {const{orientation:n="vertical",...r}=t,s=ca(Zl,t.__scopeScrollArea),i=S.useRef(null),o=S.useRef(0),[a,c]=S.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=DX(a.viewport,a.content),f={...r,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:d=>i.current=d,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:d=>o.current=d};function l(d,p){return Cke(d,o.current,a,p)}return n==="horizontal"?w.jsx(bke,{...f,ref:e,onThumbPositionChange:()=>{if(s.viewport&&i.current){const d=s.viewport.scrollLeft,p=Z5(d,a,s.dir);i.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:d=>{s.viewport&&(s.viewport.scrollLeft=d)},onDragScroll:d=>{s.viewport&&(s.viewport.scrollLeft=l(d,s.dir))}}):n==="vertical"?w.jsx(xke,{...f,ref:e,onThumbPositionChange:()=>{if(s.viewport&&i.current){const d=s.viewport.scrollTop,p=Z5(d,a);i.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:d=>{s.viewport&&(s.viewport.scrollTop=d)},onDragScroll:d=>{s.viewport&&(s.viewport.scrollTop=l(d))}}):null}),bke=S.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...s}=t,i=ca(Zl,t.__scopeScrollArea),[o,a]=S.useState(),c=S.useRef(null),u=Je(e,c,i.onScrollbarXChange);return S.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),w.jsx(NX,{"data-orientation":"horizontal",...s,ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":QA(n)+"px",...t.style},onThumbPointerDown:f=>t.onThumbPointerDown(f.x),onDragScroll:f=>t.onDragScroll(f.x),onWheelScroll:(f,l)=>{if(i.viewport){const d=i.viewport.scrollLeft+f.deltaX;t.onWheelScroll(d),OX(d,l)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&o&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:LE(o.paddingLeft),paddingEnd:LE(o.paddingRight)}})}})}),xke=S.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...s}=t,i=ca(Zl,t.__scopeScrollArea),[o,a]=S.useState(),c=S.useRef(null),u=Je(e,c,i.onScrollbarYChange);return S.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),w.jsx(NX,{"data-orientation":"vertical",...s,ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":QA(n)+"px",...t.style},onThumbPointerDown:f=>t.onThumbPointerDown(f.y),onDragScroll:f=>t.onDragScroll(f.y),onWheelScroll:(f,l)=>{if(i.viewport){const d=i.viewport.scrollTop+f.deltaY;t.onWheelScroll(d),OX(d,l)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&o&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:LE(o.paddingTop),paddingEnd:LE(o.paddingBottom)}})}})}),[wke,PX]=SX(Zl),NX=S.forwardRef((t,e)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:f,onResize:l,...d}=t,p=ca(Zl,n),[h,m]=S.useState(null),y=Je(e,N=>m(N)),g=S.useRef(null),v=S.useRef(""),b=p.viewport,_=r.content-r.viewport,R=on(f),P=on(c),T=ZA(l,10);function E(N){if(g.current){const k=N.clientX-g.current.left,M=N.clientY-g.current.top;u({x:k,y:M})}}return S.useEffect(()=>{const N=k=>{const M=k.target;(h==null?void 0:h.contains(M))&&R(k,_)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[b,h,_,R]),S.useEffect(P,[r,P]),Yv(h,T),Yv(p.content,T),w.jsx(wke,{scope:n,scrollbar:h,hasThumb:s,onThumbChange:on(i),onThumbPointerUp:on(o),onThumbPositionChange:P,onThumbPointerDown:on(a),children:w.jsx(De.div,{...d,ref:y,style:{position:"absolute",...d.style},onPointerDown:ye(t.onPointerDown,N=>{N.button===0&&(N.target.setPointerCapture(N.pointerId),g.current=h.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),E(N))}),onPointerMove:ye(t.onPointerMove,E),onPointerUp:ye(t.onPointerUp,N=>{const k=N.target;k.hasPointerCapture(N.pointerId)&&k.releasePointerCapture(N.pointerId),document.body.style.webkitUserSelect=v.current,p.viewport&&(p.viewport.style.scrollBehavior=""),g.current=null})})})}),jE="ScrollAreaThumb",TX=S.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=PX(jE,t.__scopeScrollArea);return w.jsx(Kn,{present:n||s.hasThumb,children:w.jsx(_ke,{ref:e,...r})})}),_ke=S.forwardRef((t,e)=>{const{__scopeScrollArea:n,style:r,...s}=t,i=ca(jE,n),o=PX(jE,n),{onThumbPositionChange:a}=o,c=Je(e,l=>o.onThumbChange(l)),u=S.useRef(),f=ZA(()=>{u.current&&(u.current(),u.current=void 0)},100);return S.useEffect(()=>{const l=i.viewport;if(l){const d=()=>{if(f(),!u.current){const p=Eke(l,a);u.current=p,a()}};return a(),l.addEventListener("scroll",d),()=>l.removeEventListener("scroll",d)}},[i.viewport,f,a]),w.jsx(De.div,{"data-state":o.hasThumb?"visible":"hidden",...s,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ye(t.onPointerDownCapture,l=>{const p=l.target.getBoundingClientRect(),h=l.clientX-p.left,m=l.clientY-p.top;o.onThumbPointerDown({x:h,y:m})}),onPointerUp:ye(t.onPointerUp,o.onThumbPointerUp)})});TX.displayName=jE;var e$="ScrollAreaCorner",kX=S.forwardRef((t,e)=>{const n=ca(e$,t.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?w.jsx(Ske,{...t,ref:e}):null});kX.displayName=e$;var Ske=S.forwardRef((t,e)=>{const{__scopeScrollArea:n,...r}=t,s=ca(e$,n),[i,o]=S.useState(0),[a,c]=S.useState(0),u=!!(i&&a);return Yv(s.scrollbarX,()=>{var l;const f=((l=s.scrollbarX)==null?void 0:l.offsetHeight)||0;s.onCornerHeightChange(f),c(f)}),Yv(s.scrollbarY,()=>{var l;const f=((l=s.scrollbarY)==null?void 0:l.offsetWidth)||0;s.onCornerWidthChange(f),o(f)}),u?w.jsx(De.div,{...r,ref:e,style:{width:i,height:a,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function LE(t){return t?parseInt(t,10):0}function DX(t,e){const n=t/e;return isNaN(n)?0:n}function QA(t){const e=DX(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function Cke(t,e,n,r="ltr"){const s=QA(n),i=s/2,o=e||i,a=s-o,c=n.scrollbar.paddingStart+o,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,f=n.content-n.viewport,l=r==="ltr"?[0,f]:[f*-1,0];return MX([c,u],l)(t)}function Z5(t,e,n="ltr"){const r=QA(e),s=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=e.scrollbar.size-s,o=e.content-e.viewport,a=i-r,c=n==="ltr"?[0,o]:[o*-1,0],u=mx(t,c);return MX([0,o],[0,a])(u)}function MX(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function OX(t,e){return t>0&&t {})=>{let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function s(){const i={left:t.scrollLeft,top:t.scrollTop},o=n.left!==i.left,a=n.top!==i.top;(o||a)&&e(),n=i,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function ZA(t,e){const n=on(t),r=S.useRef(0);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),S.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,e)},[n,e])}function Yv(t,e){const n=on(e);ir(()=>{let r=0;if(t){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(t),()=>{window.cancelAnimationFrame(r),s.unobserve(t)}}},[t,n])}var IX=CX,Rke=RX,Ake=kX;const t$=S.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(IX,{ref:r,className:ie("relative overflow-hidden",t),...n,children:[w.jsx(Rke,{className:"h-full w-full rounded-[inherit]",children:e}),w.jsx(jX,{}),w.jsx(Ake,{})]}));t$.displayName=IX.displayName;const jX=S.forwardRef(({className:t,orientation:e="vertical",...n},r)=>w.jsx(Z2,{ref:r,orientation:e,className:ie("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...n,children:w.jsx(TX,{className:"relative flex-1 rounded-full bg-border"})}));jX.displayName=Z2.displayName;var Pke=[" ","Enter","ArrowUp","ArrowDown"],Nke=[" ","Enter"],z_="Select",[JA,eP,Tke]=Cu(z_),[Dy,KUe]=In(z_,[Tke,Yl]),tP=Yl(),[kke,xf]=Dy(z_),[Dke,Mke]=Dy(z_),LX=t=>{const{__scopeSelect:e,children:n,open:r,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:c,dir:u,name:f,autoComplete:l,disabled:d,required:p}=t,h=tP(e),[m,y]=S.useState(null),[g,v]=S.useState(null),[b,_]=S.useState(!1),R=Qa(u),[P=!1,T]=mr({prop:r,defaultProp:s,onChange:i}),[E,N]=mr({prop:o,defaultProp:a,onChange:c}),k=S.useRef(null),M=m?!!m.closest("form"):!0,[I,j]=S.useState(new Set),L=Array.from(I).map(U=>U.props.value).join(";");return w.jsx($A,{...h,children:w.jsxs(kke,{required:p,scope:e,trigger:m,onTriggerChange:y,valueNode:g,onValueNodeChange:v,valueNodeHasChildren:b,onValueNodeHasChildrenChange:_,contentId:js(),value:E,onValueChange:N,open:P,onOpenChange:T,dir:R,triggerPointerDownPosRef:k,disabled:d,children:[w.jsx(JA.Provider,{scope:e,children:w.jsx(Dke,{scope:t.__scopeSelect,onNativeOptionAdd:S.useCallback(U=>{j(K=>new Set(K).add(U))},[]),onNativeOptionRemove:S.useCallback(U=>{j(K=>{const H=new Set(K);return H.delete(U),H})},[]),children:n})}),M?w.jsxs(lQ,{"aria-hidden":!0,required:p,tabIndex:-1,name:f,autoComplete:l,value:E,onChange:U=>N(U.target.value),disabled:d,children:[E===void 0?w.jsx("option",{value:""}):null,Array.from(I)]},L):null]})})};LX.displayName=z_;var $X="SelectTrigger",FX=S.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:r=!1,...s}=t,i=tP(n),o=xf($X,n),a=o.disabled||r,c=Je(e,o.onTriggerChange),u=eP(n),[f,l,d]=cQ(h=>{const m=u().filter(v=>!v.disabled),y=m.find(v=>v.value===o.value),g=uQ(m,h,y);g!==void 0&&o.onValueChange(g.value)}),p=()=>{a||(o.onOpenChange(!0),d())};return w.jsx(Ay,{asChild:!0,...i,children:w.jsx(De.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":aQ(o.value)?"":void 0,...s,ref:c,onClick:ye(s.onClick,h=>{h.currentTarget.focus()}),onPointerDown:ye(s.onPointerDown,h=>{const m=h.target;m.hasPointerCapture(h.pointerId)&&m.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&(p(),o.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)},h.preventDefault())}),onKeyDown:ye(s.onKeyDown,h=>{const m=f.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&l(h.key),!(m&&h.key===" ")&&Pke.includes(h.key)&&(p(),h.preventDefault())})})})});FX.displayName=$X;var zX="SelectValue",BX=S.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:s,children:i,placeholder:o="",...a}=t,c=xf(zX,n),{onValueNodeHasChildrenChange:u}=c,f=i!==void 0,l=Je(e,c.onValueNodeChange);return ir(()=>{u(f)},[u,f]),w.jsx(De.span,{...a,ref:l,style:{pointerEvents:"none"},children:aQ(c.value)?w.jsx(w.Fragment,{children:o}):i})});BX.displayName=zX;var Oke="SelectIcon",UX=S.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...s}=t;return w.jsx(De.span,{"aria-hidden":!0,...s,ref:e,children:r||"▼"})});UX.displayName=Oke;var Ike="SelectPortal",HX=t=>w.jsx(dy,{asChild:!0,...t});HX.displayName=Ike;var Tp="SelectContent",VX=S.forwardRef((t,e)=>{const n=xf(Tp,t.__scopeSelect),[r,s]=S.useState();if(ir(()=>{s(new DocumentFragment)},[]),!n.open){const i=r;return i?rs.createPortal(w.jsx(qX,{scope:t.__scopeSelect,children:w.jsx(JA.Slot,{scope:t.__scopeSelect,children:w.jsx("div",{children:t.children})})}),i):null}return w.jsx(WX,{...t,ref:e})});VX.displayName=Tp;var vc=10,[qX,wf]=Dy(Tp),jke="SelectContentImpl",WX=S.forwardRef((t,e)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:c,align:u,alignOffset:f,arrowPadding:l,collisionBoundary:d,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:y,...g}=t,v=xf(Tp,n),[b,_]=S.useState(null),[R,P]=S.useState(null),T=Je(e,ce=>_(ce)),[E,N]=S.useState(null),[k,M]=S.useState(null),I=eP(n),[j,L]=S.useState(!1),U=S.useRef(!1);S.useEffect(()=>{if(b)return p_(b)},[b]),iA();const K=S.useCallback(ce=>{const[xe,...Pe]=I().map(Me=>Me.ref.current),[pe]=Pe.slice(-1),Le=document.activeElement;for(const Me of ce)if(Me===Le||(Me==null||Me.scrollIntoView({block:"nearest"}),Me===xe&&R&&(R.scrollTop=0),Me===pe&&R&&(R.scrollTop=R.scrollHeight),Me==null||Me.focus(),document.activeElement!==Le))return},[I,R]),H=S.useCallback(()=>K([E,b]),[K,E,b]);S.useEffect(()=>{j&&H()},[j,H]);const{onOpenChange:q,triggerPointerDownPosRef:ee}=v;S.useEffect(()=>{if(b){let ce={x:0,y:0};const xe=pe=>{var Le,Me;ce={x:Math.abs(Math.round(pe.pageX)-(((Le=ee.current)==null?void 0:Le.x)??0)),y:Math.abs(Math.round(pe.pageY)-(((Me=ee.current)==null?void 0:Me.y)??0))}},Pe=pe=>{ce.x<=10&&ce.y<=10?pe.preventDefault():b.contains(pe.target)||q(!1),document.removeEventListener("pointermove",xe),ee.current=null};return ee.current!==null&&(document.addEventListener("pointermove",xe),document.addEventListener("pointerup",Pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",xe),document.removeEventListener("pointerup",Pe,{capture:!0})}}},[b,q,ee]),S.useEffect(()=>{const ce=()=>q(!1);return window.addEventListener("blur",ce),window.addEventListener("resize",ce),()=>{window.removeEventListener("blur",ce),window.removeEventListener("resize",ce)}},[q]);const[se,X]=cQ(ce=>{const xe=I().filter(Le=>!Le.disabled),Pe=xe.find(Le=>Le.ref.current===document.activeElement),pe=uQ(xe,ce,Pe);pe&&setTimeout(()=>pe.ref.current.focus())}),G=S.useCallback((ce,xe,Pe)=>{const pe=!U.current&&!Pe;(v.value!==void 0&&v.value===xe||pe)&&(N(ce),pe&&(U.current=!0))},[v.value]),Y=S.useCallback(()=>b==null?void 0:b.focus(),[b]),Q=S.useCallback((ce,xe,Pe)=>{const pe=!U.current&&!Pe;(v.value!==void 0&&v.value===xe||pe)&&M(ce)},[v.value]),he=r==="popper"?oO:GX,fe=he===oO?{side:a,sideOffset:c,align:u,alignOffset:f,arrowPadding:l,collisionBoundary:d,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:y}:{};return w.jsx(qX,{scope:n,content:b,viewport:R,onViewportChange:P,itemRefCallback:G,selectedItem:E,onItemLeave:Y,itemTextRefCallback:Q,focusSelectedItem:H,selectedItemText:k,position:r,isPositioned:j,searchRef:se,children:w.jsx(h_,{as:qa,allowPinchZoom:!0,children:w.jsx(f_,{asChild:!0,trapped:v.open,onMountAutoFocus:ce=>{ce.preventDefault()},onUnmountAutoFocus:ye(s,ce=>{var xe;(xe=v.trigger)==null||xe.focus({preventScroll:!0}),ce.preventDefault()}),children:w.jsx(Ru,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:ce=>ce.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:w.jsx(he,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:ce=>ce.preventDefault(),...g,...fe,onPlaced:()=>L(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:ye(g.onKeyDown,ce=>{const xe=ce.ctrlKey||ce.altKey||ce.metaKey;if(ce.key==="Tab"&&ce.preventDefault(),!xe&&ce.key.length===1&&X(ce.key),["ArrowUp","ArrowDown","Home","End"].includes(ce.key)){let pe=I().filter(Le=>!Le.disabled).map(Le=>Le.ref.current);if(["ArrowUp","End"].includes(ce.key)&&(pe=pe.slice().reverse()),["ArrowUp","ArrowDown"].includes(ce.key)){const Le=ce.target,Me=pe.indexOf(Le);pe=pe.slice(Me+1)}setTimeout(()=>K(pe)),ce.preventDefault()}})})})})})})});WX.displayName=jke;var Lke="SelectItemAlignedPosition",GX=S.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:r,...s}=t,i=xf(Tp,n),o=wf(Tp,n),[a,c]=S.useState(null),[u,f]=S.useState(null),l=Je(e,T=>f(T)),d=eP(n),p=S.useRef(!1),h=S.useRef(!0),{viewport:m,selectedItem:y,selectedItemText:g,focusSelectedItem:v}=o,b=S.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&u&&m&&y&&g){const T=i.trigger.getBoundingClientRect(),E=u.getBoundingClientRect(),N=i.valueNode.getBoundingClientRect(),k=g.getBoundingClientRect();if(i.dir!=="rtl"){const Le=k.left-E.left,Me=N.left-Le,Oe=T.left-Me,Fe=T.width+Oe,ot=Math.max(Fe,E.width),nt=window.innerWidth-vc,Et=mx(Me,[vc,nt-ot]);a.style.minWidth=Fe+"px",a.style.left=Et+"px"}else{const Le=E.right-k.right,Me=window.innerWidth-N.right-Le,Oe=window.innerWidth-T.right-Me,Fe=T.width+Oe,ot=Math.max(Fe,E.width),nt=window.innerWidth-vc,Et=mx(Me,[vc,nt-ot]);a.style.minWidth=Fe+"px",a.style.right=Et+"px"}const M=d(),I=window.innerHeight-vc*2,j=m.scrollHeight,L=window.getComputedStyle(u),U=parseInt(L.borderTopWidth,10),K=parseInt(L.paddingTop,10),H=parseInt(L.borderBottomWidth,10),q=parseInt(L.paddingBottom,10),ee=U+K+j+q+H,se=Math.min(y.offsetHeight*5,ee),X=window.getComputedStyle(m),G=parseInt(X.paddingTop,10),Y=parseInt(X.paddingBottom,10),Q=T.top+T.height/2-vc,he=I-Q,fe=y.offsetHeight/2,ce=y.offsetTop+fe,xe=U+K+ce,Pe=ee-xe;if(xe<=Q){const Le=y===M[M.length-1].ref.current;a.style.bottom="0px";const Me=u.clientHeight-m.offsetTop-m.offsetHeight,Oe=Math.max(he,fe+(Le?Y:0)+Me+H),Fe=xe+Oe;a.style.height=Fe+"px"}else{const Le=y===M[0].ref.current;a.style.top="0px";const Oe=Math.max(Q,U+m.offsetTop+(Le?G:0)+fe)+Pe;a.style.height=Oe+"px",m.scrollTop=xe-Q+m.offsetTop}a.style.margin=`${vc}px 0`,a.style.minHeight=se+"px",a.style.maxHeight=I+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[d,i.trigger,i.valueNode,a,u,m,y,g,i.dir,r]);ir(()=>b(),[b]);const[_,R]=S.useState();ir(()=>{u&&R(window.getComputedStyle(u).zIndex)},[u]);const P=S.useCallback(T=>{T&&h.current===!0&&(b(),v==null||v(),h.current=!1)},[b,v]);return w.jsx(Fke,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:P,children:w.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:w.jsx(De.div,{...s,ref:l,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});GX.displayName=Lke;var $ke="SelectPopperPosition",oO=S.forwardRef((t,e)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=vc,...i}=t,o=tP(n);return w.jsx(E_,{...o,...i,ref:e,align:r,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});oO.displayName=$ke;var[Fke,n$]=Dy(Tp,{}),aO="SelectViewport",KX=S.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:r,...s}=t,i=wf(aO,n),o=n$(aO,n),a=Je(e,i.onViewportChange),c=S.useRef(0);return w.jsxs(w.Fragment,{children:[w.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),w.jsx(JA.Slot,{scope:n,children:w.jsx(De.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ye(s.onScroll,u=>{const f=u.currentTarget,{contentWrapper:l,shouldExpandOnScrollRef:d}=o;if(d!=null&&d.current&&l){const p=Math.abs(c.current-f.scrollTop);if(p>0){const h=window.innerHeight-vc*2,m=parseFloat(l.style.minHeight),y=parseFloat(l.style.height),g=Math.max(m,y);if(g 0?_:0,l.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});KX.displayName=aO;var YX="SelectGroup",[zke,Bke]=Dy(YX),Uke=S.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=js();return w.jsx(zke,{scope:n,id:s,children:w.jsx(De.div,{role:"group","aria-labelledby":s,...r,ref:e})})});Uke.displayName=YX;var XX="SelectLabel",QX=S.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=Bke(XX,n);return w.jsx(De.div,{id:s.id,...r,ref:e})});QX.displayName=XX;var $E="SelectItem",[Hke,ZX]=Dy($E),JX=S.forwardRef((t,e)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:i,...o}=t,a=xf($E,n),c=wf($E,n),u=a.value===r,[f,l]=S.useState(i??""),[d,p]=S.useState(!1),h=Je(e,g=>{var v;return(v=c.itemRefCallback)==null?void 0:v.call(c,g,r,s)}),m=js(),y=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return w.jsx(Hke,{scope:n,value:r,disabled:s,textId:m,isSelected:u,onItemTextChange:S.useCallback(g=>{l(v=>v||((g==null?void 0:g.textContent)??"").trim())},[]),children:w.jsx(JA.ItemSlot,{scope:n,value:r,disabled:s,textValue:f,children:w.jsx(De.div,{role:"option","aria-labelledby":m,"data-highlighted":d?"":void 0,"aria-selected":u&&d,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:h,onFocus:ye(o.onFocus,()=>p(!0)),onBlur:ye(o.onBlur,()=>p(!1)),onPointerUp:ye(o.onPointerUp,y),onPointerMove:ye(o.onPointerMove,g=>{var v;s?(v=c.onItemLeave)==null||v.call(c):g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ye(o.onPointerLeave,g=>{var v;g.currentTarget===document.activeElement&&((v=c.onItemLeave)==null||v.call(c))}),onKeyDown:ye(o.onKeyDown,g=>{var b;((b=c.searchRef)==null?void 0:b.current)!==""&&g.key===" "||(Nke.includes(g.key)&&y(),g.key===" "&&g.preventDefault())})})})})});JX.displayName=$E;var qb="SelectItemText",eQ=S.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:s,...i}=t,o=xf(qb,n),a=wf(qb,n),c=ZX(qb,n),u=Mke(qb,n),[f,l]=S.useState(null),d=Je(e,g=>l(g),c.onItemTextChange,g=>{var v;return(v=a.itemTextRefCallback)==null?void 0:v.call(a,g,c.value,c.disabled)}),p=f==null?void 0:f.textContent,h=S.useMemo(()=>w.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:y}=u;return ir(()=>(m(h),()=>y(h)),[m,y,h]),w.jsxs(w.Fragment,{children:[w.jsx(De.span,{id:c.textId,...i,ref:d}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?rs.createPortal(i.children,o.valueNode):null]})});eQ.displayName=qb;var tQ="SelectItemIndicator",nQ=S.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return ZX(tQ,n).isSelected?w.jsx(De.span,{"aria-hidden":!0,...r,ref:e}):null});nQ.displayName=tQ;var lO="SelectScrollUpButton",rQ=S.forwardRef((t,e)=>{const n=wf(lO,t.__scopeSelect),r=n$(lO,t.__scopeSelect),[s,i]=S.useState(!1),o=Je(e,r.onScrollButtonChange);return ir(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollTop>0;i(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?w.jsx(iQ,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});rQ.displayName=lO;var cO="SelectScrollDownButton",sQ=S.forwardRef((t,e)=>{const n=wf(cO,t.__scopeSelect),r=n$(cO,t.__scopeSelect),[s,i]=S.useState(!1),o=Je(e,r.onScrollButtonChange);return ir(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?w.jsx(iQ,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});sQ.displayName=cO;var iQ=S.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=t,i=wf("SelectScrollButton",n),o=S.useRef(null),a=eP(n),c=S.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return S.useEffect(()=>()=>c(),[c]),ir(()=>{var f;const u=a().find(l=>l.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[a]),w.jsx(De.div,{"aria-hidden":!0,...s,ref:e,style:{flexShrink:0,...s.style},onPointerDown:ye(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:ye(s.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:ye(s.onPointerLeave,()=>{c()})})}),Vke="SelectSeparator",oQ=S.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return w.jsx(De.div,{"aria-hidden":!0,...r,ref:e})});oQ.displayName=Vke;var uO="SelectArrow",qke=S.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=tP(n),i=xf(uO,n),o=wf(uO,n);return i.open&&o.position==="popper"?w.jsx(R_,{...s,...r,ref:e}):null});qke.displayName=uO;function aQ(t){return t===""||t===void 0}var lQ=S.forwardRef((t,e)=>{const{value:n,...r}=t,s=S.useRef(null),i=Je(e,s),o=xy(n);return S.useEffect(()=>{const a=s.current,c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==n&&f){const l=new Event("change",{bubbles:!0});f.call(a,n),a.dispatchEvent(l)}},[o,n]),w.jsx($_,{asChild:!0,children:w.jsx("select",{...r,ref:i,defaultValue:n})})});lQ.displayName="BubbleSelect";function cQ(t){const e=on(t),n=S.useRef(""),r=S.useRef(0),s=S.useCallback(o=>{const a=n.current+o;e(a),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[e]),i=S.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,i]}function uQ(t,e,n){const s=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let o=Wke(t,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function Wke(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var Gke=LX,dQ=FX,Kke=BX,Yke=UX,Xke=HX,fQ=VX,Qke=KX,hQ=QX,pQ=JX,Zke=eQ,Jke=nQ,mQ=rQ,gQ=sQ,vQ=oQ;const r$=Gke,s$=Kke,nP=S.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(dQ,{ref:r,className:ie("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...n,children:[e,w.jsx(Yke,{asChild:!0,children:w.jsx(d_,{className:"h-4 w-4 opacity-50"})})]}));nP.displayName=dQ.displayName;const yQ=S.forwardRef(({className:t,...e},n)=>w.jsx(mQ,{ref:n,className:ie("flex cursor-default items-center justify-center py-1",t),...e,children:w.jsx(mq,{className:"h-4 w-4"})}));yQ.displayName=mQ.displayName;const bQ=S.forwardRef(({className:t,...e},n)=>w.jsx(gQ,{ref:n,className:ie("flex cursor-default items-center justify-center py-1",t),...e,children:w.jsx(d_,{className:"h-4 w-4"})}));bQ.displayName=gQ.displayName;const rP=S.forwardRef(({className:t,children:e,position:n="popper",...r},s)=>w.jsx(Xke,{children:w.jsxs(fQ,{ref:s,className:ie("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:n,...r,children:[w.jsx(yQ,{}),w.jsx(Qke,{className:ie("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),w.jsx(bQ,{})]})}));rP.displayName=fQ.displayName;const eDe=S.forwardRef(({className:t,...e},n)=>w.jsx(hQ,{ref:n,className:ie("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...e}));eDe.displayName=hQ.displayName;const yg=S.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(pQ,{ref:r,className:ie("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(Jke,{children:w.jsx(u_,{className:"h-4 w-4"})})}),w.jsx(Zke,{children:e})]}));yg.displayName=pQ.displayName;const tDe=S.forwardRef(({className:t,...e},n)=>w.jsx(vQ,{ref:n,className:ie("-mx-1 my-1 h-px bg-muted",t),...e}));tDe.displayName=vQ.displayName;const nDe=aA,rDe=lA,sDe=cA,xQ=S.forwardRef(({className:t,...e},n)=>w.jsx(fy,{className:ie("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e,ref:n}));xQ.displayName=fy.displayName;const iDe=li("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),wQ=S.forwardRef(({side:t="right",className:e,children:n,...r},s)=>w.jsxs(sDe,{children:[w.jsx(xQ,{}),w.jsxs(hy,{ref:s,className:ie(iDe({side:t}),e),...r,children:[n,w.jsxs(gy,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[w.jsx(sA,{className:"h-4 w-4"}),w.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));wQ.displayName=hy.displayName;const oDe=S.forwardRef(({className:t,...e},n)=>w.jsx(py,{ref:n,className:ie("text-lg font-semibold text-foreground",t),...e}));oDe.displayName=py.displayName;const aDe=S.forwardRef(({className:t,...e},n)=>w.jsx(my,{ref:n,className:ie("text-sm text-muted-foreground",t),...e}));aDe.displayName=my.displayName;function bi({className:t,...e}){return w.jsx("div",{className:ie("animate-pulse rounded-md bg-muted",t),...e})}var _Q=["PageUp","PageDown"],SQ=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],CQ={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},My="Slider",[dO,lDe,cDe]=Cu(My),[EQ,YUe]=In(My,[cDe]),[uDe,sP]=EQ(My),RQ=S.forwardRef((t,e)=>{const{name:n,min:r=0,max:s=100,step:i=1,orientation:o="horizontal",disabled:a=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[r],value:f,onValueChange:l=()=>{},onValueCommit:d=()=>{},inverted:p=!1,...h}=t,m=S.useRef(new Set),y=S.useRef(0),v=o==="horizontal"?dDe:fDe,[b=[],_]=mr({prop:f,defaultProp:u,onChange:k=>{var I;(I=[...m.current][y.current])==null||I.focus(),l(k)}}),R=S.useRef(b);function P(k){const M=vDe(b,k);N(k,M)}function T(k){N(k,y.current)}function E(){const k=R.current[y.current];b[y.current]!==k&&d(b)}function N(k,M,{commit:I}={commit:!1}){const j=wDe(i),L=_De(Math.round((k-r)/i)*i+r,j),U=mx(L,[r,s]);_((K=[])=>{const H=mDe(K,U,M);if(xDe(H,c*i)){y.current=H.indexOf(U);const q=String(H)!==String(K);return q&&I&&d(H),q?H:K}else return K})}return w.jsx(uDe,{scope:t.__scopeSlider,name:n,disabled:a,min:r,max:s,valueIndexToChangeRef:y,thumbs:m.current,values:b,orientation:o,children:w.jsx(dO.Provider,{scope:t.__scopeSlider,children:w.jsx(dO.Slot,{scope:t.__scopeSlider,children:w.jsx(v,{"aria-disabled":a,"data-disabled":a?"":void 0,...h,ref:e,onPointerDown:ye(h.onPointerDown,()=>{a||(R.current=b)}),min:r,max:s,inverted:p,onSlideStart:a?void 0:P,onSlideMove:a?void 0:T,onSlideEnd:a?void 0:E,onHomeKeyDown:()=>!a&&N(r,0,{commit:!0}),onEndKeyDown:()=>!a&&N(s,b.length-1,{commit:!0}),onStepKeyDown:({event:k,direction:M})=>{if(!a){const L=_Q.includes(k.key)||k.shiftKey&&SQ.includes(k.key)?10:1,U=y.current,K=b[U],H=i*L*M;N(K+H,U,{commit:!0})}}})})})})});RQ.displayName=My;var[AQ,PQ]=EQ(My,{startEdge:"left",endEdge:"right",size:"width",direction:1}),dDe=S.forwardRef((t,e)=>{const{min:n,max:r,dir:s,inverted:i,onSlideStart:o,onSlideMove:a,onSlideEnd:c,onStepKeyDown:u,...f}=t,[l,d]=S.useState(null),p=Je(e,b=>d(b)),h=S.useRef(),m=Qa(s),y=m==="ltr",g=y&&!i||!y&&i;function v(b){const _=h.current||l.getBoundingClientRect(),R=[0,_.width],T=i$(R,g?[n,r]:[r,n]);return h.current=_,T(b-_.left)}return w.jsx(AQ,{scope:t.__scopeSlider,startEdge:g?"left":"right",endEdge:g?"right":"left",direction:g?1:-1,size:"width",children:w.jsx(NQ,{dir:m,"data-orientation":"horizontal",...f,ref:p,style:{...f.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const _=v(b.clientX);o==null||o(_)},onSlideMove:b=>{const _=v(b.clientX);a==null||a(_)},onSlideEnd:()=>{h.current=void 0,c==null||c()},onStepKeyDown:b=>{const R=CQ[g?"from-left":"from-right"].includes(b.key);u==null||u({event:b,direction:R?-1:1})}})})}),fDe=S.forwardRef((t,e)=>{const{min:n,max:r,inverted:s,onSlideStart:i,onSlideMove:o,onSlideEnd:a,onStepKeyDown:c,...u}=t,f=S.useRef(null),l=Je(e,f),d=S.useRef(),p=!s;function h(m){const y=d.current||f.current.getBoundingClientRect(),g=[0,y.height],b=i$(g,p?[r,n]:[n,r]);return d.current=y,b(m-y.top)}return w.jsx(AQ,{scope:t.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:w.jsx(NQ,{"data-orientation":"vertical",...u,ref:l,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const y=h(m.clientY);i==null||i(y)},onSlideMove:m=>{const y=h(m.clientY);o==null||o(y)},onSlideEnd:()=>{d.current=void 0,a==null||a()},onStepKeyDown:m=>{const g=CQ[p?"from-bottom":"from-top"].includes(m.key);c==null||c({event:m,direction:g?-1:1})}})})}),NQ=S.forwardRef((t,e)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:s,onSlideEnd:i,onHomeKeyDown:o,onEndKeyDown:a,onStepKeyDown:c,...u}=t,f=sP(My,n);return w.jsx(De.span,{...u,ref:e,onKeyDown:ye(t.onKeyDown,l=>{l.key==="Home"?(o(l),l.preventDefault()):l.key==="End"?(a(l),l.preventDefault()):_Q.concat(SQ).includes(l.key)&&(c(l),l.preventDefault())}),onPointerDown:ye(t.onPointerDown,l=>{const d=l.target;d.setPointerCapture(l.pointerId),l.preventDefault(),f.thumbs.has(d)?d.focus():r(l)}),onPointerMove:ye(t.onPointerMove,l=>{l.target.hasPointerCapture(l.pointerId)&&s(l)}),onPointerUp:ye(t.onPointerUp,l=>{const d=l.target;d.hasPointerCapture(l.pointerId)&&(d.releasePointerCapture(l.pointerId),i(l))})})}),TQ="SliderTrack",kQ=S.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,s=sP(TQ,n);return w.jsx(De.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...r,ref:e})});kQ.displayName=TQ;var fO="SliderRange",DQ=S.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,s=sP(fO,n),i=PQ(fO,n),o=S.useRef(null),a=Je(e,o),c=s.values.length,u=s.values.map(d=>OQ(d,s.min,s.max)),f=c>1?Math.min(...u):0,l=100-Math.max(...u);return w.jsx(De.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...r,ref:a,style:{...t.style,[i.startEdge]:f+"%",[i.endEdge]:l+"%"}})});DQ.displayName=fO;var hO="SliderThumb",MQ=S.forwardRef((t,e)=>{const n=lDe(t.__scopeSlider),[r,s]=S.useState(null),i=Je(e,a=>s(a)),o=S.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return w.jsx(hDe,{...t,ref:i,index:o})}),hDe=S.forwardRef((t,e)=>{const{__scopeSlider:n,index:r,name:s,...i}=t,o=sP(hO,n),a=PQ(hO,n),[c,u]=S.useState(null),f=Je(e,v=>u(v)),l=c?!!c.closest("form"):!0,d=x_(c),p=o.values[r],h=p===void 0?0:OQ(p,o.min,o.max),m=gDe(r,o.values.length),y=d==null?void 0:d[a.size],g=y?yDe(y,h,a.direction):0;return S.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),w.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${h}% + ${g}px)`},children:[w.jsx(dO.ItemSlot,{scope:t.__scopeSlider,children:w.jsx(De.span,{role:"slider","aria-label":t["aria-label"]||m,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...i,ref:f,style:p===void 0?{display:"none"}:t.style,onFocus:ye(t.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),l&&w.jsx(pDe,{name:s??(o.name?o.name+(o.values.length>1?"[]":""):void 0),value:p},r)]})});MQ.displayName=hO;var pDe=t=>{const{value:e,...n}=t,r=S.useRef(null),s=xy(e);return S.useEffect(()=>{const i=r.current,o=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(o,"value").set;if(s!==e&&c){const u=new Event("input",{bubbles:!0});c.call(i,e),i.dispatchEvent(u)}},[s,e]),w.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:e})};function mDe(t=[],e,n){const r=[...t];return r[n]=e,r.sort((s,i)=>s-i)}function OQ(t,e,n){const i=100/(n-e)*(t-e);return mx(i,[0,100])}function gDe(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function vDe(t,e){if(t.length===1)return 0;const n=t.map(s=>Math.abs(s-e)),r=Math.min(...n);return n.indexOf(r)}function yDe(t,e,n){const r=t/2,i=i$([0,50],[0,r]);return(r-i(e)*n)*n}function bDe(t){return t.slice(0,-1).map((e,n)=>t[n+1]-e)}function xDe(t,e){if(e>0){const n=bDe(t);return Math.min(...n)>=e}return!0}function i$(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function wDe(t){return(String(t).split(".")[1]||"").length}function _De(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}var IQ=RQ,SDe=kQ,CDe=DQ,EDe=MQ;const RDe=S.forwardRef(({className:t,...e},n)=>w.jsxs(IQ,{ref:n,className:ie("relative flex w-full touch-none select-none items-center",t),...e,children:[w.jsx(SDe,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:w.jsx(CDe,{className:"absolute h-full bg-primary"})}),w.jsx(EDe,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));RDe.displayName=IQ.displayName;var o$="Switch",[ADe,XUe]=In(o$),[PDe,NDe]=ADe(o$),jQ=S.forwardRef((t,e)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:i,required:o,disabled:a,value:c="on",onCheckedChange:u,...f}=t,[l,d]=S.useState(null),p=Je(e,v=>d(v)),h=S.useRef(!1),m=l?!!l.closest("form"):!0,[y=!1,g]=mr({prop:s,defaultProp:i,onChange:u});return w.jsxs(PDe,{scope:n,checked:y,disabled:a,children:[w.jsx(De.button,{type:"button",role:"switch","aria-checked":y,"aria-required":o,"data-state":FQ(y),"data-disabled":a?"":void 0,disabled:a,value:c,...f,ref:p,onClick:ye(t.onClick,v=>{g(b=>!b),m&&(h.current=v.isPropagationStopped(),h.current||v.stopPropagation())})}),m&&w.jsx(TDe,{control:l,bubbles:!h.current,name:r,value:c,checked:y,required:o,disabled:a,style:{transform:"translateX(-100%)"}})]})});jQ.displayName=o$;var LQ="SwitchThumb",$Q=S.forwardRef((t,e)=>{const{__scopeSwitch:n,...r}=t,s=NDe(LQ,n);return w.jsx(De.span,{"data-state":FQ(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});$Q.displayName=LQ;var TDe=t=>{const{control:e,checked:n,bubbles:r=!0,...s}=t,i=S.useRef(null),o=xy(n),a=x_(e);return S.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==n&&l){const d=new Event("click",{bubbles:r});l.call(c,n),c.dispatchEvent(d)}},[o,n,r]),w.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function FQ(t){return t?"checked":"unchecked"}var zQ=jQ,kDe=$Q;const BQ=S.forwardRef(({className:t,...e},n)=>w.jsx(zQ,{className:ie("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",t),...e,ref:n,children:w.jsx(kDe,{className:ie("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));BQ.displayName=zQ.displayName;const ld=S.forwardRef(({className:t,...e},n)=>w.jsx("div",{className:"relative w-full overflow-auto",children:w.jsx("table",{ref:n,className:ie("w-full caption-bottom text-sm",t),...e})}));ld.displayName="Table";const iP=S.forwardRef(({className:t,...e},n)=>w.jsx("thead",{ref:n,className:ie("[&_tr]:border-b",t),...e}));iP.displayName="TableHeader";const cd=S.forwardRef(({className:t,...e},n)=>w.jsx("tbody",{ref:n,className:ie("[&_tr:last-child]:border-0",t),...e}));cd.displayName="TableBody";const DDe=S.forwardRef(({className:t,...e},n)=>w.jsx("tfoot",{ref:n,className:ie("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...e}));DDe.displayName="TableFooter";const Yo=S.forwardRef(({className:t,...e},n)=>w.jsx("tr",{ref:n,className:ie("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...e}));Yo.displayName="TableRow";const oP=S.forwardRef(({className:t,...e},n)=>w.jsx("th",{ref:n,className:ie("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t),...e}));oP.displayName="TableHead";const Qc=S.forwardRef(({className:t,...e},n)=>w.jsx("td",{ref:n,className:ie("py-2 px-4 align-middle [&:has([role=checkbox])]:pr-0",t),...e}));Qc.displayName="TableCell";const UQ=S.forwardRef(({className:t,...e},n)=>w.jsx("caption",{ref:n,className:ie("mt-4 text-sm text-muted-foreground",t),...e}));UQ.displayName="TableCaption";var a$="Tabs",[MDe,QUe]=In(a$,[Xl]),HQ=Xl(),[ODe,l$]=MDe(a$),VQ=S.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:c="automatic",...u}=t,f=Qa(a),[l,d]=mr({prop:r,onChange:s,defaultProp:i});return w.jsx(ODe,{scope:n,baseId:js(),value:l,onValueChange:d,orientation:o,dir:f,activationMode:c,children:w.jsx(De.div,{dir:f,"data-orientation":o,...u,ref:e})})});VQ.displayName=a$;var qQ="TabsList",WQ=S.forwardRef((t,e)=>{const{__scopeTabs:n,loop:r=!0,...s}=t,i=l$(qQ,n),o=HQ(n);return w.jsx(A_,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:r,children:w.jsx(De.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:e})})});WQ.displayName=qQ;var GQ="TabsTrigger",KQ=S.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...i}=t,o=l$(GQ,n),a=HQ(n),c=QQ(o.baseId,r),u=ZQ(o.baseId,r),f=r===o.value;return w.jsx(P_,{asChild:!0,...a,focusable:!s,active:f,children:w.jsx(De.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...i,ref:e,onMouseDown:ye(t.onMouseDown,l=>{!s&&l.button===0&&l.ctrlKey===!1?o.onValueChange(r):l.preventDefault()}),onKeyDown:ye(t.onKeyDown,l=>{[" ","Enter"].includes(l.key)&&o.onValueChange(r)}),onFocus:ye(t.onFocus,()=>{const l=o.activationMode!=="manual";!f&&!s&&l&&o.onValueChange(r)})})})});KQ.displayName=GQ;var YQ="TabsContent",XQ=S.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,forceMount:s,children:i,...o}=t,a=l$(YQ,n),c=QQ(a.baseId,r),u=ZQ(a.baseId,r),f=r===a.value,l=S.useRef(f);return S.useEffect(()=>{const d=requestAnimationFrame(()=>l.current=!1);return()=>cancelAnimationFrame(d)},[]),w.jsx(Kn,{present:s||f,children:({present:d})=>w.jsx(De.div,{"data-state":f?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!d,id:u,tabIndex:0,...o,ref:e,style:{...t.style,animationDuration:l.current?"0s":void 0},children:d&&i})})});XQ.displayName=YQ;function QQ(t,e){return`${t}-trigger-${e}`}function ZQ(t,e){return`${t}-content-${e}`}var IDe=VQ,JQ=WQ,eZ=KQ,tZ=XQ;const c$=IDe,aP=S.forwardRef(({className:t,...e},n)=>w.jsx(JQ,{ref:n,className:ie("inline-flex h-9 items-center justify-center rounded-lg bg-accent p-1 text-muted-foreground",t),...e}));aP.displayName=JQ.displayName;const Xv=S.forwardRef(({className:t,...e},n)=>w.jsx(eZ,{ref:n,className:ie("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",t),...e}));Xv.displayName=eZ.displayName;const Qv=S.forwardRef(({className:t,...e},n)=>w.jsx(tZ,{ref:n,className:ie("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...e}));Qv.displayName=tZ.displayName;const nZ=S.forwardRef(({className:t,...e},n)=>w.jsx("textarea",{className:ie("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground/75 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:n,...e}));nZ.displayName="Textarea";var u$="ToastProvider",[d$,jDe,LDe]=Cu("Toast"),[rZ,ZUe]=In("Toast",[LDe]),[$De,lP]=rZ(u$),sZ=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,c]=S.useState(null),[u,f]=S.useState(0),l=S.useRef(!1),d=S.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${u$}\`. Expected non-empty \`string\`.`),w.jsx(d$.Provider,{scope:e,children:w.jsx($De,{scope:e,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:c,onToastAdd:S.useCallback(()=>f(p=>p+1),[]),onToastRemove:S.useCallback(()=>f(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:l,isClosePausedRef:d,children:o})})};sZ.displayName=u$;var iZ="ToastViewport",FDe=["F8"],pO="toast.viewportPause",mO="toast.viewportResume",oZ=S.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=FDe,label:s="Notifications ({hotkey})",...i}=t,o=lP(iZ,n),a=jDe(n),c=S.useRef(null),u=S.useRef(null),f=S.useRef(null),l=S.useRef(null),d=Je(e,l,o.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=o.toastCount>0;S.useEffect(()=>{const y=g=>{var b;r.every(_=>g[_]||g.code===_)&&((b=l.current)==null||b.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),S.useEffect(()=>{const y=c.current,g=l.current;if(h&&y&&g){const v=()=>{if(!o.isClosePausedRef.current){const P=new CustomEvent(pO);g.dispatchEvent(P),o.isClosePausedRef.current=!0}},b=()=>{if(o.isClosePausedRef.current){const P=new CustomEvent(mO);g.dispatchEvent(P),o.isClosePausedRef.current=!1}},_=P=>{!y.contains(P.relatedTarget)&&b()},R=()=>{y.contains(document.activeElement)||b()};return y.addEventListener("focusin",v),y.addEventListener("focusout",_),y.addEventListener("pointermove",v),y.addEventListener("pointerleave",R),window.addEventListener("blur",v),window.addEventListener("focus",b),()=>{y.removeEventListener("focusin",v),y.removeEventListener("focusout",_),y.removeEventListener("pointermove",v),y.removeEventListener("pointerleave",R),window.removeEventListener("blur",v),window.removeEventListener("focus",b)}}},[h,o.isClosePausedRef]);const m=S.useCallback(({tabbingDirection:y})=>{const v=a().map(b=>{const _=b.ref.current,R=[_,...ZDe(_)];return y==="forwards"?R:R.reverse()});return(y==="forwards"?v.reverse():v).flat()},[a]);return S.useEffect(()=>{const y=l.current;if(y){const g=v=>{var R,P,T;const b=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!b){const E=document.activeElement,N=v.shiftKey;if(v.target===y&&N){(R=u.current)==null||R.focus();return}const I=m({tabbingDirection:N?"backwards":"forwards"}),j=I.findIndex(L=>L===E);Tk(I.slice(j+1))?v.preventDefault():N?(P=u.current)==null||P.focus():(T=f.current)==null||T.focus()}};return y.addEventListener("keydown",g),()=>y.removeEventListener("keydown",g)}},[a,m]),w.jsxs(vve,{ref:c,role:"region","aria-label":s.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&w.jsx(gO,{ref:u,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"forwards"});Tk(y)}}),w.jsx(d$.Slot,{scope:n,children:w.jsx(De.ol,{tabIndex:-1,...i,ref:d})}),h&&w.jsx(gO,{ref:f,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"backwards"});Tk(y)}})]})});oZ.displayName=iZ;var aZ="ToastFocusProxy",gO=S.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=t,i=lP(aZ,n);return w.jsx($_,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&r()}})});gO.displayName=aZ;var cP="Toast",zDe="toast.swipeStart",BDe="toast.swipeMove",UDe="toast.swipeCancel",HDe="toast.swipeEnd",lZ=S.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=t,[a=!0,c]=mr({prop:r,defaultProp:s,onChange:i});return w.jsx(Kn,{present:n||a,children:w.jsx(WDe,{open:a,...o,ref:e,onClose:()=>c(!1),onPause:on(t.onPause),onResume:on(t.onResume),onSwipeStart:ye(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ye(t.onSwipeMove,u=>{const{x:f,y:l}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${l}px`)}),onSwipeCancel:ye(t.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ye(t.onSwipeEnd,u=>{const{x:f,y:l}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${l}px`),c(!1)})})})});lZ.displayName=cP;var[VDe,qDe]=rZ(cP,{onClose(){}}),WDe=S.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:c,onResume:u,onSwipeStart:f,onSwipeMove:l,onSwipeCancel:d,onSwipeEnd:p,...h}=t,m=lP(cP,n),[y,g]=S.useState(null),v=Je(e,L=>g(L)),b=S.useRef(null),_=S.useRef(null),R=s||m.duration,P=S.useRef(0),T=S.useRef(R),E=S.useRef(0),{onToastAdd:N,onToastRemove:k}=m,M=on(()=>{var U;(y==null?void 0:y.contains(document.activeElement))&&((U=m.viewport)==null||U.focus()),o()}),I=S.useCallback(L=>{!L||L===1/0||(window.clearTimeout(E.current),P.current=new Date().getTime(),E.current=window.setTimeout(M,L))},[M]);S.useEffect(()=>{const L=m.viewport;if(L){const U=()=>{I(T.current),u==null||u()},K=()=>{const H=new Date().getTime()-P.current;T.current=T.current-H,window.clearTimeout(E.current),c==null||c()};return L.addEventListener(pO,K),L.addEventListener(mO,U),()=>{L.removeEventListener(pO,K),L.removeEventListener(mO,U)}}},[m.viewport,R,c,u,I]),S.useEffect(()=>{i&&!m.isClosePausedRef.current&&I(R)},[i,R,m.isClosePausedRef,I]),S.useEffect(()=>(N(),()=>k()),[N,k]);const j=S.useMemo(()=>y?mZ(y):null,[y]);return m.viewport?w.jsxs(w.Fragment,{children:[j&&w.jsx(GDe,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:j}),w.jsx(VDe,{scope:n,onClose:M,children:rs.createPortal(w.jsx(d$.ItemSlot,{scope:n,children:w.jsx(gve,{asChild:!0,onEscapeKeyDown:ye(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||M(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(De.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...h,ref:v,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ye(t.onKeyDown,L=>{L.key==="Escape"&&(a==null||a(L.nativeEvent),L.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:ye(t.onPointerDown,L=>{L.button===0&&(b.current={x:L.clientX,y:L.clientY})}),onPointerMove:ye(t.onPointerMove,L=>{if(!b.current)return;const U=L.clientX-b.current.x,K=L.clientY-b.current.y,H=!!_.current,q=["left","right"].includes(m.swipeDirection),ee=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,se=q?ee(0,U):0,X=q?0:ee(0,K),G=L.pointerType==="touch"?10:2,Y={x:se,y:X},Q={originalEvent:L,delta:Y};H?(_.current=Y,R1(BDe,l,Q,{discrete:!1})):J5(Y,m.swipeDirection,G)?(_.current=Y,R1(zDe,f,Q,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(U)>G||Math.abs(K)>G)&&(b.current=null)}),onPointerUp:ye(t.onPointerUp,L=>{const U=_.current,K=L.target;if(K.hasPointerCapture(L.pointerId)&&K.releasePointerCapture(L.pointerId),_.current=null,b.current=null,U){const H=L.currentTarget,q={originalEvent:L,delta:U};J5(U,m.swipeDirection,m.swipeThreshold)?R1(HDe,p,q,{discrete:!0}):R1(UDe,d,q,{discrete:!0}),H.addEventListener("click",ee=>ee.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),GDe=t=>{const{__scopeToast:e,children:n,...r}=t,s=lP(cP,e),[i,o]=S.useState(!1),[a,c]=S.useState(!1);return XDe(()=>o(!0)),S.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:w.jsx(dy,{asChild:!0,children:w.jsx($_,{...r,children:i&&w.jsxs(w.Fragment,{children:[s.label," ",n]})})})},KDe="ToastTitle",cZ=S.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return w.jsx(De.div,{...r,ref:e})});cZ.displayName=KDe;var YDe="ToastDescription",uZ=S.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return w.jsx(De.div,{...r,ref:e})});uZ.displayName=YDe;var dZ="ToastAction",fZ=S.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?w.jsx(pZ,{altText:n,asChild:!0,children:w.jsx(f$,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${dZ}\`. Expected non-empty \`string\`.`),null)});fZ.displayName=dZ;var hZ="ToastClose",f$=S.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,s=qDe(hZ,n);return w.jsx(pZ,{asChild:!0,children:w.jsx(De.button,{type:"button",...r,ref:e,onClick:ye(t.onClick,s.onClose)})})});f$.displayName=hZ;var pZ=S.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...s}=t;return w.jsx(De.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:e})});function mZ(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),QDe(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...mZ(r))}}),e}function R1(t,e,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?tx(s,i):s.dispatchEvent(i)}var J5=(t,e,n=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),i=r>s;return e==="left"||e==="right"?i&&r>n:!i&&s>n};function XDe(t=()=>{}){const e=on(t);ir(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function QDe(t){return t.nodeType===t.ELEMENT_NODE}function ZDe(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Tk(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var JDe=sZ,gZ=oZ,vZ=lZ,yZ=cZ,bZ=uZ,xZ=fZ,wZ=f$;const eMe=JDe,_Z=S.forwardRef(({className:t,...e},n)=>w.jsx(gZ,{ref:n,className:ie("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));_Z.displayName=gZ.displayName;const tMe=li("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-bottom-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"success bg-green-300 text-success-foreground border-green-400 group"},position:{center:"bottom-0 mx-auto w-auto sm:bottom-0"}},defaultVariants:{variant:"default"}}),SZ=S.forwardRef(({className:t,variant:e,...n},r)=>w.jsx(vZ,{ref:r,className:ie(tMe({variant:e}),t),...n}));SZ.displayName=vZ.displayName;const nMe=S.forwardRef(({className:t,...e},n)=>w.jsx(xZ,{ref:n,className:ie("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...e}));nMe.displayName=xZ.displayName;const CZ=S.forwardRef(({className:t,...e},n)=>w.jsx(wZ,{ref:n,className:ie("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:w.jsx(sA,{className:"w-4 h-4"})}));CZ.displayName=wZ.displayName;const EZ=S.forwardRef(({className:t,...e},n)=>w.jsx(yZ,{ref:n,className:ie("text-sm font-semibold",t),...e}));EZ.displayName=yZ.displayName;const RZ=S.forwardRef(({className:t,...e},n)=>w.jsx(bZ,{ref:n,className:ie("text-sm opacity-90",t),...e}));RZ.displayName=bZ.displayName;function AZ(){const{toasts:t}=Kl();return w.jsxs(eMe,{swipeDirection:"down",children:[t.map(function({id:e,title:n,description:r,action:s,...i}){return w.jsxs(SZ,{...i,children:[w.jsxs("div",{className:"grid gap-1",children:[n&&w.jsx(EZ,{children:n}),r&&w.jsx(RZ,{children:r})]}),s,w.jsx(CZ,{})]},e)}),w.jsx(_Z,{className:"bottom-0 w-auto mx-auto sm:bottom-0 sm:left-0 sm:right-0"})]})}var rMe="Toggle",h$=S.forwardRef((t,e)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:s,...i}=t,[o=!1,a]=mr({prop:n,onChange:s,defaultProp:r});return w.jsx(De.button,{type:"button","aria-pressed":o,"data-state":o?"on":"off","data-disabled":t.disabled?"":void 0,...i,ref:e,onClick:ye(t.onClick,()=>{t.disabled||a(!o)})})});h$.displayName=rMe;var PZ=h$;const NZ=li("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),TZ=S.forwardRef(({className:t,variant:e,size:n,...r},s)=>w.jsx(PZ,{ref:s,className:ie(NZ({variant:e,size:n,className:t})),...r}));TZ.displayName=PZ.displayName;var Oy="ToggleGroup",[kZ,JUe]=In(Oy,[Xl]),DZ=Xl(),p$=oe.forwardRef((t,e)=>{const{type:n,...r}=t;if(n==="single"){const s=r;return w.jsx(sMe,{...s,ref:e})}if(n==="multiple"){const s=r;return w.jsx(iMe,{...s,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${Oy}\``)});p$.displayName=Oy;var[MZ,OZ]=kZ(Oy),sMe=oe.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...i}=t,[o,a]=mr({prop:n,defaultProp:r,onChange:s});return w.jsx(MZ,{scope:t.__scopeToggleGroup,type:"single",value:o?[o]:[],onItemActivate:a,onItemDeactivate:oe.useCallback(()=>a(""),[a]),children:w.jsx(IZ,{...i,ref:e})})}),iMe=oe.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...i}=t,[o=[],a]=mr({prop:n,defaultProp:r,onChange:s}),c=oe.useCallback(f=>a((l=[])=>[...l,f]),[a]),u=oe.useCallback(f=>a((l=[])=>l.filter(d=>d!==f)),[a]);return w.jsx(MZ,{scope:t.__scopeToggleGroup,type:"multiple",value:o,onItemActivate:c,onItemDeactivate:u,children:w.jsx(IZ,{...i,ref:e})})});p$.displayName=Oy;var[oMe,aMe]=kZ(Oy),IZ=oe.forwardRef((t,e)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:s=!0,orientation:i,dir:o,loop:a=!0,...c}=t,u=DZ(n),f=Qa(o),l={role:"group",dir:f,...c};return w.jsx(oMe,{scope:n,rovingFocus:s,disabled:r,children:s?w.jsx(A_,{asChild:!0,...u,orientation:i,dir:f,loop:a,children:w.jsx(De.div,{...l,ref:e})}):w.jsx(De.div,{...l,ref:e})})}),FE="ToggleGroupItem",jZ=oe.forwardRef((t,e)=>{const n=OZ(FE,t.__scopeToggleGroup),r=aMe(FE,t.__scopeToggleGroup),s=DZ(t.__scopeToggleGroup),i=n.value.includes(t.value),o=r.disabled||t.disabled,a={...t,pressed:i,disabled:o},c=oe.useRef(null);return r.rovingFocus?w.jsx(P_,{asChild:!0,...s,focusable:!o,active:i,ref:c,children:w.jsx(eU,{...a,ref:e})}):w.jsx(eU,{...a,ref:e})});jZ.displayName=FE;var eU=oe.forwardRef((t,e)=>{const{__scopeToggleGroup:n,value:r,...s}=t,i=OZ(FE,n),o={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},a=i.type==="single"?o:void 0;return w.jsx(h$,{...a,...s,ref:e,onPressedChange:c=>{c?i.onItemActivate(r):i.onItemDeactivate(r)}})}),LZ=p$,$Z=jZ;const FZ=S.createContext({size:"default",variant:"default"}),lMe=S.forwardRef(({className:t,variant:e,size:n,children:r,...s},i)=>w.jsx(LZ,{ref:i,className:ie("flex items-center justify-center gap-1",t),...s,children:w.jsx(FZ.Provider,{value:{variant:e,size:n},children:r})}));lMe.displayName=LZ.displayName;const cMe=S.forwardRef(({className:t,children:e,variant:n,size:r,...s},i)=>{const o=S.useContext(FZ);return w.jsx($Z,{ref:i,className:ie(NZ({variant:o.variant||n,size:o.size||r}),t),...s,children:e})});cMe.displayName=$Z.displayName;var[uP,e6e]=In("Tooltip",[Yl]),dP=Yl(),zZ="TooltipProvider",uMe=700,vO="tooltip.open",[dMe,m$]=uP(zZ),BZ=t=>{const{__scopeTooltip:e,delayDuration:n=uMe,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,[o,a]=S.useState(!0),c=S.useRef(!1),u=S.useRef(0);return S.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),w.jsx(dMe,{scope:e,isOpenDelayed:o,delayDuration:n,onOpen:S.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:S.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:S.useCallback(f=>{c.current=f},[]),disableHoverableContent:s,children:i})};BZ.displayName=zZ;var fP="Tooltip",[fMe,hP]=uP(fP),UZ=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=t,c=m$(fP,t.__scopeTooltip),u=dP(e),[f,l]=S.useState(null),d=js(),p=S.useRef(0),h=o??c.disableHoverableContent,m=a??c.delayDuration,y=S.useRef(!1),[g=!1,v]=mr({prop:r,defaultProp:s,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(vO))):c.onClose(),i==null||i(T)}}),b=S.useMemo(()=>g?y.current?"delayed-open":"instant-open":"closed",[g]),_=S.useCallback(()=>{window.clearTimeout(p.current),y.current=!1,v(!0)},[v]),R=S.useCallback(()=>{window.clearTimeout(p.current),v(!1)},[v]),P=S.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{y.current=!0,v(!0)},m)},[m,v]);return S.useEffect(()=>()=>window.clearTimeout(p.current),[]),w.jsx($A,{...u,children:w.jsx(fMe,{scope:e,contentId:d,open:g,stateAttribute:b,trigger:f,onTriggerChange:l,onTriggerEnter:S.useCallback(()=>{c.isOpenDelayed?P():_()},[c.isOpenDelayed,P,_]),onTriggerLeave:S.useCallback(()=>{h?R():window.clearTimeout(p.current)},[R,h]),onOpen:_,onClose:R,disableHoverableContent:h,children:n})})};UZ.displayName=fP;var yO="TooltipTrigger",HZ=S.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=hP(yO,n),i=m$(yO,n),o=dP(n),a=S.useRef(null),c=Je(e,a,s.onTriggerChange),u=S.useRef(!1),f=S.useRef(!1),l=S.useCallback(()=>u.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",l),[l]),w.jsx(Ay,{asChild:!0,...o,children:w.jsx(De.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:ye(t.onPointerMove,d=>{d.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),f.current=!0)}),onPointerLeave:ye(t.onPointerLeave,()=>{s.onTriggerLeave(),f.current=!1}),onPointerDown:ye(t.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",l,{once:!0})}),onFocus:ye(t.onFocus,()=>{u.current||s.onOpen()}),onBlur:ye(t.onBlur,s.onClose),onClick:ye(t.onClick,s.onClose)})})});HZ.displayName=yO;var hMe="TooltipPortal",[t6e,pMe]=uP(hMe,{forceMount:void 0}),Zv="TooltipContent",VZ=S.forwardRef((t,e)=>{const n=pMe(Zv,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=t,o=hP(Zv,t.__scopeTooltip);return w.jsx(Kn,{present:r||o.open,children:o.disableHoverableContent?w.jsx(qZ,{side:s,...i,ref:e}):w.jsx(mMe,{side:s,...i,ref:e})})}),mMe=S.forwardRef((t,e)=>{const n=hP(Zv,t.__scopeTooltip),r=m$(Zv,t.__scopeTooltip),s=S.useRef(null),i=Je(e,s),[o,a]=S.useState(null),{trigger:c,onClose:u}=n,f=s.current,{onPointerInTransitChange:l}=r,d=S.useCallback(()=>{a(null),l(!1)},[l]),p=S.useCallback((h,m)=>{const y=h.currentTarget,g={x:h.clientX,y:h.clientY},v=bMe(g,y.getBoundingClientRect()),b=xMe(g,v),_=wMe(m.getBoundingClientRect()),R=SMe([...b,..._]);a(R),l(!0)},[l]);return S.useEffect(()=>()=>d(),[d]),S.useEffect(()=>{if(c&&f){const h=y=>p(y,f),m=y=>p(y,c);return c.addEventListener("pointerleave",h),f.addEventListener("pointerleave",m),()=>{c.removeEventListener("pointerleave",h),f.removeEventListener("pointerleave",m)}}},[c,f,p,d]),S.useEffect(()=>{if(o){const h=m=>{const y=m.target,g={x:m.clientX,y:m.clientY},v=(c==null?void 0:c.contains(y))||(f==null?void 0:f.contains(y)),b=!_Me(g,o);v?d():b&&(d(),u())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[c,f,o,u,d]),w.jsx(qZ,{...t,ref:i})}),[gMe,vMe]=uP(fP,{isInside:!1}),qZ=S.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,c=hP(Zv,n),u=dP(n),{onClose:f}=c;return S.useEffect(()=>(document.addEventListener(vO,f),()=>document.removeEventListener(vO,f)),[f]),S.useEffect(()=>{if(c.trigger){const l=d=>{const p=d.target;p!=null&&p.contains(c.trigger)&&f()};return window.addEventListener("scroll",l,{capture:!0}),()=>window.removeEventListener("scroll",l,{capture:!0})}},[c.trigger,f]),w.jsx(Ru,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:l=>l.preventDefault(),onDismiss:f,children:w.jsxs(E_,{"data-state":c.stateAttribute,...u,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[w.jsx(aL,{children:r}),w.jsx(gMe,{scope:n,isInside:!0,children:w.jsx(X9,{id:c.contentId,role:"tooltip",children:s||r})})]})})});VZ.displayName=Zv;var WZ="TooltipArrow",yMe=S.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=dP(n);return vMe(WZ,n).isInside?null:w.jsx(R_,{...s,...r,ref:e})});yMe.displayName=WZ;function bMe(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function xMe(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function wMe(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}function _Me(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,o=e.length-1;i r!=f>r&&n<(u-a)*(r-c)/(f-c)+a&&(s=!s)}return s}function SMe(t){const e=t.slice();return e.sort((n,r)=>n.x r.x?1:n.y r.y?1:0),CMe(e)}function CMe(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r =2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var EMe=BZ,RMe=UZ,AMe=HZ,GZ=VZ;const PMe=EMe,Kf=RMe,Yf=AMe,ud=S.forwardRef(({className:t,sideOffset:e=4,...n},r)=>w.jsx(GZ,{ref:r,sideOffset:e,className:ie("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n}));ud.displayName=GZ.displayName;const KZ=({isOpen:t,onCancel:e,onConfirm:n,title:r,description:s,cancelLabel:i,confirmLabel:o})=>w.jsx(RL,{open:t,children:w.jsxs(uA,{children:[w.jsxs(dA,{children:[w.jsx(hA,{children:r}),w.jsx(pA,{children:s})]}),w.jsxs(fA,{children:[w.jsx(gA,{children:w.jsx(Yc,{to:"#",onClick:e,children:i})}),w.jsx(mA,{children:w.jsx(Yc,{to:"#",onClick:n,children:o})})]})]})}),NMe={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class zE{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||NMe,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),r=0;r {this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s {let[a,c]=o;for(let u=0;u {let[a,c]=o;for(let u=0;u {t=r,e=s});return n.resolve=t,n.reject=e,n}function tU(t){return t==null?"":""+t}function TMe(t,e,n){t.forEach(r=>{e[r]&&(n[r]=e[r])})}const kMe=/###/g;function S0(t,e,n){function r(a){return a&&a.indexOf("###")>-1?a.replace(kMe,"."):a}function s(){return!t||typeof t=="string"}const i=typeof e!="string"?e:e.split(".");let o=0;for(;o ":">",'"':""","'":"'","/":"/"};function IMe(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>OMe[e]):t}class jMe{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const LMe=[" ",",","?","!",";"],$Me=new jMe(20);function FMe(t,e,n){e=e||"",n=n||"";const r=LMe.filter(o=>e.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const s=$Me.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let i=!s.test(t);if(!i){const o=t.indexOf(n);o>0&&!s.test(t.substring(0,o))&&(i=!0)}return i}function bO(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const r=e.split(n);let s=t;for(let i=0;i -1&&c 0?t.replace("_","-"):t}class rU extends pP{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,n],r&&(Array.isArray(r)?a.push(...r):typeof r=="string"&&i?a.push(...r.split(i)):a.push(r)));const c=BE(this.data,a);return!c&&!n&&!r&&e.indexOf(".")>-1&&(e=a[0],n=a[1],r=a.slice(2).join(".")),c||!o||typeof r!="string"?c:bO(this.data&&this.data[e]&&this.data[e][n],r,i)}addResource(e,n,r,s){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[e,n];r&&(a=a.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(a=e.split("."),s=n,n=a[1]),this.addNamespaces(n),nU(this.data,a,s),i.silent||this.emit("added",e,n,r,s)}addResources(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(typeof r[i]=="string"||Array.isArray(r[i]))&&this.addResource(e,n,i,r[i],{silent:!0});s.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,s,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[e,n];e.indexOf(".")>-1&&(a=e.split("."),s=r,r=n,n=a[1]),this.addNamespaces(n);let c=BE(this.data,a)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?YZ(c,r,i):c={...c,...r},nU(this.data,a,c),o.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var XZ={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,s){return t.forEach(i=>{this.processors[i]&&(e=this.processors[i].process(e,n,r,s))}),e}};const sU={};class HE extends pP{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),TMe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ol.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const r=this.resolve(e,n);return r&&r.res!==void 0}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const o=r&&e.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!FMe(e,r,s);if(o&&!a){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:i};const u=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),e=u.join(s)}return typeof i=="string"&&(i=[i]),{key:e,namespaces:i}}translate(e,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],n),c=a[a.length-1],u=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(f){const _=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${_}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${_}${o}`}return s?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:o}const l=this.resolve(e,n);let d=l&&l.res;const p=l&&l.usedKey||o,h=l&&l.exactUsedKey||o,m=Object.prototype.toString.apply(d),y=["[object Number]","[object Function]","[object RegExp]"],g=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject;if(v&&d&&(typeof d!="string"&&typeof d!="boolean"&&typeof d!="number")&&y.indexOf(m)<0&&!(typeof g=="string"&&Array.isArray(d))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,d,{...n,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return s?(l.res=_,l.usedParams=this.getUsedParamsDetails(n),l):_}if(i){const _=Array.isArray(d),R=_?[]:{},P=_?h:p;for(const T in d)if(Object.prototype.hasOwnProperty.call(d,T)){const E=`${P}${i}${T}`;R[T]=this.translate(E,{...n,joinArrays:!1,ns:a}),R[T]===E&&(R[T]=d[T])}d=R}}else if(v&&typeof g=="string"&&Array.isArray(d))d=d.join(g),d&&(d=this.extendTranslation(d,e,n,r));else{let _=!1,R=!1;const P=n.count!==void 0&&typeof n.count!="string",T=HE.hasDefaultValue(n),E=P?this.pluralResolver.getSuffix(u,n.count,n):"",N=n.ordinal&&P?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",k=P&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),M=k&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${E}`]||n[`defaultValue${N}`]||n.defaultValue;!this.isValidLookup(d)&&T&&(_=!0,d=M),this.isValidLookup(d)||(R=!0,d=o);const j=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&R?void 0:d,L=T&&M!==d&&this.options.updateMissing;if(R||_||L){if(this.logger.log(L?"updateKey":"missingKey",u,c,o,L?M:d),i){const q=this.resolve(o,{...n,keySeparator:!1});q&&q.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const K=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&K&&K[0])for(let q=0;q {const X=T&&se!==d?se:j;this.options.missingKeyHandler?this.options.missingKeyHandler(q,c,ee,X,L,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(q,c,ee,X,L,n),this.emit("missingKey",q,c,ee,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&P?U.forEach(q=>{const ee=this.pluralResolver.getSuffixes(q,n);k&&n[`defaultValue${this.options.pluralSeparator}zero`]&&ee.indexOf(`${this.options.pluralSeparator}zero`)<0&&ee.push(`${this.options.pluralSeparator}zero`),ee.forEach(se=>{H([q],o+se,n[`defaultValue${se}`]||M)})}):H(U,o,M))}d=this.extendTranslation(d,e,n,l,r),R&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${c}:${o}`),(R||_)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${o}`:o,_?d:void 0):d=this.options.parseMissingKeyHandler(d))}return s?(l.res=d,l.usedParams=this.getUsedParamsDetails(n),l):d}extendTranslation(e,n,r,s,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof e=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(u){const d=e.match(this.interpolator.nestingRegexp);f=d&&d.length}let l=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,r.lng||this.language||s.usedLng,r),u){const d=e.match(this.interpolator.nestingRegexp),p=d&&d.length;f 1&&arguments[1]!==void 0?arguments[1]:{},r,s,i,o,a;return typeof e=="string"&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(c,n),f=u.key;s=f;let l=u.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const d=n.count!==void 0&&typeof n.count!="string",p=d&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),h=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);l.forEach(y=>{this.isValidLookup(r)||(a=y,!sU[`${m[0]}-${y}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(sU[`${m[0]}-${y}`]=!0,this.logger.warn(`key "${s}" for languages "${m.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(g=>{if(this.isValidLookup(r))return;o=g;const v=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(v,f,g,y,n);else{let _;d&&(_=this.pluralResolver.getSuffix(g,n.count,n));const R=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(v.push(f+_),n.ordinal&&_.indexOf(P)===0&&v.push(f+_.replace(P,this.options.pluralSeparator)),p&&v.push(f+R)),h){const T=`${f}${this.options.contextSeparator}${n.context}`;v.push(T),d&&(v.push(T+_),n.ordinal&&_.indexOf(P)===0&&v.push(T+_.replace(P,this.options.pluralSeparator)),p&&v.push(T+R))}}let b;for(;b=v.pop();)this.isValidLookup(r)||(i=b,r=this.getResource(g,y,b,n))}))})}),{res:r,usedKey:s,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,r,s):this.resourceStore.getResource(e,n,r,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&typeof e.replace!="string";let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const i of n)delete s[i]}return s}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}function kk(t){return t.charAt(0).toUpperCase()+t.slice(1)}class iU{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ol.create("languageUtils")}getScriptPartFromCode(e){if(e=UE(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=UE(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=e.split("-");return this.options.lowerCaseLng?r=r.map(s=>s.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=kk(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=kk(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=kk(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(i=>{if(i===s)return i;if(!(i.indexOf("-")<0&&s.indexOf("-")<0)&&(i.indexOf("-")>0&&s.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===s||i.indexOf(s)===0&&s.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),typeof e=="string"&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],e),s=[],i=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):typeof e=="string"&&i(this.formatLanguageCode(e)),r.forEach(o=>{s.indexOf(o)<0&&i(this.formatLanguageCode(o))}),s}}let zMe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],BMe={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}};const UMe=["v1","v2","v3"],HMe=["v4"],oU={zero:0,one:1,two:2,few:3,many:4,other:5};function VMe(){const t={};return zMe.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:BMe[e.fc]}})}),t}class qMe{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=Ol.create("pluralResolver"),(!this.options.compatibilityJSON||HMe.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=VMe()}addRule(e,n){this.rules[e]=n}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(UE(e==="dev"?"en":e),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(s=>`${n}${s}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((s,i)=>oU[s]-oU[i]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):r.numbers.map(s=>this.getSuffix(e,s,n)):[]}getSuffix(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(e,r);return s?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:this.getSuffixRetroCompatible(s,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const r=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let s=e.numbers[r];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const i=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!UMe.includes(this.options.compatibilityJSON)}}function aU(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=MMe(t,e,n);return!i&&s&&typeof n=="string"&&(i=bO(t,n,r),i===void 0&&(i=bO(e,n,r))),i}class WMe{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Ol.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:c,formatSeparator:u,unescapeSuffix:f,unescapePrefix:l,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:h,nestingSuffixEscaped:m,nestingOptionsSeparator:y,maxReplaces:g,alwaysFormat:v}=e.interpolation;this.escape=n!==void 0?n:IMe,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?Am(i):o||"{{",this.suffix=a?Am(a):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=f?"":l||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=d?Am(d):p||Am("$t("),this.nestingSuffix=h?Am(h):m||Am(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=g||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,r,s){let i,o,a;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(h){return h.replace(/\$/g,"$$$$")}const f=h=>{if(h.indexOf(this.formatSeparator)<0){const v=aU(n,c,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,r,{...s,...n,interpolationkey:h}):v}const m=h.split(this.formatSeparator),y=m.shift().trim(),g=m.join(this.formatSeparator).trim();return this.format(aU(n,c,y,this.options.keySeparator,this.options.ignoreJSONStructure),g,r,{...s,...n,interpolationkey:y})};this.resetRegExp();const l=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,d=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>u(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?u(this.escape(h)):u(h)}].forEach(h=>{for(a=0;i=h.regex.exec(e);){const m=i[1].trim();if(o=f(m),o===void 0)if(typeof l=="function"){const g=l(e,i,s);o=typeof g=="string"?g:""}else if(s&&Object.prototype.hasOwnProperty.call(s,m))o="";else if(d){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=tU(o));const y=h.safeValue(o);if(e=e.replace(i[0],y),d?(h.regex.lastIndex+=o.length,h.regex.lastIndex-=i[0].length):h.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,i,o;function a(c,u){const f=this.nestingOptionsSeparator;if(c.indexOf(f)<0)return c;const l=c.split(new RegExp(`${f}[ ]*{`));let d=`{${l[1]}`;c=l[0],d=this.interpolate(d,o);const p=d.match(/'/g),h=d.match(/"/g);(p&&p.length%2===0&&!h||h.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),u&&(o={...u,...o})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,m),`${c}${f}${d}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,c}for(;s=this.nestingRegexp.exec(e);){let c=[];o={...r},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const f=s[1].split(this.formatSeparator).map(l=>l.trim());s[1]=f.shift(),c=f,u=!0}if(i=n(a.call(this,s[1].trim(),o),o),i&&s[0]===e&&typeof i!="string")return i;typeof i!="string"&&(i=tU(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),i=""),u&&(i=c.reduce((f,l)=>this.format(f,l,r.lng,{...r,interpolationkey:s[1].trim()}),i.trim())),e=e.replace(s[0],i),this.regexp.lastIndex=0}return e}}function GMe(t){let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(o=>{if(o){const[a,...c]=o.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),f=a.trim();n[f]||(n[f]=u),u==="false"&&(n[f]=!1),u==="true"&&(n[f]=!0),isNaN(u)||(n[f]=parseInt(u,10))}})}return{formatName:e,formatOptions:n}}function Pm(t){const e={};return function(r,s,i){const o=s+JSON.stringify(i);let a=e[o];return a||(a=t(UE(s),i),e[o]=a),a(r)}}class KMe{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Ol.create("formatter"),this.options=e,this.formats={number:Pm((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return i=>s.format(i)}),currency:Pm((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>s.format(i)}),datetime:Pm((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return i=>s.format(i)}),relativetime:Pm((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return i=>s.format(i,r.range||"day")}),list:Pm((n,r)=>{const s=new Intl.ListFormat(n,{...r});return i=>s.format(i)})},this.init(e)}init(e){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=Pm(n)}format(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((a,c)=>{const{formatName:u,formatOptions:f}=GMe(c);if(this.formats[u]){let l=a;try{const d=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},p=d.locale||d.lng||s.locale||s.lng||r;l=this.formats[u](a,p,{...f,...s,...d})}catch(d){this.logger.warn(d)}return l}else this.logger.warn(`there was no format function for ${u}`);return a},e)}}function YMe(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}class XMe extends pP{constructor(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=Ol.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,s.backend,s)}queueLoad(e,n,r,s){const i={},o={},a={},c={};return e.forEach(u=>{let f=!0;n.forEach(l=>{const d=`${u}|${l}`;!r.reload&&this.store.hasResourceBundle(u,l)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,f=!1,o[d]===void 0&&(o[d]=!0),i[d]===void 0&&(i[d]=!0),c[l]===void 0&&(c[l]=!0)))}),f||(a[u]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(c)}}loaded(e,n,r){const s=e.split("|"),i=s[0],o=s[1];n&&this.emit("failedLoading",i,o,n),r&&this.store.addResourceBundle(i,o,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2;const a={};this.queue.forEach(c=>{DMe(c.loaded,[i],o),YMe(c,e),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{a[u]||(a[u]={});const f=c.loaded[u];f.length&&f.forEach(l=>{a[u][l]===void 0&&(a[u][l]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(c=>!c.done)}read(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:s,wait:i,callback:o});return}this.readingCalls++;const a=(u,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const l=this.waitingReads.shift();this.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}if(u&&f&&s
{this.read.call(this,e,n,r,s+1,i*2,o)},i);return}o(u,f)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const u=c(e,n);u&&typeof u.then=="function"?u.then(f=>a(null,f)).catch(a):a(null,u)}catch(u){a(u)}return}return c(e,n,a)}prepareLoading(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const i=this.queueLoad(e,n,r,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),s=r[0],i=r[1];this.read(s,i,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${n}loading namespace ${i} for language ${s} failed`,o),!o&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${s}`,a),this.loaded(e,o,a)})}saveMissing(e,n,r,s,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const c={...o,isUpdate:i},u=this.backend.create.bind(this.backend);if(u.length<6)try{let f;u.length===5?f=u(e,n,r,s,c):f=u(e,n,r,s),f&&typeof f.then=="function"?f.then(l=>a(null,l)).catch(a):a(null,f)}catch(f){a(f)}else u(e,n,r,s,a,c)}!e||!e[0]||this.store.addResource(e[0],n,r,s)}}}function lU(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let n={};if(typeof e[1]=="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(s=>{n[s]=r[s]})}return n},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function cU(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function A1(){}function QMe(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}class gx extends pP{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=cU(e),this.services={},this.logger=Ol,this.modules={external:[]},QMe(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=lU();this.options={...s,...this.options,...cU(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function i(f){return f?typeof f=="function"?new f:f:null}if(!this.options.isClone){this.modules.logger?Ol.init(i(this.modules.logger),this.options):Ol.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=KMe);const l=new iU(this.options);this.store=new rU(this.options.resources,this.options);const d=this.services;d.logger=Ol,d.resourceStore=this.store,d.languageUtils=l,d.pluralResolver=new qMe(l,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(d.formatter=i(f),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new WMe(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new XMe(i(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(p){for(var h=arguments.length,m=new Array(h>1?h-1:0),y=1;y 1?h-1:0),y=1;y {p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=A1),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return e.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return e.store[f](...arguments),e}});const c=Rb(),u=()=>{const f=(l,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(d),r(l,d)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}loadResources(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:A1;const s=typeof e=="string"?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&i.indexOf(u)<0&&i.push(u)})};s?o(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>o(c)),this.options.preload&&this.options.preload.forEach(a=>o(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(e,n,r){const s=Rb();return e||(e=this.languages),n||(n=this.options.ns),r||(r=A1),this.services.backendConnector.reload(e,n,i=>{s.resolve(),r(i)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&XZ.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n -1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,n){var r=this;this.isLanguageChangingTo=e;const s=Rb();this.emit("languageChanging",e);const i=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},o=(c,u)=>{u?(i(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},a=c=>{!e&&!c&&this.services.languageDetector&&(c=[]);const u=typeof c=="string"?c:this.services.languageUtils.getBestMatchFromCodes(c);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,f=>{o(f,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),s}getFixedT(e,n,r){var s=this;const i=function(o,a){let c;if(typeof a!="object"){for(var u=arguments.length,f=new Array(u>2?u-2:0),l=2;l`${c.keyPrefix}${d}${h}`):p=c.keyPrefix?`${c.keyPrefix}${d}${o}`:o,s.t(p,c)};return typeof e=="string"?i.lng=e:i.lngs=e,i.ns=n,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(a,c)=>{const u=this.services.backendConnector.state[`${a}|${c}`];return u===-1||u===2};if(n.precheck){const a=n.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,e)&&(!s||o(i,e)))}loadNamespaces(e,n){const r=Rb();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=Rb();typeof e=="string"&&(e=[e]);const s=this.options.preload||[],i=e.filter(o=>s.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return i.length?(this.options.preload=s.concat(i),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new iU(lU());return n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new gx(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:A1;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},i=new gx(s);return(e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new rU(this.store.data,s),i.services.resourceStore=i.store),i.translator=new HE(i.services,s),i.translator.on("*",function(a){for(var c=arguments.length,u=new Array(c>1?c-1:0),f=1;f {const[e,n]=S.useState(!1),[r,s]=S.useState({title:"Título",description:"Descripción",cancelLabel:te("common.no"),confirmLabel:te("common.yes"),onCancel:()=>{},onConfirm:()=>{},...t}),i=(u,f)=>{u==null||u.preventDefault(),f&&s(f),n(!0)},o=u=>{u==null||u.preventDefault(),n(!1),r==null||r.onCancel(u)},a=u=>{u==null||u.preventDefault(),n(!1),r==null||r.onConfirm(u)},c=r?w.jsx(KZ,{isOpen:e,onCancel:o,onConfirm:a,title:r.title,description:r.description,cancelLabel:r.cancelLabel,confirmLabel:r.confirmLabel}):w.jsx(w.Fragment,{});return{openDialog:i,cancelDialog:o,confirmDialog:a,DialogComponent:c}};var QZ={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(self,()=>{return n={7629:(s,i,o)=>{const a=o(375),c=o(8571),u=o(9474),f=o(1687),l=o(8652),d=o(8160),p=o(3292),h=o(6354),m=o(8901),y=o(9708),g=o(6914),v=o(2294),b=o(6133),_=o(1152),R=o(8863),P=o(2036),T={Base:class{constructor(E){this.type=E,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new v.Ids,this._preferences=null,this._refs=new b.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return a(typeof y.describe=="function","Manifest functionality disabled"),y.describe(this)}allow(...E){return d.verifyFlat(E,"allow"),this._values(E,"_valids")}alter(E){a(E&&typeof E=="object"&&!Array.isArray(E),"Invalid targets argument"),a(!this._inRuleset(),"Cannot set alterations inside a ruleset");const N=this.clone();N.$_terms.alterations=N.$_terms.alterations||[];for(const k in E){const M=E[k];a(typeof M=="function","Alteration adjuster for",k,"must be a function"),N.$_terms.alterations.push({target:k,adjuster:M})}return N.$_temp.ruleset=!1,N}artifact(E){return a(E!==void 0,"Artifact cannot be undefined"),a(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",E)}cast(E){return a(E===!1||typeof E=="string","Invalid to value"),a(E===!1||this._definition.cast[E],"Type",this.type,"does not support casting to",E),this.$_setFlag("cast",E===!1?void 0:E)}default(E,N){return this._default("default",E,N)}description(E){return a(E&&typeof E=="string","Description must be a non-empty string"),this.$_setFlag("description",E)}empty(E){const N=this.clone();return E!==void 0&&(E=N.$_compile(E,{override:!1})),N.$_setFlag("empty",E,{clone:!1})}error(E){return a(E,"Missing error"),a(E instanceof Error||typeof E=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",E)}example(E,N={}){return a(E!==void 0,"Missing example"),d.assertOptions(N,["override"]),this._inner("examples",E,{single:!0,override:N.override})}external(E,N){return typeof E=="object"&&(a(!N,"Cannot combine options with description"),N=E.description,E=E.method),a(typeof E=="function","Method must be a function"),a(N===void 0||N&&typeof N=="string","Description must be a non-empty string"),this._inner("externals",{method:E,description:N},{single:!0})}failover(E,N){return this._default("failover",E,N)}forbidden(){return this.presence("forbidden")}id(E){return E?(a(typeof E=="string","id must be a non-empty string"),a(/^[^\.]+$/.test(E),"id cannot contain period character"),this.$_setFlag("id",E)):this.$_setFlag("id",void 0)}invalid(...E){return this._values(E,"_invalids")}label(E){return a(E&&typeof E=="string","Label name must be a non-empty string"),this.$_setFlag("label",E)}meta(E){return a(E!==void 0,"Meta cannot be undefined"),this._inner("metas",E,{single:!0})}note(...E){a(E.length,"Missing notes");for(const N of E)a(N&&typeof N=="string","Notes must be non-empty strings");return this._inner("notes",E)}only(E=!0){return a(typeof E=="boolean","Invalid mode:",E),this.$_setFlag("only",E)}optional(){return this.presence("optional")}prefs(E){a(E,"Missing preferences"),a(E.context===void 0,"Cannot override context"),a(E.externals===void 0,"Cannot override externals"),a(E.warnings===void 0,"Cannot override warnings"),a(E.debug===void 0,"Cannot override debug"),d.checkPreferences(E);const N=this.clone();return N._preferences=d.preferences(N._preferences,E),N}presence(E){return a(["optional","required","forbidden"].includes(E),"Unknown presence mode",E),this.$_setFlag("presence",E)}raw(E=!0){return this.$_setFlag("result",E?"raw":void 0)}result(E){return a(["raw","strip"].includes(E),"Unknown result mode",E),this.$_setFlag("result",E)}required(){return this.presence("required")}strict(E){const N=this.clone(),k=E!==void 0&&!E;return N._preferences=d.preferences(N._preferences,{convert:k}),N}strip(E=!0){return this.$_setFlag("result",E?"strip":void 0)}tag(...E){a(E.length,"Missing tags");for(const N of E)a(N&&typeof N=="string","Tags must be non-empty strings");return this._inner("tags",E)}unit(E){return a(E&&typeof E=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",E)}valid(...E){d.verifyFlat(E,"valid");const N=this.allow(...E);return N.$_setFlag("only",!!N._valids,{clone:!1}),N}when(E,N){const k=this.clone();k.$_terms.whens||(k.$_terms.whens=[]);const M=p.when(k,E,N);if(!["any","link"].includes(k.type)){const I=M.is?[M]:M.switch;for(const j of I)a(!j.then||j.then.type==="any"||j.then.type===k.type,"Cannot combine",k.type,"with",j.then&&j.then.type),a(!j.otherwise||j.otherwise.type==="any"||j.otherwise.type===k.type,"Cannot combine",k.type,"with",j.otherwise&&j.otherwise.type)}return k.$_terms.whens.push(M),k.$_mutateRebuild()}cache(E){a(!this._inRuleset(),"Cannot set caching inside a ruleset"),a(!this._cache,"Cannot override schema cache"),a(this._flags.artifact===void 0,"Cannot cache a rule with an artifact");const N=this.clone();return N._cache=E||l.provider.provision(),N.$_temp.ruleset=!1,N}clone(){const E=Object.create(Object.getPrototypeOf(this));return this._assign(E)}concat(E){a(d.isSchema(E),"Invalid schema object"),a(this.type==="any"||E.type==="any"||E.type===this.type,"Cannot merge type",this.type,"with another type:",E.type),a(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),a(!E._inRuleset(),"Cannot concatenate a schema with open ruleset");let N=this.clone();if(this.type==="any"&&E.type!=="any"){const k=E.clone();for(const M of Object.keys(N))M!=="type"&&(k[M]=N[M]);N=k}N._ids.concat(E._ids),N._refs.register(E,b.toSibling),N._preferences=N._preferences?d.preferences(N._preferences,E._preferences):E._preferences,N._valids=P.merge(N._valids,E._valids,E._invalids),N._invalids=P.merge(N._invalids,E._invalids,E._valids);for(const k of E._singleRules.keys())N._singleRules.has(k)&&(N._rules=N._rules.filter(M=>M.keep||M.name!==k),N._singleRules.delete(k));for(const k of E._rules)E._definition.rules[k.method].multi||N._singleRules.set(k.name,k),N._rules.push(k);if(N._flags.empty&&E._flags.empty){N._flags.empty=N._flags.empty.concat(E._flags.empty);const k=Object.assign({},E._flags);delete k.empty,f(N._flags,k)}else if(E._flags.empty){N._flags.empty=E._flags.empty;const k=Object.assign({},E._flags);delete k.empty,f(N._flags,k)}else f(N._flags,E._flags);for(const k in E.$_terms){const M=E.$_terms[k];M?N.$_terms[k]?N.$_terms[k]=N.$_terms[k].concat(M):N.$_terms[k]=M.slice():N.$_terms[k]||(N.$_terms[k]=M)}return this.$_root._tracer&&this.$_root._tracer._combine(N,[this,E]),N.$_mutateRebuild()}extend(E){return a(!E.base,"Cannot extend type with another base"),m.type(this,E)}extract(E){return E=Array.isArray(E)?E:E.split("."),this._ids.reach(E)}fork(E,N){a(!this._inRuleset(),"Cannot fork inside a ruleset");let k=this;for(let M of[].concat(E))M=Array.isArray(M)?M:M.split("."),k=k._ids.fork(M,N,k);return k.$_temp.ruleset=!1,k}rule(E){const N=this._definition;d.assertOptions(E,Object.keys(N.modifiers)),a(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const k=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;a(k>=0&&k k.tailor(E),ref:!1}),N.$_temp.ruleset=!1,N.$_mutateRebuild()}tracer(){return _.location?_.location(this):this}validate(E,N){return R.entry(E,this,N)}validateAsync(E,N){return R.entryAsync(E,this,N)}$_addRule(E){typeof E=="string"&&(E={name:E}),a(E&&typeof E=="object","Invalid options"),a(E.name&&typeof E.name=="string","Invalid rule name");for(const j in E)a(j[0]!=="_","Cannot set private rule properties");const N=Object.assign({},E);N._resolve=[],N.method=N.method||N.name;const k=this._definition.rules[N.method],M=N.args;a(k,"Unknown rule",N.method);const I=this.clone();if(M){a(Object.keys(M).length===1||Object.keys(M).length===this._definition.rules[N.name].args.length,"Invalid rule definition for",this.type,N.name);for(const j in M){let L=M[j];if(k.argsByName){const U=k.argsByName.get(j);if(U.ref&&d.isResolvable(L))N._resolve.push(j),I.$_mutateRegister(L);else if(U.normalize&&(L=U.normalize(L),M[j]=L),U.assert){const K=d.validateArg(L,j,U);a(!K,K,"or reference")}}L!==void 0?M[j]=L:delete M[j]}}return k.multi||(I._ruleRemove(N.name,{clone:!1}),I._singleRules.set(N.name,N)),I.$_temp.ruleset===!1&&(I.$_temp.ruleset=null),k.priority?I._rules.unshift(N):I._rules.push(N),I}$_compile(E,N){return p.schema(this.$_root,E,N)}$_createError(E,N,k,M,I,j={}){const L=j.flags!==!1?this._flags:{},U=j.messages?g.merge(this._definition.messages,j.messages):this._definition.messages;return new h.Report(E,N,k,L,U,M,I)}$_getFlag(E){return this._flags[E]}$_getRule(E){return this._singleRules.get(E)}$_mapLabels(E){return E=Array.isArray(E)?E:E.split("."),this._ids.labels(E)}$_match(E,N,k,M){(k=Object.assign({},k)).abortEarly=!0,k._externals=!1,N.snapshot();const I=!R.validate(E,this,N,k,M).errors;return N.restore(),I}$_modify(E){return d.assertOptions(E,["each","once","ref","schema"]),v.schema(this,E)||this}$_mutateRebuild(){return a(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(E,{source:N,name:k,path:M,key:I})=>{const j=this._definition[N][k]&&this._definition[N][k].register;j!==!1&&this.$_mutateRegister(E,{family:j,key:I})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(E,{family:N,key:k}={}){this._refs.register(E,N),this._ids.register(E,{key:k})}$_property(E){return this._definition.properties[E]}$_reach(E){return this._ids.reach(E)}$_rootReferences(){return this._refs.roots()}$_setFlag(E,N,k={}){a(E[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const M=this._definition.flags[E]||{};if(u(N,M.default)&&(N=void 0),u(N,this._flags[E]))return this;const I=k.clone!==!1?this.clone():this;return N!==void 0?(I._flags[E]=N,I.$_mutateRegister(N)):delete I._flags[E],E[0]!=="_"&&(I.$_temp.ruleset=!1),I}$_parent(E,...N){return this[E][d.symbols.parent].call(this,...N)}$_validate(E,N,k){return R.validate(E,this,N,k)}_assign(E){E.type=this.type,E.$_root=this.$_root,E.$_temp=Object.assign({},this.$_temp),E.$_temp.whens={},E._ids=this._ids.clone(),E._preferences=this._preferences,E._valids=this._valids&&this._valids.clone(),E._invalids=this._invalids&&this._invalids.clone(),E._rules=this._rules.slice(),E._singleRules=c(this._singleRules,{shallow:!0}),E._refs=this._refs.clone(),E._flags=Object.assign({},this._flags),E._cache=null,E.$_terms={};for(const N in this.$_terms)E.$_terms[N]=this.$_terms[N]?this.$_terms[N].slice():null;E.$_super={};for(const N in this.$_super)E.$_super[N]=this._super[N].bind(E);return E}_bare(){const E=this.clone();E._reset();const N=E._definition.terms;for(const k in N){const M=N[k];E.$_terms[k]=M.init}return E.$_mutateRebuild()}_default(E,N,k={}){return d.assertOptions(k,"literal"),a(N!==void 0,"Missing",E,"value"),a(typeof N=="function"||!k.literal,"Only function value supports literal option"),typeof N=="function"&&k.literal&&(N={[d.symbols.literal]:!0,literal:N}),this.$_setFlag(E,N)}_generate(E,N,k){if(!this.$_terms.whens)return{schema:this};const M=[],I=[];for(let U=0;U ee)break}const j=I.join(", ");if(N.mainstay.tracer.debug(N,"rule","when",j),!j)return{schema:this};if(!N.mainstay.tracer.active&&this.$_temp.whens[j])return{schema:this.$_temp.whens[j],id:j};let L=this;this._definition.generate&&(L=this._definition.generate(this,E,N,k));for(const U of M)L=L.concat(U);return this.$_root._tracer&&this.$_root._tracer._combine(L,[this,...M]),this.$_temp.whens[j]=L,{schema:L,id:j}}_inner(E,N,k={}){a(!this._inRuleset(),`Cannot set ${E} inside a ruleset`);const M=this.clone();return M.$_terms[E]&&!k.override||(M.$_terms[E]=[]),k.single?M.$_terms[E].push(N):M.$_terms[E].push(...N),M.$_temp.ruleset=!1,M}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(E,N={}){if(!this._singleRules.has(E))return this;const k=N.clone!==!1?this.clone():this;k._singleRules.delete(E);const M=[];for(let I=0;I {const a=o(375),c=o(8571),u=o(8160),f={max:1e3,supported:new Set(["undefined","boolean","number","string"])};i.provider={provision:l=>new f.Cache(l)},f.Cache=class{constructor(l={}){u.assertOptions(l,["max"]),a(l.max===void 0||l.max&&l.max>0&&isFinite(l.max),"Invalid max cache size"),this._max=l.max||f.max,this._map=new Map,this._list=new f.List}get length(){return this._map.size}set(l,d){if(l!==null&&!f.supported.has(typeof l))return;let p=this._map.get(l);if(p)return p.value=d,void this._list.first(p);p=this._list.unshift({key:l,value:d}),this._map.set(l,p),this._compact()}get(l){const d=this._map.get(l);if(d)return this._list.first(d),c(d.value)}_compact(){if(this._map.size>this._max){const l=this._list.pop();this._map.delete(l.key)}}},f.List=class{constructor(){this.tail=null,this.head=null}unshift(l){return l.next=null,l.prev=this.head,this.head&&(this.head.next=l),this.head=l,this.tail||(this.tail=l),l}first(l){l!==this.head&&(this._remove(l),this.unshift(l))}pop(){return this._remove(this.tail)}_remove(l){const{next:d,prev:p}=l;return d.prev=p,p&&(p.next=d),l===this.tail&&(this.tail=d),l.prev=null,l.next=null,l}}},8160:(s,i,o)=>{const a=o(375),c=o(7916),u=o(5934);let f,l;const d={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};i.version=u.version,i.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:"iso",errors:{escapeHtml:!1,label:"path",language:null,render:!0,stack:!1,wrap:{label:'"',array:"[]"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:"optional",skipFunctions:!1,stripUnknown:!1,warnings:!1},i.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")},i.assertOptions=function(p,h,m="Options"){a(p&&typeof p=="object"&&!Array.isArray(p),"Options must be of type object");const y=Object.keys(p).filter(g=>!h.includes(g));a(y.length===0,`${m} contain unknown keys: ${y}`)},i.checkPreferences=function(p){l=l||o(3378);const h=l.preferences.validate(p);if(h.error)throw new c([h.error.details[0].message])},i.compare=function(p,h,m){switch(m){case"=":return p===h;case">":return p>h;case"<":return p =":return p>=h;case"<=":return p<=h}},i.default=function(p,h){return p===void 0?h:p},i.isIsoDate=function(p){return d.isoDate.test(p)},i.isNumber=function(p){return typeof p=="number"&&!isNaN(p)},i.isResolvable=function(p){return!!p&&(p[i.symbols.ref]||p[i.symbols.template])},i.isSchema=function(p,h={}){const m=p&&p[i.symbols.any];return!!m&&(a(h.legacy||m.version===i.version,"Cannot mix different versions of joi schemas"),!0)},i.isValues=function(p){return p[i.symbols.values]},i.limit=function(p){return Number.isSafeInteger(p)&&p>=0},i.preferences=function(p,h){f=f||o(6914),p=p||{},h=h||{};const m=Object.assign({},p,h);return h.errors&&p.errors&&(m.errors=Object.assign({},p.errors,h.errors),m.errors.wrap=Object.assign({},p.errors.wrap,h.errors.wrap)),h.messages&&(m.messages=f.compile(h.messages,p.messages)),delete m[i.symbols.prefs],m},i.tryWithPath=function(p,h,m={}){try{return p()}catch(y){throw y.path!==void 0?y.path=h+"."+y.path:y.path=h,m.append&&(y.message=`${y.message} (${y.path})`),y}},i.validateArg=function(p,h,{assert:m,message:y}){if(i.isSchema(m)){const g=m.validate(p);return g.error?g.error.message:void 0}if(!m(p))return h?`${h} ${y}`:y},i.verifyFlat=function(p,h){for(const m of p)a(!Array.isArray(m),"Method no longer accepts array arguments:",h)}},3292:(s,i,o)=>{const a=o(375),c=o(8160),u=o(6133),f={};i.schema=function(l,d,p={}){c.assertOptions(p,["appendPath","override"]);try{return f.schema(l,d,p)}catch(h){throw p.appendPath&&h.path!==void 0&&(h.message=`${h.message} (${h.path})`),h}},f.schema=function(l,d,p){a(d!==void 0,"Invalid undefined schema"),Array.isArray(d)&&(a(d.length,"Invalid empty array schema"),d.length===1&&(d=d[0]));const h=(m,...y)=>p.override!==!1?m.valid(l.override,...y):m.valid(...y);if(f.simple(d))return h(l,d);if(typeof d=="function")return l.custom(d);if(a(typeof d=="object","Invalid schema content:",typeof d),c.isResolvable(d))return h(l,d);if(c.isSchema(d))return d;if(Array.isArray(d)){for(const m of d)if(!f.simple(m))return l.alternatives().try(...d);return h(l,...d)}return d instanceof RegExp?l.string().regex(d):d instanceof Date?h(l.date(),d):(a(Object.getPrototypeOf(d)===Object.getPrototypeOf({}),"Schema can only contain plain objects"),l.object().keys(d))},i.ref=function(l,d){return u.isRef(l)?l:u.create(l,d)},i.compile=function(l,d,p={}){c.assertOptions(p,["legacy"]);const h=d&&d[c.symbols.any];if(h)return a(p.legacy||h.version===c.version,"Cannot mix different versions of joi schemas:",h.version,c.version),d;if(typeof d!="object"||!p.legacy)return i.schema(l,d,{appendPath:!0});const m=f.walk(d);return m?m.compile(m.root,d):i.schema(l,d,{appendPath:!0})},f.walk=function(l){if(typeof l!="object")return null;if(Array.isArray(l)){for(const p of l){const h=f.walk(p);if(h)return h}return null}const d=l[c.symbols.any];if(d)return{root:l[d.root],compile:d.compile};a(Object.getPrototypeOf(l)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const p in l){const h=f.walk(l[p]);if(h)return h}return null},f.simple=function(l){return l===null||["boolean","string","number"].includes(typeof l)},i.when=function(l,d,p){if(p===void 0&&(a(d&&typeof d=="object","Missing options"),p=d,d=u.create(".")),Array.isArray(p)&&(p={switch:p}),c.assertOptions(p,["is","not","then","otherwise","switch","break"]),c.isSchema(d))return a(p.is===void 0,'"is" can not be used with a schema condition'),a(p.not===void 0,'"not" can not be used with a schema condition'),a(p.switch===void 0,'"switch" can not be used with a schema condition'),f.condition(l,{is:d,then:p.then,otherwise:p.otherwise,break:p.break});if(a(u.isRef(d)||typeof d=="string","Invalid condition:",d),a(p.not===void 0||p.is===void 0,'Cannot combine "is" with "not"'),p.switch===void 0){let m=p;p.not!==void 0&&(m={is:p.not,then:p.otherwise,otherwise:p.then,break:p.break});let y=m.is!==void 0?l.$_compile(m.is):l.$_root.invalid(null,!1,0,"").required();return a(m.then!==void 0||m.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),a(m.break===void 0||m.then===void 0||m.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),p.is===void 0||u.isRef(p.is)||c.isSchema(p.is)||(y=y.required()),f.condition(l,{ref:i.ref(d),is:y,then:m.then,otherwise:m.otherwise,break:m.break})}a(Array.isArray(p.switch),'"switch" must be an array'),a(p.is===void 0,'Cannot combine "switch" with "is"'),a(p.not===void 0,'Cannot combine "switch" with "not"'),a(p.then===void 0,'Cannot combine "switch" with "then"');const h={ref:i.ref(d),switch:[],break:p.break};for(let m=0;m {const a=o(5688),c=o(8160),u=o(3328);i.Report=class{constructor(f,l,d,p,h,m,y){if(this.code=f,this.flags=p,this.messages=h,this.path=m.path,this.prefs=y,this.state=m,this.value=l,this.message=null,this.template=null,this.local=d||{},this.local.label=i.label(this.flags,this.state,this.prefs,this.messages),this.value===void 0||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const g=this.path[this.path.length-1];typeof g!="object"&&(this.local.key=g)}}_setTemplate(f){if(this.template=f,!this.flags.label&&this.path.length===0){const l=this._template(this.template,"root");l&&(this.local.label=l)}}toString(){if(this.message)return this.message;const f=this.code;if(!this.prefs.errors.render)return this.code;const l=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return l===void 0?`Error code "${f}" is not defined, your custom type is missing the correct messages definition`:(this.message=l.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(f,l){return i.template(this.value,f,l||this.code,this.state,this.prefs)}},i.path=function(f){let l="";for(const d of f)typeof d!="object"&&(typeof d=="string"?(l&&(l+="."),l+=d):l+=`[${d}]`);return l},i.template=function(f,l,d,p,h){if(!l)return;if(u.isTemplate(l))return d!=="root"?l:null;let m=h.errors.language;if(c.isResolvable(m)&&(m=m.resolve(f,p,h)),m&&l[m]){if(l[m][d]!==void 0)return l[m][d];if(l[m]["*"]!==void 0)return l[m]["*"]}return l[d]?l[d]:l["*"]},i.label=function(f,l,d,p){if(!d.errors.label)return"";if(f.label)return f.label;let h=l.path;return d.errors.label==="key"&&l.path.length>1&&(h=l.path.slice(-1)),i.path(h)||i.template(null,d.messages,"root",l,d)||p&&i.template(null,p,"root",l,d)||"value"},i.process=function(f,l,d){if(!f)return null;const{override:p,message:h,details:m}=i.details(f);if(p)return p;if(d.errors.stack)return new i.ValidationError(h,m,l);const y=Error.stackTraceLimit;Error.stackTraceLimit=0;const g=new i.ValidationError(h,m,l);return Error.stackTraceLimit=y,g},i.details=function(f,l={}){let d=[];const p=[];for(const h of f){if(h instanceof Error){if(l.override!==!1)return{override:h};const y=h.toString();d.push(y),p.push({message:y,type:"override",context:{error:h}});continue}const m=h.toString();d.push(m),p.push({message:m,path:h.path.filter(y=>typeof y!="object"),type:h.code,context:h.local})}return d.length>1&&(d=[...new Set(d)]),{message:d.join(". "),details:p}},i.ValidationError=class extends Error{constructor(f,l,d){super(f),this._original=d,this.details=l}static isError(f){return f instanceof i.ValidationError}},i.ValidationError.prototype.isJoi=!0,i.ValidationError.prototype.name="ValidationError",i.ValidationError.prototype.annotate=a.error},8901:(s,i,o)=>{const a=o(375),c=o(8571),u=o(8160),f=o(6914),l={};i.type=function(d,p){const h=Object.getPrototypeOf(d),m=c(h),y=d._assign(Object.create(m)),g=Object.assign({},p);delete g.base,m._definition=g;const v=h._definition||{};g.messages=f.merge(v.messages,g.messages),g.properties=Object.assign({},v.properties,g.properties),y.type=g.type,g.flags=Object.assign({},v.flags,g.flags);const b=Object.assign({},v.terms);if(g.terms)for(const T in g.terms){const E=g.terms[T];a(y.$_terms[T]===void 0,"Invalid term override for",g.type,T),y.$_terms[T]=E.init,b[T]=E}g.terms=b,g.args||(g.args=v.args),g.prepare=l.prepare(g.prepare,v.prepare),g.coerce&&(typeof g.coerce=="function"&&(g.coerce={method:g.coerce}),g.coerce.from&&!Array.isArray(g.coerce.from)&&(g.coerce={method:g.coerce.method,from:[].concat(g.coerce.from)})),g.coerce=l.coerce(g.coerce,v.coerce),g.validate=l.validate(g.validate,v.validate);const _=Object.assign({},v.rules);if(g.rules)for(const T in g.rules){const E=g.rules[T];a(typeof E=="object","Invalid rule definition for",g.type,T);let N=E.method;if(N===void 0&&(N=function(){return this.$_addRule(T)}),N&&(a(!m[T],"Rule conflict in",g.type,T),m[T]=N),a(!_[T],"Rule conflict in",g.type,T),_[T]=E,E.alias){const k=[].concat(E.alias);for(const M of k)m[M]=E.method}E.args&&(E.argsByName=new Map,E.args=E.args.map(k=>(typeof k=="string"&&(k={name:k}),a(!E.argsByName.has(k.name),"Duplicated argument name",k.name),u.isSchema(k.assert)&&(k.assert=k.assert.strict().label(k.name)),E.argsByName.set(k.name,k),k)))}g.rules=_;const R=Object.assign({},v.modifiers);if(g.modifiers)for(const T in g.modifiers){a(!m[T],"Rule conflict in",g.type,T);const E=g.modifiers[T];a(typeof E=="function","Invalid modifier definition for",g.type,T);const N=function(k){return this.rule({[T]:k})};m[T]=N,R[T]=E}if(g.modifiers=R,g.overrides){m._super=h,y.$_super={};for(const T in g.overrides)a(h[T],"Cannot override missing",T),g.overrides[T][u.symbols.parent]=h[T],y.$_super[T]=h[T].bind(y);Object.assign(m,g.overrides)}g.cast=Object.assign({},v.cast,g.cast);const P=Object.assign({},v.manifest,g.manifest);return P.build=l.build(g.manifest&&g.manifest.build,v.manifest&&v.manifest.build),g.manifest=P,g.rebuild=l.rebuild(g.rebuild,v.rebuild),y},l.build=function(d,p){return d&&p?function(h,m){return p(d(h,m),m)}:d||p},l.coerce=function(d,p){return d&&p?{from:d.from&&p.from?[...new Set([...d.from,...p.from])]:null,method(h,m){let y;if((!p.from||p.from.includes(typeof h))&&(y=p.method(h,m),y)){if(y.errors||y.value===void 0)return y;h=y.value}if(!d.from||d.from.includes(typeof h)){const g=d.method(h,m);if(g)return g}return y}}:d||p},l.prepare=function(d,p){return d&&p?function(h,m){const y=d(h,m);if(y){if(y.errors||y.value===void 0)return y;h=y.value}return p(h,m)||y}:d||p},l.rebuild=function(d,p){return d&&p?function(h){p(h),d(h)}:d||p},l.validate=function(d,p){return d&&p?function(h,m){const y=p(h,m);if(y){if(y.errors&&(!Array.isArray(y.errors)||y.errors.length))return y;h=y.value}return d(h,m)||y}:d||p}},5107:(s,i,o)=>{const a=o(375),c=o(8571),u=o(8652),f=o(8160),l=o(3292),d=o(6354),p=o(8901),h=o(9708),m=o(6133),y=o(3328),g=o(1152);let v;const b={types:{alternatives:o(4946),any:o(8068),array:o(546),boolean:o(4937),date:o(7500),function:o(390),link:o(8785),number:o(3832),object:o(8966),string:o(7417),symbol:o(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const _={_types:new Set(Object.keys(b.types))};for(const R of _._types)_[R]=function(...P){return a(!P.length||["alternatives","link","object"].includes(R),"The",R,"type does not allow arguments"),b.generate(this,b.types[R],P)};for(const R of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"])_[R]=function(...P){return this.any()[R](...P)};Object.assign(_,b.methods);for(const R in b.aliases){const P=b.aliases[R];_[R]=_[P]}return _.x=_.expression,g.setup&&g.setup(_),_}};b.methods={ValidationError:d.ValidationError,version:f.version,cache:u.provider,assert(_,R,...P){b.assert(_,R,!0,P)},attempt:(_,R,...P)=>b.assert(_,R,!1,P),build(_){return a(typeof h.build=="function","Manifest functionality disabled"),h.build(this,_)},checkPreferences(_){f.checkPreferences(_)},compile(_,R){return l.compile(this,_,R)},defaults(_){a(typeof _=="function","modifier must be a function");const R=Object.assign({},this);for(const P of R._types){const T=_(R[P]());a(f.isSchema(T),"modifier must return a valid schema object"),R[P]=function(...E){return b.generate(this,T,E)}}return R},expression:(..._)=>new y(..._),extend(..._){f.verifyFlat(_,"extend"),v=v||o(3378),a(_.length,"You need to provide at least one extension"),this.assert(_,v.extensions);const R=Object.assign({},this);R._types=new Set(R._types);for(let P of _){typeof P=="function"&&(P=P(R)),this.assert(P,v.extension);const T=b.expandExtension(P,R);for(const E of T){a(R[E.type]===void 0||R._types.has(E.type),"Cannot override name",E.type);const N=E.base||this.any(),k=p.type(N,E);R._types.add(E.type),R[E.type]=function(...M){return b.generate(this,k,M)}}}return R},isError:d.ValidationError.isError,isExpression:y.isTemplate,isRef:m.isRef,isSchema:f.isSchema,in:(..._)=>m.in(..._),override:f.symbols.override,ref:(..._)=>m.create(..._),types(){const _={};for(const R of this._types)_[R]=this[R]();for(const R in b.aliases)_[R]=this[R]();return _}},b.assert=function(_,R,P,T){const E=T[0]instanceof Error||typeof T[0]=="string"?T[0]:null,N=E!==null?T[1]:T[0],k=R.validate(_,f.preferences({errors:{stack:!0}},N||{}));let M=k.error;if(!M)return k.value;if(E instanceof Error)throw E;const I=P&&typeof M.annotate=="function"?M.annotate():M.message;throw M instanceof d.ValidationError==0&&(M=c(M)),M.message=E?`${E} ${I}`:I,M},b.generate=function(_,R,P){return a(_,"Must be invoked on a Joi instance."),R.$_root=_,R._definition.args&&P.length?R._definition.args(R,...P):R},b.expandExtension=function(_,R){if(typeof _.type=="string")return[_];const P=[];for(const T of R._types)if(_.type.test(T)){const E=Object.assign({},_);E.type=T,E.base=R[T](),P.push(E)}return P},s.exports=b.root()},6914:(s,i,o)=>{const a=o(375),c=o(8571),u=o(3328);i.compile=function(f,l){if(typeof f=="string")return a(!l,"Cannot set single message string"),new u(f);if(u.isTemplate(f))return a(!l,"Cannot set single message template"),f;a(typeof f=="object"&&!Array.isArray(f),"Invalid message options"),l=l?c(l):{};for(let d in f){const p=f[d];if(d==="root"||u.isTemplate(p)){l[d]=p;continue}if(typeof p=="string"){l[d]=new u(p);continue}a(typeof p=="object"&&!Array.isArray(p),"Invalid message for",d);const h=d;for(d in l[h]=l[h]||{},p){const m=p[d];d==="root"||u.isTemplate(m)?l[h][d]=m:(a(typeof m=="string","Invalid message for",d,"in",h),l[h][d]=new u(m))}}return l},i.decompile=function(f){const l={};for(let d in f){const p=f[d];if(d==="root"){l.root=p;continue}if(u.isTemplate(p)){l[d]=p.describe({compact:!0});continue}const h=d;for(d in l[h]={},p){const m=p[d];d!=="root"?l[h][d]=m.describe({compact:!0}):l[h].root=m}}return l},i.merge=function(f,l){if(!f)return i.compile(l);if(!l)return f;if(typeof l=="string")return new u(l);if(u.isTemplate(l))return l;const d=c(f);for(let p in l){const h=l[p];if(p==="root"||u.isTemplate(h)){d[p]=h;continue}if(typeof h=="string"){d[p]=new u(h);continue}a(typeof h=="object"&&!Array.isArray(h),"Invalid message for",p);const m=p;for(p in d[m]=d[m]||{},h){const y=h[p];p==="root"||u.isTemplate(y)?d[m][p]=y:(a(typeof y=="string","Invalid message for",p,"in",m),d[m][p]=new u(y))}}return d}},2294:(s,i,o)=>{const a=o(375),c=o(8160),u=o(6133),f={};i.Ids=f.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const l=new f.Ids;return l._byId=new Map(this._byId),l._byKey=new Map(this._byKey),l._schemaChain=this._schemaChain,l}concat(l){l._schemaChain&&(this._schemaChain=!0);for(const[d,p]of l._byId.entries())a(!this._byKey.has(d),"Schema id conflicts with existing key:",d),this._byId.set(d,p);for(const[d,p]of l._byKey.entries())a(!this._byId.has(d),"Schema key conflicts with existing id:",d),this._byKey.set(d,p)}fork(l,d,p){const h=this._collect(l);h.push({schema:p});const m=h.shift();let y={id:m.id,schema:d(m.schema)};a(c.isSchema(y.schema),"adjuster function failed to return a joi schema type");for(const g of h)y={id:g.id,schema:f.fork(g.schema,y.id,y.schema)};return y.schema}labels(l,d=[]){const p=l[0],h=this._get(p);if(!h)return[...d,...l].join(".");const m=l.slice(1);return d=[...d,h.schema._flags.label||p],m.length?h.schema._ids.labels(m,d):d.join(".")}reach(l,d=[]){const p=l[0],h=this._get(p);a(h,"Schema does not contain path",[...d,...l].join("."));const m=l.slice(1);return m.length?h.schema._ids.reach(m,[...d,p]):h.schema}register(l,{key:d}={}){if(!l||!c.isSchema(l))return;(l.$_property("schemaChain")||l._ids._schemaChain)&&(this._schemaChain=!0);const p=l._flags.id;if(p){const h=this._byId.get(p);a(!h||h.schema===l,"Cannot add different schemas with the same id:",p),a(!this._byKey.has(p),"Schema id conflicts with existing key:",p),this._byId.set(p,{schema:l,id:p})}d&&(a(!this._byKey.has(d),"Schema already contains key:",d),a(!this._byId.has(d),"Schema key conflicts with existing id:",d),this._byKey.set(d,{schema:l,id:d}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(l,d=[],p=[]){const h=l[0],m=this._get(h);a(m,"Schema does not contain path",[...d,...l].join(".")),p=[m,...p];const y=l.slice(1);return y.length?m.schema._ids._collect(y,[...d,h],p):p}_get(l){return this._byId.get(l)||this._byKey.get(l)}},f.fork=function(l,d,p){const h=i.schema(l,{each:(m,{key:y})=>{if(d===(m._flags.id||y))return p},ref:!1});return h?h.$_mutateRebuild():l},i.schema=function(l,d){let p;for(const h in l._flags){if(h[0]==="_")continue;const m=f.scan(l._flags[h],{source:"flags",name:h},d);m!==void 0&&(p=p||l.clone(),p._flags[h]=m)}for(let h=0;h {const a=o(375),c=o(8571),u=o(9621),f=o(8160);let l;const d={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};i.create=function(p,h={}){a(typeof p=="string","Invalid reference key:",p),f.assertOptions(h,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),a(!h.prefix||typeof h.prefix=="object","options.prefix must be of type object");const m=Object.assign({},d.defaults,h);delete m.prefix;const y=m.separator,g=d.context(p,y,h.prefix);if(m.type=g.type,p=g.key,m.type==="value")if(g.root&&(a(!y||p[0]!==y,"Cannot specify relative path with root prefix"),m.ancestor="root",p||(p=null)),y&&y===p)p=null,m.ancestor=0;else if(m.ancestor!==void 0)a(!y||!p||p[0]!==y,"Cannot combine prefix with ancestor option");else{const[v,b]=d.ancestor(p,y);b&&(p=p.slice(b))===""&&(p=null),m.ancestor=v}return m.path=y?p===null?[]:p.split(y):[p],new d.Ref(m)},i.in=function(p,h={}){return i.create(p,{...h,in:!0})},i.isRef=function(p){return!!p&&!!p[f.symbols.ref]},d.Ref=class{constructor(p){a(typeof p=="object","Invalid reference construction"),f.assertOptions(p,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),a([!1,void 0].includes(p.separator)||typeof p.separator=="string"&&p.separator.length===1,"Invalid separator"),a(!p.adjust||typeof p.adjust=="function","options.adjust must be a function"),a(!p.map||Array.isArray(p.map),"options.map must be an array"),a(!p.map||!p.adjust,"Cannot set both map and adjust options"),Object.assign(this,d.defaults,p),a(this.type==="value"||this.ancestor===void 0,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(p,h,m,y,g={}){return a(!this.in||g.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(m.context,h,g):this.type==="local"?this._resolve(y,h,g):this.ancestor?this.ancestor==="root"?this._resolve(h.ancestors[h.ancestors.length-1],h,g):(a(this.ancestor<=h.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(h.ancestors[this.ancestor-1],h,g)):this._resolve(p,h,g)}_resolve(p,h,m){let y;if(this.type==="value"&&h.mainstay.shadow&&m.shadow!==!1&&(y=h.mainstay.shadow.get(this.absolute(h))),y===void 0&&(y=u(p,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(y=this.adjust(y)),this.map){const g=this.map.get(y);g!==void 0&&(y=g)}return h.mainstay&&h.mainstay.tracer.resolve(h,this,y),y}toString(){return this.display}absolute(p){return[...p.path.slice(0,-this.ancestor),...this.path]}clone(){return new d.Ref(this)}describe(){const p={path:this.path};this.type!=="value"&&(p.type=this.type),this.separator!=="."&&(p.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(p.ancestor=this.ancestor),this.map&&(p.map=[...this.map]);for(const h of["adjust","iterables","render"])this[h]!==null&&this[h]!==void 0&&(p[h]=this[h]);return this.in!==!1&&(p.in=!0),{ref:p}}updateDisplay(){const p=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${p}`);if(!this.separator)return void(this.display=`ref:${p}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${p}`);if(this.ancestor==="root")return void(this.display=`ref:root:${p}`);if(this.ancestor===1)return void(this.display=`ref:${p||".."}`);const h=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${h}${p||""}`}},d.Ref.prototype[f.symbols.ref]=!0,i.build=function(p){return(p=Object.assign({},d.defaults,p)).type==="value"&&p.ancestor===void 0&&(p.ancestor=1),new d.Ref(p)},d.context=function(p,h,m={}){if(p=p.trim(),m){const y=m.global===void 0?"$":m.global;if(y!==h&&p.startsWith(y))return{key:p.slice(y.length),type:"global"};const g=m.local===void 0?"#":m.local;if(g!==h&&p.startsWith(g))return{key:p.slice(g.length),type:"local"};const v=m.root===void 0?"/":m.root;if(v!==h&&p.startsWith(v))return{key:p.slice(v.length),type:"value",root:!0}}return{key:p,type:"value"}},d.ancestor=function(p,h){if(!h)return[1,0];if(p[0]!==h)return[1,0];if(p[1]!==h)return[0,1];let m=2;for(;p[m]===h;)++m;return[m-1,m]},i.toSibling=0,i.toParent=1,i.Manager=class{constructor(){this.refs=[]}register(p,h){if(p)if(h=h===void 0?i.toParent:h,Array.isArray(p))for(const m of p)this.register(m,h);else if(f.isSchema(p))for(const m of p._refs.refs)m.ancestor-h>=0&&this.refs.push({ancestor:m.ancestor-h,root:m.root});else i.isRef(p)&&p.type==="value"&&p.ancestor-h>=0&&this.refs.push({ancestor:p.ancestor-h,root:p.root}),l=l||o(3328),l.isTemplate(p)&&this.register(p.refs(),h)}get length(){return this.refs.length}clone(){const p=new i.Manager;return p.refs=c(this.refs),p}reset(){this.refs=[]}roots(){return this.refs.filter(p=>!p.ancestor).map(p=>p.root)}}},3378:(s,i,o)=>{const a=o(5107),c={};c.wrap=a.string().min(1).max(2).allow(!1),i.preferences=a.object({allowUnknown:a.boolean(),abortEarly:a.boolean(),artifacts:a.boolean(),cache:a.boolean(),context:a.object(),convert:a.boolean(),dateFormat:a.valid("date","iso","string","time","utc"),debug:a.boolean(),errors:{escapeHtml:a.boolean(),label:a.valid("path","key",!1),language:[a.string(),a.object().ref()],render:a.boolean(),stack:a.boolean(),wrap:{label:c.wrap,array:c.wrap,string:c.wrap}},externals:a.boolean(),messages:a.object(),noDefaults:a.boolean(),nonEnumerables:a.boolean(),presence:a.valid("required","optional","forbidden"),skipFunctions:a.boolean(),stripUnknown:a.object({arrays:a.boolean(),objects:a.boolean()}).or("arrays","objects").allow(!0,!1),warnings:a.boolean()}).strict(),c.nameRx=/^[a-zA-Z0-9]\w*$/,c.rule=a.object({alias:a.array().items(a.string().pattern(c.nameRx)).single(),args:a.array().items(a.string(),a.object({name:a.string().pattern(c.nameRx).required(),ref:a.boolean(),assert:a.alternatives([a.function(),a.object().schema()]).conditional("ref",{is:!0,then:a.required()}),normalize:a.function(),message:a.string().when("assert",{is:a.function(),then:a.required()})})),convert:a.boolean(),manifest:a.boolean(),method:a.function().allow(!1),multi:a.boolean(),validate:a.function()}),i.extension=a.object({type:a.alternatives([a.string(),a.object().regex()]).required(),args:a.function(),cast:a.object().pattern(c.nameRx,a.object({from:a.function().maxArity(1).required(),to:a.function().minArity(1).maxArity(2).required()})),base:a.object().schema().when("type",{is:a.object().regex(),then:a.forbidden()}),coerce:[a.function().maxArity(3),a.object({method:a.function().maxArity(3).required(),from:a.array().items(a.string()).single()})],flags:a.object().pattern(c.nameRx,a.object({setter:a.string(),default:a.any()})),manifest:{build:a.function().arity(2)},messages:[a.object(),a.string()],modifiers:a.object().pattern(c.nameRx,a.function().minArity(1).maxArity(2)),overrides:a.object().pattern(c.nameRx,a.function()),prepare:a.function().maxArity(3),rebuild:a.function().arity(1),rules:a.object().pattern(c.nameRx,c.rule),terms:a.object().pattern(c.nameRx,a.object({init:a.array().allow(null).required(),manifest:a.object().pattern(/.+/,[a.valid("schema","single"),a.object({mapped:a.object({from:a.string().required(),to:a.string().required()}).required()})])})),validate:a.function().maxArity(3)}).strict(),i.extensions=a.array().items(a.object(),a.function().arity(1)).strict(),c.desc={buffer:a.object({buffer:a.string()}),func:a.object({function:a.function().required(),options:{literal:!0}}),override:a.object({override:!0}),ref:a.object({ref:a.object({type:a.valid("value","global","local"),path:a.array().required(),separator:a.string().length(1).allow(!1),ancestor:a.number().min(0).integer().allow("root"),map:a.array().items(a.array().length(2)).min(1),adjust:a.function(),iterables:a.boolean(),in:a.boolean(),render:a.boolean()}).required()}),regex:a.object({regex:a.string().min(3)}),special:a.object({special:a.valid("deep").required()}),template:a.object({template:a.string().required(),options:a.object()}),value:a.object({value:a.alternatives([a.object(),a.array()]).required()})},c.desc.entity=a.alternatives([a.array().items(a.link("...")),a.boolean(),a.function(),a.number(),a.string(),c.desc.buffer,c.desc.func,c.desc.ref,c.desc.regex,c.desc.special,c.desc.template,c.desc.value,a.link("/")]),c.desc.values=a.array().items(null,a.boolean(),a.function(),a.number().allow(1/0,-1/0),a.string().allow(""),a.symbol(),c.desc.buffer,c.desc.func,c.desc.override,c.desc.ref,c.desc.regex,c.desc.template,c.desc.value),c.desc.messages=a.object().pattern(/.+/,[a.string(),c.desc.template,a.object().pattern(/.+/,[a.string(),c.desc.template])]),i.description=a.object({type:a.string().required(),flags:a.object({cast:a.string(),default:a.any(),description:a.string(),empty:a.link("/"),failover:c.desc.entity,id:a.string(),label:a.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:a.boolean(),unit:a.string()}).unknown(),preferences:{allowUnknown:a.boolean(),abortEarly:a.boolean(),artifacts:a.boolean(),cache:a.boolean(),convert:a.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:a.boolean(),label:["path","key"],language:[a.string(),c.desc.ref],wrap:{label:c.wrap,array:c.wrap}},externals:a.boolean(),messages:c.desc.messages,noDefaults:a.boolean(),nonEnumerables:a.boolean(),presence:["required","optional","forbidden"],skipFunctions:a.boolean(),stripUnknown:a.object({arrays:a.boolean(),objects:a.boolean()}).or("arrays","objects").allow(!0,!1),warnings:a.boolean()},allow:c.desc.values,invalid:c.desc.values,rules:a.array().min(1).items({name:a.string().required(),args:a.object().min(1),keep:a.boolean(),message:[a.string(),c.desc.messages],warn:a.boolean()}),keys:a.object().pattern(/.*/,a.link("/")),link:c.desc.ref}).pattern(/^[a-z]\w*$/,a.any())},493:(s,i,o)=>{const a=o(8571),c=o(9621),u=o(8160),f={value:Symbol("value")};s.exports=f.State=class{constructor(l,d,p){this.path=l,this.ancestors=d,this.mainstay=p.mainstay,this.schemas=p.schemas,this.debug=null}localize(l,d=null,p=null){const h=new f.State(l,d,this);return p&&h.schemas&&(h.schemas=[f.schemas(p),...h.schemas]),h}nest(l,d){const p=new f.State(this.path,this.ancestors,this);return p.schemas=p.schemas&&[f.schemas(l),...p.schemas],p.debug=d,p}shadow(l,d){this.mainstay.shadow=this.mainstay.shadow||new f.Shadow,this.mainstay.shadow.set(this.path,l,d)}snapshot(){this.mainstay.shadow&&(this._snapshot=a(this.mainstay.shadow.node(this.path))),this.mainstay.snapshot()}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.restore()}commit(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.commit()}},f.schemas=function(l){return u.isSchema(l)?{schema:l}:l},f.Shadow=class{constructor(){this._values=null}set(l,d,p){if(!l.length||p==="strip"&&typeof l[l.length-1]=="number")return;this._values=this._values||new Map;let h=this._values;for(let m=0;m {const a=o(375),c=o(8571),u=o(5277),f=o(1447),l=o(8160),d=o(6354),p=o(6133),h={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};s.exports=h.Template=class{constructor(m,y){if(a(typeof m=="string","Template source must be a string"),a(!m.includes("\0")&&!m.includes(""),"Template source cannot contain reserved control characters"),this.source=m,this.rendered=m,this._template=null,y){const{functions:g,...v}=y;this._settings=Object.keys(v).length?c(v):void 0,this._functions=g,this._functions&&(a(Object.keys(this._functions).every(b=>typeof b=="string"),"Functions keys must be strings"),a(Object.values(this._functions).every(b=>typeof b=="function"),"Functions values must be functions"))}else this._settings=void 0,this._functions=void 0;this._parse()}_parse(){if(!this.source.includes("{"))return;const m=h.encode(this.source),y=h.split(m);let g=!1;const v=[],b=y.shift();b&&v.push(b);for(const _ of y){const R=_[0]!=="{",P=R?"}":"}}",T=_.indexOf(P);if(T===-1||_[1]==="{"){v.push(`{${h.decode(_)}`);continue}let E=_.slice(R?0:1,T);const N=E[0]===":";N&&(E=E.slice(1));const k=this._ref(h.decode(E),{raw:R,wrapped:N});v.push(k),typeof k!="string"&&(g=!0);const M=_.slice(T+P.length);M&&v.push(h.decode(M))}g?this._template=v:this.rendered=v.join("")}static date(m,y){return h.dateFormat[y.dateFormat].call(m)}describe(m={}){if(!this._settings&&m.compact)return this.source;const y={template:this.source};return this._settings&&(y.options=this._settings),this._functions&&(y.functions=this._functions),y}static build(m){return new h.Template(m.template,m.options||m.functions?{...m.options,functions:m.functions}:void 0)}isDynamic(){return!!this._template}static isTemplate(m){return!!m&&!!m[l.symbols.template]}refs(){if(!this._template)return;const m=[];for(const y of this._template)typeof y!="string"&&m.push(...y.refs);return m}resolve(m,y,g,v){return this._template&&this._template.length===1?this._part(this._template[0],m,y,g,v,{}):this.render(m,y,g,v)}_part(m,...y){return m.ref?m.ref.resolve(...y):m.formula.evaluate(y)}render(m,y,g,v,b={}){if(!this.isDynamic())return this.rendered;const _=[];for(const R of this._template)if(typeof R=="string")_.push(R);else{const P=this._part(R,m,y,g,v,b),T=h.stringify(P,m,y,g,v,b);if(T!==void 0){const E=R.raw||(b.errors&&b.errors.escapeHtml)===!1?T:u(T);_.push(h.wrap(E,R.wrapped&&g.errors.wrap.label))}}return _.join("")}_ref(m,{raw:y,wrapped:g}){const v=[],b=R=>{const P=p.create(R,this._settings);return v.push(P),T=>{const E=P.resolve(...T);return E!==void 0?E:null}};try{const R=this._functions?{...h.functions,...this._functions}:h.functions;var _=new f.Parser(m,{reference:b,functions:R,constants:h.constants})}catch(R){throw R.message=`Invalid template variable "${m}" fails due to: ${R.message}`,R}if(_.single){if(_.single.type==="reference"){const R=v[0];return{ref:R,raw:y,refs:v,wrapped:g||R.type==="local"&&R.key==="label"}}return h.stringify(_.single.value)}return{formula:_,raw:y,refs:v}}toString(){return this.source}},h.Template.prototype[l.symbols.template]=!0,h.Template.prototype.isImmutable=!0,h.encode=function(m){return m.replace(/\\(\{+)/g,(y,g)=>h.opens.slice(0,g.length)).replace(/\\(\}+)/g,(y,g)=>h.closes.slice(0,g.length))},h.decode=function(m){return m.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},h.split=function(m){const y=[];let g="";for(let v=0;v ${M.toString()}`);m=N}if(!Array.isArray(m))return m.toString();const E=[];for(const N of m)E.push(h.stringify(N,y,g,v,b,{arrayItems:!0,..._}));return h.wrap(E.join(", "),!T&&P.array)},h.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},h.functions={if:(m,y,g)=>m?y:g,length:m=>typeof m=="string"?m.length:m&&typeof m=="object"?Array.isArray(m)?m.length:Object.keys(m).length:null,msg(m){const[y,g,v,b,_]=this,R=_.messages;if(!R)return"";const P=d.template(y,R[0],m,g,v)||d.template(y,R[1],m,g,v);return P?P.render(y,g,v,b,_):""},number:m=>typeof m=="number"?m:typeof m=="string"?parseFloat(m):typeof m=="boolean"?m?1:0:m instanceof Date?m.getTime():null}},4946:(s,i,o)=>{const a=o(375),c=o(1687),u=o(8068),f=o(8160),l=o(3292),d=o(6354),p=o(6133),h={};s.exports=u.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:p.toSibling}},args:(m,...y)=>y.length===1&&Array.isArray(y[0])?m.try(...y[0]):m.try(...y),validate(m,y){const{schema:g,error:v,state:b,prefs:_}=y;if(g._flags.match){const P=[],T=[];for(let N=0;N d.details(N,{override:!1}))})};if(g._flags.match==="one")return P.length===1?{value:P[0]}:{errors:v("alternatives.one")};if(P.length!==g.$_terms.matches.length)return{errors:v("alternatives.all",{details:T.map(N=>d.details(N,{override:!1}))})};const E=N=>N.$_terms.matches.some(k=>k.schema.type==="object"||k.schema.type==="alternatives"&&E(k.schema));return E(g)?{value:P.reduce((N,k)=>c(N,k,{mergeArrays:!1}))}:{value:P[P.length-1]}}const R=[];for(let P=0;P g.path[0]!=="is"&&typeof y._flags.label!="string"?y.label(m):void 0,ref:!1})}},rebuild(m){m.$_modify({each:y=>{f.isSchema(y)&&y.type==="array"&&m.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(m,y){if(y.matches)for(const g of y.matches){const{schema:v,ref:b,is:_,not:R,then:P,otherwise:T}=g;m=v?m.try(v):b?m.conditional(b,{is:_,then:P,not:R,otherwise:T,switch:g.switch}):m.conditional(_,{then:P,otherwise:T})}return m}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),h.errors=function(m,{error:y,state:g}){if(!m.length)return{errors:y("alternatives.any")};if(m.length===1)return{errors:m[0].reports};const v=new Set,b=[];for(const{reports:_,schema:R}of m){if(_.length>1)return h.unmatched(m,y);const P=_[0];if(P instanceof d.Report==0)return h.unmatched(m,y);if(P.state.path.length!==g.path.length){b.push({type:R.type,report:P});continue}if(P.code==="any.only"){for(const N of P.local.valids)v.add(N);continue}const[T,E]=P.code.split(".");E!=="base"?b.push({type:R.type,report:P}):P.code==="object.base"?v.add(P.local.type):v.add(T)}return b.length?b.length===1?{errors:b[0].report}:h.unmatched(m,y):{errors:y("alternatives.types",{types:[...v]})}},h.unmatched=function(m,y){const g=[];for(const v of m)g.push(...v.reports);return{errors:y("alternatives.match",d.details(g,{override:!1}))}}},8068:(s,i,o)=>{const a=o(375),c=o(7629),u=o(8160),f=o(6914);s.exports=c.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(l,d){return a(typeof l=="function","Method must be a function"),a(d===void 0||d&&typeof d=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:l,description:d}})},validate(l,d,{method:p}){try{return p(l,d)}catch(h){return d.error("any.custom",{error:h})}},args:["method","description"],multi:!0},messages:{method(l){return this.prefs({messages:l})}},shared:{method(l){a(u.isSchema(l)&&l._flags.id,"Schema must be a schema with an id");const d=this.clone();return d.$_terms.shared=d.$_terms.shared||[],d.$_terms.shared.push(l),d.$_mutateRegister(l),d}},warning:{method(l,d){return a(l&&typeof l=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:l,local:d},warn:!0})},validate:(l,d,{code:p,local:h})=>d.error(p,h),args:["code","local"],multi:!0}},modifiers:{keep(l,d=!0){l.keep=d},message(l,d){l.message=f.compile(d)},warn(l,d=!0){l.warn=d}},manifest:{build(l,d){for(const p in d){const h=d[p];if(["examples","externals","metas","notes","tags"].includes(p))for(const m of h)l=l[p.slice(0,-1)](m);else if(p!=="alterations")if(p!=="whens"){if(p==="shared")for(const m of h)l=l.shared(m)}else for(const m of h){const{ref:y,is:g,not:v,then:b,otherwise:_,concat:R}=m;l=R?l.concat(R):y?l.when(y,{is:g,not:v,then:b,otherwise:_,switch:m.switch,break:m.break}):l.when(g,{then:b,otherwise:_,break:m.break})}else{const m={};for(const{target:y,adjuster:g}of h)m[y]=g;l=l.alter(m)}}return l}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(s,i,o)=>{const a=o(375),c=o(9474),u=o(9621),f=o(8068),l=o(8160),d=o(3292),p={};s.exports=f.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(h,{schema:m,state:y,prefs:g}){if(!Array.isArray(h))return;const v=m.$_getRule("sort");return v?p.sort(m,h,v.args.options,y,g):void 0}},validate(h,{schema:m,error:y}){if(!Array.isArray(h)){if(m._flags.single){const g=[h];return g[l.symbols.arraySingle]=!0,{value:g}}return{errors:y("array.base")}}if(m.$_getRule("items")||m.$_terms.externals)return{value:h.slice()}},rules:{has:{method(h){h=this.$_compile(h,{appendPath:!0});const m=this.$_addRule({name:"has",args:{schema:h}});return m.$_mutateRegister(h),m},validate(h,{state:m,prefs:y,error:g},{schema:v}){const b=[h,...m.ancestors];for(let R=0;R this.$_compile(h[y]),y,{append:!0});m.$_terms.items.push(g)}return m.$_mutateRebuild()},validate(h,{schema:m,error:y,state:g,prefs:v,errorsArray:b}){const _=m.$_terms._requireds.slice(),R=m.$_terms.ordered.slice(),P=[...m.$_terms._inclusions,..._],T=!h[l.symbols.arraySingle];delete h[l.symbols.arraySingle];const E=b();let N=h.length;for(let k=0;k l.compare(h.length,y,v)?h:m.error("array."+g,{limit:b.limit,value:h}),args:[{name:"limit",ref:!0,assert:l.limit,message:"must be a positive integer"}]},max:{method(h){return this.$_addRule({name:"max",method:"length",args:{limit:h},operator:"<="})}},min:{method(h){return this.$_addRule({name:"min",method:"length",args:{limit:h},operator:">="})}},ordered:{method(...h){l.verifyFlat(h,"ordered");const m=this.$_addRule("items");for(let y=0;y this.$_compile(h[y]),y,{append:!0});p.validateSingle(g,m),m.$_mutateRegister(g),m.$_terms.ordered.push(g)}return m.$_mutateRebuild()}},single:{method(h){const m=h===void 0||!!h;return a(!m||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",m)}},sort:{method(h={}){l.assertOptions(h,["by","order"]);const m={order:h.order||"ascending"};return h.by&&(m.by=d.ref(h.by,{ancestor:0}),a(!m.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:m}})},validate(h,{error:m,state:y,prefs:g,schema:v},{options:b}){const{value:_,errors:R}=p.sort(v,h,b,y,g);if(R)return R;for(let P=0;P new Set(h)}},rebuild(h){h.$_terms._inclusions=[],h.$_terms._exclusions=[],h.$_terms._requireds=[];for(const m of h.$_terms.items)p.validateSingle(m,h),m._flags.presence==="required"?h.$_terms._requireds.push(m):m._flags.presence==="forbidden"?h.$_terms._exclusions.push(m):h.$_terms._inclusions.push(m);for(const m of h.$_terms.ordered)p.validateSingle(m,h)},manifest:{build:(h,m)=>(m.items&&(h=h.items(...m.items)),m.ordered&&(h=h.ordered(...m.ordered)),h)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),p.fillMissedErrors=function(h,m,y,g,v,b){const _=[];let R=0;for(const P of y){const T=P._flags.label;T?_.push(T):++R}_.length?R?m.push(h.$_createError("array.includesRequiredBoth",g,{knownMisses:_,unknownMisses:R},v,b)):m.push(h.$_createError("array.includesRequiredKnowns",g,{knownMisses:_},v,b)):m.push(h.$_createError("array.includesRequiredUnknowns",g,{unknownMisses:R},v,b))},p.fillOrderedErrors=function(h,m,y,g,v,b){const _=[];for(const R of y)R._flags.presence==="required"&&_.push(R);_.length&&p.fillMissedErrors(h,m,_,g,v,b)},p.fillDefault=function(h,m,y,g){const v=[];let b=!0;for(let _=h.length-1;_>=0;--_){const R=h[_],P=[m,...y.ancestors],T=R.$_validate(void 0,y.localize(y.path,P,R),g).value;if(b){if(T===void 0)continue;b=!1}v.unshift(T)}v.length&&m.push(...v)},p.fastSplice=function(h,m){let y=m;for(;y {let N=p.compare(T,E,_,R);if(N!==null||(y.by&&(T=y.by.resolve(T,g,v),E=y.by.resolve(E,g,v)),N=p.compare(T,E,_,R),N!==null))return N;const k=typeof T;if(k!==typeof E)throw h.$_createError("array.sort.mismatching",m,null,g,v);if(k!=="number"&&k!=="string")throw h.$_createError("array.sort.unsupported",m,{type:k},g,v);return k==="number"?(T-E)*b:T {const a=o(375),c=o(8068),u=o(8160),f=o(2036),l={isBool:function(d){return typeof d=="boolean"}};s.exports=c.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(d,{schema:p}){if(typeof d!="boolean"){if(typeof d=="string"){const h=p._flags.sensitive?d:d.toLowerCase();d=h==="true"||h!=="false"&&d}return typeof d!="boolean"&&(d=p.$_terms.truthy&&p.$_terms.truthy.has(d,null,null,!p._flags.sensitive)||(!p.$_terms.falsy||!p.$_terms.falsy.has(d,null,null,!p._flags.sensitive))&&d),{value:d}}},validate(d,{error:p}){if(typeof d!="boolean")return{value:d,errors:p("boolean.base")}},rules:{truthy:{method(...d){u.verifyFlat(d,"truthy");const p=this.clone();p.$_terms.truthy=p.$_terms.truthy||new f;for(let h=0;h d?1:0},string:{from:l.isBool,to:(d,p)=>d?"true":"false"}},manifest:{build:(d,p)=>(p.truthy&&(d=d.truthy(...p.truthy)),p.falsy&&(d=d.falsy(...p.falsy)),d)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(s,i,o)=>{const a=o(375),c=o(8068),u=o(8160),f=o(3328),l={isDate:function(d){return d instanceof Date}};s.exports=c.extend({type:"date",coerce:{from:["number","string"],method:(d,{schema:p})=>({value:l.parse(d,p._flags.format)||d})},validate(d,{schema:p,error:h,prefs:m}){if(d instanceof Date&&!isNaN(d.getTime()))return;const y=p._flags.format;return m.convert&&y&&typeof d=="string"?{value:d,errors:h("date.format",{format:y})}:{value:d,errors:h("date.base")}},rules:{compare:{method:!1,validate(d,p,{date:h},{name:m,operator:y,args:g}){const v=h==="now"?Date.now():h.getTime();return u.compare(d.getTime(),v,y)?d:p.error("date."+m,{limit:g.date,value:d})},args:[{name:"date",ref:!0,normalize:d=>d==="now"?d:l.parse(d),assert:d=>d!==null,message:"must have a valid date format"}]},format:{method(d){return a(["iso","javascript","unix"].includes(d),"Unknown date format",d),this.$_setFlag("format",d)}},greater:{method(d){return this.$_addRule({name:"greater",method:"compare",args:{date:d},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(d){return this.$_addRule({name:"less",method:"compare",args:{date:d},operator:"<"})}},max:{method(d){return this.$_addRule({name:"max",method:"compare",args:{date:d},operator:"<="})}},min:{method(d){return this.$_addRule({name:"min",method:"compare",args:{date:d},operator:">="})}},timestamp:{method(d="javascript"){return a(["javascript","unix"].includes(d),'"type" must be one of "javascript, unix"'),this.format(d)}}},cast:{number:{from:l.isDate,to:(d,p)=>d.getTime()},string:{from:l.isDate,to:(d,{prefs:p})=>f.date(d,p)}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),l.parse=function(d,p){if(d instanceof Date)return d;if(typeof d!="string"&&(isNaN(d)||!isFinite(d))||/^\s*$/.test(d))return null;if(p==="iso")return u.isIsoDate(d)?l.date(d.toString()):null;const h=d;if(typeof d=="string"&&/^[+-]?\d+(\.\d+)?$/.test(d)&&(d=parseFloat(d)),p){if(p==="javascript")return l.date(1*d);if(p==="unix")return l.date(1e3*d);if(typeof h=="string")return null}return l.date(d)},l.date=function(d){const p=new Date(d);return isNaN(p.getTime())?null:p}},390:(s,i,o)=>{const a=o(375),c=o(7824);s.exports=c.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(u){return a(Number.isSafeInteger(u)&&u>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:u}})},validate:(u,f,{n:l})=>u.length===l?u:f.error("function.arity",{n:l})},class:{method(){return this.$_addRule("class")},validate:(u,f)=>/^\s*class\s/.test(u.toString())?u:f.error("function.class",{value:u})},minArity:{method(u){return a(Number.isSafeInteger(u)&&u>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:u}})},validate:(u,f,{n:l})=>u.length>=l?u:f.error("function.minArity",{n:l})},maxArity:{method(u){return a(Number.isSafeInteger(u)&&u>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:u}})},validate:(u,f,{n:l})=>u.length<=l?u:f.error("function.maxArity",{n:l})}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(s,i,o)=>{const a=o(978),c=o(375),u=o(8571),f=o(3652),l=o(8068),d=o(8160),p=o(3292),h=o(6354),m=o(6133),y=o(3328),g={renameDefaults:{alias:!1,multiple:!1,override:!1}};s.exports=l.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:void 0}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(v,b)=>v.keys(b),validate(v,{schema:b,error:_,state:R,prefs:P}){if(!v||typeof v!==b.$_property("typeof")||Array.isArray(v))return{value:v,errors:_("object.base",{type:b.$_property("typeof")})};if(!(b.$_terms.renames||b.$_terms.dependencies||b.$_terms.keys||b.$_terms.patterns||b.$_terms.externals))return;v=g.clone(v,P);const T=[];if(b.$_terms.renames&&!g.rename(b,v,R,P,T))return{value:v,errors:T};if(!b.$_terms.keys&&!b.$_terms.patterns&&!b.$_terms.dependencies)return{value:v,errors:T};const E=new Set(Object.keys(v));if(b.$_terms.keys){const N=[v,...R.ancestors];for(const k of b.$_terms.keys){const M=k.key,I=v[M];E.delete(M);const j=R.localize([...R.path,M],N,k),L=k.schema.$_validate(I,j,P);if(L.errors){if(P.abortEarly)return{value:v,errors:L.errors};L.value!==void 0&&(v[M]=L.value),T.push(...L.errors)}else k.schema._flags.result==="strip"||L.value===void 0&&I!==void 0?delete v[M]:L.value!==void 0&&(v[M]=L.value)}}if(E.size||b._flags._hasPatternMatch){const N=g.unknown(b,v,E,T,R,P);if(N)return N}if(b.$_terms.dependencies)for(const N of b.$_terms.dependencies){if(N.key!==null&&g.isPresent(N.options)(N.key.resolve(v,R,P,null,{shadow:!1}))===!1)continue;const k=g.dependencies[N.rel](b,N,v,R,P);if(k){const M=b.$_createError(k.code,v,k.context,R,P);if(P.abortEarly)return{value:v,errors:M};T.push(M)}}return{value:v,errors:T}},rules:{and:{method(...v){return d.verifyFlat(v,"and"),g.dependency(this,"and",null,v)}},append:{method(v){return v==null||Object.keys(v).length===0?this:this.keys(v)}},assert:{method(v,b,_){y.isTemplate(v)||(v=p.ref(v)),c(_===void 0||typeof _=="string","Message must be a string"),b=this.$_compile(b,{appendPath:!0});const R=this.$_addRule({name:"assert",args:{subject:v,schema:b,message:_}});return R.$_mutateRegister(v),R.$_mutateRegister(b),R},validate(v,{error:b,prefs:_,state:R},{subject:P,schema:T,message:E}){const N=P.resolve(v,R,_),k=m.isRef(P)?P.absolute(R):[];return T.$_match(N,R.localize(k,[v,...R.ancestors],T),_)?v:b("object.assert",{subject:P,message:E})},args:["subject","schema","message"],multi:!0},instance:{method(v,b){return c(typeof v=="function","constructor must be a function"),b=b||v.name,this.$_addRule({name:"instance",args:{constructor:v,name:b}})},validate:(v,b,{constructor:_,name:R})=>v instanceof _?v:b.error("object.instance",{type:R,value:v}),args:["constructor","name"]},keys:{method(v){c(v===void 0||typeof v=="object","Object schema must be a valid object"),c(!d.isSchema(v),"Object schema cannot be a joi schema");const b=this.clone();if(v)if(Object.keys(v).length){b.$_terms.keys=b.$_terms.keys?b.$_terms.keys.filter(_=>!v.hasOwnProperty(_.key)):new g.Keys;for(const _ in v)d.tryWithPath(()=>b.$_terms.keys.push({key:_,schema:this.$_compile(v[_])}),_)}else b.$_terms.keys=new g.Keys;else b.$_terms.keys=null;return b.$_mutateRebuild()}},length:{method(v){return this.$_addRule({name:"length",args:{limit:v},operator:"="})},validate:(v,b,{limit:_},{name:R,operator:P,args:T})=>d.compare(Object.keys(v).length,_,P)?v:b.error("object."+R,{limit:T.limit,value:v}),args:[{name:"limit",ref:!0,assert:d.limit,message:"must be a positive integer"}]},max:{method(v){return this.$_addRule({name:"max",method:"length",args:{limit:v},operator:"<="})}},min:{method(v){return this.$_addRule({name:"min",method:"length",args:{limit:v},operator:">="})}},nand:{method(...v){return d.verifyFlat(v,"nand"),g.dependency(this,"nand",null,v)}},or:{method(...v){return d.verifyFlat(v,"or"),g.dependency(this,"or",null,v)}},oxor:{method(...v){return g.dependency(this,"oxor",null,v)}},pattern:{method(v,b,_={}){const R=v instanceof RegExp;R||(v=this.$_compile(v,{appendPath:!0})),c(b!==void 0,"Invalid rule"),d.assertOptions(_,["fallthrough","matches"]),R&&c(!v.flags.includes("g")&&!v.flags.includes("y"),"pattern should not use global or sticky mode"),b=this.$_compile(b,{appendPath:!0});const P=this.clone();P.$_terms.patterns=P.$_terms.patterns||[];const T={[R?"regex":"schema"]:v,rule:b};return _.matches&&(T.matches=this.$_compile(_.matches),T.matches.type!=="array"&&(T.matches=T.matches.$_root.array().items(T.matches)),P.$_mutateRegister(T.matches),P.$_setFlag("_hasPatternMatch",!0,{clone:!1})),_.fallthrough&&(T.fallthrough=!0),P.$_terms.patterns.push(T),P.$_mutateRegister(b),P}},ref:{method(){return this.$_addRule("ref")},validate:(v,b)=>m.isRef(v)?v:b.error("object.refType",{value:v})},regex:{method(){return this.$_addRule("regex")},validate:(v,b)=>v instanceof RegExp?v:b.error("object.regex",{value:v})},rename:{method(v,b,_={}){c(typeof v=="string"||v instanceof RegExp,"Rename missing the from argument"),c(typeof b=="string"||b instanceof y,"Invalid rename to argument"),c(b!==v,"Cannot rename key to same name:",v),d.assertOptions(_,["alias","ignoreUndefined","override","multiple"]);const R=this.clone();R.$_terms.renames=R.$_terms.renames||[];for(const P of R.$_terms.renames)c(P.from!==v,"Cannot rename the same key multiple times");return b instanceof y&&R.$_mutateRegister(b),R.$_terms.renames.push({from:v,to:b,options:a(g.renameDefaults,_)}),R}},schema:{method(v="any"){return this.$_addRule({name:"schema",args:{type:v}})},validate:(v,b,{type:_})=>!d.isSchema(v)||_!=="any"&&v.type!==_?b.error("object.schema",{type:_}):v},unknown:{method(v){return this.$_setFlag("unknown",v!==!1)}},with:{method(v,b,_={}){return g.dependency(this,"with",v,b,_)}},without:{method(v,b,_={}){return g.dependency(this,"without",v,b,_)}},xor:{method(...v){return d.verifyFlat(v,"xor"),g.dependency(this,"xor",null,v)}}},overrides:{default(v,b){return v===void 0&&(v=d.symbols.deepDefault),this.$_parent("default",v,b)}},rebuild(v){if(v.$_terms.keys){const b=new f.Sorter;for(const _ of v.$_terms.keys)d.tryWithPath(()=>b.add(_,{after:_.schema.$_rootReferences(),group:_.key}),_.key);v.$_terms.keys=new g.Keys(...b.nodes)}},manifest:{build(v,b){if(b.keys&&(v=v.keys(b.keys)),b.dependencies)for(const{rel:_,key:R=null,peers:P,options:T}of b.dependencies)v=g.dependency(v,_,R,P,T);if(b.patterns)for(const{regex:_,schema:R,rule:P,fallthrough:T,matches:E}of b.patterns)v=v.pattern(_||R,P,{fallthrough:T,matches:E});if(b.renames)for(const{from:_,to:R,options:P}of b.renames)v=v.rename(_,R,P);return v}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),g.clone=function(v,b){if(typeof v=="object"){if(b.nonEnumerables)return u(v,{shallow:!0});const R=Object.create(Object.getPrototypeOf(v));return Object.assign(R,v),R}const _=function(...R){return v.apply(this,R)};return _.prototype=u(v.prototype),Object.defineProperty(_,"name",{value:v.name,writable:!1}),Object.defineProperty(_,"length",{value:v.length,writable:!1}),Object.assign(_,v),_},g.dependency=function(v,b,_,R,P){c(_===null||typeof _=="string",b,"key must be a strings"),P||(P=R.length>1&&typeof R[R.length-1]=="object"?R.pop():{}),d.assertOptions(P,["separator","isPresent"]),R=[].concat(R);const T=d.default(P.separator,"."),E=[];for(const k of R)c(typeof k=="string",b,"peers must be strings"),E.push(p.ref(k,{separator:T,ancestor:0,prefix:!1}));_!==null&&(_=p.ref(_,{separator:T,ancestor:0,prefix:!1}));const N=v.clone();return N.$_terms.dependencies=N.$_terms.dependencies||[],N.$_terms.dependencies.push(new g.Dependency(b,_,E,R,P)),N},g.dependencies={and(v,b,_,R,P){const T=[],E=[],N=b.peers.length,k=g.isPresent(b.options);for(const M of b.peers)k(M.resolve(_,R,P,null,{shadow:!1}))===!1?T.push(M.key):E.push(M.key);if(T.length!==N&&E.length!==N)return{code:"object.and",context:{present:E,presentWithLabels:g.keysToLabels(v,E),missing:T,missingWithLabels:g.keysToLabels(v,T)}}},nand(v,b,_,R,P){const T=[],E=g.isPresent(b.options);for(const M of b.peers)E(M.resolve(_,R,P,null,{shadow:!1}))&&T.push(M.key);if(T.length!==b.peers.length)return;const N=b.paths[0],k=b.paths.slice(1);return{code:"object.nand",context:{main:N,mainWithLabel:g.keysToLabels(v,N),peers:k,peersWithLabels:g.keysToLabels(v,k)}}},or(v,b,_,R,P){const T=g.isPresent(b.options);for(const E of b.peers)if(T(E.resolve(_,R,P,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:b.paths,peersWithLabels:g.keysToLabels(v,b.paths)}}},oxor(v,b,_,R,P){const T=[],E=g.isPresent(b.options);for(const k of b.peers)E(k.resolve(_,R,P,null,{shadow:!1}))&&T.push(k.key);if(!T.length||T.length===1)return;const N={peers:b.paths,peersWithLabels:g.keysToLabels(v,b.paths)};return N.present=T,N.presentWithLabels=g.keysToLabels(v,T),{code:"object.oxor",context:N}},with(v,b,_,R,P){const T=g.isPresent(b.options);for(const E of b.peers)if(T(E.resolve(_,R,P,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:b.key.key,mainWithLabel:g.keysToLabels(v,b.key.key),peer:E.key,peerWithLabel:g.keysToLabels(v,E.key)}}},without(v,b,_,R,P){const T=g.isPresent(b.options);for(const E of b.peers)if(T(E.resolve(_,R,P,null,{shadow:!1})))return{code:"object.without",context:{main:b.key.key,mainWithLabel:g.keysToLabels(v,b.key.key),peer:E.key,peerWithLabel:g.keysToLabels(v,E.key)}}},xor(v,b,_,R,P){const T=[],E=g.isPresent(b.options);for(const k of b.peers)E(k.resolve(_,R,P,null,{shadow:!1}))&&T.push(k.key);if(T.length===1)return;const N={peers:b.paths,peersWithLabels:g.keysToLabels(v,b.paths)};return T.length===0?{code:"object.missing",context:N}:(N.present=T,N.presentWithLabels=g.keysToLabels(v,T),{code:"object.xor",context:N})}},g.keysToLabels=function(v,b){return Array.isArray(b)?b.map(_=>v.$_mapLabels(_)):v.$_mapLabels(b)},g.isPresent=function(v){return typeof v.isPresent=="function"?v.isPresent:b=>b!==void 0},g.rename=function(v,b,_,R,P){const T={};for(const E of v.$_terms.renames){const N=[],k=typeof E.from!="string";if(k)for(const M in b){if(b[M]===void 0&&E.options.ignoreUndefined||M===E.to)continue;const I=E.from.exec(M);I&&N.push({from:M,to:E.to,match:I})}else!Object.prototype.hasOwnProperty.call(b,E.from)||b[E.from]===void 0&&E.options.ignoreUndefined||N.push(E);for(const M of N){const I=M.from;let j=M.to;if(j instanceof y&&(j=j.render(b,_,R,M.match)),I!==j){if(!E.options.multiple&&T[j]&&(P.push(v.$_createError("object.rename.multiple",b,{from:I,to:j,pattern:k},_,R)),R.abortEarly)||Object.prototype.hasOwnProperty.call(b,j)&&!E.options.override&&!T[j]&&(P.push(v.$_createError("object.rename.override",b,{from:I,to:j,pattern:k},_,R)),R.abortEarly))return!1;b[I]===void 0?delete b[j]:b[j]=b[I],T[j]=!0,E.options.alias||delete b[I]}}}return!0},g.unknown=function(v,b,_,R,P,T){if(v.$_terms.patterns){let E=!1;const N=v.$_terms.patterns.map(M=>{if(M.matches)return E=!0,[]}),k=[b,...P.ancestors];for(const M of _){const I=b[M],j=[...P.path,M];for(let L=0;L {const a=o(375),c=o(8068),u=o(8160),f=o(3292),l=o(6354),d={};s.exports=c.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(p,h)=>p.ref(h),validate(p,{schema:h,state:m,prefs:y}){a(h.$_terms.link,"Uninitialized link schema");const g=d.generate(h,p,m,y),v=h.$_terms.link[0].ref;return g.$_validate(p,m.nest(g,`link:${v.display}:${g.type}`),y)},generate:(p,h,m,y)=>d.generate(p,h,m,y),rules:{ref:{method(p){a(!this.$_terms.link,"Cannot reinitialize schema"),p=f.ref(p),a(p.type==="value"||p.type==="local","Invalid reference type:",p.type),a(p.type==="local"||p.ancestor==="root"||p.ancestor>0,"Link cannot reference itself");const h=this.clone();return h.$_terms.link=[{ref:p}],h}},relative:{method(p=!0){return this.$_setFlag("relative",p)}}},overrides:{concat(p){a(this.$_terms.link,"Uninitialized link schema"),a(u.isSchema(p),"Invalid schema object"),a(p.type!=="link","Cannot merge type link with another link");const h=this.clone();return h.$_terms.whens||(h.$_terms.whens=[]),h.$_terms.whens.push({concat:p}),h.$_mutateRebuild()}},manifest:{build:(p,h)=>(a(h.link,"Invalid link description missing link"),p.ref(h.link))}}),d.generate=function(p,h,m,y){let g=m.mainstay.links.get(p);if(g)return g._generate(h,m,y).schema;const v=p.$_terms.link[0].ref,{perspective:b,path:_}=d.perspective(v,m);d.assert(b,"which is outside of schema boundaries",v,p,m,y);try{g=_.length?b.$_reach(_):b}catch{d.assert(!1,"to non-existing schema",v,p,m,y)}return d.assert(g.type!=="link","which is another link",v,p,m,y),p._flags.relative||m.mainstay.links.set(p,g),g._generate(h,m,y).schema},d.perspective=function(p,h){if(p.type==="local"){for(const{schema:m,key:y}of h.schemas){if((m._flags.id||y)===p.path[0])return{perspective:m,path:p.path.slice(1)};if(m.$_terms.shared){for(const g of m.$_terms.shared)if(g._flags.id===p.path[0])return{perspective:g,path:p.path.slice(1)}}}return{perspective:null,path:null}}return p.ancestor==="root"?{perspective:h.schemas[h.schemas.length-1].schema,path:p.path}:{perspective:h.schemas[p.ancestor]&&h.schemas[p.ancestor].schema,path:p.path}},d.assert=function(p,h,m,y,g,v){p||a(!1,`"${l.label(y._flags,g,v)}" contains link reference "${m.display}" ${h}`)}},3832:(s,i,o)=>{const a=o(375),c=o(8068),u=o(8160),f={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/,decimalPlaces(l){const d=l.toString(),p=d.indexOf("."),h=d.indexOf("e");return(p<0?0:(h<0?d.length:h)-p-1)+(h<0?0:Math.max(0,-parseInt(d.slice(h+1))))}};s.exports=c.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(l,{schema:d,error:p}){if(!l.match(f.numberRx))return;l=l.trim();const h={value:parseFloat(l)};if(h.value===0&&(h.value=0),!d._flags.unsafe)if(l.match(/e/i)){if(f.extractSignificantDigits(l)!==f.extractSignificantDigits(String(h.value)))return h.errors=p("number.unsafe"),h}else{const m=h.value.toString();if(m.match(/e/i))return h;if(m!==f.normalizeDecimal(l))return h.errors=p("number.unsafe"),h}return h}},validate(l,{schema:d,error:p,prefs:h}){if(l===1/0||l===-1/0)return{value:l,errors:p("number.infinity")};if(!u.isNumber(l))return{value:l,errors:p("number.base")};const m={value:l};if(h.convert){const y=d.$_getRule("precision");if(y){const g=Math.pow(10,y.args.limit);m.value=Math.round(m.value*g)/g}}return m.value===0&&(m.value=0),!d._flags.unsafe&&(l>Number.MAX_SAFE_INTEGER||l u.compare(l,p,m)?l:d.error("number."+h,{limit:y.limit,value:l}),args:[{name:"limit",ref:!0,assert:u.isNumber,message:"must be a number"}]},greater:{method(l){return this.$_addRule({name:"greater",method:"compare",args:{limit:l},operator:">"})}},integer:{method(){return this.$_addRule("integer")},validate:(l,d)=>Math.trunc(l)-l==0?l:d.error("number.integer")},less:{method(l){return this.$_addRule({name:"less",method:"compare",args:{limit:l},operator:"<"})}},max:{method(l){return this.$_addRule({name:"max",method:"compare",args:{limit:l},operator:"<="})}},min:{method(l){return this.$_addRule({name:"min",method:"compare",args:{limit:l},operator:">="})}},multiple:{method(l){const d=typeof l=="number"?f.decimalPlaces(l):null,p=Math.pow(10,d);return this.$_addRule({name:"multiple",args:{base:l,baseDecimalPlace:d,pfactor:p}})},validate:(l,d,{base:p,baseDecimalPlace:h,pfactor:m},y)=>f.decimalPlaces(l)>h?d.error("number.multiple",{multiple:y.args.base,value:l}):Math.round(m*l)%Math.round(m*p)==0?l:d.error("number.multiple",{multiple:y.args.base,value:l}),args:[{name:"base",ref:!0,assert:l=>typeof l=="number"&&isFinite(l)&&l>0,message:"must be a positive number"},"baseDecimalPlace","pfactor"],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(l,d)=>Number.isSafeInteger(l)&&l>=0&&l<=65535?l:d.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(l){return a(Number.isSafeInteger(l),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:l}})},validate(l,d,{limit:p}){const h=l.toString().match(f.precisionRx);return Math.max((h[1]?h[1].length:0)-(h[2]?parseInt(h[2],10):0),0)<=p?l:d.error("number.precision",{limit:p,value:l})},convert:!0},sign:{method(l){return a(["negative","positive"].includes(l),"Invalid sign",l),this.$_addRule({name:"sign",args:{sign:l}})},validate:(l,d,{sign:p})=>p==="negative"&&l<0||p==="positive"&&l>0?l:d.error(`number.${p}`)},unsafe:{method(l=!0){return a(typeof l=="boolean","enabled must be a boolean"),this.$_setFlag("unsafe",l)}}},cast:{string:{from:l=>typeof l=="number",to:(l,d)=>l.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),f.extractSignificantDigits=function(l){return l.replace(f.exponentialPartRegex,"").replace(f.dotRegex,"").replace(f.trailingZerosRegex,"").replace(f.leadingSignAndZerosRegex,"")},f.normalizeDecimal=function(l){return(l=l.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&l.endsWith("0")&&(l=l.replace(/0+$/,"")),l==="-0"?"0":l}},8966:(s,i,o)=>{const a=o(7824);s.exports=a.extend({type:"object",cast:{map:{from:c=>c&&typeof c=="object",to:(c,u)=>new Map(Object.entries(c))}}})},7417:(s,i,o)=>{const a=o(375),c=o(5380),u=o(1745),f=o(9959),l=o(6064),d=o(9926),p=o(5752),h=o(8068),m=o(8160),y={tlds:d instanceof Set&&{tlds:{allow:d,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:{withPrefix:/^0x[0-9a-f]+$/i,withOptionalPrefix:/^(?:0x)?[0-9a-f]+$/i,withoutPrefix:/^[0-9a-f]+$/i},ipRegex:f.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5",uuidv6:"6",uuidv7:"7",uuidv8:"8"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};s.exports=h.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(g,{schema:v,state:b,prefs:_}){const R=v.$_getRule("normalize");R&&(g=g.normalize(R.args.form));const P=v.$_getRule("case");P&&(g=P.args.direction==="upper"?g.toLocaleUpperCase():g.toLocaleLowerCase());const T=v.$_getRule("trim");if(T&&T.args.enabled&&(g=g.trim()),v.$_terms.replacements)for(const N of v.$_terms.replacements)g=g.replace(N.pattern,N.replacement);const E=v.$_getRule("hex");if(E&&E.args.options.byteAligned&&g.length%2!=0&&(g=`0${g}`),v.$_getRule("isoDate")){const N=y.isoDate(g);N&&(g=N)}if(v._flags.truncate){const N=v.$_getRule("max");if(N){let k=N.args.limit;if(m.isResolvable(k)&&(k=k.resolve(g,b,_),!m.limit(k)))return{value:g,errors:v.$_createError("any.ref",k,{ref:N.args.limit,arg:"limit",reason:"must be a positive integer"},b,_)};g=g.slice(0,k)}}return{value:g}}},validate(g,{schema:v,error:b}){if(typeof g!="string")return{value:g,errors:b("string.base")};if(g===""){const _=v.$_getRule("min");return _&&_.args.limit===0?void 0:{value:g,errors:b("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(g,v)=>/^[a-zA-Z0-9]+$/.test(g)?g:v.error("string.alphanum")},base64:{method(g={}){return m.assertOptions(g,["paddingRequired","urlSafe"]),g={urlSafe:!1,paddingRequired:!0,...g},a(typeof g.paddingRequired=="boolean","paddingRequired must be boolean"),a(typeof g.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:g}})},validate:(g,v,{options:b})=>y.base64Regex[b.paddingRequired][b.urlSafe].test(g)?g:v.error("string.base64")},case:{method(g){return a(["lower","upper"].includes(g),"Invalid case:",g),this.$_addRule({name:"case",args:{direction:g}})},validate:(g,v,{direction:b})=>b==="lower"&&g===g.toLocaleLowerCase()||b==="upper"&&g===g.toLocaleUpperCase()?g:v.error(`string.${b}case`),convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(g,v){let b=g.length,_=0,R=1;for(;b--;){const P=g.charAt(b)*R;_+=P-9*(P>9),R^=3}return _>0&&_%10==0?g:v.error("string.creditCard")}},dataUri:{method(g={}){return m.assertOptions(g,["paddingRequired"]),g={paddingRequired:!0,...g},a(typeof g.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:g}})},validate(g,v,{options:b}){const _=g.match(y.dataUriRegex);return _&&(!_[2]||_[2]!=="base64"||y.base64Regex[b.paddingRequired].false.test(_[3]))?g:v.error("string.dataUri")}},domain:{method(g){g&&m.assertOptions(g,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const v=y.addressOptions(g);return this.$_addRule({name:"domain",args:{options:g},address:v})},validate:(g,v,b,{address:_})=>c.isValid(g,_)?g:v.error("string.domain")},email:{method(g={}){m.assertOptions(g,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),a(g.multiple===void 0||typeof g.multiple=="boolean","multiple option must be an boolean");const v=y.addressOptions(g),b=new RegExp(`\\s*[${g.separator?l(g.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:g},regex:b,address:v})},validate(g,v,{options:b},{regex:_,address:R}){const P=b.multiple?g.split(_):[g],T=[];for(const E of P)u.isValid(E,R)||T.push(E);return T.length?v.error("string.email",{value:g,invalids:T}):g}},guid:{alias:"uuid",method(g={}){m.assertOptions(g,["version","separator"]);let v="";if(g.version){const R=[].concat(g.version);a(R.length>=1,"version must have at least 1 valid version specified");const P=new Set;for(let T=0;T (b.prefix==="optional"?y.hexRegex.withOptionalPrefix:b.prefix===!0?y.hexRegex.withPrefix:y.hexRegex.withoutPrefix).test(g)?b.byteAligned&&g.length%2!=0?v.error("string.hexAlign"):g:v.error("string.hex")},hostname:{method(){return this.$_addRule("hostname")},validate:(g,v)=>c.isValid(g,{minDomainSegments:1})||y.ipRegex.test(g)?g:v.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(g={}){m.assertOptions(g,["cidr","version"]);const{cidr:v,versions:b,regex:_}=f.regex(g),R=g.version?b:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:v,version:R}},regex:_})},validate:(g,v,{options:b},{regex:_})=>_.test(g)?g:b.version?v.error("string.ipVersion",{value:g,cidr:b.cidr,version:b.version}):v.error("string.ip",{value:g,cidr:b.cidr})},isoDate:{method(){return this.$_addRule("isoDate")},validate:(g,{error:v})=>y.isoDate(g)?g:v("string.isoDate")},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(g,v)=>y.isoDurationRegex.test(g)?g:v.error("string.isoDuration")},length:{method(g,v){return y.length(this,"length",g,"=",v)},validate(g,v,{limit:b,encoding:_},{name:R,operator:P,args:T}){const E=!_&&g.length;return m.compare(E,b,P)?g:v.error("string."+R,{limit:T.limit,value:g,encoding:_})},args:[{name:"limit",ref:!0,assert:m.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(g,v){return y.length(this,"max",g,"<=",v)},args:["limit","encoding"]},min:{method(g,v){return y.length(this,"min",g,">=",v)},args:["limit","encoding"]},normalize:{method(g="NFC"){return a(y.normalizationForms.includes(g),"normalization form must be one of "+y.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:g}})},validate:(g,{error:v},{form:b})=>g===g.normalize(b)?g:v("string.normalize",{value:g,form:b}),convert:!0},pattern:{alias:"regex",method(g,v={}){a(g instanceof RegExp,"regex must be a RegExp"),a(!g.flags.includes("g")&&!g.flags.includes("y"),"regex should not use global or sticky mode"),typeof v=="string"&&(v={name:v}),m.assertOptions(v,["invert","name"]);const b=["string.pattern",v.invert?".invert":"",v.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:g,options:v},errorCode:b})},validate:(g,v,{regex:b,options:_},{errorCode:R})=>b.test(g)^_.invert?g:v.error(R,{name:_.name,regex:b,value:g}),args:["regex","options"],multi:!0},replace:{method(g,v){typeof g=="string"&&(g=new RegExp(l(g),"g")),a(g instanceof RegExp,"pattern must be a RegExp"),a(typeof v=="string","replacement must be a String");const b=this.clone();return b.$_terms.replacements||(b.$_terms.replacements=[]),b.$_terms.replacements.push({pattern:g,replacement:v}),b}},token:{method(){return this.$_addRule("token")},validate:(g,v)=>/^\w+$/.test(g)?g:v.error("string.token")},trim:{method(g=!0){return a(typeof g=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:g}})},validate:(g,v,{enabled:b})=>b&&g!==g.trim()?v.error("string.trim"):g,convert:!0},truncate:{method(g=!0){return a(typeof g=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",g)}},uppercase:{method(){return this.case("upper")}},uri:{method(g={}){m.assertOptions(g,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme","encodeUri"]),g.domain&&m.assertOptions(g.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:v,scheme:b}=p.regex(g),_=g.domain?y.addressOptions(g.domain):null;return this.$_addRule({name:"uri",args:{options:g},regex:v,domain:_,scheme:b})},validate(g,v,{options:b},{regex:_,domain:R,scheme:P}){if(["http:/","https:/"].includes(g))return v.error("string.uri");let T=_.exec(g);if(!T&&v.prefs.convert&&b.encodeUri){const E=encodeURI(g);T=_.exec(E),T&&(g=E)}if(T){const E=T[1]||T[2];return!R||b.allowRelative&&!E||c.isValid(E,R)?g:v.error("string.domain",{value:E})}return b.relativeOnly?v.error("string.uriRelativeOnly"):b.scheme?v.error("string.uriCustomScheme",{scheme:P,value:g}):v.error("string.uri")}}},manifest:{build(g,v){if(v.replacements)for(const{pattern:b,replacement:_}of v.replacements)g=g.replace(b,_);return g}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),y.addressOptions=function(g){if(!g)return y.tlds||g;if(a(g.minDomainSegments===void 0||Number.isSafeInteger(g.minDomainSegments)&&g.minDomainSegments>0,"minDomainSegments must be a positive integer"),a(g.maxDomainSegments===void 0||Number.isSafeInteger(g.maxDomainSegments)&&g.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),g.tlds===!1)return g;if(g.tlds===!0||g.tlds===void 0)return a(y.tlds,"Built-in TLD list disabled"),Object.assign({},g,y.tlds);a(typeof g.tlds=="object","tlds must be true, false, or an object");const v=g.tlds.deny;if(v)return Array.isArray(v)&&(g=Object.assign({},g,{tlds:{deny:new Set(v)}})),a(g.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),a(!g.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),y.validateTlds(g.tlds.deny,"tlds.deny"),g;const b=g.tlds.allow;return b?b===!0?(a(y.tlds,"Built-in TLD list disabled"),Object.assign({},g,y.tlds)):(Array.isArray(b)&&(g=Object.assign({},g,{tlds:{allow:new Set(b)}})),a(g.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),y.validateTlds(g.tlds.allow,"tlds.allow"),g):g},y.validateTlds=function(g,v){for(const b of g)a(c.isValid(b,{minDomainSegments:1,maxDomainSegments:1}),`${v} must contain valid top level domain names`)},y.isoDate=function(g){if(!m.isIsoDate(g))return null;/.*T.*[+-]\d\d$/.test(g)&&(g+="00");const v=new Date(g);return isNaN(v.getTime())?null:v.toISOString()},y.length=function(g,v,b,_,R){return a(!R||!1,"Invalid encoding:",R),g.$_addRule({name:v,method:"length",args:{limit:b,encoding:R},operator:_})}},8826:(s,i,o)=>{const a=o(375),c=o(8068),u={};u.Map=class extends Map{slice(){return new u.Map(this)}},s.exports=c.extend({type:"symbol",terms:{map:{init:new u.Map}},coerce:{method(f,{schema:l,error:d}){const p=l.$_terms.map.get(f);return p&&(f=p),l._flags.only&&typeof f!="symbol"?{value:f,errors:d("symbol.map",{map:l.$_terms.map})}:{value:f}}},validate(f,{error:l}){if(typeof f!="symbol")return{value:f,errors:l("symbol.base")}},rules:{map:{method(f){f&&!f[Symbol.iterator]&&typeof f=="object"&&(f=Object.entries(f)),a(f&&f[Symbol.iterator],"Iterable must be an iterable or object");const l=this.clone(),d=[];for(const p of f){a(p&&p[Symbol.iterator],"Entry must be an iterable");const[h,m]=p;a(typeof h!="object"&&typeof h!="function"&&typeof h!="symbol","Key must not be of type object, function, or Symbol"),a(typeof m=="symbol","Value must be a Symbol"),l.$_terms.map.set(h,m),d.push(m)}return l.valid(...d)}}},manifest:{build:(f,l)=>(l.map&&(f=f.map(l.map)),f)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(s,i,o)=>{const a=o(375),c=o(8571),u=o(738),f=o(9621),l=o(8160),d=o(6354),p=o(493),h={result:Symbol("result")};i.entry=function(m,y,g){let v=l.defaults;g&&(a(g.warnings===void 0,"Cannot override warnings preference in synchronous validation"),a(g.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),v=l.preferences(l.defaults,g));const b=h.entry(m,y,v);a(!b.mainstay.externals.length,"Schema with external rules must use validateAsync()");const _={value:b.value};return b.error&&(_.error=b.error),b.mainstay.warnings.length&&(_.warning=d.details(b.mainstay.warnings)),b.mainstay.debug&&(_.debug=b.mainstay.debug),b.mainstay.artifacts&&(_.artifacts=b.mainstay.artifacts),_},i.entryAsync=async function(m,y,g){let v=l.defaults;g&&(v=l.preferences(l.defaults,g));const b=h.entry(m,y,v),_=b.mainstay;if(b.error)throw _.debug&&(b.error.debug=_.debug),b.error;if(_.externals.length){let P=b.value;const T=[];for(const E of _.externals){const N=E.state.path,k=E.schema.type==="link"?_.links.get(E.schema):null;let M,I,j=P;const L=N.length?[P]:[],U=N.length?f(m,N):m;if(N.length){M=N[N.length-1];let K=P;for(const H of N.slice(0,-1))K=K[H],L.unshift(K);I=L[0],j=I[M]}try{const K=(q,ee)=>(k||E.schema).$_createError(q,j,ee,E.state,v),H=await E.method(j,{schema:E.schema,linked:k,state:E.state,prefs:g,original:U,error:K,errorsArray:h.errorsArray,warn:(q,ee)=>_.warnings.push((k||E.schema).$_createError(q,j,ee,E.state,v)),message:(q,ee)=>(k||E.schema).$_createError("external",j,ee,E.state,v,{messages:q})});if(H===void 0||H===j)continue;if(H instanceof d.Report){if(_.tracer.log(E.schema,E.state,"rule","external","error"),T.push(H),v.abortEarly)break;continue}if(Array.isArray(H)&&H[l.symbols.errors]){if(_.tracer.log(E.schema,E.state,"rule","external","error"),T.push(...H),v.abortEarly)break;continue}I?(_.tracer.value(E.state,"rule",j,H,"external"),I[M]=H):(_.tracer.value(E.state,"rule",P,H,"external"),P=H)}catch(K){throw v.errors.label&&(K.message+=` (${E.label})`),K}}if(b.value=P,T.length)throw b.error=d.process(T,m,v),_.debug&&(b.error.debug=_.debug),b.error}if(!v.warnings&&!v.debug&&!v.artifacts)return b.value;const R={value:b.value};return _.warnings.length&&(R.warning=d.details(_.warnings)),_.debug&&(R.debug=_.debug),_.artifacts&&(R.artifacts=_.artifacts),R},h.Mainstay=class{constructor(m,y,g){this.externals=[],this.warnings=[],this.tracer=m,this.debug=y,this.links=g,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const m=this._snapshots.pop();this.externals=m.externals,this.warnings=m.warnings}commit(){this._snapshots.pop()}},h.entry=function(m,y,g){const{tracer:v,cleanup:b}=h.tracer(y,g),_=g.debug?[]:null,R=y._ids._schemaChain?new Map:null,P=new h.Mainstay(v,_,R),T=y._ids._schemaChain?[{schema:y}]:null,E=new p([],[],{mainstay:P,schemas:T}),N=i.validate(m,y,E,g);b&&y.$_root.untrace();const k=d.process(N.errors,m,g);return{value:N.value,error:k,mainstay:P}},h.tracer=function(m,y){return m.$_root._tracer?{tracer:m.$_root._tracer._register(m)}:y.debug?(a(m.$_root.trace,"Debug mode not supported"),{tracer:m.$_root.trace()._register(m),cleanup:!0}):{tracer:h.ignore}},i.validate=function(m,y,g,v,b={}){if(y.$_terms.whens&&(y=y._generate(m,g,v).schema),y._preferences&&(v=h.prefs(y,v)),y._cache&&v.cache){const k=y._cache.get(m);if(g.mainstay.tracer.debug(g,"validate","cached",!!k),k)return k}const _=(k,M,I)=>y.$_createError(k,m,M,I||g,v),R={original:m,prefs:v,schema:y,state:g,error:_,errorsArray:h.errorsArray,warn:(k,M,I)=>g.mainstay.warnings.push(_(k,M,I)),message:(k,M)=>y.$_createError("custom",m,M,g,v,{messages:k})};g.mainstay.tracer.entry(y,g);const P=y._definition;if(P.prepare&&m!==void 0&&v.convert){const k=P.prepare(m,R);if(k){if(g.mainstay.tracer.value(g,"prepare",m,k.value),k.errors)return h.finalize(k.value,[].concat(k.errors),R);m=k.value}}if(P.coerce&&m!==void 0&&v.convert&&(!P.coerce.from||P.coerce.from.includes(typeof m))){const k=P.coerce.method(m,R);if(k){if(g.mainstay.tracer.value(g,"coerced",m,k.value),k.errors)return h.finalize(k.value,[].concat(k.errors),R);m=k.value}}const T=y._flags.empty;T&&T.$_match(h.trim(m,y),g.nest(T),l.defaults)&&(g.mainstay.tracer.value(g,"empty",m,void 0),m=void 0);const E=b.presence||y._flags.presence||(y._flags._endedSwitch?null:v.presence);if(m===void 0){if(E==="forbidden")return h.finalize(m,null,R);if(E==="required")return h.finalize(m,[y.$_createError("any.required",m,null,g,v)],R);if(E==="optional"){if(y._flags.default!==l.symbols.deepDefault)return h.finalize(m,null,R);g.mainstay.tracer.value(g,"default",m,{}),m={}}}else if(E==="forbidden")return h.finalize(m,[y.$_createError("any.unknown",m,null,g,v)],R);const N=[];if(y._valids){const k=y._valids.get(m,g,v,y._flags.insensitive);if(k)return v.convert&&(g.mainstay.tracer.value(g,"valids",m,k.value),m=k.value),g.mainstay.tracer.filter(y,g,"valid",k),h.finalize(m,null,R);if(y._flags.only){const M=y.$_createError("any.only",m,{valids:y._valids.values({display:!0})},g,v);if(v.abortEarly)return h.finalize(m,[M],R);N.push(M)}}if(y._invalids){const k=y._invalids.get(m,g,v,y._flags.insensitive);if(k){g.mainstay.tracer.filter(y,g,"invalid",k);const M=y.$_createError("any.invalid",m,{invalids:y._invalids.values({display:!0})},g,v);if(v.abortEarly)return h.finalize(m,[M],R);N.push(M)}}if(P.validate){const k=P.validate(m,R);if(k&&(g.mainstay.tracer.value(g,"base",m,k.value),m=k.value,k.errors)){if(!Array.isArray(k.errors))return N.push(k.errors),h.finalize(m,N,R);if(k.errors.length)return N.push(...k.errors),h.finalize(m,N,R)}}return y._rules.length?h.rules(m,N,R):h.finalize(m,N,R)},h.rules=function(m,y,g){const{schema:v,state:b,prefs:_}=g;for(const R of v._rules){const P=v._definition.rules[R.method];if(P.convert&&_.convert){b.mainstay.tracer.log(v,b,"rule",R.name,"full");continue}let T,E=R.args;if(R._resolve.length){E=Object.assign({},E);for(const k of R._resolve){const M=P.argsByName.get(k),I=E[k].resolve(m,b,_),j=M.normalize?M.normalize(I):I,L=l.validateArg(j,null,M);if(L){T=v.$_createError("any.ref",I,{arg:k,ref:E[k],reason:L},b,_);break}E[k]=j}}T=T||P.validate(m,g,E,R);const N=h.rule(T,R);if(N.errors){if(b.mainstay.tracer.log(v,b,"rule",R.name,"error"),R.warn){b.mainstay.warnings.push(...N.errors);continue}if(_.abortEarly)return h.finalize(m,N.errors,g);y.push(...N.errors)}else b.mainstay.tracer.log(v,b,"rule",R.name,"pass"),b.mainstay.tracer.value(b,"rule",m,N.value,R.name),m=N.value}return h.finalize(m,y,g)},h.rule=function(m,y){return m instanceof d.Report?(h.error(m,y),{errors:[m],value:null}):Array.isArray(m)&&m[l.symbols.errors]?(m.forEach(g=>h.error(g,y)),{errors:m,value:null}):{errors:null,value:m}},h.error=function(m,y){return y.message&&m._setTemplate(y.message),m},h.finalize=function(m,y,g){y=y||[];const{schema:v,state:b,prefs:_}=g;if(y.length){const P=h.default("failover",void 0,y,g);P!==void 0&&(b.mainstay.tracer.value(b,"failover",m,P),m=P,y=[])}if(y.length&&v._flags.error)if(typeof v._flags.error=="function"){y=v._flags.error(y),Array.isArray(y)||(y=[y]);for(const P of y)a(P instanceof Error||P instanceof d.Report,"error() must return an Error object")}else y=[v._flags.error];if(m===void 0){const P=h.default("default",m,y,g);b.mainstay.tracer.value(b,"default",m,P),m=P}if(v._flags.cast&&m!==void 0){const P=v._definition.cast[v._flags.cast];if(P.from(m)){const T=P.to(m,g);b.mainstay.tracer.value(b,"cast",m,T,v._flags.cast),m=T}}if(v.$_terms.externals&&_.externals&&_._externals!==!1)for(const{method:P}of v.$_terms.externals)b.mainstay.externals.push({method:P,schema:v,state:b,label:d.label(v._flags,b,_)});const R={value:m,errors:y.length?y:null};return v._flags.result&&(R.value=v._flags.result==="strip"?void 0:g.original,b.mainstay.tracer.value(b,v._flags.result,m,R.value),b.shadow(m,v._flags.result)),v._cache&&_.cache!==!1&&!v._refs.length&&v._cache.set(g.original,R),m===void 0||R.errors||v._flags.artifact===void 0||(b.mainstay.artifacts=b.mainstay.artifacts||new Map,b.mainstay.artifacts.has(v._flags.artifact)||b.mainstay.artifacts.set(v._flags.artifact,[]),b.mainstay.artifacts.get(v._flags.artifact).push(b.path)),R},h.prefs=function(m,y){const g=y===l.defaults;return g&&m._preferences[l.symbols.prefs]?m._preferences[l.symbols.prefs]:(y=l.preferences(y,m._preferences),g&&(m._preferences[l.symbols.prefs]=y),y)},h.default=function(m,y,g,v){const{schema:b,state:_,prefs:R}=v,P=b._flags[m];if(R.noDefaults||P===void 0)return y;if(_.mainstay.tracer.log(b,_,"rule",m,"full"),!P)return P;if(typeof P=="function"){const T=P.length?[c(_.ancestors[0]),v]:[];try{return P(...T)}catch(E){return void g.push(b.$_createError(`any.${m}`,null,{error:E},_,R))}}return typeof P!="object"?P:P[l.symbols.literal]?P.literal:l.isResolvable(P)?P.resolve(y,_,R):c(P)},h.trim=function(m,y){if(typeof m!="string")return m;const g=y.$_getRule("trim");return g&&g.args.enabled?m.trim():m},h.ignore={active:!1,debug:u,entry:u,filter:u,log:u,resolve:u,value:u},h.errorsArray=function(){const m=[];return m[l.symbols.errors]=!0,m}},2036:(s,i,o)=>{const a=o(375),c=o(9474),u=o(8160),f={};s.exports=f.Values=class{constructor(l,d){this._values=new Set(l),this._refs=new Set(d),this._lowercase=f.lowercases(l),this._override=!1}get length(){return this._values.size+this._refs.size}add(l,d){u.isResolvable(l)?this._refs.has(l)||(this._refs.add(l),d&&d.register(l)):this.has(l,null,null,!1)||(this._values.add(l),typeof l=="string"&&this._lowercase.set(l.toLowerCase(),l))}static merge(l,d,p){if(l=l||new f.Values,d){if(d._override)return d.clone();for(const h of[...d._values,...d._refs])l.add(h)}if(p)for(const h of[...p._values,...p._refs])l.remove(h);return l.length?l:null}remove(l){u.isResolvable(l)?this._refs.delete(l):(this._values.delete(l),typeof l=="string"&&this._lowercase.delete(l.toLowerCase()))}has(l,d,p,h){return!!this.get(l,d,p,h)}get(l,d,p,h){if(!this.length)return!1;if(this._values.has(l))return{value:l};if(typeof l=="string"&&l&&h){const m=this._lowercase.get(l.toLowerCase());if(m)return{value:m}}if(!this._refs.size&&typeof l!="object")return!1;if(typeof l=="object"){for(const m of this._values)if(c(m,l))return{value:m}}if(d)for(const m of this._refs){const y=m.resolve(l,d,p,null,{in:!0});if(y===void 0)continue;const g=m.in&&typeof y=="object"?Array.isArray(y)?y:Object.keys(y):[y];for(const v of g)if(typeof v==typeof l){if(h&&l&&typeof l=="string"){if(v.toLowerCase()===l.toLowerCase())return{value:v,ref:m}}else if(c(v,l))return{value:v,ref:m}}}return!1}override(){this._override=!0}values(l){if(l&&l.display){const d=[];for(const p of[...this._values,...this._refs])p!==void 0&&d.push(p);return d}return Array.from([...this._values,...this._refs])}clone(){const l=new f.Values(this._values,this._refs);return l._override=this._override,l}concat(l){a(!l._override,"Cannot concat override set of values");const d=new f.Values([...this._values,...l._values],[...this._refs,...l._refs]);return d._override=this._override,d}describe(){const l=[];this._override&&l.push({override:!0});for(const d of this._values.values())l.push(d&&typeof d=="object"?{value:d}:d);for(const d of this._refs.values())l.push(d.describe());return l}},f.Values.prototype[u.symbols.values]=!0,f.Values.prototype.slice=f.Values.prototype.clone,f.lowercases=function(l){const d=new Map;if(l)for(const p of l)typeof p=="string"&&d.set(p.toLowerCase(),p);return d}},978:(s,i,o)=>{const a=o(375),c=o(8571),u=o(1687),f=o(9621),l={};s.exports=function(d,p,h={}){if(a(d&&typeof d=="object","Invalid defaults value: must be an object"),a(!p||p===!0||typeof p=="object","Invalid source value: must be true, falsy or an object"),a(typeof h=="object","Invalid options: must be an object"),!p)return null;if(h.shallow)return l.applyToDefaultsWithShallow(d,p,h);const m=c(d);if(p===!0)return m;const y=h.nullOverride!==void 0&&h.nullOverride;return u(m,p,{nullOverride:y,mergeArrays:!1})},l.applyToDefaultsWithShallow=function(d,p,h){const m=h.shallow;a(Array.isArray(m),"Invalid keys");const y=new Map,g=p===!0?null:new Set;for(let _ of m){_=Array.isArray(_)?_:_.split(".");const R=f(d,_);R&&typeof R=="object"?y.set(R,g&&f(p,_)||R):g&&g.add(_)}const v=c(d,{},y);if(!g)return v;for(const _ of g)l.reachCopy(v,p,_);const b=h.nullOverride!==void 0&&h.nullOverride;return u(v,p,{nullOverride:b,mergeArrays:!1})},l.reachCopy=function(d,p,h){for(const g of h){if(!(g in p))return;const v=p[g];if(typeof v!="object"||v===null)return;p=v}const m=p;let y=d;for(let g=0;g {const a=o(7916);s.exports=function(c,...u){if(!c)throw u.length===1&&u[0]instanceof Error?u[0]:new a(u)}},8571:(s,i,o)=>{const a=o(9621),c=o(4277),u=o(7043),f={needsProtoHack:new Set([c.set,c.map,c.weakSet,c.weakMap])};s.exports=f.clone=function(l,d={},p=null){if(typeof l!="object"||l===null)return l;let h=f.clone,m=p;if(d.shallow){if(d.shallow!==!0)return f.cloneWithShallow(l,d);h=b=>b}else if(m){const b=m.get(l);if(b)return b}else m=new Map;const y=c.getInternalProto(l);if(y===c.buffer)return!1;if(y===c.date)return new Date(l.getTime());if(y===c.regex)return new RegExp(l);const g=f.base(l,y,d);if(g===l)return l;if(m&&m.set(l,g),y===c.set)for(const b of l)g.add(h(b,d,m));else if(y===c.map)for(const[b,_]of l)g.set(b,h(_,d,m));const v=u.keys(l,d);for(const b of v){if(b==="__proto__")continue;if(y===c.array&&b==="length"){g.length=l.length;continue}const _=Object.getOwnPropertyDescriptor(l,b);_?_.get||_.set?Object.defineProperty(g,b,_):_.enumerable?g[b]=h(l[b],d,m):Object.defineProperty(g,b,{enumerable:!1,writable:!0,configurable:!0,value:h(l[b],d,m)}):Object.defineProperty(g,b,{enumerable:!0,writable:!0,configurable:!0,value:h(l[b],d,m)})}return g},f.cloneWithShallow=function(l,d){const p=d.shallow;(d=Object.assign({},d)).shallow=!1;const h=new Map;for(const m of p){const y=a(l,m);typeof y!="object"&&typeof y!="function"||h.set(y,y)}return f.clone(l,d,h)},f.base=function(l,d,p){if(p.prototype===!1)return f.needsProtoHack.has(d)?new d.constructor:d===c.array?[]:{};const h=Object.getPrototypeOf(l);if(h&&h.isImmutable)return l;if(d===c.array){const m=[];return h!==d&&Object.setPrototypeOf(m,h),m}if(f.needsProtoHack.has(d)){const m=new h.constructor;return h!==d&&Object.setPrototypeOf(m,h),m}return Object.create(h)}},9474:(s,i,o)=>{const a=o(4277),c={mismatched:null};s.exports=function(u,f,l){return l=Object.assign({prototype:!0},l),!!c.isDeepEqual(u,f,l,[])},c.isDeepEqual=function(u,f,l,d){if(u===f)return u!==0||1/u==1/f;const p=typeof u;if(p!==typeof f||u===null||f===null)return!1;if(p==="function"){if(!l.deepFunction||u.toString()!==f.toString())return!1}else if(p!=="object")return u!=u&&f!=f;const h=c.getSharedType(u,f,!!l.prototype);switch(h){case a.buffer:return!1;case a.promise:return u===f;case a.regex:return u.toString()===f.toString();case c.mismatched:return!1}for(let m=d.length-1;m>=0;--m)if(d[m].isSame(u,f))return!0;d.push(new c.SeenEntry(u,f));try{return!!c.isDeepEqualObj(h,u,f,l,d)}finally{d.pop()}},c.getSharedType=function(u,f,l){if(l)return Object.getPrototypeOf(u)!==Object.getPrototypeOf(f)?c.mismatched:a.getInternalProto(u);const d=a.getInternalProto(u);return d!==a.getInternalProto(f)?c.mismatched:d},c.valueOf=function(u){const f=u.valueOf;if(f===void 0)return u;try{return f.call(u)}catch(l){return l}},c.hasOwnEnumerableProperty=function(u,f){return Object.prototype.propertyIsEnumerable.call(u,f)},c.isSetSimpleEqual=function(u,f){for(const l of Set.prototype.values.call(u))if(!Set.prototype.has.call(f,l))return!1;return!0},c.isDeepEqualObj=function(u,f,l,d,p){const{isDeepEqual:h,valueOf:m,hasOwnEnumerableProperty:y}=c,{keys:g,getOwnPropertySymbols:v}=Object;if(u===a.array){if(!d.part){if(f.length!==l.length)return!1;for(let T=0;T {const a=o(8761);s.exports=class extends Error{constructor(c){super(c.filter(u=>u!=="").map(u=>typeof u=="string"?u:u instanceof Error?u.message:a(u)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,i.assert)}}},5277:s=>{const i={};s.exports=function(o){if(!o)return"";let a="";for(let c=0;c =256?""+o+";":`${o.toString(16).padStart(2,"0")};`)},i.isSafe=function(o){return i.safeCharCodes.has(o)},i.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),i.safeCharCodes=function(){const o=new Set;for(let a=32;a<123;++a)(a>=97||a>=65&&a<=90||a>=48&&a<=57||a===32||a===46||a===44||a===45||a===58||a===95)&&o.add(a);return o}()},6064:s=>{s.exports=function(i){return i.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:s=>{s.exports=function(){}},1687:(s,i,o)=>{const a=o(375),c=o(8571),u=o(7043),f={};s.exports=f.merge=function(l,d,p){if(a(l&&typeof l=="object","Invalid target value: must be an object"),a(d==null||typeof d=="object","Invalid source value: must be null, undefined, or an object"),!d)return l;if(p=Object.assign({nullOverride:!0,mergeArrays:!0},p),Array.isArray(d)){a(Array.isArray(l),"Cannot merge array onto an object"),p.mergeArrays||(l.length=0);for(let m=0;m {const a=o(375),c={};s.exports=function(u,f,l){if(f===!1||f==null)return u;typeof(l=l||{})=="string"&&(l={separator:l});const d=Array.isArray(f);a(!d||!l.separator,"Separator option is not valid for array-based chain");const p=d?f:f.split(l.separator||".");let h=u;for(let m=0;m {s.exports=function(...i){try{return JSON.stringify(...i)}catch(o){return"[Cannot display object: "+o.message+"]"}}},4277:(s,i)=>{const o={};i=s.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},o.typeMap=new Map([["[object Error]",i.error],["[object Map]",i.map],["[object Promise]",i.promise],["[object Set]",i.set],["[object WeakMap]",i.weakMap],["[object WeakSet]",i.weakSet]]),i.getInternalProto=function(a){if(Array.isArray(a))return i.array;if(a instanceof Date)return i.date;if(a instanceof RegExp)return i.regex;if(a instanceof Error)return i.error;const c=Object.prototype.toString.call(a);return o.typeMap.get(c)||i.generic}},7043:(s,i)=>{i.keys=function(o,a={}){return a.symbols!==!1?Reflect.ownKeys(o):Object.getOwnPropertyNames(o)}},3652:(s,i,o)=>{const a=o(375),c={};i.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(u,f){const l=[].concat((f=f||{}).before||[]),d=[].concat(f.after||[]),p=f.group||"?",h=f.sort||0;a(!l.includes(p),`Item cannot come before itself: ${p}`),a(!l.includes("?"),"Item cannot come before unassociated items"),a(!d.includes(p),`Item cannot come after itself: ${p}`),a(!d.includes("?"),"Item cannot come after unassociated items"),Array.isArray(u)||(u=[u]);for(const m of u){const y={seq:this._items.length,sort:h,before:l,after:d,group:p,node:m};this._items.push(y)}if(!f.manual){const m=this._sort();a(m,"item",p!=="?"?`added into group ${p}`:"","created a dependencies error")}return this.nodes}merge(u){Array.isArray(u)||(u=[u]);for(const l of u)if(l)for(const d of l._items)this._items.push(Object.assign({},d));this._items.sort(c.mergeSort);for(let l=0;l u.sort===f.sort?0:u.sort {const a=o(443),c=o(2178),u={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:a.URL||URL};i.analyze=function(f,l={}){if(!f)return c.code("DOMAIN_NON_EMPTY_STRING");if(typeof f!="string")throw new Error("Invalid input: domain must be a string");if(f.length>256)return c.code("DOMAIN_TOO_LONG");if(u.nonAsciiRx.test(f)){if(l.allowUnicode===!1)return c.code("DOMAIN_INVALID_UNICODE_CHARS");f=f.normalize("NFC")}if(u.domainControlRx.test(f))return c.code("DOMAIN_INVALID_CHARS");f=u.punycode(f),l.allowFullyQualified&&f[f.length-1]==="."&&(f=f.slice(0,-1));const d=l.minDomainSegments||u.minDomainSegments,p=f.split(".");if(p.length l.maxDomainSegments)return c.code("DOMAIN_SEGMENTS_COUNT_MAX");const h=l.tlds;if(h){const m=p[p.length-1].toLowerCase();if(h.deny&&h.deny.has(m)||h.allow&&!h.allow.has(m))return c.code("DOMAIN_FORBIDDEN_TLDS")}for(let m=0;m 63)return c.code("DOMAIN_LONG_SEGMENT");if(m {const a=o(9848),c=o(5380),u=o(2178),f={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(a.TextEncoder||TextEncoder)};i.analyze=function(l,d){return f.email(l,d)},i.isValid=function(l,d){return!f.email(l,d)},f.email=function(l,d={}){if(typeof l!="string")throw new Error("Invalid input: email must be a string");if(!l)return u.code("EMPTY_STRING");const p=!f.nonAsciiRx.test(l);if(!p){if(d.allowUnicode===!1)return u.code("FORBIDDEN_UNICODE");l=l.normalize("NFC")}const h=l.split("@");if(h.length!==2)return h.length>2?u.code("MULTIPLE_AT_CHAR"):u.code("MISSING_AT_CHAR");const[m,y]=h;if(!m)return u.code("EMPTY_LOCAL");if(!d.ignoreLength){if(l.length>254)return u.code("ADDRESS_TOO_LONG");if(f.encoder.encode(m).length>64)return u.code("LOCAL_TOO_LONG")}return f.local(m,p)||c.analyze(y,d)},f.local=function(l,d){const p=l.split(".");for(const h of p){if(!h.length)return u.code("EMPTY_LOCAL_SEGMENT");if(d){if(!f.atextRx.test(h))return u.code("INVALID_LOCAL_CHARS")}else for(const m of h){if(f.atextRx.test(m))continue;const y=f.binary(m);if(!f.atomRx.test(y))return u.code("INVALID_LOCAL_CHARS")}}},f.binary=function(l){return Array.from(f.encoder.encode(l)).map(d=>String.fromCharCode(d)).join("")},f.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,f.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(s,i)=>{i.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @ character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"},i.code=function(o){return{code:o,error:i.codes[o]}}},9959:(s,i,o)=>{const a=o(375),c=o(5752);i.regex=function(u={}){a(u.cidr===void 0||typeof u.cidr=="string","options.cidr must be a string");const f=u.cidr?u.cidr.toLowerCase():"optional";a(["required","optional","forbidden"].includes(f),"options.cidr must be one of required, optional, forbidden"),a(u.version===void 0||typeof u.version=="string"||Array.isArray(u.version),"options.version must be a string or an array of string");let l=u.version||["ipv4","ipv6","ipvfuture"];Array.isArray(l)||(l=[l]),a(l.length>=1,"options.version must have at least 1 version specified");for(let h=0;h {if(f==="forbidden")return c.ip[h];const m=`\\/${h==="ipv4"?c.ip.v4Cidr:c.ip.v6Cidr}`;return f==="required"?`${c.ip[h]}${m}`:`${c.ip[h]}(?:${m})?`}).join("|")})`,p=new RegExp(`^${d}$`);return{cidr:f,versions:l,regex:p,raw:d}}},5752:(s,i,o)=>{const a=o(375),c=o(6064),u={generate:function(){const f={},l="\\dA-Fa-f",d="["+l+"]",p="\\w-\\.~",h="!\\$&'\\(\\)\\*\\+,;=",m="%"+l,y=p+m+h+":@",g="["+y+"]",v="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";f.ipv4address="(?:"+v+"\\.){3}"+v;const b=d+"{1,4}",_="(?:"+b+":"+b+"|"+f.ipv4address+")",R="(?:"+b+":){6}"+_,P="::(?:"+b+":){5}"+_,T="(?:"+b+")?::(?:"+b+":){4}"+_,E="(?:(?:"+b+":){0,1}"+b+")?::(?:"+b+":){3}"+_,N="(?:(?:"+b+":){0,2}"+b+")?::(?:"+b+":){2}"+_,k="(?:(?:"+b+":){0,3}"+b+")?::"+b+":"+_,M="(?:(?:"+b+":){0,4}"+b+")?::"+_,I="(?:(?:"+b+":){0,5}"+b+")?::"+b,j="(?:(?:"+b+":){0,6}"+b+")?::";f.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",f.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",f.ipv6address="(?:"+R+"|"+P+"|"+T+"|"+E+"|"+N+"|"+k+"|"+M+"|"+I+"|"+j+")",f.ipvFuture="v"+d+"+\\.["+p+h+":]+",f.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",f.schemeRegex=new RegExp(f.scheme);const L="["+p+m+h+":]*",U="["+p+m+h+"]{1,255}",K="(?:\\[(?:"+f.ipv6address+"|"+f.ipvFuture+")\\]|"+f.ipv4address+"|"+U+")",H="(?:"+L+"@)?"+K+"(?::\\d*)?",q="(?:"+L+"@)?("+K+")(?::\\d*)?",ee=g+"*",se=g+"+",X="(?:\\/"+ee+")*",G="\\/(?:"+se+X+")?",Y=se+X,Q="["+p+m+h+"@]+"+X,he="(?:\\/\\/\\/"+ee+X+")";return f.hierPart="(?:(?:\\/\\/"+H+X+")|"+G+"|"+Y+"|"+he+")",f.hierPartCapture="(?:(?:\\/\\/"+q+X+")|"+G+"|"+Y+")",f.relativeRef="(?:(?:\\/\\/"+H+X+")|"+G+"|"+Q+"|)",f.relativeRefCapture="(?:(?:\\/\\/"+q+X+")|"+G+"|"+Q+"|)",f.query="["+y+"\\/\\?]*(?=#|$)",f.queryWithSquareBrackets="["+y+"\\[\\]\\/\\?]*(?=#|$)",f.fragment="["+y+"\\/\\?]*",f}};u.rfc3986=u.generate(),i.ip={v4Cidr:u.rfc3986.ipv4Cidr,v6Cidr:u.rfc3986.ipv6Cidr,ipv4:u.rfc3986.ipv4address,ipv6:u.rfc3986.ipv6address,ipvfuture:u.rfc3986.ipvFuture},u.createRegex=function(f){const l=u.rfc3986,d="(?:\\?"+(f.allowQuerySquareBrackets?l.queryWithSquareBrackets:l.query)+")?(?:#"+l.fragment+")?",p=f.domain?l.relativeRefCapture:l.relativeRef;if(f.relativeOnly)return u.wrap(p+d);let h="";if(f.scheme){a(f.scheme instanceof RegExp||typeof f.scheme=="string"||Array.isArray(f.scheme),"scheme must be a RegExp, String, or Array");const g=[].concat(f.scheme);a(g.length>=1,"scheme must have at least 1 scheme specified");const v=[];for(let b=0;b {const o={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};i.Parser=class{constructor(a,c={}){if(!c[o.settings]&&c.constants)for(const u in c.constants){const f=c.constants[u];if(f!==null&&!["boolean","number","string"].includes(typeof f))throw new Error(`Formula constant ${u} contains invalid ${typeof f} value type`)}this.settings=c[o.settings]?c:Object.assign({[o.settings]:!0,constants:{},functions:{}},c),this.single=null,this._parts=null,this._parse(a)}_parse(a){let c=[],u="",f=0,l=!1;const d=h=>{if(f)throw new Error("Formula missing closing parenthesis");const m=c.length?c[c.length-1]:null;if(l||u||h){if(m&&m.type==="reference"&&h===")")return m.type="function",m.value=this._subFormula(u,m.value),void(u="");if(h===")"){const y=new i.Parser(u,this.settings);c.push({type:"segment",value:y})}else if(l){if(l==="]")return c.push({type:"reference",value:u}),void(u="");c.push({type:"literal",value:u})}else if(o.operatorCharacters.includes(u))m&&m.type==="operator"&&o.operators.includes(m.value+u)?m.value+=u:c.push({type:"operator",value:u});else if(u.match(o.numberRx))c.push({type:"constant",value:parseFloat(u)});else if(this.settings.constants[u]!==void 0)c.push({type:"constant",value:this.settings.constants[u]});else{if(!u.match(o.tokenRx))throw new Error(`Formula contains invalid token: ${u}`);c.push({type:"reference",value:u})}u=""}};for(const h of a)l?h===l?(d(),l=!1):u+=h:f?h==="("?(u+=h,++f):h===")"?(--f,f?u+=h:d(h)):u+=h:h in o.literals?l=o.literals[h]:h==="("?(d(),++f):o.operatorCharacters.includes(h)?(d(),u=h,d()):h!==" "?u+=h:d();d(),c=c.map((h,m)=>h.type!=="operator"||h.value!=="-"||m&&c[m-1].type!=="operator"?h:{type:"operator",value:"n"});let p=!1;for(const h of c){if(h.type==="operator"){if(o.operatorsPrefix.includes(h.value))continue;if(!p)throw new Error("Formula contains an operator in invalid position");if(!o.operators.includes(h.value))throw new Error(`Formula contains an unknown operator ${h.value}`)}else if(p)throw new Error("Formula missing expected operator");p=!p}if(!p)throw new Error("Formula contains invalid trailing operator");c.length===1&&["reference","literal","constant"].includes(c[0].type)&&(this.single={type:c[0].type==="reference"?"reference":"value",value:c[0].value}),this._parts=c.map(h=>{if(h.type==="operator")return o.operatorsPrefix.includes(h.value)?h:h.value;if(h.type!=="reference")return h.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(h.value))throw new Error(`Formula contains invalid reference ${h.value}`);return this.settings.reference?this.settings.reference(h.value):o.reference(h.value)})}_subFormula(a,c){const u=this.settings.functions[c];if(typeof u!="function")throw new Error(`Formula contains unknown function ${c}`);let f=[];if(a){let l="",d=0,p=!1;const h=()=>{if(!l)throw new Error(`Formula contains function ${c} with invalid arguments ${a}`);f.push(l),l=""};for(let m=0;m new i.Parser(l,this.settings)),function(l){const d=[];for(const p of f)d.push(p.evaluate(l));return u.call(l,...d)}}evaluate(a){const c=this._parts.slice();for(let u=c.length-2;u>=0;--u){const f=c[u];if(f&&f.type==="operator"){const l=c[u+1];c.splice(u+1,1);const d=o.evaluate(l,a);c[u]=o.single(f.value,d)}}return o.operatorsOrder.forEach(u=>{for(let f=1;f ":return c>u;case">=":return c>=u;case"==":return c===u;case"!=":return c!==u;case"&&":return c&&u;case"||":return c||u}return null},o.exists=function(a){return a!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:s=>{s.exports=JSON.parse('{"version":"17.13.3"}')}},r={},function s(i){var o=r[i];if(o!==void 0)return o.exports;var a=r[i]={exports:{}};return n[i](a,a.exports,s),a.exports}(5107);var n,r})})(QZ);var JMe=QZ.exports;const Kt=_u(JMe),eOe=t=>typeof t=="object"&&t!==null&&t.hasOwnProperty("total_items");class dn{constructor(e){Te(this,"_object");Te(this,"_error");Te(this,"isSuccess");Te(this,"isFailure");const{isSuccess:n,error:r,object:s}=e;if(n&&r)throw new Error("InvalidOperation: A result cannot be successful and contain an error");if(!n&&!r)throw new Error("InvalidOperation: A failing result needs to contain an error message");this.isSuccess=n,this.isFailure=!n,this._error=r,this._object=s,Object.freeze(this)}get object(){if(this.isFailure)throw new Error("Result is not successful");return this._object}get error(){if(this.isSuccess)throw new Error("Result is not error");return this._error}static ok(e){return new dn({isSuccess:!0,object:e})}static fail(e){return new dn({isSuccess:!1,error:e})}static combine(e){for(const n of e)if(n.isFailure)return n;return dn.ok()}}class bn{static validate(e,n,r={}){if(!Kt.isSchema(e))throw new tOe("Rule provided is not a valid Joi schema!");const s={abortEarly:!1,errors:{wrap:{label:"{}"}},...r},i=e.validate(n,s);return i.error?dn.fail(i.error):dn.ok(i.value)}static validateFnc(e){return(n,r)=>{const s=e(n);return s.isSuccess?n:r.message({custom:s.error.message})}}}Te(bn,"RULE_NOT_NULL_OR_UNDEFINED",Kt.any().required().invalid(null)),Te(bn,"RULE_ALLOW_NULL_OR_UNDEFINED",Kt.any().optional().valid(null)),Te(bn,"RULE_ALLOW_NULL",Kt.any().valid(null)),Te(bn,"RULE_ALLOW_EMPTY",Kt.any().optional().valid(null,"")),Te(bn,"RULE_IS_TYPE_STRING",Kt.string()),Te(bn,"RULE_IS_TYPE_NUMBER",Kt.number());class tOe extends Error{}class g$ extends Error{constructor(n,r,s={}){super(r);Te(this,"code");Te(this,"payload",{});this.name=this.constructor.name,this.code=n,this.payload=s,Object.setPrototypeOf(this,g$.prototype)}}const dR=class dR extends g${static create(e,n,r){return new dR(e,n,r)}};Te(dR,"INVALID_INPUT_DATA","INVALID_INPUT_DATA");let Ya=dR;function af(t,e="",n){return Ya.create(t,e,n)}var ZZ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Object.prototype.hasOwnProperty;t.is=function(n,r){return n===r?n!==0||r!==0||1/n===1/r:n!==n&&r!==r},t.shallowEqual=function(n,r,s){if(n===r)return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var i=Object.keys(n),o=Object.keys(r);if(i.length!==o.length)return!1;for(var a=s&&typeof s.customEqual=="function"?s.customEqual:t.is,c=0;c this.props===null)}}class td extends B_{static validate(e,n){const r=bn.RULE_ALLOW_EMPTY.default(""),s=Kt.string().guid({version:["uuidv4"]}).label(n.label?n.label:"id"),i=Kt.alternatives(r,s);return bn.validate(i,e)}static sanitize(e){return e.trim()}static create(e,n={}){const r={label:"id",generateOnEmpty:!1,...n};if(!e&&!r.generateOnEmpty)return dn.fail(af(Ya.INVALID_INPUT_DATA,"ID is null or empty"));if(e){const s=td.validate(e,r);return s.isFailure?dn.fail(af(Ya.INVALID_INPUT_DATA,s.error.message,r)):dn.ok(new td(td.sanitize(s.object)))}return r.generateOnEmpty?td.generateNewID():dn.ok(new td(null))}static generateNewID(){return dn.ok(new td(oOe()))}get value(){return String(this.props)}toString(){return String(this.props)}toPrimitive(){return this.toString()}}class s6e extends Kt.ValidationError{}class i6e extends Kt.ValidationError{}class o6e extends Kt.ValidationError{}class a6e extends Kt.ValidationError{}class l6e extends Kt.ValidationError{}const Dk={USD:{symbol:"$",name:"US Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"USD",name_plural:"US dollars"},CAD:{symbol:"CA$",name:"Canadian Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"CAD",name_plural:"Canadian dollars"},EUR:{symbol:"€",name:"Euro",symbol_native:"€",decimal_digits:2,rounding:0,code:"EUR",name_plural:"euros"},BTC:{symbol:"BTC",name:"Bitcoin",symbol_native:"฿",decimal_digits:8,rounding:0,code:"BTC",name_plural:"Bitcoins"},AED:{symbol:"AED",name:"United Arab Emirates Dirham",symbol_native:"د.إ.",decimal_digits:2,rounding:0,code:"AED",name_plural:"UAE dirhams"},AFN:{symbol:"Af",name:"Afghan Afghani",symbol_native:"؋",decimal_digits:2,rounding:0,code:"AFN",name_plural:"Afghan Afghanis"},ALL:{symbol:"ALL",name:"Albanian Lek",symbol_native:"Lek",decimal_digits:2,rounding:0,code:"ALL",name_plural:"Albanian lekë"},AMD:{symbol:"AMD",name:"Armenian Dram",symbol_native:"դր.",decimal_digits:2,rounding:0,code:"AMD",name_plural:"Armenian drams"},ARS:{symbol:"AR$",name:"Argentine Peso",symbol_native:"$",decimal_digits:2,rounding:0,code:"ARS",name_plural:"Argentine pesos"},AUD:{symbol:"AU$",name:"Australian Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"AUD",name_plural:"Australian dollars"},AZN:{symbol:"man.",name:"Azerbaijani Manat",symbol_native:"ман.",decimal_digits:2,rounding:0,code:"AZN",name_plural:"Azerbaijani manats"},BAM:{symbol:"KM",name:"Bosnia-Herzegovina Convertible Mark",symbol_native:"KM",decimal_digits:2,rounding:0,code:"BAM",name_plural:"Bosnia-Herzegovina convertible marks"},BDT:{symbol:"Tk",name:"Bangladeshi Taka",symbol_native:"৳",decimal_digits:2,rounding:0,code:"BDT",name_plural:"Bangladeshi takas"},BGN:{symbol:"BGN",name:"Bulgarian Lev",symbol_native:"лв.",decimal_digits:2,rounding:0,code:"BGN",name_plural:"Bulgarian leva"},BHD:{symbol:"BD",name:"Bahraini Dinar",symbol_native:"د.ب.",decimal_digits:3,rounding:0,code:"BHD",name_plural:"Bahraini dinars"},BIF:{symbol:"FBu",name:"Burundian Franc",symbol_native:"FBu",decimal_digits:0,rounding:0,code:"BIF",name_plural:"Burundian francs"},BND:{symbol:"BN$",name:"Brunei Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"BND",name_plural:"Brunei dollars"},BOB:{symbol:"Bs",name:"Bolivian Boliviano",symbol_native:"Bs",decimal_digits:2,rounding:0,code:"BOB",name_plural:"Bolivian bolivianos"},BRL:{symbol:"R$",name:"Brazilian Real",symbol_native:"R$",decimal_digits:2,rounding:0,code:"BRL",name_plural:"Brazilian reals"},BWP:{symbol:"BWP",name:"Botswanan Pula",symbol_native:"P",decimal_digits:2,rounding:0,code:"BWP",name_plural:"Botswanan pulas"},BYR:{symbol:"BYR",name:"Belarusian Ruble",symbol_native:"BYR",decimal_digits:0,rounding:0,code:"BYR",name_plural:"Belarusian rubles"},BZD:{symbol:"BZ$",name:"Belize Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"BZD",name_plural:"Belize dollars"},CDF:{symbol:"CDF",name:"Congolese Franc",symbol_native:"FrCD",decimal_digits:2,rounding:0,code:"CDF",name_plural:"Congolese francs"},CHF:{symbol:"CHF",name:"Swiss Franc",symbol_native:"CHF",decimal_digits:2,rounding:.05,code:"CHF",name_plural:"Swiss francs"},CLP:{symbol:"CL$",name:"Chilean Peso",symbol_native:"$",decimal_digits:0,rounding:0,code:"CLP",name_plural:"Chilean pesos"},CNY:{symbol:"CN¥",name:"Chinese Yuan",symbol_native:"CN¥",decimal_digits:2,rounding:0,code:"CNY",name_plural:"Chinese yuan"},COP:{symbol:"CO$",name:"Colombian Peso",symbol_native:"$",decimal_digits:2,rounding:0,code:"COP",name_plural:"Colombian pesos"},CRC:{symbol:"₡",name:"Costa Rican Colón",symbol_native:"₡",decimal_digits:2,rounding:0,code:"CRC",name_plural:"Costa Rican colóns"},CVE:{symbol:"CV$",name:"Cape Verdean Escudo",symbol_native:"CV$",decimal_digits:2,rounding:0,code:"CVE",name_plural:"Cape Verdean escudos"},CZK:{symbol:"Kč",name:"Czech Republic Koruna",symbol_native:"Kč",decimal_digits:2,rounding:0,code:"CZK",name_plural:"Czech Republic korunas"},DJF:{symbol:"Fdj",name:"Djiboutian Franc",symbol_native:"Fdj",decimal_digits:0,rounding:0,code:"DJF",name_plural:"Djiboutian francs"},DKK:{symbol:"Dkr",name:"Danish Krone",symbol_native:"kr",decimal_digits:2,rounding:0,code:"DKK",name_plural:"Danish kroner"},DOP:{symbol:"RD$",name:"Dominican Peso",symbol_native:"RD$",decimal_digits:2,rounding:0,code:"DOP",name_plural:"Dominican pesos"},DZD:{symbol:"DA",name:"Algerian Dinar",symbol_native:"د.ج.",decimal_digits:2,rounding:0,code:"DZD",name_plural:"Algerian dinars"},EEK:{symbol:"Ekr",name:"Estonian Kroon",symbol_native:"kr",decimal_digits:2,rounding:0,code:"EEK",name_plural:"Estonian kroons"},EGP:{symbol:"EGP",name:"Egyptian Pound",symbol_native:"ج.م.",decimal_digits:2,rounding:0,code:"EGP",name_plural:"Egyptian pounds"},ERN:{symbol:"Nfk",name:"Eritrean Nakfa",symbol_native:"Nfk",decimal_digits:2,rounding:0,code:"ERN",name_plural:"Eritrean nakfas"},ETB:{symbol:"Br",name:"Ethiopian Birr",symbol_native:"Br",decimal_digits:2,rounding:0,code:"ETB",name_plural:"Ethiopian birrs"},GBP:{symbol:"£",name:"British Pound Sterling",symbol_native:"£",decimal_digits:2,rounding:0,code:"GBP",name_plural:"British pounds sterling"},GEL:{symbol:"GEL",name:"Georgian Lari",symbol_native:"GEL",decimal_digits:2,rounding:0,code:"GEL",name_plural:"Georgian laris"},GHS:{symbol:"GH₵",name:"Ghanaian Cedi",symbol_native:"GH₵",decimal_digits:2,rounding:0,code:"GHS",name_plural:"Ghanaian cedis"},GNF:{symbol:"FG",name:"Guinean Franc",symbol_native:"FG",decimal_digits:0,rounding:0,code:"GNF",name_plural:"Guinean francs"},GTQ:{symbol:"GTQ",name:"Guatemalan Quetzal",symbol_native:"Q",decimal_digits:2,rounding:0,code:"GTQ",name_plural:"Guatemalan quetzals"},HKD:{symbol:"HK$",name:"Hong Kong Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"HKD",name_plural:"Hong Kong dollars"},HNL:{symbol:"HNL",name:"Honduran Lempira",symbol_native:"L",decimal_digits:2,rounding:0,code:"HNL",name_plural:"Honduran lempiras"},HRK:{symbol:"kn",name:"Croatian Kuna",symbol_native:"kn",decimal_digits:2,rounding:0,code:"HRK",name_plural:"Croatian kunas"},HUF:{symbol:"Ft",name:"Hungarian Forint",symbol_native:"Ft",decimal_digits:2,rounding:0,code:"HUF",name_plural:"Hungarian forints"},IDR:{symbol:"Rp",name:"Indonesian Rupiah",symbol_native:"Rp",decimal_digits:2,rounding:0,code:"IDR",name_plural:"Indonesian rupiahs"},ILS:{symbol:"₪",name:"Israeli New Sheqel",symbol_native:"₪",decimal_digits:2,rounding:0,code:"ILS",name_plural:"Israeli new sheqels"},INR:{symbol:"Rs",name:"Indian Rupee",symbol_native:"টকা",decimal_digits:2,rounding:0,code:"INR",name_plural:"Indian rupees"},IQD:{symbol:"IQD",name:"Iraqi Dinar",symbol_native:"د.ع.",decimal_digits:3,rounding:0,code:"IQD",name_plural:"Iraqi dinars"},IRR:{symbol:"IRR",name:"Iranian Rial",symbol_native:"﷼",decimal_digits:2,rounding:0,code:"IRR",name_plural:"Iranian rials"},ISK:{symbol:"Ikr",name:"Icelandic Króna",symbol_native:"kr",decimal_digits:0,rounding:0,code:"ISK",name_plural:"Icelandic krónur"},JMD:{symbol:"J$",name:"Jamaican Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"JMD",name_plural:"Jamaican dollars"},JOD:{symbol:"JD",name:"Jordanian Dinar",symbol_native:"د.أ.",decimal_digits:3,rounding:0,code:"JOD",name_plural:"Jordanian dinars"},JPY:{symbol:"¥",name:"Japanese Yen",symbol_native:"¥",decimal_digits:0,rounding:0,code:"JPY",name_plural:"Japanese yen"},KES:{symbol:"Ksh",name:"Kenyan Shilling",symbol_native:"Ksh",decimal_digits:2,rounding:0,code:"KES",name_plural:"Kenyan shillings"},KHR:{symbol:"KHR",name:"Cambodian Riel",symbol_native:"៛",decimal_digits:2,rounding:0,code:"KHR",name_plural:"Cambodian riels"},KMF:{symbol:"CF",name:"Comorian Franc",symbol_native:"FC",decimal_digits:0,rounding:0,code:"KMF",name_plural:"Comorian francs"},KRW:{symbol:"₩",name:"South Korean Won",symbol_native:"₩",decimal_digits:0,rounding:0,code:"KRW",name_plural:"South Korean won"},KWD:{symbol:"KD",name:"Kuwaiti Dinar",symbol_native:"د.ك.",decimal_digits:3,rounding:0,code:"KWD",name_plural:"Kuwaiti dinars"},KZT:{symbol:"KZT",name:"Kazakhstani Tenge",symbol_native:"тңг.",decimal_digits:2,rounding:0,code:"KZT",name_plural:"Kazakhstani tenges"},LAK:{symbol:"₭",name:"Lao kip",symbol_native:"ກີບ",decimal_digits:2,rounding:0,code:"LAK",name_plural:"Lao kips"},LBP:{symbol:"LB£",name:"Lebanese Pound",symbol_native:"ل.ل.",decimal_digits:2,rounding:0,code:"LBP",name_plural:"Lebanese pounds"},LKR:{symbol:"SLRs",name:"Sri Lankan Rupee",symbol_native:"SL Re",decimal_digits:2,rounding:0,code:"LKR",name_plural:"Sri Lankan rupees"},LTL:{symbol:"Lt",name:"Lithuanian Litas",symbol_native:"Lt",decimal_digits:2,rounding:0,code:"LTL",name_plural:"Lithuanian litai"},LVL:{symbol:"Ls",name:"Latvian Lats",symbol_native:"Ls",decimal_digits:2,rounding:0,code:"LVL",name_plural:"Latvian lati"},LYD:{symbol:"LD",name:"Libyan Dinar",symbol_native:"د.ل.",decimal_digits:3,rounding:0,code:"LYD",name_plural:"Libyan dinars"},MAD:{symbol:"MAD",name:"Moroccan Dirham",symbol_native:"د.م.",decimal_digits:2,rounding:0,code:"MAD",name_plural:"Moroccan dirhams"},MDL:{symbol:"MDL",name:"Moldovan Leu",symbol_native:"MDL",decimal_digits:2,rounding:0,code:"MDL",name_plural:"Moldovan lei"},MGA:{symbol:"MGA",name:"Malagasy Ariary",symbol_native:"MGA",decimal_digits:2,rounding:0,code:"MGA",name_plural:"Malagasy Ariaries"},MKD:{symbol:"MKD",name:"Macedonian Denar",symbol_native:"MKD",decimal_digits:2,rounding:0,code:"MKD",name_plural:"Macedonian denari"},MMK:{symbol:"MMK",name:"Myanma Kyat",symbol_native:"K",decimal_digits:2,rounding:0,code:"MMK",name_plural:"Myanma kyats"},MOP:{symbol:"MOP$",name:"Macanese Pataca",symbol_native:"MOP$",decimal_digits:2,rounding:0,code:"MOP",name_plural:"Macanese patacas"},MUR:{symbol:"MURs",name:"Mauritian Rupee",symbol_native:"MURs",decimal_digits:2,rounding:0,code:"MUR",name_plural:"Mauritian rupees"},MXN:{symbol:"MX$",name:"Mexican Peso",symbol_native:"$",decimal_digits:2,rounding:0,code:"MXN",name_plural:"Mexican pesos"},MYR:{symbol:"RM",name:"Malaysian Ringgit",symbol_native:"RM",decimal_digits:2,rounding:0,code:"MYR",name_plural:"Malaysian ringgits"},MZN:{symbol:"MTn",name:"Mozambican Metical",symbol_native:"MTn",decimal_digits:2,rounding:0,code:"MZN",name_plural:"Mozambican meticals"},NAD:{symbol:"N$",name:"Namibian Dollar",symbol_native:"N$",decimal_digits:2,rounding:0,code:"NAD",name_plural:"Namibian dollars"},NGN:{symbol:"₦",name:"Nigerian Naira",symbol_native:"₦",decimal_digits:2,rounding:0,code:"NGN",name_plural:"Nigerian nairas"},NIO:{symbol:"C$",name:"Nicaraguan Córdoba",symbol_native:"C$",decimal_digits:2,rounding:0,code:"NIO",name_plural:"Nicaraguan córdobas"},NOK:{symbol:"Nkr",name:"Norwegian Krone",symbol_native:"kr",decimal_digits:2,rounding:0,code:"NOK",name_plural:"Norwegian kroner"},NPR:{symbol:"NPRs",name:"Nepalese Rupee",symbol_native:"नेरू",decimal_digits:2,rounding:0,code:"NPR",name_plural:"Nepalese rupees"},NZD:{symbol:"NZ$",name:"New Zealand Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"NZD",name_plural:"New Zealand dollars"},OMR:{symbol:"OMR",name:"Omani Rial",symbol_native:"ر.ع.",decimal_digits:3,rounding:0,code:"OMR",name_plural:"Omani rials"},PAB:{symbol:"B/.",name:"Panamanian Balboa",symbol_native:"B/.",decimal_digits:2,rounding:0,code:"PAB",name_plural:"Panamanian balboas"},PEN:{symbol:"S/.",name:"Peruvian Nuevo Sol",symbol_native:"S/.",decimal_digits:2,rounding:0,code:"PEN",name_plural:"Peruvian nuevos soles"},PHP:{symbol:"₱",name:"Philippine Peso",symbol_native:"₱",decimal_digits:2,rounding:0,code:"PHP",name_plural:"Philippine pesos"},PKR:{symbol:"PKRs",name:"Pakistani Rupee",symbol_native:"₨",decimal_digits:2,rounding:0,code:"PKR",name_plural:"Pakistani rupees"},PLN:{symbol:"zł",name:"Polish Zloty",symbol_native:"zł",decimal_digits:2,rounding:0,code:"PLN",name_plural:"Polish zlotys"},PYG:{symbol:"₲",name:"Paraguayan Guarani",symbol_native:"₲",decimal_digits:0,rounding:0,code:"PYG",name_plural:"Paraguayan guaranis"},QAR:{symbol:"QR",name:"Qatari Rial",symbol_native:"ر.ق.",decimal_digits:2,rounding:0,code:"QAR",name_plural:"Qatari rials"},RON:{symbol:"RON",name:"Romanian Leu",symbol_native:"RON",decimal_digits:2,rounding:0,code:"RON",name_plural:"Romanian lei"},RSD:{symbol:"din.",name:"Serbian Dinar",symbol_native:"дин.",decimal_digits:2,rounding:0,code:"RSD",name_plural:"Serbian dinars"},RUB:{symbol:"RUB",name:"Russian Ruble",symbol_native:"₽",decimal_digits:2,rounding:0,code:"RUB",name_plural:"Russian rubles"},RWF:{symbol:"RWF",name:"Rwandan Franc",symbol_native:"FR",decimal_digits:0,rounding:0,code:"RWF",name_plural:"Rwandan francs"},SAR:{symbol:"SR",name:"Saudi Riyal",symbol_native:"ر.س.",decimal_digits:2,rounding:0,code:"SAR",name_plural:"Saudi riyals"},SDG:{symbol:"SDG",name:"Sudanese Pound",symbol_native:"SDG",decimal_digits:2,rounding:0,code:"SDG",name_plural:"Sudanese pounds"},SEK:{symbol:"Skr",name:"Swedish Krona",symbol_native:"kr",decimal_digits:2,rounding:0,code:"SEK",name_plural:"Swedish kronor"},SGD:{symbol:"S$",name:"Singapore Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"SGD",name_plural:"Singapore dollars"},SOS:{symbol:"Ssh",name:"Somali Shilling",symbol_native:"Ssh",decimal_digits:2,rounding:0,code:"SOS",name_plural:"Somali shillings"},SYP:{symbol:"SY£",name:"Syrian Pound",symbol_native:"ل.س.",decimal_digits:2,rounding:0,code:"SYP",name_plural:"Syrian pounds"},THB:{symbol:"฿",name:"Thai Baht",symbol_native:"฿",decimal_digits:2,rounding:0,code:"THB",name_plural:"Thai baht"},TND:{symbol:"DT",name:"Tunisian Dinar",symbol_native:"د.ت.",decimal_digits:3,rounding:0,code:"TND",name_plural:"Tunisian dinars"},TOP:{symbol:"T$",name:"Tongan Paʻanga",symbol_native:"T$",decimal_digits:2,rounding:0,code:"TOP",name_plural:"Tongan paʻanga"},TRY:{symbol:"TL",name:"Turkish Lira",symbol_native:"TL",decimal_digits:2,rounding:0,code:"TRY",name_plural:"Turkish Lira"},TTD:{symbol:"TT$",name:"Trinidad and Tobago Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"TTD",name_plural:"Trinidad and Tobago dollars"},TWD:{symbol:"NT$",name:"New Taiwan Dollar",symbol_native:"NT$",decimal_digits:2,rounding:0,code:"TWD",name_plural:"New Taiwan dollars"},TZS:{symbol:"TSh",name:"Tanzanian Shilling",symbol_native:"TSh",decimal_digits:2,rounding:0,code:"TZS",name_plural:"Tanzanian shillings"},UAH:{symbol:"₴",name:"Ukrainian Hryvnia",symbol_native:"₴",decimal_digits:2,rounding:0,code:"UAH",name_plural:"Ukrainian hryvnias"},UGX:{symbol:"USh",name:"Ugandan Shilling",symbol_native:"USh",decimal_digits:0,rounding:0,code:"UGX",name_plural:"Ugandan shillings"},UYU:{symbol:"$U",name:"Uruguayan Peso",symbol_native:"$",decimal_digits:2,rounding:0,code:"UYU",name_plural:"Uruguayan pesos"},UZS:{symbol:"UZS",name:"Uzbekistan Som",symbol_native:"UZS",decimal_digits:2,rounding:0,code:"UZS",name_plural:"Uzbekistan som"},VEF:{symbol:"Bs.F.",name:"Venezuelan Bolívar",symbol_native:"Bs.F.",decimal_digits:2,rounding:0,code:"VEF",name_plural:"Venezuelan bolívars"},VND:{symbol:"₫",name:"Vietnamese Dong",symbol_native:"₫",decimal_digits:0,rounding:0,code:"VND",name_plural:"Vietnamese dong"},XAF:{symbol:"FCFA",name:"CFA Franc BEAC",symbol_native:"FCFA",decimal_digits:0,rounding:0,code:"XAF",name_plural:"CFA francs BEAC"},XOF:{symbol:"CFA",name:"CFA Franc BCEAO",symbol_native:"CFA",decimal_digits:0,rounding:0,code:"XOF",name_plural:"CFA francs BCEAO"},YER:{symbol:"YR",name:"Yemeni Rial",symbol_native:"ر.ي.",decimal_digits:2,rounding:0,code:"YER",name_plural:"Yemeni rials"},ZAR:{symbol:"R",name:"South African Rand",symbol_native:"R",decimal_digits:2,rounding:0,code:"ZAR",name_plural:"South African rand"},ZMK:{symbol:"ZK",name:"Zambian Kwacha",symbol_native:"ZK",decimal_digits:0,rounding:0,code:"ZMK",name_plural:"Zambian kwachas"}},rd=class rd extends B_{constructor(){super(...arguments);Te(this,"toString",()=>this.code)}get symbol(){return this.props?String(this.props.symbol_native):""}get code(){return this.props?String(this.props.code):""}static validate(n,r){const s=Kt.alternatives(bn.RULE_ALLOW_EMPTY.default(""),Kt.string().uppercase().valid(...Object.keys(Dk)).label(String(r.label)));return bn.validate(s,n)}static createFromCode(n,r={}){const s={...r,label:r.label?r.label:"current_code"},i=rd.validate(n,s);return i.isFailure?dn.fail(af(Ya.INVALID_INPUT_DATA,i.error.message,s)):dn.ok(new rd(Dk[i.object]))}static createDefaultCode(){return rd.createFromCode(rd.DEFAULT_CURRENCY_CODE)}isEmpty(){return this.isNull()||this.props===void 0}toPrimitive(){return this.toString()}};Te(rd,"DEFAULT_CURRENCY_CODE","EUR"),Te(rd,"CURRENCIES",Dk);let au=rd;class c6e extends Kt.ValidationError{}const Mk={aa:{name:"Afar",nativeName:"Afaraf"},ab:{name:"Abkhaz",nativeName:"аҧсуа бызшәа"},ae:{name:"Avestan",nativeName:"avesta"},af:{name:"Afrikaans",nativeName:"Afrikaans"},ak:{name:"Akan",nativeName:"Akan"},am:{name:"Amharic",nativeName:"አማርኛ"},an:{name:"Aragonese",nativeName:"aragonés"},ar:{name:"Arabic",nativeName:"اَلْعَرَبِيَّةُ"},as:{name:"Assamese",nativeName:"অসমীয়া"},av:{name:"Avaric",nativeName:"авар мацӀ"},ay:{name:"Aymara",nativeName:"aymar aru"},az:{name:"Azerbaijani",nativeName:"azərbaycan dili"},ba:{name:"Bashkir",nativeName:"башҡорт теле"},be:{name:"Belarusian",nativeName:"беларуская мова"},bg:{name:"Bulgarian",nativeName:"български език"},bi:{name:"Bislama",nativeName:"Bislama"},bm:{name:"Bambara",nativeName:"bamanankan"},bn:{name:"Bengali",nativeName:"বাংলা"},bo:{name:"Tibetan",nativeName:"བོད་ཡིག"},br:{name:"Breton",nativeName:"brezhoneg"},bs:{name:"Bosnian",nativeName:"bosanski jezik"},ca:{name:"Catalan",nativeName:"Català"},ce:{name:"Chechen",nativeName:"нохчийн мотт"},ch:{name:"Chamorro",nativeName:"Chamoru"},co:{name:"Corsican",nativeName:"corsu"},cr:{name:"Cree",nativeName:"ᓀᐦᐃᔭᐍᐏᐣ"},cs:{name:"Czech",nativeName:"čeština"},cu:{name:"Old Church Slavonic",nativeName:"ѩзыкъ словѣньскъ"},cv:{name:"Chuvash",nativeName:"чӑваш чӗлхи"},cy:{name:"Welsh",nativeName:"Cymraeg"},da:{name:"Danish",nativeName:"dansk"},de:{name:"German",nativeName:"Deutsch"},dv:{name:"Divehi",nativeName:"ދިވެހި"},dz:{name:"Dzongkha",nativeName:"རྫོང་ཁ"},ee:{name:"Ewe",nativeName:"Eʋegbe"},el:{name:"Greek",nativeName:"Ελληνικά"},en:{name:"English",nativeName:"English"},eo:{name:"Esperanto",nativeName:"Esperanto"},es:{name:"Spanish",nativeName:"Español"},et:{name:"Estonian",nativeName:"eesti"},eu:{name:"Basque",nativeName:"euskara"},fa:{name:"Persian",nativeName:"فارسی"},ff:{name:"Fula",nativeName:"Fulfulde"},fi:{name:"Finnish",nativeName:"suomi"},fj:{name:"Fijian",nativeName:"vosa Vakaviti"},fo:{name:"Faroese",nativeName:"føroyskt"},fr:{name:"French",nativeName:"Français"},fy:{name:"Western Frisian",nativeName:"Frysk"},ga:{name:"Irish",nativeName:"Gaeilge"},gd:{name:"Scottish Gaelic",nativeName:"Gàidhlig"},gl:{name:"Galician",nativeName:"galego"},gn:{name:"Guaraní",nativeName:"Avañe'ẽ"},gu:{name:"Gujarati",nativeName:"ગુજરાતી"},gv:{name:"Manx",nativeName:"Gaelg"},ha:{name:"Hausa",nativeName:"هَوُسَ"},he:{name:"Hebrew",nativeName:"עברית"},hi:{name:"Hindi",nativeName:"हिन्दी"},ho:{name:"Hiri Motu",nativeName:"Hiri Motu"},hr:{name:"Croatian",nativeName:"Hrvatski"},ht:{name:"Haitian",nativeName:"Kreyòl ayisyen"},hu:{name:"Hungarian",nativeName:"magyar"},hy:{name:"Armenian",nativeName:"Հայերեն"},hz:{name:"Herero",nativeName:"Otjiherero"},ia:{name:"Interlingua",nativeName:"Interlingua"},id:{name:"Indonesian",nativeName:"Bahasa Indonesia"},ie:{name:"Interlingue",nativeName:"Interlingue"},ig:{name:"Igbo",nativeName:"Asụsụ Igbo"},ii:{name:"Nuosu",nativeName:"ꆈꌠ꒿ Nuosuhxop"},ik:{name:"Inupiaq",nativeName:"Iñupiaq"},io:{name:"Ido",nativeName:"Ido"},is:{name:"Icelandic",nativeName:"Íslenska"},it:{name:"Italian",nativeName:"Italiano"},iu:{name:"Inuktitut",nativeName:"ᐃᓄᒃᑎᑐᑦ"},ja:{name:"Japanese",nativeName:"日本語"},jv:{name:"Javanese",nativeName:"basa Jawa"},ka:{name:"Georgian",nativeName:"ქართული"},kg:{name:"Kongo",nativeName:"Kikongo"},ki:{name:"Kikuyu",nativeName:"Gĩkũyũ"},kj:{name:"Kwanyama",nativeName:"Kuanyama"},kk:{name:"Kazakh",nativeName:"қазақ тілі"},kl:{name:"Kalaallisut",nativeName:"kalaallisut"},km:{name:"Khmer",nativeName:"ខេមរភាសា"},kn:{name:"Kannada",nativeName:"ಕನ್ನಡ"},ko:{name:"Korean",nativeName:"한국어"},kr:{name:"Kanuri",nativeName:"Kanuri"},ks:{name:"Kashmiri",nativeName:"कश्मीरी"},ku:{name:"Kurdish",nativeName:"Kurdî"},kv:{name:"Komi",nativeName:"коми кыв"},kw:{name:"Cornish",nativeName:"Kernewek"},ky:{name:"Kyrgyz",nativeName:"Кыргызча"},la:{name:"Latin",nativeName:"latine"},lb:{name:"Luxembourgish",nativeName:"Lëtzebuergesch"},lg:{name:"Ganda",nativeName:"Luganda"},li:{name:"Limburgish",nativeName:"Limburgs"},ln:{name:"Lingala",nativeName:"Lingála"},lo:{name:"Lao",nativeName:"ພາສາລາວ"},lt:{name:"Lithuanian",nativeName:"lietuvių kalba"},lu:{name:"Luba-Katanga",nativeName:"Kiluba"},lv:{name:"Latvian",nativeName:"latviešu valoda"},mg:{name:"Malagasy",nativeName:"fiteny malagasy"},mh:{name:"Marshallese",nativeName:"Kajin M̧ajeļ"},mi:{name:"Māori",nativeName:"te reo Māori"},mk:{name:"Macedonian",nativeName:"македонски јазик"},ml:{name:"Malayalam",nativeName:"മലയാളം"},mn:{name:"Mongolian",nativeName:"Монгол хэл"},mr:{name:"Marathi",nativeName:"मराठी"},ms:{name:"Malay",nativeName:"Bahasa Melayu"},mt:{name:"Maltese",nativeName:"Malti"},my:{name:"Burmese",nativeName:"ဗမာစာ"},na:{name:"Nauru",nativeName:"Dorerin Naoero"},nb:{name:"Norwegian Bokmål",nativeName:"Norsk bokmål"},nd:{name:"Northern Ndebele",nativeName:"isiNdebele"},ne:{name:"Nepali",nativeName:"नेपाली"},ng:{name:"Ndonga",nativeName:"Owambo"},nl:{name:"Dutch",nativeName:"Nederlands"},nn:{name:"Norwegian Nynorsk",nativeName:"Norsk nynorsk"},no:{name:"Norwegian",nativeName:"Norsk"},nr:{name:"Southern Ndebele",nativeName:"isiNdebele"},nv:{name:"Navajo",nativeName:"Diné bizaad"},ny:{name:"Chichewa",nativeName:"chiCheŵa"},oc:{name:"Occitan",nativeName:"occitan"},oj:{name:"Ojibwe",nativeName:"ᐊᓂᔑᓈᐯᒧᐎᓐ"},om:{name:"Oromo",nativeName:"Afaan Oromoo"},or:{name:"Oriya",nativeName:"ଓଡ଼ିଆ"},os:{name:"Ossetian",nativeName:"ирон æвзаг"},pa:{name:"Panjabi",nativeName:"ਪੰਜਾਬੀ"},pi:{name:"Pāli",nativeName:"पाऴि"},pl:{name:"Polish",nativeName:"Polski"},ps:{name:"Pashto",nativeName:"پښتو"},pt:{name:"Portuguese",nativeName:"Português"},qu:{name:"Quechua",nativeName:"Runa Simi"},rm:{name:"Romansh",nativeName:"rumantsch grischun"},rn:{name:"Kirundi",nativeName:"Ikirundi"},ro:{name:"Romanian",nativeName:"Română"},ru:{name:"Russian",nativeName:"Русский"},rw:{name:"Kinyarwanda",nativeName:"Ikinyarwanda"},sa:{name:"Sanskrit",nativeName:"संस्कृतम्"},sc:{name:"Sardinian",nativeName:"sardu"},sd:{name:"Sindhi",nativeName:"सिन्धी"},se:{name:"Northern Sami",nativeName:"Davvisámegiella"},sg:{name:"Sango",nativeName:"yângâ tî sängö"},si:{name:"Sinhala",nativeName:"සිංහල"},sk:{name:"Slovak",nativeName:"slovenčina"},sl:{name:"Slovenian",nativeName:"slovenščina"},sm:{name:"Samoan",nativeName:"gagana fa'a Samoa"},sn:{name:"Shona",nativeName:"chiShona"},so:{name:"Somali",nativeName:"Soomaaliga"},sq:{name:"Albanian",nativeName:"Shqip"},sr:{name:"Serbian",nativeName:"српски језик"},ss:{name:"Swati",nativeName:"SiSwati"},st:{name:"Southern Sotho",nativeName:"Sesotho"},su:{name:"Sundanese",nativeName:"Basa Sunda"},sv:{name:"Swedish",nativeName:"Svenska"},sw:{name:"Swahili",nativeName:"Kiswahili"},ta:{name:"Tamil",nativeName:"தமிழ்"},te:{name:"Telugu",nativeName:"తెలుగు"},tg:{name:"Tajik",nativeName:"тоҷикӣ"},th:{name:"Thai",nativeName:"ไทย"},ti:{name:"Tigrinya",nativeName:"ትግርኛ"},tk:{name:"Turkmen",nativeName:"Türkmençe"},tl:{name:"Tagalog",nativeName:"Wikang Tagalog"},tn:{name:"Tswana",nativeName:"Setswana"},to:{name:"Tonga",nativeName:"faka Tonga"},tr:{name:"Turkish",nativeName:"Türkçe"},ts:{name:"Tsonga",nativeName:"Xitsonga"},tt:{name:"Tatar",nativeName:"татар теле"},tw:{name:"Twi",nativeName:"Twi"},ty:{name:"Tahitian",nativeName:"Reo Tahiti"},ug:{name:"Uyghur",nativeName:"ئۇيغۇرچە"},uk:{name:"Ukrainian",nativeName:"Українська"},ur:{name:"Urdu",nativeName:"اردو"},uz:{name:"Uzbek",nativeName:"Ўзбек"},ve:{name:"Venda",nativeName:"Tshivenḓa"},vi:{name:"Vietnamese",nativeName:"Tiếng Việt"},vo:{name:"Volapük",nativeName:"Volapük"},wa:{name:"Walloon",nativeName:"walon"},wo:{name:"Wolof",nativeName:"Wollof"},xh:{name:"Xhosa",nativeName:"isiXhosa"},yi:{name:"Yiddish",nativeName:"ייִדיש"},yo:{name:"Yoruba",nativeName:"Yorùbá"},za:{name:"Zhuang",nativeName:"Saɯ cueŋƅ"},zh:{name:"Chinese",nativeName:"中文"},zu:{name:"Zulu",nativeName:"isiZulu"}},sd=class sd extends B_{constructor(){super(...arguments);Te(this,"toString",()=>this.code)}static validate(n,r){const s=Kt.alternatives(bn.RULE_ALLOW_EMPTY.default(""),Kt.string().lowercase().valid(...Object.keys(Mk)).label(String(r.label)));return bn.validate(s,n)}static sanitize(n){return n?String(n).toLowerCase():void 0}static createFromCode(n,r={}){const s={...r,label:r.label?r.label:"lang_code"},i=sd.validate(n,s);if(i.isFailure)return dn.fail(af(Ya.INVALID_INPUT_DATA,i.error.message,s));const o=sd.sanitize(i.object),a=o?{...Mk[i.object],code:o}:void 0;return dn.ok(new sd(a))}static createDefaultCode(){return sd.createFromCode(this.DEFAULT_LANGUAGE_CODE)}get name(){return this.props?String(this.props.name):""}get nativeName(){return this.props?String(this.props.nativeName):""}get code(){return this.props?String(this.props.code):""}isEmpty(){return this.isNull()||this.props===void 0}toPrimitive(){return this.toString()}};Te(sd,"DEFAULT_LANGUAGE_CODE","es"),Te(sd,"LANGUAGES",Mk);let C0=sd;var aOe={defaultAmount:0,defaultCurrency:"USD",defaultPrecision:2},lOe={globalLocale:"en-US",globalFormat:"$0,0.00",globalRoundingMode:"HALF_EVEN",globalFormatRoundingMode:"HALF_AWAY_FROM_ZERO",globalExchangeRatesApi:{endpoint:void 0,headers:void 0,propertyPath:void 0}};function E0(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?E0=function(e){return typeof e}:E0=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E0(t)}function dU(t){return cOe(t)||uOe(t)||dOe(t)||fOe()}function cOe(t){if(Array.isArray(t))return t}function uOe(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function dOe(t,e){if(t){if(typeof t=="string")return fU(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fU(t,e)}}function fU(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n =0}function mOe(t){return t.length>0&&t.every(function(e){return e>=0})&&t.some(function(e){return e>0})}function hU(t){return t%2===0}function pU(t){return JZ(t)&&!Number.isInteger(t)}function gOe(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=t.toString();if(e.indexOf("e-")>0)return parseInt(e.split("e-")[1]);var n=e.split(".")[1];return n?n.length:0}function Ab(t){return Math.abs(t)%1===.5}function vOe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(n,r){var s=Object.assign(new XMLHttpRequest,{onreadystatechange:function(){s.readyState===4&&(s.status>=200&&s.status<400?n(JSON.parse(s.responseText)):r(new Error(s.statusText)))},onerror:function(){r(new Error("Network error"))}});s.open("GET",t,!0),yOe(s,e.headers),s.send()})}function yOe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var n in e)t.setRequestHeader(n,e[n]);return t}function Wb(t){return typeof t>"u"}function eJ(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:".",n={};return Object.entries(t).forEach(function(r){if(E0(r[1])==="object"){var s=eJ(r[1]);Object.entries(s).forEach(function(i){n[r[0]+e+i[0]]=i[1]})}else n[r[0]]=r[1]}),n}function bOe(t){return!!t&&(E0(t)==="object"||typeof t=="function")&&typeof t.then=="function"}function tJ(){var t=function(r,s){var i=function(c){return Math.pow(10,gOe(c))},o=Math.max(i(r),i(s));return Math.round(r*o)*Math.round(s*o)/(o*o)},e={HALF_ODD:function(r){var s=Math.round(r);return Ab(r)&&hU(s)?s-1:s},HALF_EVEN:function(r){var s=Math.round(r);return Ab(r)?hU(s)?s:s-1:s},HALF_UP:function(r){return Math.round(r)},HALF_DOWN:function(r){return Ab(r)?Math.floor(r):Math.round(r)},HALF_TOWARDS_ZERO:function(r){return Ab(r)?Math.sign(r)*Math.floor(Math.abs(r)):Math.round(r)},HALF_AWAY_FROM_ZERO:function(r){return Ab(r)?Math.sign(r)*Math.ceil(Math.abs(r)):Math.round(r)},DOWN:function(r){return Math.floor(r)}};return{add:function(r,s){return r+s},subtract:function(r,s){return r-s},multiply:function(r,s){return pU(r)||pU(s)?t(r,s):r*s},divide:function(r,s){return r/s},modulo:function(r,s){return r%s},round:function(r){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"HALF_EVEN";return e[s](r)}}}var xOe=tJ();function wOe(t){var e=/^(?:(\$|USD)?0(?:(,)0)?(\.)?(0+)?|0(?:(,)0)?(\.)?(0+)?\s?(dollar)?)$/gm.exec(t);return{getMatches:function(){return e!==null?e.slice(1).filter(function(r){return!Wb(r)}):[]},getMinimumFractionDigits:function(){var r=function(i){return i==="."};return Wb(this.getMatches().find(r))?0:this.getMatches()[xOe.add(this.getMatches().findIndex(r),1)].split("").length},getCurrencyDisplay:function(){var r={USD:"code",dollar:"name",$:"symbol"};return r[this.getMatches().find(function(s){return s==="USD"||s==="dollar"||s==="$"})]},getStyle:function(){return Wb(this.getCurrencyDisplay(this.getMatches()))?"decimal":"currency"},getUseGrouping:function(){return!Wb(this.getMatches().find(function(r){return r===","}))}}}function _Oe(t){var e=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",i=arguments.length>1?arguments[1]:void 0;for(var o in i)s=s.replace("{{".concat(o,"}}"),i[o]);return s},n=function(s,i){return vOe(e(t.endpoint,{from:s,to:i}),{headers:t.headers})};return{getExchangeRate:function(s,i){return(bOe(t.endpoint)?t.endpoint:n(s,i)).then(function(o){return eJ(o)[e(t.propertyPath,{from:s,to:i})]})}}}function vx(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Error;if(!t)throw new n(e)}function SOe(t){vx(pOe(t),"You must provide a numeric value between 0 and 100.",RangeError)}function COe(t){vx(mOe(t),"You must provide a non-empty array of numeric values greater than 0.",TypeError)}function Ok(t){vx(Number.isInteger(t),"You must provide an integer.",TypeError)}var Vn=tJ(),EOe=function t(e){var n=Object.assign({},{amount:t.defaultAmount,currency:t.defaultCurrency,precision:t.defaultPrecision},e),r=n.amount,s=n.currency,i=n.precision;Ok(r),Ok(i);var o=t.globalLocale,a=t.globalFormat,c=t.globalRoundingMode,u=t.globalFormatRoundingMode,f=Object.assign({},t.globalExchangeRatesApi),l=function(h){var m=Object.assign({},Object.assign({},{amount:r,currency:s,precision:i},h),Object.assign({},{locale:this.locale},h));return Object.assign(t({amount:m.amount,currency:m.currency,precision:m.precision}),{locale:m.locale})},d=function(h){vx(this.hasSameCurrency(h),"You must provide a Dinero instance with the same currency.",TypeError)};return{getAmount:function(){return r},getCurrency:function(){return s},getLocale:function(){return this.locale||o},setLocale:function(h){return l.call(this,{locale:h})},getPrecision:function(){return i},convertPrecision:function(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u;Ok(h);var y=this.getPrecision(),g=h>y,v=g?Vn.multiply:Vn.divide,b=g?[h,y]:[y,h],_=Math.pow(10,Vn.subtract.apply(Vn,b));return l.call(this,{amount:Vn.round(v(this.getAmount(),_),m),precision:h})},add:function(h){d.call(this,h);var m=t.normalizePrecision([this,h]);return l.call(this,{amount:Vn.add(m[0].getAmount(),m[1].getAmount()),precision:m[0].getPrecision()})},subtract:function(h){d.call(this,h);var m=t.normalizePrecision([this,h]);return l.call(this,{amount:Vn.subtract(m[0].getAmount(),m[1].getAmount()),precision:m[0].getPrecision()})},multiply:function(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c;return l.call(this,{amount:Vn.round(Vn.multiply(this.getAmount(),h),m)})},divide:function(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c;return l.call(this,{amount:Vn.round(Vn.divide(this.getAmount(),h),m)})},percentage:function(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c;return SOe(h),this.multiply(Vn.divide(h,100),m)},allocate:function(h){var m=this;COe(h);for(var y=h.reduce(function(_,R){return Vn.add(_,R)}),g=this.getAmount(),v=h.map(function(_){var R=Math.floor(Vn.divide(Vn.multiply(m.getAmount(),_),y));return g=Vn.subtract(g,R),l.call(m,{amount:R})}),b=0;g>0;)h[b]>0&&(v[b]=v[b].add(l.call(this,{amount:1})),g=Vn.subtract(g,1)),b+=1;return v},convert:function(h){var m=this,y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=y.endpoint,v=g===void 0?f.endpoint:g,b=y.propertyPath,_=b===void 0?f.propertyPath||"rates.{{to}}":b,R=y.headers,P=R===void 0?f.headers:R,T=y.roundingMode,E=T===void 0?c:T,N=Object.assign({},{endpoint:v,propertyPath:_,headers:P,roundingMode:E});return _Oe(N).getExchangeRate(this.getCurrency(),h).then(function(k){return vx(!Wb(k),'No rate was found for the destination currency "'.concat(h,'".'),TypeError),l.call(m,{amount:Vn.round(Vn.multiply(m.getAmount(),parseFloat(k)),N.roundingMode),currency:h})})},equalsTo:function(h){return this.hasSameAmount(h)&&this.hasSameCurrency(h)},lessThan:function(h){d.call(this,h);var m=t.normalizePrecision([this,h]);return m[0].getAmount() m[1].getAmount()},greaterThanOrEqual:function(h){d.call(this,h);var m=t.normalizePrecision([this,h]);return m[0].getAmount()>=m[1].getAmount()},isZero:function(){return this.getAmount()===0},isPositive:function(){return this.getAmount()>=0},isNegative:function(){return this.getAmount()<0},hasSubUnits:function(){return Vn.modulo(this.getAmount(),Math.pow(10,i))!==0},hasCents:function(){return Vn.modulo(this.getAmount(),Math.pow(10,i))!==0},hasSameCurrency:function(h){return this.getCurrency()===h.getCurrency()},hasSameAmount:function(h){var m=t.normalizePrecision([this,h]);return m[0].getAmount()===m[1].getAmount()},toFormat:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a,m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,y=wOe(h);return this.toRoundedUnit(y.getMinimumFractionDigits(),m).toLocaleString(this.getLocale(),{currencyDisplay:y.getCurrencyDisplay(),useGrouping:y.getUseGrouping(),minimumFractionDigits:y.getMinimumFractionDigits(),style:y.getStyle(),currency:this.getCurrency()})},toUnit:function(){return Vn.divide(this.getAmount(),Math.pow(10,i))},toRoundedUnit:function(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,y=Math.pow(10,h);return Vn.divide(Vn.round(Vn.multiply(this.toUnit(),y),m),y)},toObject:function(){return{amount:r,currency:s,precision:i}},toJSON:function(){return this.toObject()}}},N1=Object.assign(EOe,aOe,lOe,hOe),VE={exports:{}};/** +Defaulting to \`null\`.`}var BY=LY,ETe=FY;const V2=S.forwardRef(({className:t,value:e,...n},r)=>w.jsx(BY,{ref:r,className:ie("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...n,children:w.jsx(ETe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(e||0)}%)`}})}));V2.displayName=BY.displayName;var q2="Radio",[RTe,UY]=In(q2),[ATe,PTe]=RTe(q2),HY=S.forwardRef((t,e)=>{const{__scopeRadio:n,name:r,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:c,...u}=t,[f,l]=S.useState(null),d=Je(e,m=>l(m)),p=S.useRef(!1),h=f?!!f.closest("form"):!0;return w.jsxs(ATe,{scope:n,checked:s,disabled:o,children:[w.jsx(De.button,{type:"button",role:"radio","aria-checked":s,"data-state":WY(s),"data-disabled":o?"":void 0,disabled:o,value:a,...u,ref:d,onClick:ye(t.onClick,m=>{s||c==null||c(),h&&(p.current=m.isPropagationStopped(),p.current||m.stopPropagation())})}),h&&w.jsx(NTe,{control:f,bubbles:!p.current,name:r,value:a,checked:s,required:i,disabled:o,style:{transform:"translateX(-100%)"}})]})});HY.displayName=q2;var VY="RadioIndicator",qY=S.forwardRef((t,e)=>{const{__scopeRadio:n,forceMount:r,...s}=t,i=PTe(VY,n);return w.jsx(Kn,{present:r||i.checked,children:w.jsx(De.span,{"data-state":WY(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:e})})});qY.displayName=VY;var NTe=t=>{const{control:e,checked:n,bubbles:r=!0,...s}=t,i=S.useRef(null),o=xy(n),a=x_(e);return S.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==n&&l){const d=new Event("click",{bubbles:r});l.call(c,n),c.dispatchEvent(d)}},[o,n,r]),w.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function WY(t){return t?"checked":"unchecked"}var TTe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],W2="RadioGroup",[kTe,WUe]=In(W2,[Xl,UY]),GY=Xl(),KY=UY(),[DTe,MTe]=kTe(W2),YY=S.forwardRef((t,e)=>{const{__scopeRadioGroup:n,name:r,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:c,dir:u,loop:f=!0,onValueChange:l,...d}=t,p=GY(n),h=Qa(u),[m,y]=mr({prop:i,defaultProp:s,onChange:l});return w.jsx(DTe,{scope:n,name:r,required:o,disabled:a,value:m,onValueChange:y,children:w.jsx(A_,{asChild:!0,...p,orientation:c,dir:h,loop:f,children:w.jsx(De.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":a?"":void 0,dir:h,...d,ref:e})})})});YY.displayName=W2;var XY="RadioGroupItem",QY=S.forwardRef((t,e)=>{const{__scopeRadioGroup:n,disabled:r,...s}=t,i=MTe(XY,n),o=i.disabled||r,a=GY(n),c=KY(n),u=S.useRef(null),f=Je(e,u),l=i.value===s.value,d=S.useRef(!1);return S.useEffect(()=>{const p=m=>{TTe.includes(m.key)&&(d.current=!0)},h=()=>d.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",h),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",h)}},[]),w.jsx(P_,{asChild:!0,...a,focusable:!o,active:l,children:w.jsx(HY,{disabled:o,required:i.required,checked:l,...c,...s,name:i.name,ref:f,onCheck:()=>i.onValueChange(s.value),onKeyDown:ye(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:ye(s.onFocus,()=>{var p;d.current&&((p=u.current)==null||p.click())})})})});QY.displayName=XY;var OTe="RadioGroupIndicator",ZY=S.forwardRef((t,e)=>{const{__scopeRadioGroup:n,...r}=t,s=KY(n);return w.jsx(qY,{...s,...r,ref:e})});ZY.displayName=OTe;var JY=YY,eX=QY,ITe=ZY;const jTe=S.forwardRef(({className:t,...e},n)=>w.jsx(JY,{className:ie("grid gap-2",t),...e,ref:n}));jTe.displayName=JY.displayName;const LTe=S.forwardRef(({className:t,...e},n)=>w.jsx(eX,{ref:n,className:ie("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:w.jsx(ITe,{className:"flex items-center justify-center",children:w.jsx(sA,{className:"h-2.5 w-2.5 fill-current text-current"})})}));LTe.displayName=eX.displayName;const{createElement:Kv,createContext:$Te,createRef:GUe,forwardRef:tX,useCallback:yi,useContext:nX,useEffect:fp,useImperativeHandle:rX,useLayoutEffect:FTe,useMemo:zTe,useRef:Ri,useState:vg}=s_,B5=s_[`useId${Math.random()}`.slice(0,5)],BTe=FTe,KA=$Te(null);KA.displayName="PanelGroupContext";const hp=BTe,UTe=typeof B5=="function"?B5:()=>null;let HTe=0;function G2(t=null){const e=UTe(),n=Ri(t||e||null);return n.current===null&&(n.current=""+HTe++),t??n.current}function sX({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:s,forwardedRef:i,id:o,maxSize:a,minSize:c,onCollapse:u,onExpand:f,onResize:l,order:d,style:p,tagName:h="div",...m}){const y=nX(KA);if(y===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:g,expandPanel:v,getPanelSize:b,getPanelStyle:_,groupId:R,isPanelCollapsed:P,reevaluatePanelConstraints:T,registerPanel:E,resizePanel:N,unregisterPanel:k}=y,M=G2(o),I=Ri({callbacks:{onCollapse:u,onExpand:f,onResize:l},constraints:{collapsedSize:n,collapsible:r,defaultSize:s,maxSize:a,minSize:c},id:M,idIsFromProps:o!==void 0,order:d});Ri({didLogMissingDefaultSizeWarning:!1}),hp(()=>{const{callbacks:L,constraints:U}=I.current,K={...U};I.current.id=M,I.current.idIsFromProps=o!==void 0,I.current.order=d,L.onCollapse=u,L.onExpand=f,L.onResize=l,U.collapsedSize=n,U.collapsible=r,U.defaultSize=s,U.maxSize=a,U.minSize=c,(K.collapsedSize!==U.collapsedSize||K.collapsible!==U.collapsible||K.maxSize!==U.maxSize||K.minSize!==U.minSize)&&T(I.current,K)}),hp(()=>{const L=I.current;return E(L),()=>{k(L)}},[d,M,E,k]),rX(i,()=>({collapse:()=>{g(I.current)},expand:L=>{v(I.current,L)},getId(){return M},getSize(){return b(I.current)},isCollapsed(){return P(I.current)},isExpanded(){return!P(I.current)},resize:L=>{N(I.current,L)}}),[g,v,b,P,M,N]);const j=_(I.current,s);return Kv(h,{...m,children:t,className:e,id:o,style:{...j,...p},"data-panel":"","data-panel-collapsible":r||void 0,"data-panel-group-id":R,"data-panel-id":M,"data-panel-size":parseFloat(""+j.flexGrow).toFixed(1)})}const iX=tX((t,e)=>Kv(sX,{...t,forwardedRef:e}));sX.displayName="Panel";iX.displayName="forwardRef(Panel)";let iO=null,sh=null;function VTe(t,e){if(e){const n=(e&uX)!==0,r=(e&dX)!==0,s=(e&fX)!==0,i=(e&hX)!==0;if(n)return s?"se-resize":i?"ne-resize":"e-resize";if(r)return s?"sw-resize":i?"nw-resize":"w-resize";if(s)return"s-resize";if(i)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function qTe(){sh!==null&&(document.head.removeChild(sh),iO=null,sh=null)}function Nk(t,e){const n=VTe(t,e);iO!==n&&(iO=n,sh===null&&(sh=document.createElement("style"),document.head.appendChild(sh)),sh.innerHTML=`*{cursor: ${n}!important;}`)}function oX(t){return t.type==="keydown"}function aX(t){return t.type.startsWith("pointer")}function lX(t){return t.type.startsWith("mouse")}function YA(t){if(aX(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(lX(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function WTe(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function GTe(t,e,n){return t.x e.x&&t.y e.y}function KTe(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:V5(t),b:V5(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;It(r,"Stacking order can only be calculated for elements with a common ancestor");const s={a:H5(U5(n.a)),b:H5(U5(n.b))};if(s.a===s.b){const i=r.childNodes,o={a:n.a.at(-1),b:n.b.at(-1)};let a=i.length;for(;a--;){const c=i[a];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(s.a-s.b)}const YTe=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function XTe(t){var e;const n=getComputedStyle((e=cX(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function QTe(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||XTe(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||YTe.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function U5(t){let e=t.length;for(;e--;){const n=t[e];if(It(n,"Missing node"),QTe(n))return n}return null}function H5(t){return t&&Number(getComputedStyle(t).zIndex)||0}function V5(t){const e=[];for(;t;)e.push(t),t=cX(t);return e}function cX(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const uX=1,dX=2,fX=4,hX=8,ZTe=WTe()==="coarse";let Ba=[],fx=!1,ad=new Map,XA=new Map;const hx=new Set;function JTe(t,e,n,r,s){var i;const{ownerDocument:o}=e,a={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:s},c=(i=ad.get(o))!==null&&i!==void 0?i:0;return ad.set(o,c+1),hx.add(a),OE(),function(){var f;XA.delete(t),hx.delete(a);const l=(f=ad.get(o))!==null&&f!==void 0?f:1;if(ad.set(o,l-1),OE(),l===1&&ad.delete(o),Ba.includes(a)){const d=Ba.indexOf(a);d>=0&&Ba.splice(d,1),Y2()}}}function q5(t){const{target:e}=t,{x:n,y:r}=YA(t);fx=!0,K2({target:e,x:n,y:r}),OE(),Ba.length>0&&(IE("down",t),t.preventDefault(),t.stopPropagation())}function Eb(t){const{x:e,y:n}=YA(t);if(t.buttons===0&&(fx=!1,IE("up",t)),!fx){const{target:r}=t;K2({target:r,x:e,y:n})}IE("move",t),Y2(),Ba.length>0&&t.preventDefault()}function Em(t){const{target:e}=t,{x:n,y:r}=YA(t);XA.clear(),fx=!1,Ba.length>0&&t.preventDefault(),IE("up",t),K2({target:e,x:n,y:r}),Y2(),OE()}function K2({target:t,x:e,y:n}){Ba.splice(0);let r=null;t instanceof HTMLElement&&(r=t),hx.forEach(s=>{const{element:i,hitAreaMargins:o}=s,a=i.getBoundingClientRect(),{bottom:c,left:u,right:f,top:l}=a,d=ZTe?o.coarse:o.fine;if(e>=u-d&&e<=f+d&&n>=l-d&&n<=c+d){if(r!==null&&i!==r&&!i.contains(r)&&!r.contains(i)&&KTe(r,i)>0){let h=r,m=!1;for(;h&&!h.contains(i);){if(GTe(h.getBoundingClientRect(),a)){m=!0;break}h=h.parentElement}if(m)return}Ba.push(s)}})}function Tk(t,e){XA.set(t,e)}function Y2(){let t=!1,e=!1;Ba.forEach(r=>{const{direction:s}=r;s==="horizontal"?t=!0:e=!0});let n=0;XA.forEach(r=>{n|=r}),t&&e?Nk("intersection",n):t?Nk("horizontal",n):e?Nk("vertical",n):qTe()}function OE(){ad.forEach((t,e)=>{const{body:n}=e;n.removeEventListener("contextmenu",Em),n.removeEventListener("pointerdown",q5),n.removeEventListener("pointerleave",Eb),n.removeEventListener("pointermove",Eb)}),window.removeEventListener("pointerup",Em),window.removeEventListener("pointercancel",Em),hx.size>0&&(fx?(Ba.length>0&&ad.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("contextmenu",Em),n.addEventListener("pointerleave",Eb),n.addEventListener("pointermove",Eb))}),window.addEventListener("pointerup",Em),window.addEventListener("pointercancel",Em)):ad.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("pointerdown",q5,{capture:!0}),n.addEventListener("pointermove",Eb))}))}function IE(t,e){hx.forEach(n=>{const{setResizeHandlerState:r}=n,s=Ba.includes(n);r(t,s,e)})}function eke(){const[t,e]=vg(0);return yi(()=>e(n=>n+1),[])}function It(t,e){if(!t)throw console.error(e),Error(e)}const X2=10;function Np(t,e,n=X2){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function Xc(t,e,n=X2){return Np(t,e,n)===0}function fo(t,e,n){return Np(t,e,n)===0}function tke(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r 0&&(t=t<0?0-g:g)}}}{const l=t<0?a:c,d=n[l];It(d,`No panel constraints found for index ${l}`);const{collapsedSize:p=0,collapsible:h,minSize:m=0}=d;if(h){const y=e[l];if(It(y!=null,`Previous layout not found for panel index ${l}`),fo(y,m)){const g=y-p;Np(g,Math.abs(t))>0&&(t=t<0?0-g:g)}}}}{const l=t<0?1:-1;let d=t<0?c:a,p=0;for(;;){const m=e[d];It(m!=null,`Previous layout not found for panel index ${d}`);const g=eg({panelConstraints:n,panelIndex:d,size:100})-m;if(p+=g,d+=l,d<0||d>=n.length)break}const h=Math.min(Math.abs(t),Math.abs(p));t=t<0?0-h:h}{let d=t<0?a:c;for(;d>=0&&d =0))break;t<0?d--:d++}}if(tke(s,o))return s;{const l=t<0?c:a,d=e[l];It(d!=null,`Previous layout not found for panel index ${l}`);const p=d+u,h=eg({panelConstraints:n,panelIndex:l,size:p});if(o[l]=h,!fo(h,p)){let m=p-h,g=t<0?c:a;for(;g>=0&&g 0?g--:g++}}}const f=o.reduce((l,d)=>d+l,0);return fo(f,100)?o:s}function nke({layout:t,panelsArray:e,pivotIndices:n}){let r=0,s=100,i=0,o=0;const a=n[0];It(a!=null,"No pivot index found"),e.forEach((l,d)=>{const{constraints:p}=l,{maxSize:h=100,minSize:m=0}=p;d===a?(r=m,s=h):(i+=m,o+=h)});const c=Math.min(s,100-i),u=Math.max(r,100-o),f=t[a];return{valueMax:c,valueMin:u,valueNow:f}}function px(t,e=document){return Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`))}function pX(t,e,n=document){const s=px(t,n).findIndex(i=>i.getAttribute("data-panel-resize-handle-id")===e);return s??null}function mX(t,e,n){const r=pX(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function gX(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function QA(t,e=document){const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function rke(t,e,n,r=document){var s,i,o,a;const c=QA(e,r),u=px(t,r),f=c?u.indexOf(c):-1,l=(s=(i=n[f])===null||i===void 0?void 0:i.id)!==null&&s!==void 0?s:null,d=(o=(a=n[f+1])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null;return[l,d]}function ske({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:s,panelGroupElement:i,setLayout:o}){Ri({didWarnAboutMissingResizeHandle:!1}),hp(()=>{if(!i)return;const a=px(n,i);for(let c=0;c {a.forEach((c,u)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[n,r,s,i]),fp(()=>{if(!i)return;const a=e.current;It(a,"Eager values not found");const{panelDataArray:c}=a,u=gX(n,i);It(u!=null,`No group found for id "${n}"`);const f=px(n,i);It(f,`No resize handles found for group id "${n}"`);const l=f.map(d=>{const p=d.getAttribute("data-panel-resize-handle-id");It(p,"Resize handle element has no handle id attribute");const[h,m]=rke(n,p,c,i);if(h==null||m==null)return()=>{};const y=g=>{if(!g.defaultPrevented)switch(g.key){case"Enter":{g.preventDefault();const v=c.findIndex(b=>b.id===h);if(v>=0){const b=c[v];It(b,`No panel data found for index ${v}`);const _=r[v],{collapsedSize:R=0,collapsible:P,minSize:T=0}=b.constraints;if(_!=null&&P){const E=Hb({delta:fo(_,R)?T-R:R-_,initialLayout:r,panelConstraints:c.map(N=>N.constraints),pivotIndices:mX(n,p,i),prevLayout:r,trigger:"keyboard"});r!==E&&o(E)}}break}}};return d.addEventListener("keydown",y),()=>{d.removeEventListener("keydown",y)}});return()=>{l.forEach(d=>d())}},[i,t,e,n,r,s,o])}function W5(t,e){if(t.length!==e.length)return!1;for(let n=0;n i.constraints);let r=0,s=100;for(let i=0;i {const i=t[s];It(i,`Panel data not found for index ${s}`);const{callbacks:o,constraints:a,id:c}=i,{collapsedSize:u=0,collapsible:f}=a,l=n[c];if(l==null||r!==l){n[c]=r;const{onCollapse:d,onExpand:p,onResize:h}=o;h&&h(r,l),f&&(d||p)&&(p&&(l==null||Xc(l,u))&&!Xc(r,u)&&p(),d&&(l==null||!Xc(l,u))&&Xc(r,u)&&d())}})}function E1(t,e){if(t.length!==e.length)return!1;for(let n=0;n {n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...s)},e)}}function G5(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function yX(t){return`react-resizable-panels:${t}`}function bX(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:s,order:i}=e;return s?r:i?`${i}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function xX(t,e){try{const n=yX(t),r=e.getItem(n);if(r){const s=JSON.parse(r);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function uke(t,e,n){var r,s;const i=(r=xX(t,n))!==null&&r!==void 0?r:{},o=bX(e);return(s=i[o])!==null&&s!==void 0?s:null}function dke(t,e,n,r,s){var i;const o=yX(t),a=bX(e),c=(i=xX(t,s))!==null&&i!==void 0?i:{};c[a]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{s.setItem(o,JSON.stringify(c))}catch(u){console.error(u)}}function K5({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((i,o)=>i+o,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(i=>`${i}%`).join(", ")}`);if(!fo(r,100))for(let i=0;i (G5(Vb),Vb.getItem(t)),setItem:(t,e)=>{G5(Vb),Vb.setItem(t,e)}},Y5={};function wX({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:s,id:i=null,onLayout:o=null,keyboardResizeBy:a=null,storage:c=Vb,style:u,tagName:f="div",...l}){const d=G2(i),p=Ri(null),[h,m]=vg(null),[y,g]=vg([]),v=eke(),b=Ri({}),_=Ri(new Map),R=Ri(0),P=Ri({autoSaveId:t,direction:r,dragState:h,id:d,keyboardResizeBy:a,onLayout:o,storage:c}),T=Ri({layout:y,panelDataArray:[],panelDataArrayChanged:!1});Ri({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),rX(s,()=>({getId:()=>P.current.id,getLayout:()=>{const{layout:Y}=T.current;return Y},setLayout:Y=>{const{onLayout:Q}=P.current,{layout:he,panelDataArray:fe}=T.current,ce=K5({layout:Y,panelConstraints:fe.map(xe=>xe.constraints)});W5(he,ce)||(g(ce),T.current.layout=ce,Q&&Q(ce),Rm(fe,ce,b.current))}}),[]),hp(()=>{P.current.autoSaveId=t,P.current.direction=r,P.current.dragState=h,P.current.id=d,P.current.onLayout=o,P.current.storage=c}),ske({committedValuesRef:P,eagerValuesRef:T,groupId:d,layout:y,panelDataArray:T.current.panelDataArray,setLayout:g,panelGroupElement:p.current}),fp(()=>{const{panelDataArray:Y}=T.current;if(t){if(y.length===0||y.length!==Y.length)return;let Q=Y5[t];Q==null&&(Q=cke(dke,fke),Y5[t]=Q);const he=[...Y],fe=new Map(_.current);Q(t,he,fe,y,c)}},[t,y,c]),fp(()=>{});const E=yi(Y=>{const{onLayout:Q}=P.current,{layout:he,panelDataArray:fe}=T.current;if(Y.constraints.collapsible){const ce=fe.map(Le=>Le.constraints),{collapsedSize:xe=0,panelSize:Pe,pivotIndices:pe}=Lf(fe,Y,he);if(It(Pe!=null,`Panel size not found for panel "${Y.id}"`),!Xc(Pe,xe)){_.current.set(Y.id,Pe);const Me=Mm(fe,Y)===fe.length-1?Pe-xe:xe-Pe,Oe=Hb({delta:Me,initialLayout:he,panelConstraints:ce,pivotIndices:pe,prevLayout:he,trigger:"imperative-api"});E1(he,Oe)||(g(Oe),T.current.layout=Oe,Q&&Q(Oe),Rm(fe,Oe,b.current))}}},[]),N=yi((Y,Q)=>{const{onLayout:he}=P.current,{layout:fe,panelDataArray:ce}=T.current;if(Y.constraints.collapsible){const xe=ce.map(Fe=>Fe.constraints),{collapsedSize:Pe=0,panelSize:pe=0,minSize:Le=0,pivotIndices:Me}=Lf(ce,Y,fe),Oe=Q??Le;if(Xc(pe,Pe)){const Fe=_.current.get(Y.id),ot=Fe!=null&&Fe>=Oe?Fe:Oe,Rt=Mm(ce,Y)===ce.length-1?pe-ot:ot-pe,J=Hb({delta:Rt,initialLayout:fe,panelConstraints:xe,pivotIndices:Me,prevLayout:fe,trigger:"imperative-api"});E1(fe,J)||(g(J),T.current.layout=J,he&&he(J),Rm(ce,J,b.current))}}},[]),k=yi(Y=>{const{layout:Q,panelDataArray:he}=T.current,{panelSize:fe}=Lf(he,Y,Q);return It(fe!=null,`Panel size not found for panel "${Y.id}"`),fe},[]),M=yi((Y,Q)=>{const{panelDataArray:he}=T.current,fe=Mm(he,Y);return lke({defaultSize:Q,dragState:h,layout:y,panelData:he,panelIndex:fe})},[h,y]),I=yi(Y=>{const{layout:Q,panelDataArray:he}=T.current,{collapsedSize:fe=0,collapsible:ce,panelSize:xe}=Lf(he,Y,Q);return It(xe!=null,`Panel size not found for panel "${Y.id}"`),ce===!0&&Xc(xe,fe)},[]),j=yi(Y=>{const{layout:Q,panelDataArray:he}=T.current,{collapsedSize:fe=0,collapsible:ce,panelSize:xe}=Lf(he,Y,Q);return It(xe!=null,`Panel size not found for panel "${Y.id}"`),!ce||Np(xe,fe)>0},[]),L=yi(Y=>{const{panelDataArray:Q}=T.current;Q.push(Y),Q.sort((he,fe)=>{const ce=he.order,xe=fe.order;return ce==null&&xe==null?0:ce==null?-1:xe==null?1:ce-xe}),T.current.panelDataArrayChanged=!0,v()},[v]);hp(()=>{if(T.current.panelDataArrayChanged){T.current.panelDataArrayChanged=!1;const{autoSaveId:Y,onLayout:Q,storage:he}=P.current,{layout:fe,panelDataArray:ce}=T.current;let xe=null;if(Y){const pe=uke(Y,ce,he);pe&&(_.current=new Map(Object.entries(pe.expandToSizes)),xe=pe.layout)}xe==null&&(xe=ake({panelDataArray:ce}));const Pe=K5({layout:xe,panelConstraints:ce.map(pe=>pe.constraints)});W5(fe,Pe)||(g(Pe),T.current.layout=Pe,Q&&Q(Pe),Rm(ce,Pe,b.current))}}),hp(()=>{const Y=T.current;return()=>{Y.layout=[]}},[]);const U=yi(Y=>function(he){he.preventDefault();const fe=p.current;if(!fe)return()=>null;const{direction:ce,dragState:xe,id:Pe,keyboardResizeBy:pe,onLayout:Le}=P.current,{layout:Me,panelDataArray:Oe}=T.current,{initialLayout:Fe}=xe??{},ot=mX(Pe,Y,fe);let nt=oke(he,Y,ce,xe,pe,fe);const Rt=ce==="horizontal";document.dir==="rtl"&&Rt&&(nt=-nt);const J=Oe.map(Ae=>Ae.constraints),de=Hb({delta:nt,initialLayout:Fe??Me,panelConstraints:J,pivotIndices:ot,prevLayout:Me,trigger:oX(he)?"keyboard":"mouse-or-touch"}),me=!E1(Me,de);(aX(he)||lX(he))&&R.current!=nt&&(R.current=nt,me?Tk(Y,0):Rt?Tk(Y,nt<0?uX:dX):Tk(Y,nt<0?fX:hX)),me&&(g(de),T.current.layout=de,Le&&Le(de),Rm(Oe,de,b.current))},[]),K=yi((Y,Q)=>{const{onLayout:he}=P.current,{layout:fe,panelDataArray:ce}=T.current,xe=ce.map(Fe=>Fe.constraints),{panelSize:Pe,pivotIndices:pe}=Lf(ce,Y,fe);It(Pe!=null,`Panel size not found for panel "${Y.id}"`);const Me=Mm(ce,Y)===ce.length-1?Pe-Q:Q-Pe,Oe=Hb({delta:Me,initialLayout:fe,panelConstraints:xe,pivotIndices:pe,prevLayout:fe,trigger:"imperative-api"});E1(fe,Oe)||(g(Oe),T.current.layout=Oe,he&&he(Oe),Rm(ce,Oe,b.current))},[]),H=yi((Y,Q)=>{const{layout:he,panelDataArray:fe}=T.current,{collapsedSize:ce=0,collapsible:xe}=Q,{collapsedSize:Pe=0,collapsible:pe,maxSize:Le=100,minSize:Me=0}=Y.constraints,{panelSize:Oe}=Lf(fe,Y,he);Oe!=null&&(xe&&pe&&Xc(Oe,ce)?Xc(ce,Pe)||K(Y,Pe):Oe Le&&K(Y,Le))},[K]),q=yi((Y,Q)=>{const{direction:he}=P.current,{layout:fe}=T.current;if(!p.current)return;const ce=QA(Y,p.current);It(ce,`Drag handle element not found for id "${Y}"`);const xe=vX(he,Q);m({dragHandleId:Y,dragHandleRect:ce.getBoundingClientRect(),initialCursorPosition:xe,initialLayout:fe})},[]),ee=yi(()=>{m(null)},[]),se=yi(Y=>{const{panelDataArray:Q}=T.current,he=Mm(Q,Y);he>=0&&(Q.splice(he,1),delete b.current[Y.id],T.current.panelDataArrayChanged=!0,v())},[v]),X=zTe(()=>({collapsePanel:E,direction:r,dragState:h,expandPanel:N,getPanelSize:k,getPanelStyle:M,groupId:d,isPanelCollapsed:I,isPanelExpanded:j,reevaluatePanelConstraints:H,registerPanel:L,registerResizeHandle:U,resizePanel:K,startDragging:q,stopDragging:ee,unregisterPanel:se,panelGroupElement:p.current}),[E,h,r,N,k,M,d,I,j,H,L,U,K,q,ee,se]),G={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return Kv(KA.Provider,{value:X},Kv(f,{...l,children:e,className:n,id:i,ref:p,style:{...G,...u},"data-panel-group":"","data-panel-group-direction":r,"data-panel-group-id":d}))}const _X=tX((t,e)=>Kv(wX,{...t,forwardedRef:e}));wX.displayName="PanelGroup";_X.displayName="forwardRef(PanelGroup)";function Mm(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function Lf(t,e,n){const r=Mm(t,e),i=r===t.length-1?[r-1,r]:[r,r+1],o=n[r];return{...e.constraints,panelSize:o,pivotIndices:i}}function hke({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){fp(()=>{if(t||n==null||r==null)return;const s=QA(e,r);if(s==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),n(o);break}case"F6":{o.preventDefault();const a=s.getAttribute("data-panel-group-id");It(a,`No group element found for id "${a}"`);const c=px(a,r),u=pX(a,e,r);It(u!==null,`No resize element found for id "${e}"`);const f=o.shiftKey?u>0?u-1:c.length-1:u+1 {s.removeEventListener("keydown",i)}},[r,t,e,n])}function SX({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:s,onBlur:i,onDragging:o,onFocus:a,style:c={},tabIndex:u=0,tagName:f="div",...l}){var d,p;const h=Ri(null),m=Ri({onDragging:o});fp(()=>{m.current.onDragging=o});const y=nX(KA);if(y===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:g,groupId:v,registerResizeHandle:b,startDragging:_,stopDragging:R,panelGroupElement:P}=y,T=G2(s),[E,N]=vg("inactive"),[k,M]=vg(!1),[I,j]=vg(null),L=Ri({state:E});hp(()=>{L.current.state=E}),fp(()=>{if(n)j(null);else{const q=b(T);j(()=>q)}},[n,T,b]);const U=(d=r==null?void 0:r.coarse)!==null&&d!==void 0?d:15,K=(p=r==null?void 0:r.fine)!==null&&p!==void 0?p:5;return fp(()=>{if(n||I==null)return;const q=h.current;return It(q,"Element ref not attached"),JTe(T,q,g,{coarse:U,fine:K},(se,X,G)=>{if(X)switch(se){case"down":{N("drag"),_(T,G);const{onDragging:Y}=m.current;Y&&Y(!0);break}case"move":{const{state:Y}=L.current;Y!=="drag"&&N("hover"),I(G);break}case"up":{N("hover"),R();const{onDragging:Y}=m.current;Y&&Y(!1);break}}else N("inactive")})},[U,g,n,K,b,T,I,_,R]),hke({disabled:n,handleId:T,resizeHandler:I,panelGroupElement:P}),Kv(f,{...l,children:t,className:e,id:s,onBlur:()=>{M(!1),i==null||i()},onFocus:()=>{M(!0),a==null||a()},ref:h,role:"separator",style:{...{touchAction:"none",userSelect:"none"},...c},tabIndex:u,"data-panel-group-direction":g,"data-panel-group-id":v,"data-resize-handle":"","data-resize-handle-active":E==="drag"?"pointer":k?"keyboard":void 0,"data-resize-handle-state":E,"data-panel-resize-handle-enabled":!n,"data-panel-resize-handle-id":T})}SX.displayName="PanelResizeHandle";const pke=({className:t,...e})=>w.jsx(_X,{className:ie("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),...e}),X5=iX,mke=({withHandle:t,className:e,...n})=>w.jsx(SX,{className:ie("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",e),...n,children:t&&w.jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:w.jsx(xq,{className:"h-2.5 w-2.5"})})});function mx(t,[e,n]){return Math.min(n,Math.max(e,t))}function gke(t,e){return S.useReducer((n,r)=>e[n][r]??n,t)}var Q2="ScrollArea",[CX,KUe]=In(Q2),[vke,ca]=CX(Q2),EX=S.forwardRef((t,e)=>{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:i=600,...o}=t,[a,c]=S.useState(null),[u,f]=S.useState(null),[l,d]=S.useState(null),[p,h]=S.useState(null),[m,y]=S.useState(null),[g,v]=S.useState(0),[b,_]=S.useState(0),[R,P]=S.useState(!1),[T,E]=S.useState(!1),N=Je(e,M=>c(M)),k=Qa(s);return w.jsx(vke,{scope:n,type:r,dir:k,scrollHideDelay:i,scrollArea:a,viewport:u,onViewportChange:f,content:l,onContentChange:d,scrollbarX:p,onScrollbarXChange:h,scrollbarXEnabled:R,onScrollbarXEnabledChange:P,scrollbarY:m,onScrollbarYChange:y,scrollbarYEnabled:T,onScrollbarYEnabledChange:E,onCornerWidthChange:v,onCornerHeightChange:_,children:w.jsx(De.div,{dir:k,...o,ref:N,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":b+"px",...t.style}})})});EX.displayName=Q2;var RX="ScrollAreaViewport",AX=S.forwardRef((t,e)=>{const{__scopeScrollArea:n,children:r,nonce:s,...i}=t,o=ca(RX,n),a=S.useRef(null),c=Je(e,a,o.onViewportChange);return w.jsxs(w.Fragment,{children:[w.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),w.jsx(De.div,{"data-radix-scroll-area-viewport":"",...i,ref:c,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t.style},children:w.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});AX.displayName=RX;var Zl="ScrollAreaScrollbar",Z2=S.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=ca(Zl,t.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=s,a=t.orientation==="horizontal";return S.useEffect(()=>(a?i(!0):o(!0),()=>{a?i(!1):o(!1)}),[a,i,o]),s.type==="hover"?w.jsx(yke,{...r,ref:e,forceMount:n}):s.type==="scroll"?w.jsx(bke,{...r,ref:e,forceMount:n}):s.type==="auto"?w.jsx(PX,{...r,ref:e,forceMount:n}):s.type==="always"?w.jsx(J2,{...r,ref:e}):null});Z2.displayName=Zl;var yke=S.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=ca(Zl,t.__scopeScrollArea),[i,o]=S.useState(!1);return S.useEffect(()=>{const a=s.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),o(!0)},f=()=>{c=window.setTimeout(()=>o(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",f),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",f)}}},[s.scrollArea,s.scrollHideDelay]),w.jsx(Kn,{present:n||i,children:w.jsx(PX,{"data-state":i?"visible":"hidden",...r,ref:e})})}),bke=S.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=ca(Zl,t.__scopeScrollArea),i=t.orientation==="horizontal",o=JA(()=>c("SCROLL_END"),100),[a,c]=gke("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return S.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,s.scrollHideDelay,c]),S.useEffect(()=>{const u=s.viewport,f=i?"scrollLeft":"scrollTop";if(u){let l=u[f];const d=()=>{const p=u[f];l!==p&&(c("SCROLL"),o()),l=p};return u.addEventListener("scroll",d),()=>u.removeEventListener("scroll",d)}},[s.viewport,i,c,o]),w.jsx(Kn,{present:n||a!=="hidden",children:w.jsx(J2,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:e,onPointerEnter:ye(t.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ye(t.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),PX=S.forwardRef((t,e)=>{const n=ca(Zl,t.__scopeScrollArea),{forceMount:r,...s}=t,[i,o]=S.useState(!1),a=t.orientation==="horizontal",c=JA(()=>{if(n.viewport){const u=n.viewport.offsetWidth {const{orientation:n="vertical",...r}=t,s=ca(Zl,t.__scopeScrollArea),i=S.useRef(null),o=S.useRef(0),[a,c]=S.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=MX(a.viewport,a.content),f={...r,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:d=>i.current=d,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:d=>o.current=d};function l(d,p){return Eke(d,o.current,a,p)}return n==="horizontal"?w.jsx(xke,{...f,ref:e,onThumbPositionChange:()=>{if(s.viewport&&i.current){const d=s.viewport.scrollLeft,p=Q5(d,a,s.dir);i.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:d=>{s.viewport&&(s.viewport.scrollLeft=d)},onDragScroll:d=>{s.viewport&&(s.viewport.scrollLeft=l(d,s.dir))}}):n==="vertical"?w.jsx(wke,{...f,ref:e,onThumbPositionChange:()=>{if(s.viewport&&i.current){const d=s.viewport.scrollTop,p=Q5(d,a);i.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:d=>{s.viewport&&(s.viewport.scrollTop=d)},onDragScroll:d=>{s.viewport&&(s.viewport.scrollTop=l(d))}}):null}),xke=S.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...s}=t,i=ca(Zl,t.__scopeScrollArea),[o,a]=S.useState(),c=S.useRef(null),u=Je(e,c,i.onScrollbarXChange);return S.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),w.jsx(TX,{"data-orientation":"horizontal",...s,ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ZA(n)+"px",...t.style},onThumbPointerDown:f=>t.onThumbPointerDown(f.x),onDragScroll:f=>t.onDragScroll(f.x),onWheelScroll:(f,l)=>{if(i.viewport){const d=i.viewport.scrollLeft+f.deltaX;t.onWheelScroll(d),IX(d,l)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&o&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:LE(o.paddingLeft),paddingEnd:LE(o.paddingRight)}})}})}),wke=S.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...s}=t,i=ca(Zl,t.__scopeScrollArea),[o,a]=S.useState(),c=S.useRef(null),u=Je(e,c,i.onScrollbarYChange);return S.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),w.jsx(TX,{"data-orientation":"vertical",...s,ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ZA(n)+"px",...t.style},onThumbPointerDown:f=>t.onThumbPointerDown(f.y),onDragScroll:f=>t.onDragScroll(f.y),onWheelScroll:(f,l)=>{if(i.viewport){const d=i.viewport.scrollTop+f.deltaY;t.onWheelScroll(d),IX(d,l)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&o&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:LE(o.paddingTop),paddingEnd:LE(o.paddingBottom)}})}})}),[_ke,NX]=CX(Zl),TX=S.forwardRef((t,e)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:f,onResize:l,...d}=t,p=ca(Zl,n),[h,m]=S.useState(null),y=Je(e,N=>m(N)),g=S.useRef(null),v=S.useRef(""),b=p.viewport,_=r.content-r.viewport,R=on(f),P=on(c),T=JA(l,10);function E(N){if(g.current){const k=N.clientX-g.current.left,M=N.clientY-g.current.top;u({x:k,y:M})}}return S.useEffect(()=>{const N=k=>{const M=k.target;(h==null?void 0:h.contains(M))&&R(k,_)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[b,h,_,R]),S.useEffect(P,[r,P]),Yv(h,T),Yv(p.content,T),w.jsx(_ke,{scope:n,scrollbar:h,hasThumb:s,onThumbChange:on(i),onThumbPointerUp:on(o),onThumbPositionChange:P,onThumbPointerDown:on(a),children:w.jsx(De.div,{...d,ref:y,style:{position:"absolute",...d.style},onPointerDown:ye(t.onPointerDown,N=>{N.button===0&&(N.target.setPointerCapture(N.pointerId),g.current=h.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),E(N))}),onPointerMove:ye(t.onPointerMove,E),onPointerUp:ye(t.onPointerUp,N=>{const k=N.target;k.hasPointerCapture(N.pointerId)&&k.releasePointerCapture(N.pointerId),document.body.style.webkitUserSelect=v.current,p.viewport&&(p.viewport.style.scrollBehavior=""),g.current=null})})})}),jE="ScrollAreaThumb",kX=S.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=NX(jE,t.__scopeScrollArea);return w.jsx(Kn,{present:n||s.hasThumb,children:w.jsx(Ske,{ref:e,...r})})}),Ske=S.forwardRef((t,e)=>{const{__scopeScrollArea:n,style:r,...s}=t,i=ca(jE,n),o=NX(jE,n),{onThumbPositionChange:a}=o,c=Je(e,l=>o.onThumbChange(l)),u=S.useRef(),f=JA(()=>{u.current&&(u.current(),u.current=void 0)},100);return S.useEffect(()=>{const l=i.viewport;if(l){const d=()=>{if(f(),!u.current){const p=Rke(l,a);u.current=p,a()}};return a(),l.addEventListener("scroll",d),()=>l.removeEventListener("scroll",d)}},[i.viewport,f,a]),w.jsx(De.div,{"data-state":o.hasThumb?"visible":"hidden",...s,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ye(t.onPointerDownCapture,l=>{const p=l.target.getBoundingClientRect(),h=l.clientX-p.left,m=l.clientY-p.top;o.onThumbPointerDown({x:h,y:m})}),onPointerUp:ye(t.onPointerUp,o.onThumbPointerUp)})});kX.displayName=jE;var e$="ScrollAreaCorner",DX=S.forwardRef((t,e)=>{const n=ca(e$,t.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?w.jsx(Cke,{...t,ref:e}):null});DX.displayName=e$;var Cke=S.forwardRef((t,e)=>{const{__scopeScrollArea:n,...r}=t,s=ca(e$,n),[i,o]=S.useState(0),[a,c]=S.useState(0),u=!!(i&&a);return Yv(s.scrollbarX,()=>{var l;const f=((l=s.scrollbarX)==null?void 0:l.offsetHeight)||0;s.onCornerHeightChange(f),c(f)}),Yv(s.scrollbarY,()=>{var l;const f=((l=s.scrollbarY)==null?void 0:l.offsetWidth)||0;s.onCornerWidthChange(f),o(f)}),u?w.jsx(De.div,{...r,ref:e,style:{width:i,height:a,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function LE(t){return t?parseInt(t,10):0}function MX(t,e){const n=t/e;return isNaN(n)?0:n}function ZA(t){const e=MX(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function Eke(t,e,n,r="ltr"){const s=ZA(n),i=s/2,o=e||i,a=s-o,c=n.scrollbar.paddingStart+o,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,f=n.content-n.viewport,l=r==="ltr"?[0,f]:[f*-1,0];return OX([c,u],l)(t)}function Q5(t,e,n="ltr"){const r=ZA(e),s=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=e.scrollbar.size-s,o=e.content-e.viewport,a=i-r,c=n==="ltr"?[0,o]:[o*-1,0],u=mx(t,c);return OX([0,o],[0,a])(u)}function OX(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function IX(t,e){return t>0&&t {})=>{let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function s(){const i={left:t.scrollLeft,top:t.scrollTop},o=n.left!==i.left,a=n.top!==i.top;(o||a)&&e(),n=i,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function JA(t,e){const n=on(t),r=S.useRef(0);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),S.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,e)},[n,e])}function Yv(t,e){const n=on(e);ir(()=>{let r=0;if(t){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(t),()=>{window.cancelAnimationFrame(r),s.unobserve(t)}}},[t,n])}var jX=EX,Ake=AX,Pke=DX;const t$=S.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(jX,{ref:r,className:ie("relative overflow-hidden",t),...n,children:[w.jsx(Ake,{className:"h-full w-full rounded-[inherit]",children:e}),w.jsx(LX,{}),w.jsx(Pke,{})]}));t$.displayName=jX.displayName;const LX=S.forwardRef(({className:t,orientation:e="vertical",...n},r)=>w.jsx(Z2,{ref:r,orientation:e,className:ie("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...n,children:w.jsx(kX,{className:"relative flex-1 rounded-full bg-border"})}));LX.displayName=Z2.displayName;var Nke=[" ","Enter","ArrowUp","ArrowDown"],Tke=[" ","Enter"],z_="Select",[eP,tP,kke]=Cu(z_),[Dy,YUe]=In(z_,[kke,Yl]),nP=Yl(),[Dke,xf]=Dy(z_),[Mke,Oke]=Dy(z_),$X=t=>{const{__scopeSelect:e,children:n,open:r,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:c,dir:u,name:f,autoComplete:l,disabled:d,required:p}=t,h=nP(e),[m,y]=S.useState(null),[g,v]=S.useState(null),[b,_]=S.useState(!1),R=Qa(u),[P=!1,T]=mr({prop:r,defaultProp:s,onChange:i}),[E,N]=mr({prop:o,defaultProp:a,onChange:c}),k=S.useRef(null),M=m?!!m.closest("form"):!0,[I,j]=S.useState(new Set),L=Array.from(I).map(U=>U.props.value).join(";");return w.jsx(FA,{...h,children:w.jsxs(Dke,{required:p,scope:e,trigger:m,onTriggerChange:y,valueNode:g,onValueNodeChange:v,valueNodeHasChildren:b,onValueNodeHasChildrenChange:_,contentId:js(),value:E,onValueChange:N,open:P,onOpenChange:T,dir:R,triggerPointerDownPosRef:k,disabled:d,children:[w.jsx(eP.Provider,{scope:e,children:w.jsx(Mke,{scope:t.__scopeSelect,onNativeOptionAdd:S.useCallback(U=>{j(K=>new Set(K).add(U))},[]),onNativeOptionRemove:S.useCallback(U=>{j(K=>{const H=new Set(K);return H.delete(U),H})},[]),children:n})}),M?w.jsxs(cQ,{"aria-hidden":!0,required:p,tabIndex:-1,name:f,autoComplete:l,value:E,onChange:U=>N(U.target.value),disabled:d,children:[E===void 0?w.jsx("option",{value:""}):null,Array.from(I)]},L):null]})})};$X.displayName=z_;var FX="SelectTrigger",zX=S.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:r=!1,...s}=t,i=nP(n),o=xf(FX,n),a=o.disabled||r,c=Je(e,o.onTriggerChange),u=tP(n),[f,l,d]=uQ(h=>{const m=u().filter(v=>!v.disabled),y=m.find(v=>v.value===o.value),g=dQ(m,h,y);g!==void 0&&o.onValueChange(g.value)}),p=()=>{a||(o.onOpenChange(!0),d())};return w.jsx(Ay,{asChild:!0,...i,children:w.jsx(De.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":lQ(o.value)?"":void 0,...s,ref:c,onClick:ye(s.onClick,h=>{h.currentTarget.focus()}),onPointerDown:ye(s.onPointerDown,h=>{const m=h.target;m.hasPointerCapture(h.pointerId)&&m.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&(p(),o.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)},h.preventDefault())}),onKeyDown:ye(s.onKeyDown,h=>{const m=f.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&l(h.key),!(m&&h.key===" ")&&Nke.includes(h.key)&&(p(),h.preventDefault())})})})});zX.displayName=FX;var BX="SelectValue",UX=S.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:s,children:i,placeholder:o="",...a}=t,c=xf(BX,n),{onValueNodeHasChildrenChange:u}=c,f=i!==void 0,l=Je(e,c.onValueNodeChange);return ir(()=>{u(f)},[u,f]),w.jsx(De.span,{...a,ref:l,style:{pointerEvents:"none"},children:lQ(c.value)?w.jsx(w.Fragment,{children:o}):i})});UX.displayName=BX;var Ike="SelectIcon",HX=S.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...s}=t;return w.jsx(De.span,{"aria-hidden":!0,...s,ref:e,children:r||"▼"})});HX.displayName=Ike;var jke="SelectPortal",VX=t=>w.jsx(dy,{asChild:!0,...t});VX.displayName=jke;var Tp="SelectContent",qX=S.forwardRef((t,e)=>{const n=xf(Tp,t.__scopeSelect),[r,s]=S.useState();if(ir(()=>{s(new DocumentFragment)},[]),!n.open){const i=r;return i?rs.createPortal(w.jsx(WX,{scope:t.__scopeSelect,children:w.jsx(eP.Slot,{scope:t.__scopeSelect,children:w.jsx("div",{children:t.children})})}),i):null}return w.jsx(GX,{...t,ref:e})});qX.displayName=Tp;var vc=10,[WX,wf]=Dy(Tp),Lke="SelectContentImpl",GX=S.forwardRef((t,e)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:c,align:u,alignOffset:f,arrowPadding:l,collisionBoundary:d,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:y,...g}=t,v=xf(Tp,n),[b,_]=S.useState(null),[R,P]=S.useState(null),T=Je(e,ce=>_(ce)),[E,N]=S.useState(null),[k,M]=S.useState(null),I=tP(n),[j,L]=S.useState(!1),U=S.useRef(!1);S.useEffect(()=>{if(b)return p_(b)},[b]),oA();const K=S.useCallback(ce=>{const[xe,...Pe]=I().map(Me=>Me.ref.current),[pe]=Pe.slice(-1),Le=document.activeElement;for(const Me of ce)if(Me===Le||(Me==null||Me.scrollIntoView({block:"nearest"}),Me===xe&&R&&(R.scrollTop=0),Me===pe&&R&&(R.scrollTop=R.scrollHeight),Me==null||Me.focus(),document.activeElement!==Le))return},[I,R]),H=S.useCallback(()=>K([E,b]),[K,E,b]);S.useEffect(()=>{j&&H()},[j,H]);const{onOpenChange:q,triggerPointerDownPosRef:ee}=v;S.useEffect(()=>{if(b){let ce={x:0,y:0};const xe=pe=>{var Le,Me;ce={x:Math.abs(Math.round(pe.pageX)-(((Le=ee.current)==null?void 0:Le.x)??0)),y:Math.abs(Math.round(pe.pageY)-(((Me=ee.current)==null?void 0:Me.y)??0))}},Pe=pe=>{ce.x<=10&&ce.y<=10?pe.preventDefault():b.contains(pe.target)||q(!1),document.removeEventListener("pointermove",xe),ee.current=null};return ee.current!==null&&(document.addEventListener("pointermove",xe),document.addEventListener("pointerup",Pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",xe),document.removeEventListener("pointerup",Pe,{capture:!0})}}},[b,q,ee]),S.useEffect(()=>{const ce=()=>q(!1);return window.addEventListener("blur",ce),window.addEventListener("resize",ce),()=>{window.removeEventListener("blur",ce),window.removeEventListener("resize",ce)}},[q]);const[se,X]=uQ(ce=>{const xe=I().filter(Le=>!Le.disabled),Pe=xe.find(Le=>Le.ref.current===document.activeElement),pe=dQ(xe,ce,Pe);pe&&setTimeout(()=>pe.ref.current.focus())}),G=S.useCallback((ce,xe,Pe)=>{const pe=!U.current&&!Pe;(v.value!==void 0&&v.value===xe||pe)&&(N(ce),pe&&(U.current=!0))},[v.value]),Y=S.useCallback(()=>b==null?void 0:b.focus(),[b]),Q=S.useCallback((ce,xe,Pe)=>{const pe=!U.current&&!Pe;(v.value!==void 0&&v.value===xe||pe)&&M(ce)},[v.value]),he=r==="popper"?oO:KX,fe=he===oO?{side:a,sideOffset:c,align:u,alignOffset:f,arrowPadding:l,collisionBoundary:d,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:y}:{};return w.jsx(WX,{scope:n,content:b,viewport:R,onViewportChange:P,itemRefCallback:G,selectedItem:E,onItemLeave:Y,itemTextRefCallback:Q,focusSelectedItem:H,selectedItemText:k,position:r,isPositioned:j,searchRef:se,children:w.jsx(h_,{as:qa,allowPinchZoom:!0,children:w.jsx(f_,{asChild:!0,trapped:v.open,onMountAutoFocus:ce=>{ce.preventDefault()},onUnmountAutoFocus:ye(s,ce=>{var xe;(xe=v.trigger)==null||xe.focus({preventScroll:!0}),ce.preventDefault()}),children:w.jsx(Ru,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:ce=>ce.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:w.jsx(he,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:ce=>ce.preventDefault(),...g,...fe,onPlaced:()=>L(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:ye(g.onKeyDown,ce=>{const xe=ce.ctrlKey||ce.altKey||ce.metaKey;if(ce.key==="Tab"&&ce.preventDefault(),!xe&&ce.key.length===1&&X(ce.key),["ArrowUp","ArrowDown","Home","End"].includes(ce.key)){let pe=I().filter(Le=>!Le.disabled).map(Le=>Le.ref.current);if(["ArrowUp","End"].includes(ce.key)&&(pe=pe.slice().reverse()),["ArrowUp","ArrowDown"].includes(ce.key)){const Le=ce.target,Me=pe.indexOf(Le);pe=pe.slice(Me+1)}setTimeout(()=>K(pe)),ce.preventDefault()}})})})})})})});GX.displayName=Lke;var $ke="SelectItemAlignedPosition",KX=S.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:r,...s}=t,i=xf(Tp,n),o=wf(Tp,n),[a,c]=S.useState(null),[u,f]=S.useState(null),l=Je(e,T=>f(T)),d=tP(n),p=S.useRef(!1),h=S.useRef(!0),{viewport:m,selectedItem:y,selectedItemText:g,focusSelectedItem:v}=o,b=S.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&u&&m&&y&&g){const T=i.trigger.getBoundingClientRect(),E=u.getBoundingClientRect(),N=i.valueNode.getBoundingClientRect(),k=g.getBoundingClientRect();if(i.dir!=="rtl"){const Le=k.left-E.left,Me=N.left-Le,Oe=T.left-Me,Fe=T.width+Oe,ot=Math.max(Fe,E.width),nt=window.innerWidth-vc,Rt=mx(Me,[vc,nt-ot]);a.style.minWidth=Fe+"px",a.style.left=Rt+"px"}else{const Le=E.right-k.right,Me=window.innerWidth-N.right-Le,Oe=window.innerWidth-T.right-Me,Fe=T.width+Oe,ot=Math.max(Fe,E.width),nt=window.innerWidth-vc,Rt=mx(Me,[vc,nt-ot]);a.style.minWidth=Fe+"px",a.style.right=Rt+"px"}const M=d(),I=window.innerHeight-vc*2,j=m.scrollHeight,L=window.getComputedStyle(u),U=parseInt(L.borderTopWidth,10),K=parseInt(L.paddingTop,10),H=parseInt(L.borderBottomWidth,10),q=parseInt(L.paddingBottom,10),ee=U+K+j+q+H,se=Math.min(y.offsetHeight*5,ee),X=window.getComputedStyle(m),G=parseInt(X.paddingTop,10),Y=parseInt(X.paddingBottom,10),Q=T.top+T.height/2-vc,he=I-Q,fe=y.offsetHeight/2,ce=y.offsetTop+fe,xe=U+K+ce,Pe=ee-xe;if(xe<=Q){const Le=y===M[M.length-1].ref.current;a.style.bottom="0px";const Me=u.clientHeight-m.offsetTop-m.offsetHeight,Oe=Math.max(he,fe+(Le?Y:0)+Me+H),Fe=xe+Oe;a.style.height=Fe+"px"}else{const Le=y===M[0].ref.current;a.style.top="0px";const Oe=Math.max(Q,U+m.offsetTop+(Le?G:0)+fe)+Pe;a.style.height=Oe+"px",m.scrollTop=xe-Q+m.offsetTop}a.style.margin=`${vc}px 0`,a.style.minHeight=se+"px",a.style.maxHeight=I+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[d,i.trigger,i.valueNode,a,u,m,y,g,i.dir,r]);ir(()=>b(),[b]);const[_,R]=S.useState();ir(()=>{u&&R(window.getComputedStyle(u).zIndex)},[u]);const P=S.useCallback(T=>{T&&h.current===!0&&(b(),v==null||v(),h.current=!1)},[b,v]);return w.jsx(zke,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:P,children:w.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:w.jsx(De.div,{...s,ref:l,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});KX.displayName=$ke;var Fke="SelectPopperPosition",oO=S.forwardRef((t,e)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=vc,...i}=t,o=nP(n);return w.jsx(E_,{...o,...i,ref:e,align:r,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});oO.displayName=Fke;var[zke,n$]=Dy(Tp,{}),aO="SelectViewport",YX=S.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:r,...s}=t,i=wf(aO,n),o=n$(aO,n),a=Je(e,i.onViewportChange),c=S.useRef(0);return w.jsxs(w.Fragment,{children:[w.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),w.jsx(eP.Slot,{scope:n,children:w.jsx(De.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ye(s.onScroll,u=>{const f=u.currentTarget,{contentWrapper:l,shouldExpandOnScrollRef:d}=o;if(d!=null&&d.current&&l){const p=Math.abs(c.current-f.scrollTop);if(p>0){const h=window.innerHeight-vc*2,m=parseFloat(l.style.minHeight),y=parseFloat(l.style.height),g=Math.max(m,y);if(g 0?_:0,l.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});YX.displayName=aO;var XX="SelectGroup",[Bke,Uke]=Dy(XX),Hke=S.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=js();return w.jsx(Bke,{scope:n,id:s,children:w.jsx(De.div,{role:"group","aria-labelledby":s,...r,ref:e})})});Hke.displayName=XX;var QX="SelectLabel",ZX=S.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=Uke(QX,n);return w.jsx(De.div,{id:s.id,...r,ref:e})});ZX.displayName=QX;var $E="SelectItem",[Vke,JX]=Dy($E),eQ=S.forwardRef((t,e)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:i,...o}=t,a=xf($E,n),c=wf($E,n),u=a.value===r,[f,l]=S.useState(i??""),[d,p]=S.useState(!1),h=Je(e,g=>{var v;return(v=c.itemRefCallback)==null?void 0:v.call(c,g,r,s)}),m=js(),y=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return w.jsx(Vke,{scope:n,value:r,disabled:s,textId:m,isSelected:u,onItemTextChange:S.useCallback(g=>{l(v=>v||((g==null?void 0:g.textContent)??"").trim())},[]),children:w.jsx(eP.ItemSlot,{scope:n,value:r,disabled:s,textValue:f,children:w.jsx(De.div,{role:"option","aria-labelledby":m,"data-highlighted":d?"":void 0,"aria-selected":u&&d,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:h,onFocus:ye(o.onFocus,()=>p(!0)),onBlur:ye(o.onBlur,()=>p(!1)),onPointerUp:ye(o.onPointerUp,y),onPointerMove:ye(o.onPointerMove,g=>{var v;s?(v=c.onItemLeave)==null||v.call(c):g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ye(o.onPointerLeave,g=>{var v;g.currentTarget===document.activeElement&&((v=c.onItemLeave)==null||v.call(c))}),onKeyDown:ye(o.onKeyDown,g=>{var b;((b=c.searchRef)==null?void 0:b.current)!==""&&g.key===" "||(Tke.includes(g.key)&&y(),g.key===" "&&g.preventDefault())})})})})});eQ.displayName=$E;var qb="SelectItemText",tQ=S.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:s,...i}=t,o=xf(qb,n),a=wf(qb,n),c=JX(qb,n),u=Oke(qb,n),[f,l]=S.useState(null),d=Je(e,g=>l(g),c.onItemTextChange,g=>{var v;return(v=a.itemTextRefCallback)==null?void 0:v.call(a,g,c.value,c.disabled)}),p=f==null?void 0:f.textContent,h=S.useMemo(()=>w.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:y}=u;return ir(()=>(m(h),()=>y(h)),[m,y,h]),w.jsxs(w.Fragment,{children:[w.jsx(De.span,{id:c.textId,...i,ref:d}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?rs.createPortal(i.children,o.valueNode):null]})});tQ.displayName=qb;var nQ="SelectItemIndicator",rQ=S.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return JX(nQ,n).isSelected?w.jsx(De.span,{"aria-hidden":!0,...r,ref:e}):null});rQ.displayName=nQ;var lO="SelectScrollUpButton",sQ=S.forwardRef((t,e)=>{const n=wf(lO,t.__scopeSelect),r=n$(lO,t.__scopeSelect),[s,i]=S.useState(!1),o=Je(e,r.onScrollButtonChange);return ir(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollTop>0;i(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?w.jsx(oQ,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});sQ.displayName=lO;var cO="SelectScrollDownButton",iQ=S.forwardRef((t,e)=>{const n=wf(cO,t.__scopeSelect),r=n$(cO,t.__scopeSelect),[s,i]=S.useState(!1),o=Je(e,r.onScrollButtonChange);return ir(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?w.jsx(oQ,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});iQ.displayName=cO;var oQ=S.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=t,i=wf("SelectScrollButton",n),o=S.useRef(null),a=tP(n),c=S.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return S.useEffect(()=>()=>c(),[c]),ir(()=>{var f;const u=a().find(l=>l.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[a]),w.jsx(De.div,{"aria-hidden":!0,...s,ref:e,style:{flexShrink:0,...s.style},onPointerDown:ye(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:ye(s.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:ye(s.onPointerLeave,()=>{c()})})}),qke="SelectSeparator",aQ=S.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return w.jsx(De.div,{"aria-hidden":!0,...r,ref:e})});aQ.displayName=qke;var uO="SelectArrow",Wke=S.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=nP(n),i=xf(uO,n),o=wf(uO,n);return i.open&&o.position==="popper"?w.jsx(R_,{...s,...r,ref:e}):null});Wke.displayName=uO;function lQ(t){return t===""||t===void 0}var cQ=S.forwardRef((t,e)=>{const{value:n,...r}=t,s=S.useRef(null),i=Je(e,s),o=xy(n);return S.useEffect(()=>{const a=s.current,c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==n&&f){const l=new Event("change",{bubbles:!0});f.call(a,n),a.dispatchEvent(l)}},[o,n]),w.jsx($_,{asChild:!0,children:w.jsx("select",{...r,ref:i,defaultValue:n})})});cQ.displayName="BubbleSelect";function uQ(t){const e=on(t),n=S.useRef(""),r=S.useRef(0),s=S.useCallback(o=>{const a=n.current+o;e(a),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[e]),i=S.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,i]}function dQ(t,e,n){const s=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let o=Gke(t,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function Gke(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var Kke=$X,fQ=zX,Yke=UX,Xke=HX,Qke=VX,hQ=qX,Zke=YX,pQ=ZX,mQ=eQ,Jke=tQ,eDe=rQ,gQ=sQ,vQ=iQ,yQ=aQ;const r$=Kke,s$=Yke,rP=S.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(fQ,{ref:r,className:ie("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...n,children:[e,w.jsx(Xke,{asChild:!0,children:w.jsx(d_,{className:"h-4 w-4 opacity-50"})})]}));rP.displayName=fQ.displayName;const bQ=S.forwardRef(({className:t,...e},n)=>w.jsx(gQ,{ref:n,className:ie("flex cursor-default items-center justify-center py-1",t),...e,children:w.jsx(pq,{className:"h-4 w-4"})}));bQ.displayName=gQ.displayName;const xQ=S.forwardRef(({className:t,...e},n)=>w.jsx(vQ,{ref:n,className:ie("flex cursor-default items-center justify-center py-1",t),...e,children:w.jsx(d_,{className:"h-4 w-4"})}));xQ.displayName=vQ.displayName;const sP=S.forwardRef(({className:t,children:e,position:n="popper",...r},s)=>w.jsx(Qke,{children:w.jsxs(hQ,{ref:s,className:ie("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:n,...r,children:[w.jsx(bQ,{}),w.jsx(Zke,{className:ie("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),w.jsx(xQ,{})]})}));sP.displayName=hQ.displayName;const tDe=S.forwardRef(({className:t,...e},n)=>w.jsx(pQ,{ref:n,className:ie("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...e}));tDe.displayName=pQ.displayName;const yg=S.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(mQ,{ref:r,className:ie("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(eDe,{children:w.jsx(u_,{className:"h-4 w-4"})})}),w.jsx(Jke,{children:e})]}));yg.displayName=mQ.displayName;const nDe=S.forwardRef(({className:t,...e},n)=>w.jsx(yQ,{ref:n,className:ie("-mx-1 my-1 h-px bg-muted",t),...e}));nDe.displayName=yQ.displayName;const rDe=lA,sDe=cA,iDe=uA,wQ=S.forwardRef(({className:t,...e},n)=>w.jsx(fy,{className:ie("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e,ref:n}));wQ.displayName=fy.displayName;const oDe=li("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),_Q=S.forwardRef(({side:t="right",className:e,children:n,...r},s)=>w.jsxs(iDe,{children:[w.jsx(wQ,{}),w.jsxs(hy,{ref:s,className:ie(oDe({side:t}),e),...r,children:[n,w.jsxs(gy,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[w.jsx(iA,{className:"h-4 w-4"}),w.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));_Q.displayName=hy.displayName;const aDe=S.forwardRef(({className:t,...e},n)=>w.jsx(py,{ref:n,className:ie("text-lg font-semibold text-foreground",t),...e}));aDe.displayName=py.displayName;const lDe=S.forwardRef(({className:t,...e},n)=>w.jsx(my,{ref:n,className:ie("text-sm text-muted-foreground",t),...e}));lDe.displayName=my.displayName;function bi({className:t,...e}){return w.jsx("div",{className:ie("animate-pulse rounded-md bg-muted",t),...e})}var SQ=["PageUp","PageDown"],CQ=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],EQ={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},My="Slider",[dO,cDe,uDe]=Cu(My),[RQ,XUe]=In(My,[uDe]),[dDe,iP]=RQ(My),AQ=S.forwardRef((t,e)=>{const{name:n,min:r=0,max:s=100,step:i=1,orientation:o="horizontal",disabled:a=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[r],value:f,onValueChange:l=()=>{},onValueCommit:d=()=>{},inverted:p=!1,...h}=t,m=S.useRef(new Set),y=S.useRef(0),v=o==="horizontal"?fDe:hDe,[b=[],_]=mr({prop:f,defaultProp:u,onChange:k=>{var I;(I=[...m.current][y.current])==null||I.focus(),l(k)}}),R=S.useRef(b);function P(k){const M=yDe(b,k);N(k,M)}function T(k){N(k,y.current)}function E(){const k=R.current[y.current];b[y.current]!==k&&d(b)}function N(k,M,{commit:I}={commit:!1}){const j=_De(i),L=SDe(Math.round((k-r)/i)*i+r,j),U=mx(L,[r,s]);_((K=[])=>{const H=gDe(K,U,M);if(wDe(H,c*i)){y.current=H.indexOf(U);const q=String(H)!==String(K);return q&&I&&d(H),q?H:K}else return K})}return w.jsx(dDe,{scope:t.__scopeSlider,name:n,disabled:a,min:r,max:s,valueIndexToChangeRef:y,thumbs:m.current,values:b,orientation:o,children:w.jsx(dO.Provider,{scope:t.__scopeSlider,children:w.jsx(dO.Slot,{scope:t.__scopeSlider,children:w.jsx(v,{"aria-disabled":a,"data-disabled":a?"":void 0,...h,ref:e,onPointerDown:ye(h.onPointerDown,()=>{a||(R.current=b)}),min:r,max:s,inverted:p,onSlideStart:a?void 0:P,onSlideMove:a?void 0:T,onSlideEnd:a?void 0:E,onHomeKeyDown:()=>!a&&N(r,0,{commit:!0}),onEndKeyDown:()=>!a&&N(s,b.length-1,{commit:!0}),onStepKeyDown:({event:k,direction:M})=>{if(!a){const L=SQ.includes(k.key)||k.shiftKey&&CQ.includes(k.key)?10:1,U=y.current,K=b[U],H=i*L*M;N(K+H,U,{commit:!0})}}})})})})});AQ.displayName=My;var[PQ,NQ]=RQ(My,{startEdge:"left",endEdge:"right",size:"width",direction:1}),fDe=S.forwardRef((t,e)=>{const{min:n,max:r,dir:s,inverted:i,onSlideStart:o,onSlideMove:a,onSlideEnd:c,onStepKeyDown:u,...f}=t,[l,d]=S.useState(null),p=Je(e,b=>d(b)),h=S.useRef(),m=Qa(s),y=m==="ltr",g=y&&!i||!y&&i;function v(b){const _=h.current||l.getBoundingClientRect(),R=[0,_.width],T=i$(R,g?[n,r]:[r,n]);return h.current=_,T(b-_.left)}return w.jsx(PQ,{scope:t.__scopeSlider,startEdge:g?"left":"right",endEdge:g?"right":"left",direction:g?1:-1,size:"width",children:w.jsx(TQ,{dir:m,"data-orientation":"horizontal",...f,ref:p,style:{...f.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const _=v(b.clientX);o==null||o(_)},onSlideMove:b=>{const _=v(b.clientX);a==null||a(_)},onSlideEnd:()=>{h.current=void 0,c==null||c()},onStepKeyDown:b=>{const R=EQ[g?"from-left":"from-right"].includes(b.key);u==null||u({event:b,direction:R?-1:1})}})})}),hDe=S.forwardRef((t,e)=>{const{min:n,max:r,inverted:s,onSlideStart:i,onSlideMove:o,onSlideEnd:a,onStepKeyDown:c,...u}=t,f=S.useRef(null),l=Je(e,f),d=S.useRef(),p=!s;function h(m){const y=d.current||f.current.getBoundingClientRect(),g=[0,y.height],b=i$(g,p?[r,n]:[n,r]);return d.current=y,b(m-y.top)}return w.jsx(PQ,{scope:t.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:w.jsx(TQ,{"data-orientation":"vertical",...u,ref:l,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const y=h(m.clientY);i==null||i(y)},onSlideMove:m=>{const y=h(m.clientY);o==null||o(y)},onSlideEnd:()=>{d.current=void 0,a==null||a()},onStepKeyDown:m=>{const g=EQ[p?"from-bottom":"from-top"].includes(m.key);c==null||c({event:m,direction:g?-1:1})}})})}),TQ=S.forwardRef((t,e)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:s,onSlideEnd:i,onHomeKeyDown:o,onEndKeyDown:a,onStepKeyDown:c,...u}=t,f=iP(My,n);return w.jsx(De.span,{...u,ref:e,onKeyDown:ye(t.onKeyDown,l=>{l.key==="Home"?(o(l),l.preventDefault()):l.key==="End"?(a(l),l.preventDefault()):SQ.concat(CQ).includes(l.key)&&(c(l),l.preventDefault())}),onPointerDown:ye(t.onPointerDown,l=>{const d=l.target;d.setPointerCapture(l.pointerId),l.preventDefault(),f.thumbs.has(d)?d.focus():r(l)}),onPointerMove:ye(t.onPointerMove,l=>{l.target.hasPointerCapture(l.pointerId)&&s(l)}),onPointerUp:ye(t.onPointerUp,l=>{const d=l.target;d.hasPointerCapture(l.pointerId)&&(d.releasePointerCapture(l.pointerId),i(l))})})}),kQ="SliderTrack",DQ=S.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,s=iP(kQ,n);return w.jsx(De.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...r,ref:e})});DQ.displayName=kQ;var fO="SliderRange",MQ=S.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,s=iP(fO,n),i=NQ(fO,n),o=S.useRef(null),a=Je(e,o),c=s.values.length,u=s.values.map(d=>IQ(d,s.min,s.max)),f=c>1?Math.min(...u):0,l=100-Math.max(...u);return w.jsx(De.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...r,ref:a,style:{...t.style,[i.startEdge]:f+"%",[i.endEdge]:l+"%"}})});MQ.displayName=fO;var hO="SliderThumb",OQ=S.forwardRef((t,e)=>{const n=cDe(t.__scopeSlider),[r,s]=S.useState(null),i=Je(e,a=>s(a)),o=S.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return w.jsx(pDe,{...t,ref:i,index:o})}),pDe=S.forwardRef((t,e)=>{const{__scopeSlider:n,index:r,name:s,...i}=t,o=iP(hO,n),a=NQ(hO,n),[c,u]=S.useState(null),f=Je(e,v=>u(v)),l=c?!!c.closest("form"):!0,d=x_(c),p=o.values[r],h=p===void 0?0:IQ(p,o.min,o.max),m=vDe(r,o.values.length),y=d==null?void 0:d[a.size],g=y?bDe(y,h,a.direction):0;return S.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),w.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${h}% + ${g}px)`},children:[w.jsx(dO.ItemSlot,{scope:t.__scopeSlider,children:w.jsx(De.span,{role:"slider","aria-label":t["aria-label"]||m,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...i,ref:f,style:p===void 0?{display:"none"}:t.style,onFocus:ye(t.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),l&&w.jsx(mDe,{name:s??(o.name?o.name+(o.values.length>1?"[]":""):void 0),value:p},r)]})});OQ.displayName=hO;var mDe=t=>{const{value:e,...n}=t,r=S.useRef(null),s=xy(e);return S.useEffect(()=>{const i=r.current,o=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(o,"value").set;if(s!==e&&c){const u=new Event("input",{bubbles:!0});c.call(i,e),i.dispatchEvent(u)}},[s,e]),w.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:e})};function gDe(t=[],e,n){const r=[...t];return r[n]=e,r.sort((s,i)=>s-i)}function IQ(t,e,n){const i=100/(n-e)*(t-e);return mx(i,[0,100])}function vDe(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function yDe(t,e){if(t.length===1)return 0;const n=t.map(s=>Math.abs(s-e)),r=Math.min(...n);return n.indexOf(r)}function bDe(t,e,n){const r=t/2,i=i$([0,50],[0,r]);return(r-i(e)*n)*n}function xDe(t){return t.slice(0,-1).map((e,n)=>t[n+1]-e)}function wDe(t,e){if(e>0){const n=xDe(t);return Math.min(...n)>=e}return!0}function i$(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function _De(t){return(String(t).split(".")[1]||"").length}function SDe(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}var jQ=AQ,CDe=DQ,EDe=MQ,RDe=OQ;const ADe=S.forwardRef(({className:t,...e},n)=>w.jsxs(jQ,{ref:n,className:ie("relative flex w-full touch-none select-none items-center",t),...e,children:[w.jsx(CDe,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:w.jsx(EDe,{className:"absolute h-full bg-primary"})}),w.jsx(RDe,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));ADe.displayName=jQ.displayName;var o$="Switch",[PDe,QUe]=In(o$),[NDe,TDe]=PDe(o$),LQ=S.forwardRef((t,e)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:i,required:o,disabled:a,value:c="on",onCheckedChange:u,...f}=t,[l,d]=S.useState(null),p=Je(e,v=>d(v)),h=S.useRef(!1),m=l?!!l.closest("form"):!0,[y=!1,g]=mr({prop:s,defaultProp:i,onChange:u});return w.jsxs(NDe,{scope:n,checked:y,disabled:a,children:[w.jsx(De.button,{type:"button",role:"switch","aria-checked":y,"aria-required":o,"data-state":zQ(y),"data-disabled":a?"":void 0,disabled:a,value:c,...f,ref:p,onClick:ye(t.onClick,v=>{g(b=>!b),m&&(h.current=v.isPropagationStopped(),h.current||v.stopPropagation())})}),m&&w.jsx(kDe,{control:l,bubbles:!h.current,name:r,value:c,checked:y,required:o,disabled:a,style:{transform:"translateX(-100%)"}})]})});LQ.displayName=o$;var $Q="SwitchThumb",FQ=S.forwardRef((t,e)=>{const{__scopeSwitch:n,...r}=t,s=TDe($Q,n);return w.jsx(De.span,{"data-state":zQ(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});FQ.displayName=$Q;var kDe=t=>{const{control:e,checked:n,bubbles:r=!0,...s}=t,i=S.useRef(null),o=xy(n),a=x_(e);return S.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==n&&l){const d=new Event("click",{bubbles:r});l.call(c,n),c.dispatchEvent(d)}},[o,n,r]),w.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function zQ(t){return t?"checked":"unchecked"}var BQ=LQ,DDe=FQ;const UQ=S.forwardRef(({className:t,...e},n)=>w.jsx(BQ,{className:ie("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",t),...e,ref:n,children:w.jsx(DDe,{className:ie("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));UQ.displayName=BQ.displayName;const ld=S.forwardRef(({className:t,...e},n)=>w.jsx("div",{className:"relative w-full overflow-auto",children:w.jsx("table",{ref:n,className:ie("w-full caption-bottom text-sm",t),...e})}));ld.displayName="Table";const oP=S.forwardRef(({className:t,...e},n)=>w.jsx("thead",{ref:n,className:ie("[&_tr]:border-b",t),...e}));oP.displayName="TableHeader";const cd=S.forwardRef(({className:t,...e},n)=>w.jsx("tbody",{ref:n,className:ie("[&_tr:last-child]:border-0",t),...e}));cd.displayName="TableBody";const MDe=S.forwardRef(({className:t,...e},n)=>w.jsx("tfoot",{ref:n,className:ie("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...e}));MDe.displayName="TableFooter";const Yo=S.forwardRef(({className:t,...e},n)=>w.jsx("tr",{ref:n,className:ie("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...e}));Yo.displayName="TableRow";const aP=S.forwardRef(({className:t,...e},n)=>w.jsx("th",{ref:n,className:ie("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t),...e}));aP.displayName="TableHead";const Qc=S.forwardRef(({className:t,...e},n)=>w.jsx("td",{ref:n,className:ie("py-2 px-4 align-middle [&:has([role=checkbox])]:pr-0",t),...e}));Qc.displayName="TableCell";const HQ=S.forwardRef(({className:t,...e},n)=>w.jsx("caption",{ref:n,className:ie("mt-4 text-sm text-muted-foreground",t),...e}));HQ.displayName="TableCaption";var a$="Tabs",[ODe,ZUe]=In(a$,[Xl]),VQ=Xl(),[IDe,l$]=ODe(a$),qQ=S.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:c="automatic",...u}=t,f=Qa(a),[l,d]=mr({prop:r,onChange:s,defaultProp:i});return w.jsx(IDe,{scope:n,baseId:js(),value:l,onValueChange:d,orientation:o,dir:f,activationMode:c,children:w.jsx(De.div,{dir:f,"data-orientation":o,...u,ref:e})})});qQ.displayName=a$;var WQ="TabsList",GQ=S.forwardRef((t,e)=>{const{__scopeTabs:n,loop:r=!0,...s}=t,i=l$(WQ,n),o=VQ(n);return w.jsx(A_,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:r,children:w.jsx(De.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:e})})});GQ.displayName=WQ;var KQ="TabsTrigger",YQ=S.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...i}=t,o=l$(KQ,n),a=VQ(n),c=ZQ(o.baseId,r),u=JQ(o.baseId,r),f=r===o.value;return w.jsx(P_,{asChild:!0,...a,focusable:!s,active:f,children:w.jsx(De.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...i,ref:e,onMouseDown:ye(t.onMouseDown,l=>{!s&&l.button===0&&l.ctrlKey===!1?o.onValueChange(r):l.preventDefault()}),onKeyDown:ye(t.onKeyDown,l=>{[" ","Enter"].includes(l.key)&&o.onValueChange(r)}),onFocus:ye(t.onFocus,()=>{const l=o.activationMode!=="manual";!f&&!s&&l&&o.onValueChange(r)})})})});YQ.displayName=KQ;var XQ="TabsContent",QQ=S.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,forceMount:s,children:i,...o}=t,a=l$(XQ,n),c=ZQ(a.baseId,r),u=JQ(a.baseId,r),f=r===a.value,l=S.useRef(f);return S.useEffect(()=>{const d=requestAnimationFrame(()=>l.current=!1);return()=>cancelAnimationFrame(d)},[]),w.jsx(Kn,{present:s||f,children:({present:d})=>w.jsx(De.div,{"data-state":f?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!d,id:u,tabIndex:0,...o,ref:e,style:{...t.style,animationDuration:l.current?"0s":void 0},children:d&&i})})});QQ.displayName=XQ;function ZQ(t,e){return`${t}-trigger-${e}`}function JQ(t,e){return`${t}-content-${e}`}var jDe=qQ,eZ=GQ,tZ=YQ,nZ=QQ;const c$=jDe,lP=S.forwardRef(({className:t,...e},n)=>w.jsx(eZ,{ref:n,className:ie("inline-flex h-9 items-center justify-center rounded-lg bg-accent p-1 text-muted-foreground",t),...e}));lP.displayName=eZ.displayName;const Xv=S.forwardRef(({className:t,...e},n)=>w.jsx(tZ,{ref:n,className:ie("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",t),...e}));Xv.displayName=tZ.displayName;const Qv=S.forwardRef(({className:t,...e},n)=>w.jsx(nZ,{ref:n,className:ie("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...e}));Qv.displayName=nZ.displayName;const rZ=S.forwardRef(({className:t,...e},n)=>w.jsx("textarea",{className:ie("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground/75 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:n,...e}));rZ.displayName="Textarea";var u$="ToastProvider",[d$,LDe,$De]=Cu("Toast"),[sZ,JUe]=In("Toast",[$De]),[FDe,cP]=sZ(u$),iZ=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,c]=S.useState(null),[u,f]=S.useState(0),l=S.useRef(!1),d=S.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${u$}\`. Expected non-empty \`string\`.`),w.jsx(d$.Provider,{scope:e,children:w.jsx(FDe,{scope:e,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:c,onToastAdd:S.useCallback(()=>f(p=>p+1),[]),onToastRemove:S.useCallback(()=>f(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:l,isClosePausedRef:d,children:o})})};iZ.displayName=u$;var oZ="ToastViewport",zDe=["F8"],pO="toast.viewportPause",mO="toast.viewportResume",aZ=S.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=zDe,label:s="Notifications ({hotkey})",...i}=t,o=cP(oZ,n),a=LDe(n),c=S.useRef(null),u=S.useRef(null),f=S.useRef(null),l=S.useRef(null),d=Je(e,l,o.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=o.toastCount>0;S.useEffect(()=>{const y=g=>{var b;r.every(_=>g[_]||g.code===_)&&((b=l.current)==null||b.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),S.useEffect(()=>{const y=c.current,g=l.current;if(h&&y&&g){const v=()=>{if(!o.isClosePausedRef.current){const P=new CustomEvent(pO);g.dispatchEvent(P),o.isClosePausedRef.current=!0}},b=()=>{if(o.isClosePausedRef.current){const P=new CustomEvent(mO);g.dispatchEvent(P),o.isClosePausedRef.current=!1}},_=P=>{!y.contains(P.relatedTarget)&&b()},R=()=>{y.contains(document.activeElement)||b()};return y.addEventListener("focusin",v),y.addEventListener("focusout",_),y.addEventListener("pointermove",v),y.addEventListener("pointerleave",R),window.addEventListener("blur",v),window.addEventListener("focus",b),()=>{y.removeEventListener("focusin",v),y.removeEventListener("focusout",_),y.removeEventListener("pointermove",v),y.removeEventListener("pointerleave",R),window.removeEventListener("blur",v),window.removeEventListener("focus",b)}}},[h,o.isClosePausedRef]);const m=S.useCallback(({tabbingDirection:y})=>{const v=a().map(b=>{const _=b.ref.current,R=[_,...JDe(_)];return y==="forwards"?R:R.reverse()});return(y==="forwards"?v.reverse():v).flat()},[a]);return S.useEffect(()=>{const y=l.current;if(y){const g=v=>{var R,P,T;const b=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!b){const E=document.activeElement,N=v.shiftKey;if(v.target===y&&N){(R=u.current)==null||R.focus();return}const I=m({tabbingDirection:N?"backwards":"forwards"}),j=I.findIndex(L=>L===E);kk(I.slice(j+1))?v.preventDefault():N?(P=u.current)==null||P.focus():(T=f.current)==null||T.focus()}};return y.addEventListener("keydown",g),()=>y.removeEventListener("keydown",g)}},[a,m]),w.jsxs(yve,{ref:c,role:"region","aria-label":s.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&w.jsx(gO,{ref:u,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"forwards"});kk(y)}}),w.jsx(d$.Slot,{scope:n,children:w.jsx(De.ol,{tabIndex:-1,...i,ref:d})}),h&&w.jsx(gO,{ref:f,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"backwards"});kk(y)}})]})});aZ.displayName=oZ;var lZ="ToastFocusProxy",gO=S.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=t,i=cP(lZ,n);return w.jsx($_,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&r()}})});gO.displayName=lZ;var uP="Toast",BDe="toast.swipeStart",UDe="toast.swipeMove",HDe="toast.swipeCancel",VDe="toast.swipeEnd",cZ=S.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=t,[a=!0,c]=mr({prop:r,defaultProp:s,onChange:i});return w.jsx(Kn,{present:n||a,children:w.jsx(GDe,{open:a,...o,ref:e,onClose:()=>c(!1),onPause:on(t.onPause),onResume:on(t.onResume),onSwipeStart:ye(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ye(t.onSwipeMove,u=>{const{x:f,y:l}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${l}px`)}),onSwipeCancel:ye(t.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ye(t.onSwipeEnd,u=>{const{x:f,y:l}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${l}px`),c(!1)})})})});cZ.displayName=uP;var[qDe,WDe]=sZ(uP,{onClose(){}}),GDe=S.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:c,onResume:u,onSwipeStart:f,onSwipeMove:l,onSwipeCancel:d,onSwipeEnd:p,...h}=t,m=cP(uP,n),[y,g]=S.useState(null),v=Je(e,L=>g(L)),b=S.useRef(null),_=S.useRef(null),R=s||m.duration,P=S.useRef(0),T=S.useRef(R),E=S.useRef(0),{onToastAdd:N,onToastRemove:k}=m,M=on(()=>{var U;(y==null?void 0:y.contains(document.activeElement))&&((U=m.viewport)==null||U.focus()),o()}),I=S.useCallback(L=>{!L||L===1/0||(window.clearTimeout(E.current),P.current=new Date().getTime(),E.current=window.setTimeout(M,L))},[M]);S.useEffect(()=>{const L=m.viewport;if(L){const U=()=>{I(T.current),u==null||u()},K=()=>{const H=new Date().getTime()-P.current;T.current=T.current-H,window.clearTimeout(E.current),c==null||c()};return L.addEventListener(pO,K),L.addEventListener(mO,U),()=>{L.removeEventListener(pO,K),L.removeEventListener(mO,U)}}},[m.viewport,R,c,u,I]),S.useEffect(()=>{i&&!m.isClosePausedRef.current&&I(R)},[i,R,m.isClosePausedRef,I]),S.useEffect(()=>(N(),()=>k()),[N,k]);const j=S.useMemo(()=>y?gZ(y):null,[y]);return m.viewport?w.jsxs(w.Fragment,{children:[j&&w.jsx(KDe,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:j}),w.jsx(qDe,{scope:n,onClose:M,children:rs.createPortal(w.jsx(d$.ItemSlot,{scope:n,children:w.jsx(vve,{asChild:!0,onEscapeKeyDown:ye(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||M(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(De.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...h,ref:v,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ye(t.onKeyDown,L=>{L.key==="Escape"&&(a==null||a(L.nativeEvent),L.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:ye(t.onPointerDown,L=>{L.button===0&&(b.current={x:L.clientX,y:L.clientY})}),onPointerMove:ye(t.onPointerMove,L=>{if(!b.current)return;const U=L.clientX-b.current.x,K=L.clientY-b.current.y,H=!!_.current,q=["left","right"].includes(m.swipeDirection),ee=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,se=q?ee(0,U):0,X=q?0:ee(0,K),G=L.pointerType==="touch"?10:2,Y={x:se,y:X},Q={originalEvent:L,delta:Y};H?(_.current=Y,R1(UDe,l,Q,{discrete:!1})):Z5(Y,m.swipeDirection,G)?(_.current=Y,R1(BDe,f,Q,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(U)>G||Math.abs(K)>G)&&(b.current=null)}),onPointerUp:ye(t.onPointerUp,L=>{const U=_.current,K=L.target;if(K.hasPointerCapture(L.pointerId)&&K.releasePointerCapture(L.pointerId),_.current=null,b.current=null,U){const H=L.currentTarget,q={originalEvent:L,delta:U};Z5(U,m.swipeDirection,m.swipeThreshold)?R1(VDe,p,q,{discrete:!0}):R1(HDe,d,q,{discrete:!0}),H.addEventListener("click",ee=>ee.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),KDe=t=>{const{__scopeToast:e,children:n,...r}=t,s=cP(uP,e),[i,o]=S.useState(!1),[a,c]=S.useState(!1);return QDe(()=>o(!0)),S.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:w.jsx(dy,{asChild:!0,children:w.jsx($_,{...r,children:i&&w.jsxs(w.Fragment,{children:[s.label," ",n]})})})},YDe="ToastTitle",uZ=S.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return w.jsx(De.div,{...r,ref:e})});uZ.displayName=YDe;var XDe="ToastDescription",dZ=S.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return w.jsx(De.div,{...r,ref:e})});dZ.displayName=XDe;var fZ="ToastAction",hZ=S.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?w.jsx(mZ,{altText:n,asChild:!0,children:w.jsx(f$,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${fZ}\`. Expected non-empty \`string\`.`),null)});hZ.displayName=fZ;var pZ="ToastClose",f$=S.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,s=WDe(pZ,n);return w.jsx(mZ,{asChild:!0,children:w.jsx(De.button,{type:"button",...r,ref:e,onClick:ye(t.onClick,s.onClose)})})});f$.displayName=pZ;var mZ=S.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...s}=t;return w.jsx(De.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:e})});function gZ(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),ZDe(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...gZ(r))}}),e}function R1(t,e,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?tx(s,i):s.dispatchEvent(i)}var Z5=(t,e,n=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),i=r>s;return e==="left"||e==="right"?i&&r>n:!i&&s>n};function QDe(t=()=>{}){const e=on(t);ir(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function ZDe(t){return t.nodeType===t.ELEMENT_NODE}function JDe(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function kk(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var eMe=iZ,vZ=aZ,yZ=cZ,bZ=uZ,xZ=dZ,wZ=hZ,_Z=f$;const tMe=eMe,SZ=S.forwardRef(({className:t,...e},n)=>w.jsx(vZ,{ref:n,className:ie("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));SZ.displayName=vZ.displayName;const nMe=li("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-bottom-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"success bg-green-300 text-success-foreground border-green-400 group"},position:{center:"bottom-0 mx-auto w-auto sm:bottom-0"}},defaultVariants:{variant:"default"}}),CZ=S.forwardRef(({className:t,variant:e,...n},r)=>w.jsx(yZ,{ref:r,className:ie(nMe({variant:e}),t),...n}));CZ.displayName=yZ.displayName;const rMe=S.forwardRef(({className:t,...e},n)=>w.jsx(wZ,{ref:n,className:ie("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...e}));rMe.displayName=wZ.displayName;const EZ=S.forwardRef(({className:t,...e},n)=>w.jsx(_Z,{ref:n,className:ie("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:w.jsx(iA,{className:"w-4 h-4"})}));EZ.displayName=_Z.displayName;const RZ=S.forwardRef(({className:t,...e},n)=>w.jsx(bZ,{ref:n,className:ie("text-sm font-semibold",t),...e}));RZ.displayName=bZ.displayName;const AZ=S.forwardRef(({className:t,...e},n)=>w.jsx(xZ,{ref:n,className:ie("text-sm opacity-90",t),...e}));AZ.displayName=xZ.displayName;function PZ(){const{toasts:t}=Kl();return w.jsxs(tMe,{swipeDirection:"down",children:[t.map(function({id:e,title:n,description:r,action:s,...i}){return w.jsxs(CZ,{...i,children:[w.jsxs("div",{className:"grid gap-1",children:[n&&w.jsx(RZ,{children:n}),r&&w.jsx(AZ,{children:r})]}),s,w.jsx(EZ,{})]},e)}),w.jsx(SZ,{className:"bottom-0 w-auto mx-auto sm:bottom-0 sm:left-0 sm:right-0"})]})}var sMe="Toggle",h$=S.forwardRef((t,e)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:s,...i}=t,[o=!1,a]=mr({prop:n,onChange:s,defaultProp:r});return w.jsx(De.button,{type:"button","aria-pressed":o,"data-state":o?"on":"off","data-disabled":t.disabled?"":void 0,...i,ref:e,onClick:ye(t.onClick,()=>{t.disabled||a(!o)})})});h$.displayName=sMe;var NZ=h$;const TZ=li("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),kZ=S.forwardRef(({className:t,variant:e,size:n,...r},s)=>w.jsx(NZ,{ref:s,className:ie(TZ({variant:e,size:n,className:t})),...r}));kZ.displayName=NZ.displayName;var Oy="ToggleGroup",[DZ,e6e]=In(Oy,[Xl]),MZ=Xl(),p$=oe.forwardRef((t,e)=>{const{type:n,...r}=t;if(n==="single"){const s=r;return w.jsx(iMe,{...s,ref:e})}if(n==="multiple"){const s=r;return w.jsx(oMe,{...s,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${Oy}\``)});p$.displayName=Oy;var[OZ,IZ]=DZ(Oy),iMe=oe.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...i}=t,[o,a]=mr({prop:n,defaultProp:r,onChange:s});return w.jsx(OZ,{scope:t.__scopeToggleGroup,type:"single",value:o?[o]:[],onItemActivate:a,onItemDeactivate:oe.useCallback(()=>a(""),[a]),children:w.jsx(jZ,{...i,ref:e})})}),oMe=oe.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...i}=t,[o=[],a]=mr({prop:n,defaultProp:r,onChange:s}),c=oe.useCallback(f=>a((l=[])=>[...l,f]),[a]),u=oe.useCallback(f=>a((l=[])=>l.filter(d=>d!==f)),[a]);return w.jsx(OZ,{scope:t.__scopeToggleGroup,type:"multiple",value:o,onItemActivate:c,onItemDeactivate:u,children:w.jsx(jZ,{...i,ref:e})})});p$.displayName=Oy;var[aMe,lMe]=DZ(Oy),jZ=oe.forwardRef((t,e)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:s=!0,orientation:i,dir:o,loop:a=!0,...c}=t,u=MZ(n),f=Qa(o),l={role:"group",dir:f,...c};return w.jsx(aMe,{scope:n,rovingFocus:s,disabled:r,children:s?w.jsx(A_,{asChild:!0,...u,orientation:i,dir:f,loop:a,children:w.jsx(De.div,{...l,ref:e})}):w.jsx(De.div,{...l,ref:e})})}),FE="ToggleGroupItem",LZ=oe.forwardRef((t,e)=>{const n=IZ(FE,t.__scopeToggleGroup),r=lMe(FE,t.__scopeToggleGroup),s=MZ(t.__scopeToggleGroup),i=n.value.includes(t.value),o=r.disabled||t.disabled,a={...t,pressed:i,disabled:o},c=oe.useRef(null);return r.rovingFocus?w.jsx(P_,{asChild:!0,...s,focusable:!o,active:i,ref:c,children:w.jsx(J5,{...a,ref:e})}):w.jsx(J5,{...a,ref:e})});LZ.displayName=FE;var J5=oe.forwardRef((t,e)=>{const{__scopeToggleGroup:n,value:r,...s}=t,i=IZ(FE,n),o={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},a=i.type==="single"?o:void 0;return w.jsx(h$,{...a,...s,ref:e,onPressedChange:c=>{c?i.onItemActivate(r):i.onItemDeactivate(r)}})}),$Z=p$,FZ=LZ;const zZ=S.createContext({size:"default",variant:"default"}),cMe=S.forwardRef(({className:t,variant:e,size:n,children:r,...s},i)=>w.jsx($Z,{ref:i,className:ie("flex items-center justify-center gap-1",t),...s,children:w.jsx(zZ.Provider,{value:{variant:e,size:n},children:r})}));cMe.displayName=$Z.displayName;const uMe=S.forwardRef(({className:t,children:e,variant:n,size:r,...s},i)=>{const o=S.useContext(zZ);return w.jsx(FZ,{ref:i,className:ie(TZ({variant:o.variant||n,size:o.size||r}),t),...s,children:e})});uMe.displayName=FZ.displayName;var[dP,t6e]=In("Tooltip",[Yl]),fP=Yl(),BZ="TooltipProvider",dMe=700,vO="tooltip.open",[fMe,m$]=dP(BZ),UZ=t=>{const{__scopeTooltip:e,delayDuration:n=dMe,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,[o,a]=S.useState(!0),c=S.useRef(!1),u=S.useRef(0);return S.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),w.jsx(fMe,{scope:e,isOpenDelayed:o,delayDuration:n,onOpen:S.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:S.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:S.useCallback(f=>{c.current=f},[]),disableHoverableContent:s,children:i})};UZ.displayName=BZ;var hP="Tooltip",[hMe,pP]=dP(hP),HZ=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=t,c=m$(hP,t.__scopeTooltip),u=fP(e),[f,l]=S.useState(null),d=js(),p=S.useRef(0),h=o??c.disableHoverableContent,m=a??c.delayDuration,y=S.useRef(!1),[g=!1,v]=mr({prop:r,defaultProp:s,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(vO))):c.onClose(),i==null||i(T)}}),b=S.useMemo(()=>g?y.current?"delayed-open":"instant-open":"closed",[g]),_=S.useCallback(()=>{window.clearTimeout(p.current),y.current=!1,v(!0)},[v]),R=S.useCallback(()=>{window.clearTimeout(p.current),v(!1)},[v]),P=S.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{y.current=!0,v(!0)},m)},[m,v]);return S.useEffect(()=>()=>window.clearTimeout(p.current),[]),w.jsx(FA,{...u,children:w.jsx(hMe,{scope:e,contentId:d,open:g,stateAttribute:b,trigger:f,onTriggerChange:l,onTriggerEnter:S.useCallback(()=>{c.isOpenDelayed?P():_()},[c.isOpenDelayed,P,_]),onTriggerLeave:S.useCallback(()=>{h?R():window.clearTimeout(p.current)},[R,h]),onOpen:_,onClose:R,disableHoverableContent:h,children:n})})};HZ.displayName=hP;var yO="TooltipTrigger",VZ=S.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=pP(yO,n),i=m$(yO,n),o=fP(n),a=S.useRef(null),c=Je(e,a,s.onTriggerChange),u=S.useRef(!1),f=S.useRef(!1),l=S.useCallback(()=>u.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",l),[l]),w.jsx(Ay,{asChild:!0,...o,children:w.jsx(De.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:ye(t.onPointerMove,d=>{d.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),f.current=!0)}),onPointerLeave:ye(t.onPointerLeave,()=>{s.onTriggerLeave(),f.current=!1}),onPointerDown:ye(t.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",l,{once:!0})}),onFocus:ye(t.onFocus,()=>{u.current||s.onOpen()}),onBlur:ye(t.onBlur,s.onClose),onClick:ye(t.onClick,s.onClose)})})});VZ.displayName=yO;var pMe="TooltipPortal",[n6e,mMe]=dP(pMe,{forceMount:void 0}),Zv="TooltipContent",qZ=S.forwardRef((t,e)=>{const n=mMe(Zv,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=t,o=pP(Zv,t.__scopeTooltip);return w.jsx(Kn,{present:r||o.open,children:o.disableHoverableContent?w.jsx(WZ,{side:s,...i,ref:e}):w.jsx(gMe,{side:s,...i,ref:e})})}),gMe=S.forwardRef((t,e)=>{const n=pP(Zv,t.__scopeTooltip),r=m$(Zv,t.__scopeTooltip),s=S.useRef(null),i=Je(e,s),[o,a]=S.useState(null),{trigger:c,onClose:u}=n,f=s.current,{onPointerInTransitChange:l}=r,d=S.useCallback(()=>{a(null),l(!1)},[l]),p=S.useCallback((h,m)=>{const y=h.currentTarget,g={x:h.clientX,y:h.clientY},v=xMe(g,y.getBoundingClientRect()),b=wMe(g,v),_=_Me(m.getBoundingClientRect()),R=CMe([...b,..._]);a(R),l(!0)},[l]);return S.useEffect(()=>()=>d(),[d]),S.useEffect(()=>{if(c&&f){const h=y=>p(y,f),m=y=>p(y,c);return c.addEventListener("pointerleave",h),f.addEventListener("pointerleave",m),()=>{c.removeEventListener("pointerleave",h),f.removeEventListener("pointerleave",m)}}},[c,f,p,d]),S.useEffect(()=>{if(o){const h=m=>{const y=m.target,g={x:m.clientX,y:m.clientY},v=(c==null?void 0:c.contains(y))||(f==null?void 0:f.contains(y)),b=!SMe(g,o);v?d():b&&(d(),u())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[c,f,o,u,d]),w.jsx(WZ,{...t,ref:i})}),[vMe,yMe]=dP(hP,{isInside:!1}),WZ=S.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,c=pP(Zv,n),u=fP(n),{onClose:f}=c;return S.useEffect(()=>(document.addEventListener(vO,f),()=>document.removeEventListener(vO,f)),[f]),S.useEffect(()=>{if(c.trigger){const l=d=>{const p=d.target;p!=null&&p.contains(c.trigger)&&f()};return window.addEventListener("scroll",l,{capture:!0}),()=>window.removeEventListener("scroll",l,{capture:!0})}},[c.trigger,f]),w.jsx(Ru,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:l=>l.preventDefault(),onDismiss:f,children:w.jsxs(E_,{"data-state":c.stateAttribute,...u,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[w.jsx(aL,{children:r}),w.jsx(vMe,{scope:n,isInside:!0,children:w.jsx(Q9,{id:c.contentId,role:"tooltip",children:s||r})})]})})});qZ.displayName=Zv;var GZ="TooltipArrow",bMe=S.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=fP(n);return yMe(GZ,n).isInside?null:w.jsx(R_,{...s,...r,ref:e})});bMe.displayName=GZ;function xMe(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function wMe(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function _Me(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}function SMe(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,o=e.length-1;i r!=f>r&&n<(u-a)*(r-c)/(f-c)+a&&(s=!s)}return s}function CMe(t){const e=t.slice();return e.sort((n,r)=>n.x r.x?1:n.y r.y?1:0),EMe(e)}function EMe(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r =2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var RMe=UZ,AMe=HZ,PMe=VZ,KZ=qZ;const NMe=RMe,Kf=AMe,Yf=PMe,ud=S.forwardRef(({className:t,sideOffset:e=4,...n},r)=>w.jsx(KZ,{ref:r,sideOffset:e,className:ie("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n}));ud.displayName=KZ.displayName;const YZ=({isOpen:t,onCancel:e,onConfirm:n,title:r,description:s,cancelLabel:i,confirmLabel:o})=>w.jsx(RL,{open:t,children:w.jsxs(dA,{children:[w.jsxs(fA,{children:[w.jsx(pA,{children:r}),w.jsx(mA,{children:s})]}),w.jsxs(hA,{children:[w.jsx(vA,{children:w.jsx(Yc,{to:"#",onClick:e,children:i})}),w.jsx(gA,{children:w.jsx(Yc,{to:"#",onClick:n,children:o})})]})]})}),TMe={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class zE{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||TMe,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),r=0;r {this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s {let[a,c]=o;for(let u=0;u {let[a,c]=o;for(let u=0;u {t=r,e=s});return n.resolve=t,n.reject=e,n}function eU(t){return t==null?"":""+t}function kMe(t,e,n){t.forEach(r=>{e[r]&&(n[r]=e[r])})}const DMe=/###/g;function S0(t,e,n){function r(a){return a&&a.indexOf("###")>-1?a.replace(DMe,"."):a}function s(){return!t||typeof t=="string"}const i=typeof e!="string"?e:e.split(".");let o=0;for(;o ":">",'"':""","'":"'","/":"/"};function jMe(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>IMe[e]):t}class LMe{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const $Me=[" ",",","?","!",";"],FMe=new LMe(20);function zMe(t,e,n){e=e||"",n=n||"";const r=$Me.filter(o=>e.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const s=FMe.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let i=!s.test(t);if(!i){const o=t.indexOf(n);o>0&&!s.test(t.substring(0,o))&&(i=!0)}return i}function bO(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const r=e.split(n);let s=t;for(let i=0;i -1&&c 0?t.replace("_","-"):t}class nU extends mP{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,n],r&&(Array.isArray(r)?a.push(...r):typeof r=="string"&&i?a.push(...r.split(i)):a.push(r)));const c=BE(this.data,a);return!c&&!n&&!r&&e.indexOf(".")>-1&&(e=a[0],n=a[1],r=a.slice(2).join(".")),c||!o||typeof r!="string"?c:bO(this.data&&this.data[e]&&this.data[e][n],r,i)}addResource(e,n,r,s){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[e,n];r&&(a=a.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(a=e.split("."),s=n,n=a[1]),this.addNamespaces(n),tU(this.data,a,s),i.silent||this.emit("added",e,n,r,s)}addResources(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(typeof r[i]=="string"||Array.isArray(r[i]))&&this.addResource(e,n,i,r[i],{silent:!0});s.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,s,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[e,n];e.indexOf(".")>-1&&(a=e.split("."),s=r,r=n,n=a[1]),this.addNamespaces(n);let c=BE(this.data,a)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?XZ(c,r,i):c={...c,...r},tU(this.data,a,c),o.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var QZ={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,s){return t.forEach(i=>{this.processors[i]&&(e=this.processors[i].process(e,n,r,s))}),e}};const rU={};class HE extends mP{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),kMe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ol.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const r=this.resolve(e,n);return r&&r.res!==void 0}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const o=r&&e.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!zMe(e,r,s);if(o&&!a){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:i};const u=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),e=u.join(s)}return typeof i=="string"&&(i=[i]),{key:e,namespaces:i}}translate(e,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],n),c=a[a.length-1],u=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(f){const _=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${_}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${_}${o}`}return s?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:o}const l=this.resolve(e,n);let d=l&&l.res;const p=l&&l.usedKey||o,h=l&&l.exactUsedKey||o,m=Object.prototype.toString.apply(d),y=["[object Number]","[object Function]","[object RegExp]"],g=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject;if(v&&d&&(typeof d!="string"&&typeof d!="boolean"&&typeof d!="number")&&y.indexOf(m)<0&&!(typeof g=="string"&&Array.isArray(d))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,d,{...n,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return s?(l.res=_,l.usedParams=this.getUsedParamsDetails(n),l):_}if(i){const _=Array.isArray(d),R=_?[]:{},P=_?h:p;for(const T in d)if(Object.prototype.hasOwnProperty.call(d,T)){const E=`${P}${i}${T}`;R[T]=this.translate(E,{...n,joinArrays:!1,ns:a}),R[T]===E&&(R[T]=d[T])}d=R}}else if(v&&typeof g=="string"&&Array.isArray(d))d=d.join(g),d&&(d=this.extendTranslation(d,e,n,r));else{let _=!1,R=!1;const P=n.count!==void 0&&typeof n.count!="string",T=HE.hasDefaultValue(n),E=P?this.pluralResolver.getSuffix(u,n.count,n):"",N=n.ordinal&&P?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",k=P&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),M=k&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${E}`]||n[`defaultValue${N}`]||n.defaultValue;!this.isValidLookup(d)&&T&&(_=!0,d=M),this.isValidLookup(d)||(R=!0,d=o);const j=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&R?void 0:d,L=T&&M!==d&&this.options.updateMissing;if(R||_||L){if(this.logger.log(L?"updateKey":"missingKey",u,c,o,L?M:d),i){const q=this.resolve(o,{...n,keySeparator:!1});q&&q.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const K=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&K&&K[0])for(let q=0;q {const X=T&&se!==d?se:j;this.options.missingKeyHandler?this.options.missingKeyHandler(q,c,ee,X,L,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(q,c,ee,X,L,n),this.emit("missingKey",q,c,ee,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&P?U.forEach(q=>{const ee=this.pluralResolver.getSuffixes(q,n);k&&n[`defaultValue${this.options.pluralSeparator}zero`]&&ee.indexOf(`${this.options.pluralSeparator}zero`)<0&&ee.push(`${this.options.pluralSeparator}zero`),ee.forEach(se=>{H([q],o+se,n[`defaultValue${se}`]||M)})}):H(U,o,M))}d=this.extendTranslation(d,e,n,l,r),R&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${c}:${o}`),(R||_)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${o}`:o,_?d:void 0):d=this.options.parseMissingKeyHandler(d))}return s?(l.res=d,l.usedParams=this.getUsedParamsDetails(n),l):d}extendTranslation(e,n,r,s,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof e=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(u){const d=e.match(this.interpolator.nestingRegexp);f=d&&d.length}let l=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,r.lng||this.language||s.usedLng,r),u){const d=e.match(this.interpolator.nestingRegexp),p=d&&d.length;f 1&&arguments[1]!==void 0?arguments[1]:{},r,s,i,o,a;return typeof e=="string"&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(c,n),f=u.key;s=f;let l=u.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const d=n.count!==void 0&&typeof n.count!="string",p=d&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),h=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);l.forEach(y=>{this.isValidLookup(r)||(a=y,!rU[`${m[0]}-${y}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(rU[`${m[0]}-${y}`]=!0,this.logger.warn(`key "${s}" for languages "${m.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(g=>{if(this.isValidLookup(r))return;o=g;const v=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(v,f,g,y,n);else{let _;d&&(_=this.pluralResolver.getSuffix(g,n.count,n));const R=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(v.push(f+_),n.ordinal&&_.indexOf(P)===0&&v.push(f+_.replace(P,this.options.pluralSeparator)),p&&v.push(f+R)),h){const T=`${f}${this.options.contextSeparator}${n.context}`;v.push(T),d&&(v.push(T+_),n.ordinal&&_.indexOf(P)===0&&v.push(T+_.replace(P,this.options.pluralSeparator)),p&&v.push(T+R))}}let b;for(;b=v.pop();)this.isValidLookup(r)||(i=b,r=this.getResource(g,y,b,n))}))})}),{res:r,usedKey:s,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,r,s):this.resourceStore.getResource(e,n,r,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&typeof e.replace!="string";let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const i of n)delete s[i]}return s}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}function Dk(t){return t.charAt(0).toUpperCase()+t.slice(1)}class sU{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ol.create("languageUtils")}getScriptPartFromCode(e){if(e=UE(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=UE(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=e.split("-");return this.options.lowerCaseLng?r=r.map(s=>s.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Dk(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Dk(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Dk(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(i=>{if(i===s)return i;if(!(i.indexOf("-")<0&&s.indexOf("-")<0)&&(i.indexOf("-")>0&&s.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===s||i.indexOf(s)===0&&s.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),typeof e=="string"&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],e),s=[],i=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):typeof e=="string"&&i(this.formatLanguageCode(e)),r.forEach(o=>{s.indexOf(o)<0&&i(this.formatLanguageCode(o))}),s}}let BMe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],UMe={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}};const HMe=["v1","v2","v3"],VMe=["v4"],iU={zero:0,one:1,two:2,few:3,many:4,other:5};function qMe(){const t={};return BMe.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:UMe[e.fc]}})}),t}class WMe{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=Ol.create("pluralResolver"),(!this.options.compatibilityJSON||VMe.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=qMe()}addRule(e,n){this.rules[e]=n}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(UE(e==="dev"?"en":e),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(s=>`${n}${s}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((s,i)=>iU[s]-iU[i]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):r.numbers.map(s=>this.getSuffix(e,s,n)):[]}getSuffix(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(e,r);return s?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:this.getSuffixRetroCompatible(s,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const r=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let s=e.numbers[r];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const i=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!HMe.includes(this.options.compatibilityJSON)}}function oU(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=OMe(t,e,n);return!i&&s&&typeof n=="string"&&(i=bO(t,n,r),i===void 0&&(i=bO(e,n,r))),i}class GMe{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Ol.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:c,formatSeparator:u,unescapeSuffix:f,unescapePrefix:l,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:h,nestingSuffixEscaped:m,nestingOptionsSeparator:y,maxReplaces:g,alwaysFormat:v}=e.interpolation;this.escape=n!==void 0?n:jMe,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?Am(i):o||"{{",this.suffix=a?Am(a):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=f?"":l||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=d?Am(d):p||Am("$t("),this.nestingSuffix=h?Am(h):m||Am(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=g||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,r,s){let i,o,a;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(h){return h.replace(/\$/g,"$$$$")}const f=h=>{if(h.indexOf(this.formatSeparator)<0){const v=oU(n,c,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,r,{...s,...n,interpolationkey:h}):v}const m=h.split(this.formatSeparator),y=m.shift().trim(),g=m.join(this.formatSeparator).trim();return this.format(oU(n,c,y,this.options.keySeparator,this.options.ignoreJSONStructure),g,r,{...s,...n,interpolationkey:y})};this.resetRegExp();const l=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,d=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>u(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?u(this.escape(h)):u(h)}].forEach(h=>{for(a=0;i=h.regex.exec(e);){const m=i[1].trim();if(o=f(m),o===void 0)if(typeof l=="function"){const g=l(e,i,s);o=typeof g=="string"?g:""}else if(s&&Object.prototype.hasOwnProperty.call(s,m))o="";else if(d){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=eU(o));const y=h.safeValue(o);if(e=e.replace(i[0],y),d?(h.regex.lastIndex+=o.length,h.regex.lastIndex-=i[0].length):h.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,i,o;function a(c,u){const f=this.nestingOptionsSeparator;if(c.indexOf(f)<0)return c;const l=c.split(new RegExp(`${f}[ ]*{`));let d=`{${l[1]}`;c=l[0],d=this.interpolate(d,o);const p=d.match(/'/g),h=d.match(/"/g);(p&&p.length%2===0&&!h||h.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),u&&(o={...u,...o})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,m),`${c}${f}${d}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,c}for(;s=this.nestingRegexp.exec(e);){let c=[];o={...r},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const f=s[1].split(this.formatSeparator).map(l=>l.trim());s[1]=f.shift(),c=f,u=!0}if(i=n(a.call(this,s[1].trim(),o),o),i&&s[0]===e&&typeof i!="string")return i;typeof i!="string"&&(i=eU(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),i=""),u&&(i=c.reduce((f,l)=>this.format(f,l,r.lng,{...r,interpolationkey:s[1].trim()}),i.trim())),e=e.replace(s[0],i),this.regexp.lastIndex=0}return e}}function KMe(t){let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(o=>{if(o){const[a,...c]=o.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),f=a.trim();n[f]||(n[f]=u),u==="false"&&(n[f]=!1),u==="true"&&(n[f]=!0),isNaN(u)||(n[f]=parseInt(u,10))}})}return{formatName:e,formatOptions:n}}function Pm(t){const e={};return function(r,s,i){const o=s+JSON.stringify(i);let a=e[o];return a||(a=t(UE(s),i),e[o]=a),a(r)}}class YMe{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Ol.create("formatter"),this.options=e,this.formats={number:Pm((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return i=>s.format(i)}),currency:Pm((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>s.format(i)}),datetime:Pm((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return i=>s.format(i)}),relativetime:Pm((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return i=>s.format(i,r.range||"day")}),list:Pm((n,r)=>{const s=new Intl.ListFormat(n,{...r});return i=>s.format(i)})},this.init(e)}init(e){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=Pm(n)}format(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((a,c)=>{const{formatName:u,formatOptions:f}=KMe(c);if(this.formats[u]){let l=a;try{const d=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},p=d.locale||d.lng||s.locale||s.lng||r;l=this.formats[u](a,p,{...f,...s,...d})}catch(d){this.logger.warn(d)}return l}else this.logger.warn(`there was no format function for ${u}`);return a},e)}}function XMe(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}class QMe extends mP{constructor(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=Ol.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,s.backend,s)}queueLoad(e,n,r,s){const i={},o={},a={},c={};return e.forEach(u=>{let f=!0;n.forEach(l=>{const d=`${u}|${l}`;!r.reload&&this.store.hasResourceBundle(u,l)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,f=!1,o[d]===void 0&&(o[d]=!0),i[d]===void 0&&(i[d]=!0),c[l]===void 0&&(c[l]=!0)))}),f||(a[u]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(c)}}loaded(e,n,r){const s=e.split("|"),i=s[0],o=s[1];n&&this.emit("failedLoading",i,o,n),r&&this.store.addResourceBundle(i,o,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2;const a={};this.queue.forEach(c=>{MMe(c.loaded,[i],o),XMe(c,e),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{a[u]||(a[u]={});const f=c.loaded[u];f.length&&f.forEach(l=>{a[u][l]===void 0&&(a[u][l]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(c=>!c.done)}read(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:s,wait:i,callback:o});return}this.readingCalls++;const a=(u,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const l=this.waitingReads.shift();this.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}if(u&&f&&s
{this.read.call(this,e,n,r,s+1,i*2,o)},i);return}o(u,f)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const u=c(e,n);u&&typeof u.then=="function"?u.then(f=>a(null,f)).catch(a):a(null,u)}catch(u){a(u)}return}return c(e,n,a)}prepareLoading(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const i=this.queueLoad(e,n,r,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),s=r[0],i=r[1];this.read(s,i,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${n}loading namespace ${i} for language ${s} failed`,o),!o&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${s}`,a),this.loaded(e,o,a)})}saveMissing(e,n,r,s,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const c={...o,isUpdate:i},u=this.backend.create.bind(this.backend);if(u.length<6)try{let f;u.length===5?f=u(e,n,r,s,c):f=u(e,n,r,s),f&&typeof f.then=="function"?f.then(l=>a(null,l)).catch(a):a(null,f)}catch(f){a(f)}else u(e,n,r,s,a,c)}!e||!e[0]||this.store.addResource(e[0],n,r,s)}}}function aU(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let n={};if(typeof e[1]=="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(s=>{n[s]=r[s]})}return n},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function lU(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function A1(){}function ZMe(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}class gx extends mP{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=lU(e),this.services={},this.logger=Ol,this.modules={external:[]},ZMe(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=aU();this.options={...s,...this.options,...lU(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function i(f){return f?typeof f=="function"?new f:f:null}if(!this.options.isClone){this.modules.logger?Ol.init(i(this.modules.logger),this.options):Ol.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=YMe);const l=new sU(this.options);this.store=new nU(this.options.resources,this.options);const d=this.services;d.logger=Ol,d.resourceStore=this.store,d.languageUtils=l,d.pluralResolver=new WMe(l,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(d.formatter=i(f),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new GMe(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new QMe(i(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(p){for(var h=arguments.length,m=new Array(h>1?h-1:0),y=1;y 1?h-1:0),y=1;y {p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=A1),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return e.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return e.store[f](...arguments),e}});const c=Rb(),u=()=>{const f=(l,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(d),r(l,d)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}loadResources(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:A1;const s=typeof e=="string"?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&i.indexOf(u)<0&&i.push(u)})};s?o(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>o(c)),this.options.preload&&this.options.preload.forEach(a=>o(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(e,n,r){const s=Rb();return e||(e=this.languages),n||(n=this.options.ns),r||(r=A1),this.services.backendConnector.reload(e,n,i=>{s.resolve(),r(i)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&QZ.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n