@rigour-labs/cli 5.3.3 → 5.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,362 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function gy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ih={exports:{}},ho={},oh={exports:{}},U={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Ds=Symbol.for("react.element"),xy=Symbol.for("react.portal"),jy=Symbol.for("react.fragment"),wy=Symbol.for("react.strict_mode"),Sy=Symbol.for("react.profiler"),ky=Symbol.for("react.provider"),Ny=Symbol.for("react.context"),Cy=Symbol.for("react.forward_ref"),Ty=Symbol.for("react.suspense"),Py=Symbol.for("react.memo"),Ey=Symbol.for("react.lazy"),ku=Symbol.iterator;function My(e){return e===null||typeof e!="object"?null:(e=ku&&e[ku]||e["@@iterator"],typeof e=="function"?e:null)}var ah={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},lh=Object.assign,ch={};function Nr(e,t,n){this.props=e,this.context=t,this.refs=ch,this.updater=n||ah}Nr.prototype.isReactComponent={};Nr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Nr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function uh(){}uh.prototype=Nr.prototype;function zl(e,t,n){this.props=e,this.context=t,this.refs=ch,this.updater=n||ah}var Vl=zl.prototype=new uh;Vl.constructor=zl;lh(Vl,Nr.prototype);Vl.isPureReactComponent=!0;var Nu=Array.isArray,dh=Object.prototype.hasOwnProperty,Ol={current:null},fh={key:!0,ref:!0,__self:!0,__source:!0};function hh(e,t,n){var r,s={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)dh.call(t,r)&&!fh.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:Ds,type:e,key:o,ref:a,props:s,_owner:Ol.current}}function Ay(e,t){return{$$typeof:Ds,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Fl(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ds}function Ry(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Cu=/\/+/g;function Vo(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Ry(""+e.key):t.toString(36)}function vi(e,t,n,r,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Ds:case xy:a=!0}}if(a)return a=e,s=s(a),e=r===""?"."+Vo(a,0):r,Nu(s)?(n="",e!=null&&(n=e.replace(Cu,"$&/")+"/"),vi(s,t,n,"",function(u){return u})):s!=null&&(Fl(s)&&(s=Ay(s,n+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(Cu,"$&/")+"/")+e)),t.push(s)),1;if(a=0,r=r===""?".":r+":",Nu(e))for(var l=0;l<e.length;l++){o=e[l];var c=r+Vo(o,l);a+=vi(o,t,n,c,s)}else if(c=My(e),typeof c=="function")for(e=c.call(e),l=0;!(o=e.next()).done;)o=o.value,c=r+Vo(o,l++),a+=vi(o,t,n,c,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Hs(e,t,n){if(e==null)return e;var r=[],s=0;return vi(e,r,"","",function(o){return t.call(n,o,s++)}),r}function Dy(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Re={current:null},yi={transition:null},_y={ReactCurrentDispatcher:Re,ReactCurrentBatchConfig:yi,ReactCurrentOwner:Ol};function ph(){throw Error("act(...) is not supported in production builds of React.")}U.Children={map:Hs,forEach:function(e,t,n){Hs(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Hs(e,function(){t++}),t},toArray:function(e){return Hs(e,function(t){return t})||[]},only:function(e){if(!Fl(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};U.Component=Nr;U.Fragment=jy;U.Profiler=Sy;U.PureComponent=zl;U.StrictMode=wy;U.Suspense=Ty;U.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_y;U.act=ph;U.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=lh({},e.props),s=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=Ol.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)dh.call(t,c)&&!fh.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Ds,type:e.type,key:s,ref:o,props:r,_owner:a}};U.createContext=function(e){return e={$$typeof:Ny,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:ky,_context:e},e.Consumer=e};U.createElement=hh;U.createFactory=function(e){var t=hh.bind(null,e);return t.type=e,t};U.createRef=function(){return{current:null}};U.forwardRef=function(e){return{$$typeof:Cy,render:e}};U.isValidElement=Fl;U.lazy=function(e){return{$$typeof:Ey,_payload:{_status:-1,_result:e},_init:Dy}};U.memo=function(e,t){return{$$typeof:Py,type:e,compare:t===void 0?null:t}};U.startTransition=function(e){var t=yi.transition;yi.transition={};try{e()}finally{yi.transition=t}};U.unstable_act=ph;U.useCallback=function(e,t){return Re.current.useCallback(e,t)};U.useContext=function(e){return Re.current.useContext(e)};U.useDebugValue=function(){};U.useDeferredValue=function(e){return Re.current.useDeferredValue(e)};U.useEffect=function(e,t){return Re.current.useEffect(e,t)};U.useId=function(){return Re.current.useId()};U.useImperativeHandle=function(e,t,n){return Re.current.useImperativeHandle(e,t,n)};U.useInsertionEffect=function(e,t){return Re.current.useInsertionEffect(e,t)};U.useLayoutEffect=function(e,t){return Re.current.useLayoutEffect(e,t)};U.useMemo=function(e,t){return Re.current.useMemo(e,t)};U.useReducer=function(e,t,n){return Re.current.useReducer(e,t,n)};U.useRef=function(e){return Re.current.useRef(e)};U.useState=function(e){return Re.current.useState(e)};U.useSyncExternalStore=function(e,t,n){return Re.current.useSyncExternalStore(e,t,n)};U.useTransition=function(){return Re.current.useTransition()};U.version="18.3.1";oh.exports=U;var w=oh.exports;const Ue=gy(w);/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Ly=w,zy=Symbol.for("react.element"),Vy=Symbol.for("react.fragment"),Oy=Object.prototype.hasOwnProperty,Fy=Ly.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Iy={key:!0,ref:!0,__self:!0,__source:!0};function mh(e,t,n){var r,s={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)Oy.call(t,r)&&!Iy.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:zy,type:e,key:o,ref:a,props:s,_owner:Fy.current}}ho.Fragment=Vy;ho.jsx=mh;ho.jsxs=mh;ih.exports=ho;var i=ih.exports,Ta={},vh={exports:{}},Ye={},yh={exports:{}},gh={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */(function(e){function t(A,z){var V=A.length;A.push(z);e:for(;0<V;){var _=V-1>>>1,E=A[_];if(0<s(E,z))A[_]=z,A[V]=E,V=_;else break e}}function n(A){return A.length===0?null:A[0]}function r(A){if(A.length===0)return null;var z=A[0],V=A.pop();if(V!==z){A[0]=V;e:for(var _=0,E=A.length,b=E>>>1;_<b;){var G=2*(_+1)-1,ae=A[G],le=G+1,lt=A[le];if(0>s(ae,V))le<E&&0>s(lt,ae)?(A[_]=lt,A[le]=V,_=le):(A[_]=ae,A[G]=V,_=G);else if(le<E&&0>s(lt,V))A[_]=lt,A[le]=V,_=le;else break e}}return z}function s(A,z){var V=A.sortIndex-z.sortIndex;return V!==0?V:A.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,f=null,h=3,y=!1,g=!1,x=!1,C=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(A){for(var z=n(u);z!==null;){if(z.callback===null)r(u);else if(z.startTime<=A)r(u),z.sortIndex=z.expirationTime,t(c,z);else break;z=n(u)}}function S(A){if(x=!1,v(A),!g)if(n(c)!==null)g=!0,B(j);else{var z=n(u);z!==null&&H(S,z.startTime-A)}}function j(A,z){g=!1,x&&(x=!1,m(T),T=-1),y=!0;var V=h;try{for(v(z),f=n(c);f!==null&&(!(f.expirationTime>z)||A&&!$());){var _=f.callback;if(typeof _=="function"){f.callback=null,h=f.priorityLevel;var E=_(f.expirationTime<=z);z=e.unstable_now(),typeof E=="function"?f.callback=E:f===n(c)&&r(c),v(z)}else r(c);f=n(c)}if(f!==null)var b=!0;else{var G=n(u);G!==null&&H(S,G.startTime-z),b=!1}return b}finally{f=null,h=V,y=!1}}var k=!1,N=null,T=-1,R=5,P=-1;function $(){return!(e.unstable_now()-P<R)}function I(){if(N!==null){var A=e.unstable_now();P=A;var z=!0;try{z=N(!0,A)}finally{z?Q():(k=!1,N=null)}}else k=!1}var Q;if(typeof p=="function")Q=function(){p(I)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,L=he.port2;he.port1.onmessage=I,Q=function(){L.postMessage(null)}}else Q=function(){C(I,0)};function B(A){N=A,k||(k=!0,Q())}function H(A,z){T=C(function(){A(e.unstable_now())},z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(A){A.callback=null},e.unstable_continueExecution=function(){g||y||(g=!0,B(j))},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(A){switch(h){case 1:case 2:case 3:var z=3;break;default:z=h}var V=h;h=z;try{return A()}finally{h=V}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(A,z){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var V=h;h=A;try{return z()}finally{h=V}},e.unstable_scheduleCallback=function(A,z,V){var _=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?_+V:_):V=_,A){case 1:var E=-1;break;case 2:E=250;break;case 5:E=1073741823;break;case 4:E=1e4;break;default:E=5e3}return E=V+E,A={id:d++,callback:z,priorityLevel:A,startTime:V,expirationTime:E,sortIndex:-1},V>_?(A.sortIndex=V,t(u,A),n(c)===null&&A===n(u)&&(x?(m(T),T=-1):x=!0,H(S,V-_))):(A.sortIndex=E,t(c,A),g||y||(g=!0,B(j))),A},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(A){var z=h;return function(){var V=h;h=z;try{return A.apply(this,arguments)}finally{h=V}}}})(gh);yh.exports=gh;var by=yh.exports;/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var $y=w,Ge=by;function M(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var xh=new Set,as={};function Ln(e,t){ur(e,t),ur(e+"Capture",t)}function ur(e,t){for(as[e]=t,e=0;e<t.length;e++)xh.add(t[e])}var zt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pa=Object.prototype.hasOwnProperty,By=/^[: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]*$/,Tu={},Pu={};function Uy(e){return Pa.call(Pu,e)?!0:Pa.call(Tu,e)?!1:By.test(e)?Pu[e]=!0:(Tu[e]=!0,!1)}function Hy(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Wy(e,t,n,r){if(t===null||typeof t>"u"||Hy(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function De(e,t,n,r,s,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Se={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Se[e]=new De(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Se[t]=new De(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Se[e]=new De(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Se[e]=new De(e,2,!1,e,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(e){Se[e]=new De(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Se[e]=new De(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Se[e]=new De(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Se[e]=new De(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Se[e]=new De(e,5,!1,e.toLowerCase(),null,!1,!1)});var Il=/[\-:]([a-z])/g;function bl(e){return e[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(e){var t=e.replace(Il,bl);Se[t]=new De(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Il,bl);Se[t]=new De(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Il,bl);Se[t]=new De(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Se[e]=new De(e,1,!1,e.toLowerCase(),null,!1,!1)});Se.xlinkHref=new De("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Se[e]=new De(e,1,!1,e.toLowerCase(),null,!0,!0)});function $l(e,t,n,r){var s=Se.hasOwnProperty(t)?Se[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Wy(t,n,s,r)&&(n=null),r||s===null?Uy(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var bt=$y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ws=Symbol.for("react.element"),Fn=Symbol.for("react.portal"),In=Symbol.for("react.fragment"),Bl=Symbol.for("react.strict_mode"),Ea=Symbol.for("react.profiler"),jh=Symbol.for("react.provider"),wh=Symbol.for("react.context"),Ul=Symbol.for("react.forward_ref"),Ma=Symbol.for("react.suspense"),Aa=Symbol.for("react.suspense_list"),Hl=Symbol.for("react.memo"),Ut=Symbol.for("react.lazy"),Sh=Symbol.for("react.offscreen"),Eu=Symbol.iterator;function Mr(e){return e===null||typeof e!="object"?null:(e=Eu&&e[Eu]||e["@@iterator"],typeof e=="function"?e:null)}var oe=Object.assign,Oo;function Fr(e){if(Oo===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Oo=t&&t[1]||""}return`
34
+ `+Oo+e}var Fo=!1;function Io(e,t){if(!e||Fo)return"";Fo=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(`
35
+ `),o=r.stack.split(`
36
+ `),a=s.length-1,l=o.length-1;1<=a&&0<=l&&s[a]!==o[l];)l--;for(;1<=a&&0<=l;a--,l--)if(s[a]!==o[l]){if(a!==1||l!==1)do if(a--,l--,0>l||s[a]!==o[l]){var c=`
37
+ `+s[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=a&&0<=l);break}}}finally{Fo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Fr(e):""}function Ky(e){switch(e.tag){case 5:return Fr(e.type);case 16:return Fr("Lazy");case 13:return Fr("Suspense");case 19:return Fr("SuspenseList");case 0:case 2:case 15:return e=Io(e.type,!1),e;case 11:return e=Io(e.type.render,!1),e;case 1:return e=Io(e.type,!0),e;default:return""}}function Ra(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case In:return"Fragment";case Fn:return"Portal";case Ea:return"Profiler";case Bl:return"StrictMode";case Ma:return"Suspense";case Aa:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case wh:return(e.displayName||"Context")+".Consumer";case jh:return(e._context.displayName||"Context")+".Provider";case Ul:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Hl:return t=e.displayName||null,t!==null?t:Ra(e.type)||"Memo";case Ut:t=e._payload,e=e._init;try{return Ra(e(t))}catch{}}return null}function Gy(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ra(t);case 8:return t===Bl?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function an(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function kh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qy(e){var t=kh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ks(e){e._valueTracker||(e._valueTracker=qy(e))}function Nh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=kh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Di(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Da(e,t){var n=t.checked;return oe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Mu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=an(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ch(e,t){t=t.checked,t!=null&&$l(e,"checked",t,!1)}function _a(e,t){Ch(e,t);var n=an(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?La(e,t.type,n):t.hasOwnProperty("defaultValue")&&La(e,t.type,an(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Au(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function La(e,t,n){(t!=="number"||Di(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ir=Array.isArray;function rr(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+an(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function za(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(M(91));return oe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ru(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(M(92));if(Ir(n)){if(1<n.length)throw Error(M(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:an(n)}}function Th(e,t){var n=an(t.value),r=an(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Du(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ph(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Va(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ph(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Gs,Eh=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Gs=Gs||document.createElement("div"),Gs.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Gs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ls(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Kr={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},Qy=["Webkit","ms","Moz","O"];Object.keys(Kr).forEach(function(e){Qy.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Kr[t]=Kr[e]})});function Mh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Kr.hasOwnProperty(e)&&Kr[e]?(""+t).trim():t+"px"}function Ah(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Mh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Yy=oe({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 Oa(e,t){if(t){if(Yy[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(M(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(M(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(M(61))}if(t.style!=null&&typeof t.style!="object")throw Error(M(62))}}function Fa(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 Ia=null;function Wl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ba=null,sr=null,ir=null;function _u(e){if(e=zs(e)){if(typeof ba!="function")throw Error(M(280));var t=e.stateNode;t&&(t=go(t),ba(e.stateNode,e.type,t))}}function Rh(e){sr?ir?ir.push(e):ir=[e]:sr=e}function Dh(){if(sr){var e=sr,t=ir;if(ir=sr=null,_u(e),t)for(e=0;e<t.length;e++)_u(t[e])}}function _h(e,t){return e(t)}function Lh(){}var bo=!1;function zh(e,t,n){if(bo)return e(t,n);bo=!0;try{return _h(e,t,n)}finally{bo=!1,(sr!==null||ir!==null)&&(Lh(),Dh())}}function cs(e,t){var n=e.stateNode;if(n===null)return null;var r=go(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(M(231,t,typeof n));return n}var $a=!1;if(zt)try{var Ar={};Object.defineProperty(Ar,"passive",{get:function(){$a=!0}}),window.addEventListener("test",Ar,Ar),window.removeEventListener("test",Ar,Ar)}catch{$a=!1}function Xy(e,t,n,r,s,o,a,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Gr=!1,_i=null,Li=!1,Ba=null,Zy={onError:function(e){Gr=!0,_i=e}};function Jy(e,t,n,r,s,o,a,l,c){Gr=!1,_i=null,Xy.apply(Zy,arguments)}function eg(e,t,n,r,s,o,a,l,c){if(Jy.apply(this,arguments),Gr){if(Gr){var u=_i;Gr=!1,_i=null}else throw Error(M(198));Li||(Li=!0,Ba=u)}}function zn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Vh(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Lu(e){if(zn(e)!==e)throw Error(M(188))}function tg(e){var t=e.alternate;if(!t){if(t=zn(e),t===null)throw Error(M(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return Lu(s),e;if(o===r)return Lu(s),t;o=o.sibling}throw Error(M(188))}if(n.return!==r.return)n=s,r=o;else{for(var a=!1,l=s.child;l;){if(l===n){a=!0,n=s,r=o;break}if(l===r){a=!0,r=s,n=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===n){a=!0,n=o,r=s;break}if(l===r){a=!0,r=o,n=s;break}l=l.sibling}if(!a)throw Error(M(189))}}if(n.alternate!==r)throw Error(M(190))}if(n.tag!==3)throw Error(M(188));return n.stateNode.current===n?e:t}function Oh(e){return e=tg(e),e!==null?Fh(e):null}function Fh(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Fh(e);if(t!==null)return t;e=e.sibling}return null}var Ih=Ge.unstable_scheduleCallback,zu=Ge.unstable_cancelCallback,ng=Ge.unstable_shouldYield,rg=Ge.unstable_requestPaint,fe=Ge.unstable_now,sg=Ge.unstable_getCurrentPriorityLevel,Kl=Ge.unstable_ImmediatePriority,bh=Ge.unstable_UserBlockingPriority,zi=Ge.unstable_NormalPriority,ig=Ge.unstable_LowPriority,$h=Ge.unstable_IdlePriority,po=null,St=null;function og(e){if(St&&typeof St.onCommitFiberRoot=="function")try{St.onCommitFiberRoot(po,e,void 0,(e.current.flags&128)===128)}catch{}}var mt=Math.clz32?Math.clz32:cg,ag=Math.log,lg=Math.LN2;function cg(e){return e>>>=0,e===0?32:31-(ag(e)/lg|0)|0}var qs=64,Qs=4194304;function br(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Vi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~s;l!==0?r=br(l):(o&=a,o!==0&&(r=br(o)))}else a=n&~s,a!==0?r=br(a):o!==0&&(r=br(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-mt(t),s=1<<n,r|=e[n],t&=~s;return r}function ug(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dg(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-mt(o),l=1<<a,c=s[a];c===-1?(!(l&n)||l&r)&&(s[a]=ug(l,t)):c<=t&&(e.expiredLanes|=l),o&=~l}}function Ua(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Bh(){var e=qs;return qs<<=1,!(qs&4194240)&&(qs=64),e}function $o(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function _s(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-mt(t),e[t]=n}function fg(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-mt(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function Gl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-mt(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var q=0;function Uh(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Hh,ql,Wh,Kh,Gh,Ha=!1,Ys=[],Yt=null,Xt=null,Zt=null,us=new Map,ds=new Map,Wt=[],hg="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Vu(e,t){switch(e){case"focusin":case"focusout":Yt=null;break;case"dragenter":case"dragleave":Xt=null;break;case"mouseover":case"mouseout":Zt=null;break;case"pointerover":case"pointerout":us.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ds.delete(t.pointerId)}}function Rr(e,t,n,r,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},t!==null&&(t=zs(t),t!==null&&ql(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function pg(e,t,n,r,s){switch(t){case"focusin":return Yt=Rr(Yt,e,t,n,r,s),!0;case"dragenter":return Xt=Rr(Xt,e,t,n,r,s),!0;case"mouseover":return Zt=Rr(Zt,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return us.set(o,Rr(us.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,ds.set(o,Rr(ds.get(o)||null,e,t,n,r,s)),!0}return!1}function qh(e){var t=Sn(e.target);if(t!==null){var n=zn(t);if(n!==null){if(t=n.tag,t===13){if(t=Vh(n),t!==null){e.blockedOn=t,Gh(e.priority,function(){Wh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function gi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Wa(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ia=r,n.target.dispatchEvent(r),Ia=null}else return t=zs(n),t!==null&&ql(t),e.blockedOn=n,!1;t.shift()}return!0}function Ou(e,t,n){gi(e)&&n.delete(t)}function mg(){Ha=!1,Yt!==null&&gi(Yt)&&(Yt=null),Xt!==null&&gi(Xt)&&(Xt=null),Zt!==null&&gi(Zt)&&(Zt=null),us.forEach(Ou),ds.forEach(Ou)}function Dr(e,t){e.blockedOn===t&&(e.blockedOn=null,Ha||(Ha=!0,Ge.unstable_scheduleCallback(Ge.unstable_NormalPriority,mg)))}function fs(e){function t(s){return Dr(s,e)}if(0<Ys.length){Dr(Ys[0],e);for(var n=1;n<Ys.length;n++){var r=Ys[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Yt!==null&&Dr(Yt,e),Xt!==null&&Dr(Xt,e),Zt!==null&&Dr(Zt,e),us.forEach(t),ds.forEach(t),n=0;n<Wt.length;n++)r=Wt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Wt.length&&(n=Wt[0],n.blockedOn===null);)qh(n),n.blockedOn===null&&Wt.shift()}var or=bt.ReactCurrentBatchConfig,Oi=!0;function vg(e,t,n,r){var s=q,o=or.transition;or.transition=null;try{q=1,Ql(e,t,n,r)}finally{q=s,or.transition=o}}function yg(e,t,n,r){var s=q,o=or.transition;or.transition=null;try{q=4,Ql(e,t,n,r)}finally{q=s,or.transition=o}}function Ql(e,t,n,r){if(Oi){var s=Wa(e,t,n,r);if(s===null)Xo(e,t,r,Fi,n),Vu(e,r);else if(pg(s,e,t,n,r))r.stopPropagation();else if(Vu(e,r),t&4&&-1<hg.indexOf(e)){for(;s!==null;){var o=zs(s);if(o!==null&&Hh(o),o=Wa(e,t,n,r),o===null&&Xo(e,t,r,Fi,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else Xo(e,t,r,null,n)}}var Fi=null;function Wa(e,t,n,r){if(Fi=null,e=Wl(r),e=Sn(e),e!==null)if(t=zn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Vh(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Fi=e,null}function Qh(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(sg()){case Kl:return 1;case bh:return 4;case zi:case ig:return 16;case $h:return 536870912;default:return 16}default:return 16}}var Gt=null,Yl=null,xi=null;function Yh(){if(xi)return xi;var e,t=Yl,n=t.length,r,s="value"in Gt?Gt.value:Gt.textContent,o=s.length;for(e=0;e<n&&t[e]===s[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===s[o-r];r++);return xi=s.slice(e,1<r?1-r:void 0)}function ji(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Xs(){return!0}function Fu(){return!1}function Xe(e){function t(n,r,s,o,a){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Xs:Fu,this.isPropagationStopped=Fu,this}return oe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Xs)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Xs)},persist:function(){},isPersistent:Xs}),t}var Cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xl=Xe(Cr),Ls=oe({},Cr,{view:0,detail:0}),gg=Xe(Ls),Bo,Uo,_r,mo=oe({},Ls,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zl,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==_r&&(_r&&e.type==="mousemove"?(Bo=e.screenX-_r.screenX,Uo=e.screenY-_r.screenY):Uo=Bo=0,_r=e),Bo)},movementY:function(e){return"movementY"in e?e.movementY:Uo}}),Iu=Xe(mo),xg=oe({},mo,{dataTransfer:0}),jg=Xe(xg),wg=oe({},Ls,{relatedTarget:0}),Ho=Xe(wg),Sg=oe({},Cr,{animationName:0,elapsedTime:0,pseudoElement:0}),kg=Xe(Sg),Ng=oe({},Cr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Cg=Xe(Ng),Tg=oe({},Cr,{data:0}),bu=Xe(Tg),Pg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Eg={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Mg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ag(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Mg[e])?!!t[e]:!1}function Zl(){return Ag}var Rg=oe({},Ls,{key:function(e){if(e.key){var t=Pg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ji(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Eg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zl,charCode:function(e){return e.type==="keypress"?ji(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ji(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Dg=Xe(Rg),_g=oe({},mo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$u=Xe(_g),Lg=oe({},Ls,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zl}),zg=Xe(Lg),Vg=oe({},Cr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Og=Xe(Vg),Fg=oe({},mo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ig=Xe(Fg),bg=[9,13,27,32],Jl=zt&&"CompositionEvent"in window,qr=null;zt&&"documentMode"in document&&(qr=document.documentMode);var $g=zt&&"TextEvent"in window&&!qr,Xh=zt&&(!Jl||qr&&8<qr&&11>=qr),Bu=" ",Uu=!1;function Zh(e,t){switch(e){case"keyup":return bg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bn=!1;function Bg(e,t){switch(e){case"compositionend":return Jh(t);case"keypress":return t.which!==32?null:(Uu=!0,Bu);case"textInput":return e=t.data,e===Bu&&Uu?null:e;default:return null}}function Ug(e,t){if(bn)return e==="compositionend"||!Jl&&Zh(e,t)?(e=Yh(),xi=Yl=Gt=null,bn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Xh&&t.locale!=="ko"?null:t.data;default:return null}}var Hg={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Hg[e.type]:t==="textarea"}function ep(e,t,n,r){Rh(r),t=Ii(t,"onChange"),0<t.length&&(n=new Xl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Qr=null,hs=null;function Wg(e){dp(e,0)}function vo(e){var t=Un(e);if(Nh(t))return e}function Kg(e,t){if(e==="change")return t}var tp=!1;if(zt){var Wo;if(zt){var Ko="oninput"in document;if(!Ko){var Wu=document.createElement("div");Wu.setAttribute("oninput","return;"),Ko=typeof Wu.oninput=="function"}Wo=Ko}else Wo=!1;tp=Wo&&(!document.documentMode||9<document.documentMode)}function Ku(){Qr&&(Qr.detachEvent("onpropertychange",np),hs=Qr=null)}function np(e){if(e.propertyName==="value"&&vo(hs)){var t=[];ep(t,hs,e,Wl(e)),zh(Wg,t)}}function Gg(e,t,n){e==="focusin"?(Ku(),Qr=t,hs=n,Qr.attachEvent("onpropertychange",np)):e==="focusout"&&Ku()}function qg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vo(hs)}function Qg(e,t){if(e==="click")return vo(t)}function Yg(e,t){if(e==="input"||e==="change")return vo(t)}function Xg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:Xg;function ps(e,t){if(yt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Pa.call(t,s)||!yt(e[s],t[s]))return!1}return!0}function Gu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qu(e,t){var n=Gu(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Gu(n)}}function rp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?rp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function sp(){for(var e=window,t=Di();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Di(e.document)}return t}function ec(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Zg(e){var t=sp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&rp(n.ownerDocument.documentElement,n)){if(r!==null&&ec(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=qu(n,o);var a=qu(n,r);s&&a&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Jg=zt&&"documentMode"in document&&11>=document.documentMode,$n=null,Ka=null,Yr=null,Ga=!1;function Qu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ga||$n==null||$n!==Di(r)||(r=$n,"selectionStart"in r&&ec(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}),Yr&&ps(Yr,r)||(Yr=r,r=Ii(Ka,"onSelect"),0<r.length&&(t=new Xl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=$n)))}function Zs(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Bn={animationend:Zs("Animation","AnimationEnd"),animationiteration:Zs("Animation","AnimationIteration"),animationstart:Zs("Animation","AnimationStart"),transitionend:Zs("Transition","TransitionEnd")},Go={},ip={};zt&&(ip=document.createElement("div").style,"AnimationEvent"in window||(delete Bn.animationend.animation,delete Bn.animationiteration.animation,delete Bn.animationstart.animation),"TransitionEvent"in window||delete Bn.transitionend.transition);function yo(e){if(Go[e])return Go[e];if(!Bn[e])return e;var t=Bn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ip)return Go[e]=t[n];return e}var op=yo("animationend"),ap=yo("animationiteration"),lp=yo("animationstart"),cp=yo("transitionend"),up=new Map,Yu="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function fn(e,t){up.set(e,t),Ln(t,[e])}for(var qo=0;qo<Yu.length;qo++){var Qo=Yu[qo],e0=Qo.toLowerCase(),t0=Qo[0].toUpperCase()+Qo.slice(1);fn(e0,"on"+t0)}fn(op,"onAnimationEnd");fn(ap,"onAnimationIteration");fn(lp,"onAnimationStart");fn("dblclick","onDoubleClick");fn("focusin","onFocus");fn("focusout","onBlur");fn(cp,"onTransitionEnd");ur("onMouseEnter",["mouseout","mouseover"]);ur("onMouseLeave",["mouseout","mouseover"]);ur("onPointerEnter",["pointerout","pointerover"]);ur("onPointerLeave",["pointerout","pointerover"]);Ln("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ln("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ln("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ln("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ln("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ln("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $r="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),n0=new Set("cancel close invalid load scroll toggle".split(" ").concat($r));function Xu(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,eg(r,t,void 0,e),e.currentTarget=null}function dp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var l=r[a],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==o&&s.isPropagationStopped())break e;Xu(s,l,u),o=c}else for(a=0;a<r.length;a++){if(l=r[a],c=l.instance,u=l.currentTarget,l=l.listener,c!==o&&s.isPropagationStopped())break e;Xu(s,l,u),o=c}}}if(Li)throw e=Ba,Li=!1,Ba=null,e}function J(e,t){var n=t[Za];n===void 0&&(n=t[Za]=new Set);var r=e+"__bubble";n.has(r)||(fp(t,e,2,!1),n.add(r))}function Yo(e,t,n){var r=0;t&&(r|=4),fp(n,e,r,t)}var Js="_reactListening"+Math.random().toString(36).slice(2);function ms(e){if(!e[Js]){e[Js]=!0,xh.forEach(function(n){n!=="selectionchange"&&(n0.has(n)||Yo(n,!1,e),Yo(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Js]||(t[Js]=!0,Yo("selectionchange",!1,t))}}function fp(e,t,n,r){switch(Qh(t)){case 1:var s=vg;break;case 4:s=yg;break;default:s=Ql}n=s.bind(null,t,n,e),s=void 0,!$a||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Xo(e,t,n,r,s){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(a===4)for(a=r.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;a=a.return}for(;l!==null;){if(a=Sn(l),a===null)return;if(c=a.tag,c===5||c===6){r=o=a;continue e}l=l.parentNode}}r=r.return}zh(function(){var u=o,d=Wl(n),f=[];e:{var h=up.get(e);if(h!==void 0){var y=Xl,g=e;switch(e){case"keypress":if(ji(n)===0)break e;case"keydown":case"keyup":y=Dg;break;case"focusin":g="focus",y=Ho;break;case"focusout":g="blur",y=Ho;break;case"beforeblur":case"afterblur":y=Ho;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=Iu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=jg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=zg;break;case op:case ap:case lp:y=kg;break;case cp:y=Og;break;case"scroll":y=gg;break;case"wheel":y=Ig;break;case"copy":case"cut":case"paste":y=Cg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=$u}var x=(t&4)!==0,C=!x&&e==="scroll",m=x?h!==null?h+"Capture":null:h;x=[];for(var p=u,v;p!==null;){v=p;var S=v.stateNode;if(v.tag===5&&S!==null&&(v=S,m!==null&&(S=cs(p,m),S!=null&&x.push(vs(p,S,v)))),C)break;p=p.return}0<x.length&&(h=new y(h,g,null,n,d),f.push({event:h,listeners:x}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",h&&n!==Ia&&(g=n.relatedTarget||n.fromElement)&&(Sn(g)||g[Vt]))break e;if((y||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,y?(g=n.relatedTarget||n.toElement,y=u,g=g?Sn(g):null,g!==null&&(C=zn(g),g!==C||g.tag!==5&&g.tag!==6)&&(g=null)):(y=null,g=u),y!==g)){if(x=Iu,S="onMouseLeave",m="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(x=$u,S="onPointerLeave",m="onPointerEnter",p="pointer"),C=y==null?h:Un(y),v=g==null?h:Un(g),h=new x(S,p+"leave",y,n,d),h.target=C,h.relatedTarget=v,S=null,Sn(d)===u&&(x=new x(m,p+"enter",g,n,d),x.target=v,x.relatedTarget=C,S=x),C=S,y&&g)t:{for(x=y,m=g,p=0,v=x;v;v=On(v))p++;for(v=0,S=m;S;S=On(S))v++;for(;0<p-v;)x=On(x),p--;for(;0<v-p;)m=On(m),v--;for(;p--;){if(x===m||m!==null&&x===m.alternate)break t;x=On(x),m=On(m)}x=null}else x=null;y!==null&&Zu(f,h,y,x,!1),g!==null&&C!==null&&Zu(f,C,g,x,!0)}}e:{if(h=u?Un(u):window,y=h.nodeName&&h.nodeName.toLowerCase(),y==="select"||y==="input"&&h.type==="file")var j=Kg;else if(Hu(h))if(tp)j=Yg;else{j=qg;var k=Gg}else(y=h.nodeName)&&y.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(j=Qg);if(j&&(j=j(e,u))){ep(f,j,n,d);break e}k&&k(e,h,u),e==="focusout"&&(k=h._wrapperState)&&k.controlled&&h.type==="number"&&La(h,"number",h.value)}switch(k=u?Un(u):window,e){case"focusin":(Hu(k)||k.contentEditable==="true")&&($n=k,Ka=u,Yr=null);break;case"focusout":Yr=Ka=$n=null;break;case"mousedown":Ga=!0;break;case"contextmenu":case"mouseup":case"dragend":Ga=!1,Qu(f,n,d);break;case"selectionchange":if(Jg)break;case"keydown":case"keyup":Qu(f,n,d)}var N;if(Jl)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else bn?Zh(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(Xh&&n.locale!=="ko"&&(bn||T!=="onCompositionStart"?T==="onCompositionEnd"&&bn&&(N=Yh()):(Gt=d,Yl="value"in Gt?Gt.value:Gt.textContent,bn=!0)),k=Ii(u,T),0<k.length&&(T=new bu(T,e,null,n,d),f.push({event:T,listeners:k}),N?T.data=N:(N=Jh(n),N!==null&&(T.data=N)))),(N=$g?Bg(e,n):Ug(e,n))&&(u=Ii(u,"onBeforeInput"),0<u.length&&(d=new bu("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=N))}dp(f,t)})}function vs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ii(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=cs(e,n),o!=null&&r.unshift(vs(e,o,s)),o=cs(e,t),o!=null&&r.push(vs(e,o,s))),e=e.return}return r}function On(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Zu(e,t,n,r,s){for(var o=t._reactName,a=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,s?(c=cs(n,o),c!=null&&a.unshift(vs(n,c,l))):s||(c=cs(n,o),c!=null&&a.push(vs(n,c,l)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var r0=/\r\n?/g,s0=/\u0000|\uFFFD/g;function Ju(e){return(typeof e=="string"?e:""+e).replace(r0,`
38
+ `).replace(s0,"")}function ei(e,t,n){if(t=Ju(t),Ju(e)!==t&&n)throw Error(M(425))}function bi(){}var qa=null,Qa=null;function Ya(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Xa=typeof setTimeout=="function"?setTimeout:void 0,i0=typeof clearTimeout=="function"?clearTimeout:void 0,ed=typeof Promise=="function"?Promise:void 0,o0=typeof queueMicrotask=="function"?queueMicrotask:typeof ed<"u"?function(e){return ed.resolve(null).then(e).catch(a0)}:Xa;function a0(e){setTimeout(function(){throw e})}function Zo(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),fs(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);fs(t)}function Jt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function td(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Tr=Math.random().toString(36).slice(2),jt="__reactFiber$"+Tr,ys="__reactProps$"+Tr,Vt="__reactContainer$"+Tr,Za="__reactEvents$"+Tr,l0="__reactListeners$"+Tr,c0="__reactHandles$"+Tr;function Sn(e){var t=e[jt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Vt]||n[jt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=td(e);e!==null;){if(n=e[jt])return n;e=td(e)}return t}e=n,n=e.parentNode}return null}function zs(e){return e=e[jt]||e[Vt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Un(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(M(33))}function go(e){return e[ys]||null}var Ja=[],Hn=-1;function hn(e){return{current:e}}function ee(e){0>Hn||(e.current=Ja[Hn],Ja[Hn]=null,Hn--)}function X(e,t){Hn++,Ja[Hn]=e.current,e.current=t}var ln={},Ee=hn(ln),Ve=hn(!1),Mn=ln;function dr(e,t){var n=e.type.contextTypes;if(!n)return ln;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Oe(e){return e=e.childContextTypes,e!=null}function $i(){ee(Ve),ee(Ee)}function nd(e,t,n){if(Ee.current!==ln)throw Error(M(168));X(Ee,t),X(Ve,n)}function hp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(M(108,Gy(e)||"Unknown",s));return oe({},n,r)}function Bi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ln,Mn=Ee.current,X(Ee,e),X(Ve,Ve.current),!0}function rd(e,t,n){var r=e.stateNode;if(!r)throw Error(M(169));n?(e=hp(e,t,Mn),r.__reactInternalMemoizedMergedChildContext=e,ee(Ve),ee(Ee),X(Ee,e)):ee(Ve),X(Ve,n)}var Et=null,xo=!1,Jo=!1;function pp(e){Et===null?Et=[e]:Et.push(e)}function u0(e){xo=!0,pp(e)}function pn(){if(!Jo&&Et!==null){Jo=!0;var e=0,t=q;try{var n=Et;for(q=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Et=null,xo=!1}catch(s){throw Et!==null&&(Et=Et.slice(e+1)),Ih(Kl,pn),s}finally{q=t,Jo=!1}}return null}var Wn=[],Kn=0,Ui=null,Hi=0,tt=[],nt=0,An=null,Mt=1,At="";function gn(e,t){Wn[Kn++]=Hi,Wn[Kn++]=Ui,Ui=e,Hi=t}function mp(e,t,n){tt[nt++]=Mt,tt[nt++]=At,tt[nt++]=An,An=e;var r=Mt;e=At;var s=32-mt(r)-1;r&=~(1<<s),n+=1;var o=32-mt(t)+s;if(30<o){var a=s-s%5;o=(r&(1<<a)-1).toString(32),r>>=a,s-=a,Mt=1<<32-mt(t)+s|n<<s|r,At=o+e}else Mt=1<<o|n<<s|r,At=e}function tc(e){e.return!==null&&(gn(e,1),mp(e,1,0))}function nc(e){for(;e===Ui;)Ui=Wn[--Kn],Wn[Kn]=null,Hi=Wn[--Kn],Wn[Kn]=null;for(;e===An;)An=tt[--nt],tt[nt]=null,At=tt[--nt],tt[nt]=null,Mt=tt[--nt],tt[nt]=null}var We=null,He=null,ne=!1,pt=null;function vp(e,t){var n=rt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function sd(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,We=e,He=Jt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,We=e,He=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=An!==null?{id:Mt,overflow:At}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=rt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,We=e,He=null,!0):!1;default:return!1}}function el(e){return(e.mode&1)!==0&&(e.flags&128)===0}function tl(e){if(ne){var t=He;if(t){var n=t;if(!sd(e,t)){if(el(e))throw Error(M(418));t=Jt(n.nextSibling);var r=We;t&&sd(e,t)?vp(r,n):(e.flags=e.flags&-4097|2,ne=!1,We=e)}}else{if(el(e))throw Error(M(418));e.flags=e.flags&-4097|2,ne=!1,We=e}}}function id(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;We=e}function ti(e){if(e!==We)return!1;if(!ne)return id(e),ne=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ya(e.type,e.memoizedProps)),t&&(t=He)){if(el(e))throw yp(),Error(M(418));for(;t;)vp(e,t),t=Jt(t.nextSibling)}if(id(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(M(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){He=Jt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}He=null}}else He=We?Jt(e.stateNode.nextSibling):null;return!0}function yp(){for(var e=He;e;)e=Jt(e.nextSibling)}function fr(){He=We=null,ne=!1}function rc(e){pt===null?pt=[e]:pt.push(e)}var d0=bt.ReactCurrentBatchConfig;function Lr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(M(309));var r=n.stateNode}if(!r)throw Error(M(147,e));var s=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var l=s.refs;a===null?delete l[o]:l[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(M(284));if(!n._owner)throw Error(M(290,e))}return e}function ni(e,t){throw e=Object.prototype.toString.call(t),Error(M(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function od(e){var t=e._init;return t(e._payload)}function gp(e){function t(m,p){if(e){var v=m.deletions;v===null?(m.deletions=[p],m.flags|=16):v.push(p)}}function n(m,p){if(!e)return null;for(;p!==null;)t(m,p),p=p.sibling;return null}function r(m,p){for(m=new Map;p!==null;)p.key!==null?m.set(p.key,p):m.set(p.index,p),p=p.sibling;return m}function s(m,p){return m=rn(m,p),m.index=0,m.sibling=null,m}function o(m,p,v){return m.index=v,e?(v=m.alternate,v!==null?(v=v.index,v<p?(m.flags|=2,p):v):(m.flags|=2,p)):(m.flags|=1048576,p)}function a(m){return e&&m.alternate===null&&(m.flags|=2),m}function l(m,p,v,S){return p===null||p.tag!==6?(p=oa(v,m.mode,S),p.return=m,p):(p=s(p,v),p.return=m,p)}function c(m,p,v,S){var j=v.type;return j===In?d(m,p,v.props.children,S,v.key):p!==null&&(p.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Ut&&od(j)===p.type)?(S=s(p,v.props),S.ref=Lr(m,p,v),S.return=m,S):(S=Pi(v.type,v.key,v.props,null,m.mode,S),S.ref=Lr(m,p,v),S.return=m,S)}function u(m,p,v,S){return p===null||p.tag!==4||p.stateNode.containerInfo!==v.containerInfo||p.stateNode.implementation!==v.implementation?(p=aa(v,m.mode,S),p.return=m,p):(p=s(p,v.children||[]),p.return=m,p)}function d(m,p,v,S,j){return p===null||p.tag!==7?(p=Pn(v,m.mode,S,j),p.return=m,p):(p=s(p,v),p.return=m,p)}function f(m,p,v){if(typeof p=="string"&&p!==""||typeof p=="number")return p=oa(""+p,m.mode,v),p.return=m,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Ws:return v=Pi(p.type,p.key,p.props,null,m.mode,v),v.ref=Lr(m,null,p),v.return=m,v;case Fn:return p=aa(p,m.mode,v),p.return=m,p;case Ut:var S=p._init;return f(m,S(p._payload),v)}if(Ir(p)||Mr(p))return p=Pn(p,m.mode,v,null),p.return=m,p;ni(m,p)}return null}function h(m,p,v,S){var j=p!==null?p.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return j!==null?null:l(m,p,""+v,S);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Ws:return v.key===j?c(m,p,v,S):null;case Fn:return v.key===j?u(m,p,v,S):null;case Ut:return j=v._init,h(m,p,j(v._payload),S)}if(Ir(v)||Mr(v))return j!==null?null:d(m,p,v,S,null);ni(m,v)}return null}function y(m,p,v,S,j){if(typeof S=="string"&&S!==""||typeof S=="number")return m=m.get(v)||null,l(p,m,""+S,j);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Ws:return m=m.get(S.key===null?v:S.key)||null,c(p,m,S,j);case Fn:return m=m.get(S.key===null?v:S.key)||null,u(p,m,S,j);case Ut:var k=S._init;return y(m,p,v,k(S._payload),j)}if(Ir(S)||Mr(S))return m=m.get(v)||null,d(p,m,S,j,null);ni(p,S)}return null}function g(m,p,v,S){for(var j=null,k=null,N=p,T=p=0,R=null;N!==null&&T<v.length;T++){N.index>T?(R=N,N=null):R=N.sibling;var P=h(m,N,v[T],S);if(P===null){N===null&&(N=R);break}e&&N&&P.alternate===null&&t(m,N),p=o(P,p,T),k===null?j=P:k.sibling=P,k=P,N=R}if(T===v.length)return n(m,N),ne&&gn(m,T),j;if(N===null){for(;T<v.length;T++)N=f(m,v[T],S),N!==null&&(p=o(N,p,T),k===null?j=N:k.sibling=N,k=N);return ne&&gn(m,T),j}for(N=r(m,N);T<v.length;T++)R=y(N,m,T,v[T],S),R!==null&&(e&&R.alternate!==null&&N.delete(R.key===null?T:R.key),p=o(R,p,T),k===null?j=R:k.sibling=R,k=R);return e&&N.forEach(function($){return t(m,$)}),ne&&gn(m,T),j}function x(m,p,v,S){var j=Mr(v);if(typeof j!="function")throw Error(M(150));if(v=j.call(v),v==null)throw Error(M(151));for(var k=j=null,N=p,T=p=0,R=null,P=v.next();N!==null&&!P.done;T++,P=v.next()){N.index>T?(R=N,N=null):R=N.sibling;var $=h(m,N,P.value,S);if($===null){N===null&&(N=R);break}e&&N&&$.alternate===null&&t(m,N),p=o($,p,T),k===null?j=$:k.sibling=$,k=$,N=R}if(P.done)return n(m,N),ne&&gn(m,T),j;if(N===null){for(;!P.done;T++,P=v.next())P=f(m,P.value,S),P!==null&&(p=o(P,p,T),k===null?j=P:k.sibling=P,k=P);return ne&&gn(m,T),j}for(N=r(m,N);!P.done;T++,P=v.next())P=y(N,m,T,P.value,S),P!==null&&(e&&P.alternate!==null&&N.delete(P.key===null?T:P.key),p=o(P,p,T),k===null?j=P:k.sibling=P,k=P);return e&&N.forEach(function(I){return t(m,I)}),ne&&gn(m,T),j}function C(m,p,v,S){if(typeof v=="object"&&v!==null&&v.type===In&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ws:e:{for(var j=v.key,k=p;k!==null;){if(k.key===j){if(j=v.type,j===In){if(k.tag===7){n(m,k.sibling),p=s(k,v.props.children),p.return=m,m=p;break e}}else if(k.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Ut&&od(j)===k.type){n(m,k.sibling),p=s(k,v.props),p.ref=Lr(m,k,v),p.return=m,m=p;break e}n(m,k);break}else t(m,k);k=k.sibling}v.type===In?(p=Pn(v.props.children,m.mode,S,v.key),p.return=m,m=p):(S=Pi(v.type,v.key,v.props,null,m.mode,S),S.ref=Lr(m,p,v),S.return=m,m=S)}return a(m);case Fn:e:{for(k=v.key;p!==null;){if(p.key===k)if(p.tag===4&&p.stateNode.containerInfo===v.containerInfo&&p.stateNode.implementation===v.implementation){n(m,p.sibling),p=s(p,v.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else t(m,p);p=p.sibling}p=aa(v,m.mode,S),p.return=m,m=p}return a(m);case Ut:return k=v._init,C(m,p,k(v._payload),S)}if(Ir(v))return g(m,p,v,S);if(Mr(v))return x(m,p,v,S);ni(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,p!==null&&p.tag===6?(n(m,p.sibling),p=s(p,v),p.return=m,m=p):(n(m,p),p=oa(v,m.mode,S),p.return=m,m=p),a(m)):n(m,p)}return C}var hr=gp(!0),xp=gp(!1),Wi=hn(null),Ki=null,Gn=null,sc=null;function ic(){sc=Gn=Ki=null}function oc(e){var t=Wi.current;ee(Wi),e._currentValue=t}function nl(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ar(e,t){Ki=e,sc=Gn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ze=!0),e.firstContext=null)}function it(e){var t=e._currentValue;if(sc!==e)if(e={context:e,memoizedValue:t,next:null},Gn===null){if(Ki===null)throw Error(M(308));Gn=e,Ki.dependencies={lanes:0,firstContext:e}}else Gn=Gn.next=e;return t}var kn=null;function ac(e){kn===null?kn=[e]:kn.push(e)}function jp(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,ac(t)):(n.next=s.next,s.next=n),t.interleaved=n,Ot(e,r)}function Ot(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ht=!1;function lc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function wp(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Rt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function en(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Ot(e,n)}return s=r.interleaved,s===null?(t.next=t,ac(r)):(t.next=s.next,s.next=t),r.interleaved=t,Ot(e,n)}function wi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gl(e,n)}}function ad(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Gi(e,t,n,r){var s=e.updateQueue;Ht=!1;var o=s.firstBaseUpdate,a=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,a===null?o=u:a.next=u,a=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==a&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(o!==null){var f=s.baseState;a=0,d=u=c=null,l=o;do{var h=l.lane,y=l.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:y,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,x=l;switch(h=t,y=n,x.tag){case 1:if(g=x.payload,typeof g=="function"){f=g.call(y,f,h);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=x.payload,h=typeof g=="function"?g.call(y,f,h):g,h==null)break e;f=oe({},f,h);break e;case 2:Ht=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[l]:h.push(l))}else y={eventTime:y,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=y,c=f):d=d.next=y,a|=h;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;h=l,l=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(d===null&&(c=f),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do a|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);Dn|=a,e.lanes=a,e.memoizedState=f}}function ld(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(M(191,s));s.call(r)}}}var Vs={},kt=hn(Vs),gs=hn(Vs),xs=hn(Vs);function Nn(e){if(e===Vs)throw Error(M(174));return e}function cc(e,t){switch(X(xs,t),X(gs,e),X(kt,Vs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Va(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Va(t,e)}ee(kt),X(kt,t)}function pr(){ee(kt),ee(gs),ee(xs)}function Sp(e){Nn(xs.current);var t=Nn(kt.current),n=Va(t,e.type);t!==n&&(X(gs,e),X(kt,n))}function uc(e){gs.current===e&&(ee(kt),ee(gs))}var re=hn(0);function qi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ea=[];function dc(){for(var e=0;e<ea.length;e++)ea[e]._workInProgressVersionPrimary=null;ea.length=0}var Si=bt.ReactCurrentDispatcher,ta=bt.ReactCurrentBatchConfig,Rn=0,ie=null,me=null,ye=null,Qi=!1,Xr=!1,js=0,f0=0;function ke(){throw Error(M(321))}function fc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yt(e[n],t[n]))return!1;return!0}function hc(e,t,n,r,s,o){if(Rn=o,ie=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Si.current=e===null||e.memoizedState===null?v0:y0,e=n(r,s),Xr){o=0;do{if(Xr=!1,js=0,25<=o)throw Error(M(301));o+=1,ye=me=null,t.updateQueue=null,Si.current=g0,e=n(r,s)}while(Xr)}if(Si.current=Yi,t=me!==null&&me.next!==null,Rn=0,ye=me=ie=null,Qi=!1,t)throw Error(M(300));return e}function pc(){var e=js!==0;return js=0,e}function xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ye===null?ie.memoizedState=ye=e:ye=ye.next=e,ye}function ot(){if(me===null){var e=ie.alternate;e=e!==null?e.memoizedState:null}else e=me.next;var t=ye===null?ie.memoizedState:ye.next;if(t!==null)ye=t,me=e;else{if(e===null)throw Error(M(310));me=e,e={memoizedState:me.memoizedState,baseState:me.baseState,baseQueue:me.baseQueue,queue:me.queue,next:null},ye===null?ie.memoizedState=ye=e:ye=ye.next=e}return ye}function ws(e,t){return typeof t=="function"?t(e):t}function na(e){var t=ot(),n=t.queue;if(n===null)throw Error(M(311));n.lastRenderedReducer=e;var r=me,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var a=s.next;s.next=o.next,o.next=a}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var l=a=null,c=null,u=o;do{var d=u.lane;if((Rn&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=f,a=r):c=c.next=f,ie.lanes|=d,Dn|=d}u=u.next}while(u!==null&&u!==o);c===null?a=r:c.next=l,yt(r,t.memoizedState)||(ze=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,ie.lanes|=o,Dn|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ra(e){var t=ot(),n=t.queue;if(n===null)throw Error(M(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,o=t.memoizedState;if(s!==null){n.pending=null;var a=s=s.next;do o=e(o,a.action),a=a.next;while(a!==s);yt(o,t.memoizedState)||(ze=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function kp(){}function Np(e,t){var n=ie,r=ot(),s=t(),o=!yt(r.memoizedState,s);if(o&&(r.memoizedState=s,ze=!0),r=r.queue,mc(Pp.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||ye!==null&&ye.memoizedState.tag&1){if(n.flags|=2048,Ss(9,Tp.bind(null,n,r,s,t),void 0,null),ge===null)throw Error(M(349));Rn&30||Cp(n,t,s)}return s}function Cp(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ie.updateQueue,t===null?(t={lastEffect:null,stores:null},ie.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Tp(e,t,n,r){t.value=n,t.getSnapshot=r,Ep(t)&&Mp(e)}function Pp(e,t,n){return n(function(){Ep(t)&&Mp(e)})}function Ep(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yt(e,n)}catch{return!0}}function Mp(e){var t=Ot(e,1);t!==null&&vt(t,e,1,-1)}function cd(e){var t=xt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ws,lastRenderedState:e},t.queue=e,e=e.dispatch=m0.bind(null,ie,e),[t.memoizedState,e]}function Ss(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ie.updateQueue,t===null?(t={lastEffect:null,stores:null},ie.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Ap(){return ot().memoizedState}function ki(e,t,n,r){var s=xt();ie.flags|=e,s.memoizedState=Ss(1|t,n,void 0,r===void 0?null:r)}function jo(e,t,n,r){var s=ot();r=r===void 0?null:r;var o=void 0;if(me!==null){var a=me.memoizedState;if(o=a.destroy,r!==null&&fc(r,a.deps)){s.memoizedState=Ss(t,n,o,r);return}}ie.flags|=e,s.memoizedState=Ss(1|t,n,o,r)}function ud(e,t){return ki(8390656,8,e,t)}function mc(e,t){return jo(2048,8,e,t)}function Rp(e,t){return jo(4,2,e,t)}function Dp(e,t){return jo(4,4,e,t)}function _p(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Lp(e,t,n){return n=n!=null?n.concat([e]):null,jo(4,4,_p.bind(null,t,e),n)}function vc(){}function zp(e,t){var n=ot();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&fc(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Vp(e,t){var n=ot();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&fc(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Op(e,t,n){return Rn&21?(yt(n,t)||(n=Bh(),ie.lanes|=n,Dn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ze=!0),e.memoizedState=n)}function h0(e,t){var n=q;q=n!==0&&4>n?n:4,e(!0);var r=ta.transition;ta.transition={};try{e(!1),t()}finally{q=n,ta.transition=r}}function Fp(){return ot().memoizedState}function p0(e,t,n){var r=nn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ip(e))bp(t,n);else if(n=jp(e,t,n,r),n!==null){var s=Ae();vt(n,e,r,s),$p(n,t,r)}}function m0(e,t,n){var r=nn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ip(e))bp(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,l=o(a,n);if(s.hasEagerState=!0,s.eagerState=l,yt(l,a)){var c=t.interleaved;c===null?(s.next=s,ac(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=jp(e,t,s,r),n!==null&&(s=Ae(),vt(n,e,r,s),$p(n,t,r))}}function Ip(e){var t=e.alternate;return e===ie||t!==null&&t===ie}function bp(e,t){Xr=Qi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $p(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gl(e,n)}}var Yi={readContext:it,useCallback:ke,useContext:ke,useEffect:ke,useImperativeHandle:ke,useInsertionEffect:ke,useLayoutEffect:ke,useMemo:ke,useReducer:ke,useRef:ke,useState:ke,useDebugValue:ke,useDeferredValue:ke,useTransition:ke,useMutableSource:ke,useSyncExternalStore:ke,useId:ke,unstable_isNewReconciler:!1},v0={readContext:it,useCallback:function(e,t){return xt().memoizedState=[e,t===void 0?null:t],e},useContext:it,useEffect:ud,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ki(4194308,4,_p.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ki(4194308,4,e,t)},useInsertionEffect:function(e,t){return ki(4,2,e,t)},useMemo:function(e,t){var n=xt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=xt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=p0.bind(null,ie,e),[r.memoizedState,e]},useRef:function(e){var t=xt();return e={current:e},t.memoizedState=e},useState:cd,useDebugValue:vc,useDeferredValue:function(e){return xt().memoizedState=e},useTransition:function(){var e=cd(!1),t=e[0];return e=h0.bind(null,e[1]),xt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ie,s=xt();if(ne){if(n===void 0)throw Error(M(407));n=n()}else{if(n=t(),ge===null)throw Error(M(349));Rn&30||Cp(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,ud(Pp.bind(null,r,o,e),[e]),r.flags|=2048,Ss(9,Tp.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=xt(),t=ge.identifierPrefix;if(ne){var n=At,r=Mt;n=(r&~(1<<32-mt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=js++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=f0++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},y0={readContext:it,useCallback:zp,useContext:it,useEffect:mc,useImperativeHandle:Lp,useInsertionEffect:Rp,useLayoutEffect:Dp,useMemo:Vp,useReducer:na,useRef:Ap,useState:function(){return na(ws)},useDebugValue:vc,useDeferredValue:function(e){var t=ot();return Op(t,me.memoizedState,e)},useTransition:function(){var e=na(ws)[0],t=ot().memoizedState;return[e,t]},useMutableSource:kp,useSyncExternalStore:Np,useId:Fp,unstable_isNewReconciler:!1},g0={readContext:it,useCallback:zp,useContext:it,useEffect:mc,useImperativeHandle:Lp,useInsertionEffect:Rp,useLayoutEffect:Dp,useMemo:Vp,useReducer:ra,useRef:Ap,useState:function(){return ra(ws)},useDebugValue:vc,useDeferredValue:function(e){var t=ot();return me===null?t.memoizedState=e:Op(t,me.memoizedState,e)},useTransition:function(){var e=ra(ws)[0],t=ot().memoizedState;return[e,t]},useMutableSource:kp,useSyncExternalStore:Np,useId:Fp,unstable_isNewReconciler:!1};function ft(e,t){if(e&&e.defaultProps){t=oe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function rl(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:oe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var wo={isMounted:function(e){return(e=e._reactInternals)?zn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ae(),s=nn(e),o=Rt(r,s);o.payload=t,n!=null&&(o.callback=n),t=en(e,o,s),t!==null&&(vt(t,e,s,r),wi(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ae(),s=nn(e),o=Rt(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=en(e,o,s),t!==null&&(vt(t,e,s,r),wi(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ae(),r=nn(e),s=Rt(n,r);s.tag=2,t!=null&&(s.callback=t),t=en(e,s,r),t!==null&&(vt(t,e,r,n),wi(t,e,r))}};function dd(e,t,n,r,s,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,a):t.prototype&&t.prototype.isPureReactComponent?!ps(n,r)||!ps(s,o):!0}function Bp(e,t,n){var r=!1,s=ln,o=t.contextType;return typeof o=="object"&&o!==null?o=it(o):(s=Oe(t)?Mn:Ee.current,r=t.contextTypes,o=(r=r!=null)?dr(e,s):ln),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=wo,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function fd(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&wo.enqueueReplaceState(t,t.state,null)}function sl(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},lc(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=it(o):(o=Oe(t)?Mn:Ee.current,s.context=dr(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(rl(e,t,o,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&wo.enqueueReplaceState(s,s.state,null),Gi(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function mr(e,t){try{var n="",r=t;do n+=Ky(r),r=r.return;while(r);var s=n}catch(o){s=`
39
+ Error generating stack: `+o.message+`
40
+ `+o.stack}return{value:e,source:t,stack:s,digest:null}}function sa(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function il(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var x0=typeof WeakMap=="function"?WeakMap:Map;function Up(e,t,n){n=Rt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Zi||(Zi=!0,ml=r),il(e,t)},n}function Hp(e,t,n){n=Rt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){il(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){il(e,t),typeof r!="function"&&(tn===null?tn=new Set([this]):tn.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function hd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new x0;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=_0.bind(null,e,t,n),t.then(e,e))}function pd(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function md(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Rt(-1,1),t.tag=2,en(n,t,1))),n.lanes|=1),e)}var j0=bt.ReactCurrentOwner,ze=!1;function Me(e,t,n,r){t.child=e===null?xp(t,null,n,r):hr(t,e.child,n,r)}function vd(e,t,n,r,s){n=n.render;var o=t.ref;return ar(t,s),r=hc(e,t,n,r,o,s),n=pc(),e!==null&&!ze?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ft(e,t,s)):(ne&&n&&tc(t),t.flags|=1,Me(e,t,r,s),t.child)}function yd(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!Nc(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Wp(e,t,o,r,s)):(e=Pi(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:ps,n(a,r)&&e.ref===t.ref)return Ft(e,t,s)}return t.flags|=1,e=rn(o,r),e.ref=t.ref,e.return=t,t.child=e}function Wp(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(ps(o,r)&&e.ref===t.ref)if(ze=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(ze=!0);else return t.lanes=e.lanes,Ft(e,t,s)}return ol(e,t,n,r,s)}function Kp(e,t,n){var r=t.pendingProps,s=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},X(Qn,$e),$e|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,X(Qn,$e),$e|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,X(Qn,$e),$e|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,X(Qn,$e),$e|=r;return Me(e,t,s,n),t.child}function Gp(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ol(e,t,n,r,s){var o=Oe(n)?Mn:Ee.current;return o=dr(t,o),ar(t,s),n=hc(e,t,n,r,o,s),r=pc(),e!==null&&!ze?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ft(e,t,s)):(ne&&r&&tc(t),t.flags|=1,Me(e,t,n,s),t.child)}function gd(e,t,n,r,s){if(Oe(n)){var o=!0;Bi(t)}else o=!1;if(ar(t,s),t.stateNode===null)Ni(e,t),Bp(t,n,r),sl(t,n,r,s),r=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var c=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=it(u):(u=Oe(n)?Mn:Ee.current,u=dr(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==r||c!==u)&&fd(t,a,r,u),Ht=!1;var h=t.memoizedState;a.state=h,Gi(t,r,a,s),c=t.memoizedState,l!==r||h!==c||Ve.current||Ht?(typeof d=="function"&&(rl(t,n,d,r),c=t.memoizedState),(l=Ht||dd(t,n,l,r,h,c,u))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=u,r=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,wp(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:ft(t.type,l),a.props=u,f=t.pendingProps,h=a.context,c=n.contextType,typeof c=="object"&&c!==null?c=it(c):(c=Oe(n)?Mn:Ee.current,c=dr(t,c));var y=n.getDerivedStateFromProps;(d=typeof y=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==f||h!==c)&&fd(t,a,r,c),Ht=!1,h=t.memoizedState,a.state=h,Gi(t,r,a,s);var g=t.memoizedState;l!==f||h!==g||Ve.current||Ht?(typeof y=="function"&&(rl(t,n,y,r),g=t.memoizedState),(u=Ht||dd(t,n,u,r,h,g,c)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,g,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,g,c)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),a.props=r,a.state=g,a.context=c,r=u):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return al(e,t,n,r,o,s)}function al(e,t,n,r,s,o){Gp(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return s&&rd(t,n,!1),Ft(e,t,o);r=t.stateNode,j0.current=t;var l=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=hr(t,e.child,null,o),t.child=hr(t,null,l,o)):Me(e,t,l,o),t.memoizedState=r.state,s&&rd(t,n,!0),t.child}function qp(e){var t=e.stateNode;t.pendingContext?nd(e,t.pendingContext,t.pendingContext!==t.context):t.context&&nd(e,t.context,!1),cc(e,t.containerInfo)}function xd(e,t,n,r,s){return fr(),rc(s),t.flags|=256,Me(e,t,n,r),t.child}var ll={dehydrated:null,treeContext:null,retryLane:0};function cl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Qp(e,t,n){var r=t.pendingProps,s=re.current,o=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),X(re,s&1),e===null)return tl(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=No(a,r,0,null),e=Pn(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=cl(n),t.memoizedState=ll,e):yc(t,a));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return w0(e,t,a,r,l,s,n);if(o){o=r.fallback,a=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:r.children};return!(a&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=rn(s,c),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?o=rn(l,o):(o=Pn(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?cl(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=ll,r}return o=e.child,e=o.sibling,r=rn(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function yc(e,t){return t=No({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ri(e,t,n,r){return r!==null&&rc(r),hr(t,e.child,null,n),e=yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function w0(e,t,n,r,s,o,a){if(n)return t.flags&256?(t.flags&=-257,r=sa(Error(M(422))),ri(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=No({mode:"visible",children:r.children},s,0,null),o=Pn(o,s,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&hr(t,e.child,null,a),t.child.memoizedState=cl(a),t.memoizedState=ll,o);if(!(t.mode&1))return ri(e,t,a,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(M(419)),r=sa(o,r,void 0),ri(e,t,a,r)}if(l=(a&e.childLanes)!==0,ze||l){if(r=ge,r!==null){switch(a&-a){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|a)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,Ot(e,s),vt(r,e,s,-1))}return kc(),r=sa(Error(M(421))),ri(e,t,a,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=L0.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,He=Jt(s.nextSibling),We=t,ne=!0,pt=null,e!==null&&(tt[nt++]=Mt,tt[nt++]=At,tt[nt++]=An,Mt=e.id,At=e.overflow,An=t),t=yc(t,r.children),t.flags|=4096,t)}function jd(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),nl(e.return,t,n)}function ia(e,t,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function Yp(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(Me(e,t,r.children,n),r=re.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&jd(e,n,t);else if(e.tag===19)jd(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(X(re,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&qi(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),ia(t,!1,s,n,o);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&qi(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}ia(t,!0,n,null,o);break;case"together":ia(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ni(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ft(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Dn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(M(153));if(t.child!==null){for(e=t.child,n=rn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=rn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function S0(e,t,n){switch(t.tag){case 3:qp(t),fr();break;case 5:Sp(t);break;case 1:Oe(t.type)&&Bi(t);break;case 4:cc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;X(Wi,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(X(re,re.current&1),t.flags|=128,null):n&t.child.childLanes?Qp(e,t,n):(X(re,re.current&1),e=Ft(e,t,n),e!==null?e.sibling:null);X(re,re.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Yp(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),X(re,re.current),r)break;return null;case 22:case 23:return t.lanes=0,Kp(e,t,n)}return Ft(e,t,n)}var Xp,ul,Zp,Jp;Xp=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ul=function(){};Zp=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Nn(kt.current);var o=null;switch(n){case"input":s=Da(e,s),r=Da(e,r),o=[];break;case"select":s=oe({},s,{value:void 0}),r=oe({},r,{value:void 0}),o=[];break;case"textarea":s=za(e,s),r=za(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=bi)}Oa(n,r);var a;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(as.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var c=r[u];if(l=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(o||(o=[]),o.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(as.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&J("scroll",e),o||l===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};Jp=function(e,t,n,r){n!==r&&(t.flags|=4)};function zr(e,t){if(!ne)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ne(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function k0(e,t,n){var r=t.pendingProps;switch(nc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ne(t),null;case 1:return Oe(t.type)&&$i(),Ne(t),null;case 3:return r=t.stateNode,pr(),ee(Ve),ee(Ee),dc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ti(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,pt!==null&&(gl(pt),pt=null))),ul(e,t),Ne(t),null;case 5:uc(t);var s=Nn(xs.current);if(n=t.type,e!==null&&t.stateNode!=null)Zp(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(M(166));return Ne(t),null}if(e=Nn(kt.current),ti(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[jt]=t,r[ys]=o,e=(t.mode&1)!==0,n){case"dialog":J("cancel",r),J("close",r);break;case"iframe":case"object":case"embed":J("load",r);break;case"video":case"audio":for(s=0;s<$r.length;s++)J($r[s],r);break;case"source":J("error",r);break;case"img":case"image":case"link":J("error",r),J("load",r);break;case"details":J("toggle",r);break;case"input":Mu(r,o),J("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},J("invalid",r);break;case"textarea":Ru(r,o),J("invalid",r)}Oa(n,o),s=null;for(var a in o)if(o.hasOwnProperty(a)){var l=o[a];a==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&ei(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&ei(r.textContent,l,e),s=["children",""+l]):as.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&J("scroll",r)}switch(n){case"input":Ks(r),Au(r,o,!0);break;case"textarea":Ks(r),Du(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=bi)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ph(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[jt]=t,e[ys]=r,Xp(e,t,!1,!1),t.stateNode=e;e:{switch(a=Fa(n,r),n){case"dialog":J("cancel",e),J("close",e),s=r;break;case"iframe":case"object":case"embed":J("load",e),s=r;break;case"video":case"audio":for(s=0;s<$r.length;s++)J($r[s],e);s=r;break;case"source":J("error",e),s=r;break;case"img":case"image":case"link":J("error",e),J("load",e),s=r;break;case"details":J("toggle",e),s=r;break;case"input":Mu(e,r),s=Da(e,r),J("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=oe({},r,{value:void 0}),J("invalid",e);break;case"textarea":Ru(e,r),s=za(e,r),J("invalid",e);break;default:s=r}Oa(n,s),l=s;for(o in l)if(l.hasOwnProperty(o)){var c=l[o];o==="style"?Ah(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Eh(e,c)):o==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&ls(e,c):typeof c=="number"&&ls(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(as.hasOwnProperty(o)?c!=null&&o==="onScroll"&&J("scroll",e):c!=null&&$l(e,o,c,a))}switch(n){case"input":Ks(e),Au(e,r,!1);break;case"textarea":Ks(e),Du(e);break;case"option":r.value!=null&&e.setAttribute("value",""+an(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?rr(e,!!r.multiple,o,!1):r.defaultValue!=null&&rr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=bi)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ne(t),null;case 6:if(e&&t.stateNode!=null)Jp(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(M(166));if(n=Nn(xs.current),Nn(kt.current),ti(t)){if(r=t.stateNode,n=t.memoizedProps,r[jt]=t,(o=r.nodeValue!==n)&&(e=We,e!==null))switch(e.tag){case 3:ei(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ei(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[jt]=t,t.stateNode=r}return Ne(t),null;case 13:if(ee(re),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ne&&He!==null&&t.mode&1&&!(t.flags&128))yp(),fr(),t.flags|=98560,o=!1;else if(o=ti(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(M(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(M(317));o[jt]=t}else fr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ne(t),o=!1}else pt!==null&&(gl(pt),pt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||re.current&1?ve===0&&(ve=3):kc())),t.updateQueue!==null&&(t.flags|=4),Ne(t),null);case 4:return pr(),ul(e,t),e===null&&ms(t.stateNode.containerInfo),Ne(t),null;case 10:return oc(t.type._context),Ne(t),null;case 17:return Oe(t.type)&&$i(),Ne(t),null;case 19:if(ee(re),o=t.memoizedState,o===null)return Ne(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)zr(o,!1);else{if(ve!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=qi(e),a!==null){for(t.flags|=128,zr(o,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return X(re,re.current&1|2),t.child}e=e.sibling}o.tail!==null&&fe()>vr&&(t.flags|=128,r=!0,zr(o,!1),t.lanes=4194304)}else{if(!r)if(e=qi(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),zr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ne)return Ne(t),null}else 2*fe()-o.renderingStartTime>vr&&n!==1073741824&&(t.flags|=128,r=!0,zr(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=fe(),t.sibling=null,n=re.current,X(re,r?n&1|2:n&1),t):(Ne(t),null);case 22:case 23:return Sc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?$e&1073741824&&(Ne(t),t.subtreeFlags&6&&(t.flags|=8192)):Ne(t),null;case 24:return null;case 25:return null}throw Error(M(156,t.tag))}function N0(e,t){switch(nc(t),t.tag){case 1:return Oe(t.type)&&$i(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pr(),ee(Ve),ee(Ee),dc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return uc(t),null;case 13:if(ee(re),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(M(340));fr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ee(re),null;case 4:return pr(),null;case 10:return oc(t.type._context),null;case 22:case 23:return Sc(),null;case 24:return null;default:return null}}var si=!1,Te=!1,C0=typeof WeakSet=="function"?WeakSet:Set,D=null;function qn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ue(e,t,r)}else n.current=null}function dl(e,t,n){try{n()}catch(r){ue(e,t,r)}}var wd=!1;function T0(e,t){if(qa=Oi,e=sp(),ec(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,l=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var y;f!==n||s!==0&&f.nodeType!==3||(l=a+s),f!==o||r!==0&&f.nodeType!==3||(c=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(y=f.firstChild)!==null;)h=f,f=y;for(;;){if(f===e)break t;if(h===n&&++u===s&&(l=a),h===o&&++d===r&&(c=a),(y=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=y}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Qa={focusedElem:e,selectionRange:n},Oi=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var x=g.memoizedProps,C=g.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?x:ft(t.type,x),C);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(M(163))}}catch(S){ue(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return g=wd,wd=!1,g}function Zr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&dl(t,n,o)}s=s.next}while(s!==r)}}function So(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function fl(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function em(e){var t=e.alternate;t!==null&&(e.alternate=null,em(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[jt],delete t[ys],delete t[Za],delete t[l0],delete t[c0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function tm(e){return e.tag===5||e.tag===3||e.tag===4}function Sd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||tm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function hl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bi));else if(r!==4&&(e=e.child,e!==null))for(hl(e,t,n),e=e.sibling;e!==null;)hl(e,t,n),e=e.sibling}function pl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(pl(e,t,n),e=e.sibling;e!==null;)pl(e,t,n),e=e.sibling}var xe=null,ht=!1;function $t(e,t,n){for(n=n.child;n!==null;)nm(e,t,n),n=n.sibling}function nm(e,t,n){if(St&&typeof St.onCommitFiberUnmount=="function")try{St.onCommitFiberUnmount(po,n)}catch{}switch(n.tag){case 5:Te||qn(n,t);case 6:var r=xe,s=ht;xe=null,$t(e,t,n),xe=r,ht=s,xe!==null&&(ht?(e=xe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):xe.removeChild(n.stateNode));break;case 18:xe!==null&&(ht?(e=xe,n=n.stateNode,e.nodeType===8?Zo(e.parentNode,n):e.nodeType===1&&Zo(e,n),fs(e)):Zo(xe,n.stateNode));break;case 4:r=xe,s=ht,xe=n.stateNode.containerInfo,ht=!0,$t(e,t,n),xe=r,ht=s;break;case 0:case 11:case 14:case 15:if(!Te&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&dl(n,t,a),s=s.next}while(s!==r)}$t(e,t,n);break;case 1:if(!Te&&(qn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ue(n,t,l)}$t(e,t,n);break;case 21:$t(e,t,n);break;case 22:n.mode&1?(Te=(r=Te)||n.memoizedState!==null,$t(e,t,n),Te=r):$t(e,t,n);break;default:$t(e,t,n)}}function kd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new C0),t.forEach(function(r){var s=z0.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function ut(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 5:xe=l.stateNode,ht=!1;break e;case 3:xe=l.stateNode.containerInfo,ht=!0;break e;case 4:xe=l.stateNode.containerInfo,ht=!0;break e}l=l.return}if(xe===null)throw Error(M(160));nm(o,a,s),xe=null,ht=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){ue(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)rm(t,e),t=t.sibling}function rm(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ut(t,e),gt(e),r&4){try{Zr(3,e,e.return),So(3,e)}catch(x){ue(e,e.return,x)}try{Zr(5,e,e.return)}catch(x){ue(e,e.return,x)}}break;case 1:ut(t,e),gt(e),r&512&&n!==null&&qn(n,n.return);break;case 5:if(ut(t,e),gt(e),r&512&&n!==null&&qn(n,n.return),e.flags&32){var s=e.stateNode;try{ls(s,"")}catch(x){ue(e,e.return,x)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&Ch(s,o),Fa(l,a);var u=Fa(l,o);for(a=0;a<c.length;a+=2){var d=c[a],f=c[a+1];d==="style"?Ah(s,f):d==="dangerouslySetInnerHTML"?Eh(s,f):d==="children"?ls(s,f):$l(s,d,f,u)}switch(l){case"input":_a(s,o);break;case"textarea":Th(s,o);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var y=o.value;y!=null?rr(s,!!o.multiple,y,!1):h!==!!o.multiple&&(o.defaultValue!=null?rr(s,!!o.multiple,o.defaultValue,!0):rr(s,!!o.multiple,o.multiple?[]:"",!1))}s[ys]=o}catch(x){ue(e,e.return,x)}}break;case 6:if(ut(t,e),gt(e),r&4){if(e.stateNode===null)throw Error(M(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(x){ue(e,e.return,x)}}break;case 3:if(ut(t,e),gt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{fs(t.containerInfo)}catch(x){ue(e,e.return,x)}break;case 4:ut(t,e),gt(e);break;case 13:ut(t,e),gt(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(jc=fe())),r&4&&kd(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Te=(u=Te)||d,ut(t,e),Te=u):ut(t,e),gt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(D=e,d=e.child;d!==null;){for(f=D=d;D!==null;){switch(h=D,y=h.child,h.tag){case 0:case 11:case 14:case 15:Zr(4,h,h.return);break;case 1:qn(h,h.return);var g=h.stateNode;if(typeof g.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(x){ue(r,n,x)}}break;case 5:qn(h,h.return);break;case 22:if(h.memoizedState!==null){Cd(f);continue}}y!==null?(y.return=h,D=y):Cd(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=f.stateNode,c=f.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=Mh("display",a))}catch(x){ue(e,e.return,x)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(x){ue(e,e.return,x)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:ut(t,e),gt(e),r&4&&kd(e);break;case 21:break;default:ut(t,e),gt(e)}}function gt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(tm(n)){var r=n;break e}n=n.return}throw Error(M(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(ls(s,""),r.flags&=-33);var o=Sd(e);pl(e,o,s);break;case 3:case 4:var a=r.stateNode.containerInfo,l=Sd(e);hl(e,l,a);break;default:throw Error(M(161))}}catch(c){ue(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function P0(e,t,n){D=e,sm(e)}function sm(e,t,n){for(var r=(e.mode&1)!==0;D!==null;){var s=D,o=s.child;if(s.tag===22&&r){var a=s.memoizedState!==null||si;if(!a){var l=s.alternate,c=l!==null&&l.memoizedState!==null||Te;l=si;var u=Te;if(si=a,(Te=c)&&!u)for(D=s;D!==null;)a=D,c=a.child,a.tag===22&&a.memoizedState!==null?Td(s):c!==null?(c.return=a,D=c):Td(s);for(;o!==null;)D=o,sm(o),o=o.sibling;D=s,si=l,Te=u}Nd(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,D=o):Nd(e)}}function Nd(e){for(;D!==null;){var t=D;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Te||So(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Te)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:ft(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&ld(t,o,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ld(t,a,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&fs(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(M(163))}Te||t.flags&512&&fl(t)}catch(h){ue(t,t.return,h)}}if(t===e){D=null;break}if(n=t.sibling,n!==null){n.return=t.return,D=n;break}D=t.return}}function Cd(e){for(;D!==null;){var t=D;if(t===e){D=null;break}var n=t.sibling;if(n!==null){n.return=t.return,D=n;break}D=t.return}}function Td(e){for(;D!==null;){var t=D;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{So(4,t)}catch(c){ue(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){ue(t,s,c)}}var o=t.return;try{fl(t)}catch(c){ue(t,o,c)}break;case 5:var a=t.return;try{fl(t)}catch(c){ue(t,a,c)}}}catch(c){ue(t,t.return,c)}if(t===e){D=null;break}var l=t.sibling;if(l!==null){l.return=t.return,D=l;break}D=t.return}}var E0=Math.ceil,Xi=bt.ReactCurrentDispatcher,gc=bt.ReactCurrentOwner,st=bt.ReactCurrentBatchConfig,K=0,ge=null,pe=null,we=0,$e=0,Qn=hn(0),ve=0,ks=null,Dn=0,ko=0,xc=0,Jr=null,Le=null,jc=0,vr=1/0,Pt=null,Zi=!1,ml=null,tn=null,ii=!1,qt=null,Ji=0,es=0,vl=null,Ci=-1,Ti=0;function Ae(){return K&6?fe():Ci!==-1?Ci:Ci=fe()}function nn(e){return e.mode&1?K&2&&we!==0?we&-we:d0.transition!==null?(Ti===0&&(Ti=Bh()),Ti):(e=q,e!==0||(e=window.event,e=e===void 0?16:Qh(e.type)),e):1}function vt(e,t,n,r){if(50<es)throw es=0,vl=null,Error(M(185));_s(e,n,r),(!(K&2)||e!==ge)&&(e===ge&&(!(K&2)&&(ko|=n),ve===4&&Kt(e,we)),Fe(e,r),n===1&&K===0&&!(t.mode&1)&&(vr=fe()+500,xo&&pn()))}function Fe(e,t){var n=e.callbackNode;dg(e,t);var r=Vi(e,e===ge?we:0);if(r===0)n!==null&&zu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&zu(n),t===1)e.tag===0?u0(Pd.bind(null,e)):pp(Pd.bind(null,e)),o0(function(){!(K&6)&&pn()}),n=null;else{switch(Uh(r)){case 1:n=Kl;break;case 4:n=bh;break;case 16:n=zi;break;case 536870912:n=$h;break;default:n=zi}n=fm(n,im.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function im(e,t){if(Ci=-1,Ti=0,K&6)throw Error(M(327));var n=e.callbackNode;if(lr()&&e.callbackNode!==n)return null;var r=Vi(e,e===ge?we:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=eo(e,r);else{t=r;var s=K;K|=2;var o=am();(ge!==e||we!==t)&&(Pt=null,vr=fe()+500,Tn(e,t));do try{R0();break}catch(l){om(e,l)}while(!0);ic(),Xi.current=o,K=s,pe!==null?t=0:(ge=null,we=0,t=ve)}if(t!==0){if(t===2&&(s=Ua(e),s!==0&&(r=s,t=yl(e,s))),t===1)throw n=ks,Tn(e,0),Kt(e,r),Fe(e,fe()),n;if(t===6)Kt(e,r);else{if(s=e.current.alternate,!(r&30)&&!M0(s)&&(t=eo(e,r),t===2&&(o=Ua(e),o!==0&&(r=o,t=yl(e,o))),t===1))throw n=ks,Tn(e,0),Kt(e,r),Fe(e,fe()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(M(345));case 2:xn(e,Le,Pt);break;case 3:if(Kt(e,r),(r&130023424)===r&&(t=jc+500-fe(),10<t)){if(Vi(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Ae(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Xa(xn.bind(null,e,Le,Pt),t);break}xn(e,Le,Pt);break;case 4:if(Kt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var a=31-mt(r);o=1<<a,a=t[a],a>s&&(s=a),r&=~o}if(r=s,r=fe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*E0(r/1960))-r,10<r){e.timeoutHandle=Xa(xn.bind(null,e,Le,Pt),r);break}xn(e,Le,Pt);break;case 5:xn(e,Le,Pt);break;default:throw Error(M(329))}}}return Fe(e,fe()),e.callbackNode===n?im.bind(null,e):null}function yl(e,t){var n=Jr;return e.current.memoizedState.isDehydrated&&(Tn(e,t).flags|=256),e=eo(e,t),e!==2&&(t=Le,Le=n,t!==null&&gl(t)),e}function gl(e){Le===null?Le=e:Le.push.apply(Le,e)}function M0(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],o=s.getSnapshot;s=s.value;try{if(!yt(o(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Kt(e,t){for(t&=~xc,t&=~ko,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-mt(t),r=1<<n;e[n]=-1,t&=~r}}function Pd(e){if(K&6)throw Error(M(327));lr();var t=Vi(e,0);if(!(t&1))return Fe(e,fe()),null;var n=eo(e,t);if(e.tag!==0&&n===2){var r=Ua(e);r!==0&&(t=r,n=yl(e,r))}if(n===1)throw n=ks,Tn(e,0),Kt(e,t),Fe(e,fe()),n;if(n===6)throw Error(M(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,xn(e,Le,Pt),Fe(e,fe()),null}function wc(e,t){var n=K;K|=1;try{return e(t)}finally{K=n,K===0&&(vr=fe()+500,xo&&pn())}}function _n(e){qt!==null&&qt.tag===0&&!(K&6)&&lr();var t=K;K|=1;var n=st.transition,r=q;try{if(st.transition=null,q=1,e)return e()}finally{q=r,st.transition=n,K=t,!(K&6)&&pn()}}function Sc(){$e=Qn.current,ee(Qn)}function Tn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,i0(n)),pe!==null)for(n=pe.return;n!==null;){var r=n;switch(nc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&$i();break;case 3:pr(),ee(Ve),ee(Ee),dc();break;case 5:uc(r);break;case 4:pr();break;case 13:ee(re);break;case 19:ee(re);break;case 10:oc(r.type._context);break;case 22:case 23:Sc()}n=n.return}if(ge=e,pe=e=rn(e.current,null),we=$e=t,ve=0,ks=null,xc=ko=Dn=0,Le=Jr=null,kn!==null){for(t=0;t<kn.length;t++)if(n=kn[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=s,r.next=a}n.pending=r}kn=null}return e}function om(e,t){do{var n=pe;try{if(ic(),Si.current=Yi,Qi){for(var r=ie.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Qi=!1}if(Rn=0,ye=me=ie=null,Xr=!1,js=0,gc.current=null,n===null||n.return===null){ve=1,ks=t,pe=null;break}e:{var o=e,a=n.return,l=n,c=t;if(t=we,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var y=pd(a);if(y!==null){y.flags&=-257,md(y,a,l,o,t),y.mode&1&&hd(o,u,t),t=y,c=u;var g=t.updateQueue;if(g===null){var x=new Set;x.add(c),t.updateQueue=x}else g.add(c);break e}else{if(!(t&1)){hd(o,u,t),kc();break e}c=Error(M(426))}}else if(ne&&l.mode&1){var C=pd(a);if(C!==null){!(C.flags&65536)&&(C.flags|=256),md(C,a,l,o,t),rc(mr(c,l));break e}}o=c=mr(c,l),ve!==4&&(ve=2),Jr===null?Jr=[o]:Jr.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var m=Up(o,c,t);ad(o,m);break e;case 1:l=c;var p=o.type,v=o.stateNode;if(!(o.flags&128)&&(typeof p.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(tn===null||!tn.has(v)))){o.flags|=65536,t&=-t,o.lanes|=t;var S=Hp(o,l,t);ad(o,S);break e}}o=o.return}while(o!==null)}cm(n)}catch(j){t=j,pe===n&&n!==null&&(pe=n=n.return);continue}break}while(!0)}function am(){var e=Xi.current;return Xi.current=Yi,e===null?Yi:e}function kc(){(ve===0||ve===3||ve===2)&&(ve=4),ge===null||!(Dn&268435455)&&!(ko&268435455)||Kt(ge,we)}function eo(e,t){var n=K;K|=2;var r=am();(ge!==e||we!==t)&&(Pt=null,Tn(e,t));do try{A0();break}catch(s){om(e,s)}while(!0);if(ic(),K=n,Xi.current=r,pe!==null)throw Error(M(261));return ge=null,we=0,ve}function A0(){for(;pe!==null;)lm(pe)}function R0(){for(;pe!==null&&!ng();)lm(pe)}function lm(e){var t=dm(e.alternate,e,$e);e.memoizedProps=e.pendingProps,t===null?cm(e):pe=t,gc.current=null}function cm(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=N0(n,t),n!==null){n.flags&=32767,pe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ve=6,pe=null;return}}else if(n=k0(n,t,$e),n!==null){pe=n;return}if(t=t.sibling,t!==null){pe=t;return}pe=t=e}while(t!==null);ve===0&&(ve=5)}function xn(e,t,n){var r=q,s=st.transition;try{st.transition=null,q=1,D0(e,t,n,r)}finally{st.transition=s,q=r}return null}function D0(e,t,n,r){do lr();while(qt!==null);if(K&6)throw Error(M(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(M(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(fg(e,o),e===ge&&(pe=ge=null,we=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ii||(ii=!0,fm(zi,function(){return lr(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=st.transition,st.transition=null;var a=q;q=1;var l=K;K|=4,gc.current=null,T0(e,n),rm(n,e),Zg(Qa),Oi=!!qa,Qa=qa=null,e.current=n,P0(n),rg(),K=l,q=a,st.transition=o}else e.current=n;if(ii&&(ii=!1,qt=e,Ji=s),o=e.pendingLanes,o===0&&(tn=null),og(n.stateNode),Fe(e,fe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Zi)throw Zi=!1,e=ml,ml=null,e;return Ji&1&&e.tag!==0&&lr(),o=e.pendingLanes,o&1?e===vl?es++:(es=0,vl=e):es=0,pn(),null}function lr(){if(qt!==null){var e=Uh(Ji),t=st.transition,n=q;try{if(st.transition=null,q=16>e?16:e,qt===null)var r=!1;else{if(e=qt,qt=null,Ji=0,K&6)throw Error(M(331));var s=K;for(K|=4,D=e.current;D!==null;){var o=D,a=o.child;if(D.flags&16){var l=o.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(D=u;D!==null;){var d=D;switch(d.tag){case 0:case 11:case 15:Zr(8,d,o)}var f=d.child;if(f!==null)f.return=d,D=f;else for(;D!==null;){d=D;var h=d.sibling,y=d.return;if(em(d),d===u){D=null;break}if(h!==null){h.return=y,D=h;break}D=y}}}var g=o.alternate;if(g!==null){var x=g.child;if(x!==null){g.child=null;do{var C=x.sibling;x.sibling=null,x=C}while(x!==null)}}D=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,D=a;else e:for(;D!==null;){if(o=D,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Zr(9,o,o.return)}var m=o.sibling;if(m!==null){m.return=o.return,D=m;break e}D=o.return}}var p=e.current;for(D=p;D!==null;){a=D;var v=a.child;if(a.subtreeFlags&2064&&v!==null)v.return=a,D=v;else e:for(a=p;D!==null;){if(l=D,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:So(9,l)}}catch(j){ue(l,l.return,j)}if(l===a){D=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,D=S;break e}D=l.return}}if(K=s,pn(),St&&typeof St.onPostCommitFiberRoot=="function")try{St.onPostCommitFiberRoot(po,e)}catch{}r=!0}return r}finally{q=n,st.transition=t}}return!1}function Ed(e,t,n){t=mr(n,t),t=Up(e,t,1),e=en(e,t,1),t=Ae(),e!==null&&(_s(e,1,t),Fe(e,t))}function ue(e,t,n){if(e.tag===3)Ed(e,e,n);else for(;t!==null;){if(t.tag===3){Ed(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(tn===null||!tn.has(r))){e=mr(n,e),e=Hp(t,e,1),t=en(t,e,1),e=Ae(),t!==null&&(_s(t,1,e),Fe(t,e));break}}t=t.return}}function _0(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ae(),e.pingedLanes|=e.suspendedLanes&n,ge===e&&(we&n)===n&&(ve===4||ve===3&&(we&130023424)===we&&500>fe()-jc?Tn(e,0):xc|=n),Fe(e,t)}function um(e,t){t===0&&(e.mode&1?(t=Qs,Qs<<=1,!(Qs&130023424)&&(Qs=4194304)):t=1);var n=Ae();e=Ot(e,t),e!==null&&(_s(e,t,n),Fe(e,n))}function L0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),um(e,n)}function z0(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(M(314))}r!==null&&r.delete(t),um(e,n)}var dm;dm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ve.current)ze=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ze=!1,S0(e,t,n);ze=!!(e.flags&131072)}else ze=!1,ne&&t.flags&1048576&&mp(t,Hi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ni(e,t),e=t.pendingProps;var s=dr(t,Ee.current);ar(t,n),s=hc(null,t,r,e,s,n);var o=pc();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Oe(r)?(o=!0,Bi(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,lc(t),s.updater=wo,t.stateNode=s,s._reactInternals=t,sl(t,r,e,n),t=al(null,t,r,!0,o,n)):(t.tag=0,ne&&o&&tc(t),Me(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ni(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=O0(r),e=ft(r,e),s){case 0:t=ol(null,t,r,e,n);break e;case 1:t=gd(null,t,r,e,n);break e;case 11:t=vd(null,t,r,e,n);break e;case 14:t=yd(null,t,r,ft(r.type,e),n);break e}throw Error(M(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ft(r,s),ol(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ft(r,s),gd(e,t,r,s,n);case 3:e:{if(qp(t),e===null)throw Error(M(387));r=t.pendingProps,o=t.memoizedState,s=o.element,wp(e,t),Gi(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=mr(Error(M(423)),t),t=xd(e,t,r,n,s);break e}else if(r!==s){s=mr(Error(M(424)),t),t=xd(e,t,r,n,s);break e}else for(He=Jt(t.stateNode.containerInfo.firstChild),We=t,ne=!0,pt=null,n=xp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(fr(),r===s){t=Ft(e,t,n);break e}Me(e,t,r,n)}t=t.child}return t;case 5:return Sp(t),e===null&&tl(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,a=s.children,Ya(r,s)?a=null:o!==null&&Ya(r,o)&&(t.flags|=32),Gp(e,t),Me(e,t,a,n),t.child;case 6:return e===null&&tl(t),null;case 13:return Qp(e,t,n);case 4:return cc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=hr(t,null,r,n):Me(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ft(r,s),vd(e,t,r,s,n);case 7:return Me(e,t,t.pendingProps,n),t.child;case 8:return Me(e,t,t.pendingProps.children,n),t.child;case 12:return Me(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,a=s.value,X(Wi,r._currentValue),r._currentValue=a,o!==null)if(yt(o.value,a)){if(o.children===s.children&&!Ve.current){t=Ft(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){a=o.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=Rt(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),nl(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(M(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),nl(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Me(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,ar(t,n),s=it(s),r=r(s),t.flags|=1,Me(e,t,r,n),t.child;case 14:return r=t.type,s=ft(r,t.pendingProps),s=ft(r.type,s),yd(e,t,r,s,n);case 15:return Wp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ft(r,s),Ni(e,t),t.tag=1,Oe(r)?(e=!0,Bi(t)):e=!1,ar(t,n),Bp(t,r,s),sl(t,r,s,n),al(null,t,r,!0,e,n);case 19:return Yp(e,t,n);case 22:return Kp(e,t,n)}throw Error(M(156,t.tag))};function fm(e,t){return Ih(e,t)}function V0(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,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 rt(e,t,n,r){return new V0(e,t,n,r)}function Nc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function O0(e){if(typeof e=="function")return Nc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ul)return 11;if(e===Hl)return 14}return 2}function rn(e,t){var n=e.alternate;return n===null?(n=rt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Pi(e,t,n,r,s,o){var a=2;if(r=e,typeof e=="function")Nc(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case In:return Pn(n.children,s,o,t);case Bl:a=8,s|=8;break;case Ea:return e=rt(12,n,t,s|2),e.elementType=Ea,e.lanes=o,e;case Ma:return e=rt(13,n,t,s),e.elementType=Ma,e.lanes=o,e;case Aa:return e=rt(19,n,t,s),e.elementType=Aa,e.lanes=o,e;case Sh:return No(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case jh:a=10;break e;case wh:a=9;break e;case Ul:a=11;break e;case Hl:a=14;break e;case Ut:a=16,r=null;break e}throw Error(M(130,e==null?e:typeof e,""))}return t=rt(a,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function Pn(e,t,n,r){return e=rt(7,e,r,t),e.lanes=n,e}function No(e,t,n,r){return e=rt(22,e,r,t),e.elementType=Sh,e.lanes=n,e.stateNode={isHidden:!1},e}function oa(e,t,n){return e=rt(6,e,null,t),e.lanes=n,e}function aa(e,t,n){return t=rt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function F0(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=$o(0),this.expirationTimes=$o(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$o(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Cc(e,t,n,r,s,o,a,l,c){return e=new F0(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=rt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},lc(o),e}function I0(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Fn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function hm(e){if(!e)return ln;e=e._reactInternals;e:{if(zn(e)!==e||e.tag!==1)throw Error(M(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Oe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(M(171))}if(e.tag===1){var n=e.type;if(Oe(n))return hp(e,n,t)}return t}function pm(e,t,n,r,s,o,a,l,c){return e=Cc(n,r,!0,e,s,o,a,l,c),e.context=hm(null),n=e.current,r=Ae(),s=nn(n),o=Rt(r,s),o.callback=t??null,en(n,o,s),e.current.lanes=s,_s(e,s,r),Fe(e,r),e}function Co(e,t,n,r){var s=t.current,o=Ae(),a=nn(s);return n=hm(n),t.context===null?t.context=n:t.pendingContext=n,t=Rt(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=en(s,t,a),e!==null&&(vt(e,s,a,o),wi(e,s,a)),a}function to(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Md(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Tc(e,t){Md(e,t),(e=e.alternate)&&Md(e,t)}function b0(){return null}var mm=typeof reportError=="function"?reportError:function(e){console.error(e)};function Pc(e){this._internalRoot=e}To.prototype.render=Pc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(M(409));Co(e,t,null,null)};To.prototype.unmount=Pc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_n(function(){Co(null,e,null,null)}),t[Vt]=null}};function To(e){this._internalRoot=e}To.prototype.unstable_scheduleHydration=function(e){if(e){var t=Kh();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Wt.length&&t!==0&&t<Wt[n].priority;n++);Wt.splice(n,0,e),n===0&&qh(e)}};function Ec(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Po(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ad(){}function $0(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var u=to(a);o.call(u)}}var a=pm(t,r,e,0,null,!1,!1,"",Ad);return e._reactRootContainer=a,e[Vt]=a.current,ms(e.nodeType===8?e.parentNode:e),_n(),a}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var u=to(c);l.call(u)}}var c=Cc(e,0,!1,null,null,!1,!1,"",Ad);return e._reactRootContainer=c,e[Vt]=c.current,ms(e.nodeType===8?e.parentNode:e),_n(function(){Co(t,c,n,r)}),c}function Eo(e,t,n,r,s){var o=n._reactRootContainer;if(o){var a=o;if(typeof s=="function"){var l=s;s=function(){var c=to(a);l.call(c)}}Co(t,a,e,s)}else a=$0(n,t,e,s,r);return to(a)}Hh=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=br(t.pendingLanes);n!==0&&(Gl(t,n|1),Fe(t,fe()),!(K&6)&&(vr=fe()+500,pn()))}break;case 13:_n(function(){var r=Ot(e,1);if(r!==null){var s=Ae();vt(r,e,1,s)}}),Tc(e,1)}};ql=function(e){if(e.tag===13){var t=Ot(e,134217728);if(t!==null){var n=Ae();vt(t,e,134217728,n)}Tc(e,134217728)}};Wh=function(e){if(e.tag===13){var t=nn(e),n=Ot(e,t);if(n!==null){var r=Ae();vt(n,e,t,r)}Tc(e,t)}};Kh=function(){return q};Gh=function(e,t){var n=q;try{return q=e,t()}finally{q=n}};ba=function(e,t,n){switch(t){case"input":if(_a(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=go(r);if(!s)throw Error(M(90));Nh(r),_a(r,s)}}}break;case"textarea":Th(e,n);break;case"select":t=n.value,t!=null&&rr(e,!!n.multiple,t,!1)}};_h=wc;Lh=_n;var B0={usingClientEntryPoint:!1,Events:[zs,Un,go,Rh,Dh,wc]},Vr={findFiberByHostInstance:Sn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},U0={bundleType:Vr.bundleType,version:Vr.version,rendererPackageName:Vr.rendererPackageName,rendererConfig:Vr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:bt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Oh(e),e===null?null:e.stateNode},findFiberByHostInstance:Vr.findFiberByHostInstance||b0,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var oi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oi.isDisabled&&oi.supportsFiber)try{po=oi.inject(U0),St=oi}catch{}}Ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B0;Ye.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ec(t))throw Error(M(200));return I0(e,t,null,n)};Ye.createRoot=function(e,t){if(!Ec(e))throw Error(M(299));var n=!1,r="",s=mm;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Cc(e,1,!1,null,null,n,!1,r,s),e[Vt]=t.current,ms(e.nodeType===8?e.parentNode:e),new Pc(t)};Ye.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(M(188)):(e=Object.keys(e).join(","),Error(M(268,e)));return e=Oh(t),e=e===null?null:e.stateNode,e};Ye.flushSync=function(e){return _n(e)};Ye.hydrate=function(e,t,n){if(!Po(t))throw Error(M(200));return Eo(null,e,t,!0,n)};Ye.hydrateRoot=function(e,t,n){if(!Ec(e))throw Error(M(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",a=mm;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=pm(t,null,e,1,n??null,s,!1,o,a),e[Vt]=t.current,ms(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new To(t)};Ye.render=function(e,t,n){if(!Po(t))throw Error(M(200));return Eo(null,e,t,!1,n)};Ye.unmountComponentAtNode=function(e){if(!Po(e))throw Error(M(40));return e._reactRootContainer?(_n(function(){Eo(null,null,e,!1,function(){e._reactRootContainer=null,e[Vt]=null})}),!0):!1};Ye.unstable_batchedUpdates=wc;Ye.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Po(n))throw Error(M(200));if(e==null||e._reactInternals===void 0)throw Error(M(38));return Eo(e,t,n,!1,r)};Ye.version="18.3.1-next-f1338f8080-20240426";function vm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(vm)}catch(e){console.error(e)}}vm(),vh.exports=Ye;var H0=vh.exports,Rd=H0;Ta.createRoot=Rd.createRoot,Ta.hydrateRoot=Rd.hydrateRoot;/**
41
+ * @license lucide-react v0.441.0 - ISC
42
+ *
43
+ * This source code is licensed under the ISC license.
44
+ * See the LICENSE file in the root directory of this source tree.
45
+ */const W0=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ym=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
46
+ * @license lucide-react v0.441.0 - ISC
47
+ *
48
+ * This source code is licensed under the ISC license.
49
+ * See the LICENSE file in the root directory of this source tree.
50
+ */var K0={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"};/**
51
+ * @license lucide-react v0.441.0 - ISC
52
+ *
53
+ * This source code is licensed under the ISC license.
54
+ * See the LICENSE file in the root directory of this source tree.
55
+ */const G0=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:a,...l},c)=>w.createElement("svg",{ref:c,...K0,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ym("lucide",s),...l},[...a.map(([u,d])=>w.createElement(u,d)),...Array.isArray(o)?o:[o]]));/**
56
+ * @license lucide-react v0.441.0 - ISC
57
+ *
58
+ * This source code is licensed under the ISC license.
59
+ * See the LICENSE file in the root directory of this source tree.
60
+ */const O=(e,t)=>{const n=w.forwardRef(({className:r,...s},o)=>w.createElement(G0,{ref:o,iconNode:t,className:ym(`lucide-${W0(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
61
+ * @license lucide-react v0.441.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */const Dt=O("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
66
+ * @license lucide-react v0.441.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */const no=O("ArrowRightLeft",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);/**
71
+ * @license lucide-react v0.441.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const Yn=O("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
76
+ * @license lucide-react v0.441.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const at=O("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
81
+ * @license lucide-react v0.441.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const gm=O("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
86
+ * @license lucide-react v0.441.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const q0=O("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
91
+ * @license lucide-react v0.441.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const yr=O("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
96
+ * @license lucide-react v0.441.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const cn=O("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
101
+ * @license lucide-react v0.441.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const Ns=O("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"}]]);/**
106
+ * @license lucide-react v0.441.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const Nt=O("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
111
+ * @license lucide-react v0.441.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const xm=O("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
116
+ * @license lucide-react v0.441.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const Q0=O("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"}]]);/**
121
+ * @license lucide-react v0.441.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const Cs=O("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"}]]);/**
126
+ * @license lucide-react v0.441.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const Ei=O("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
131
+ * @license lucide-react v0.441.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const gr=O("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
136
+ * @license lucide-react v0.441.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const Mc=O("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/**
141
+ * @license lucide-react v0.441.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const Y0=O("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"}]]);/**
146
+ * @license lucide-react v0.441.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const X0=O("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
151
+ * @license lucide-react v0.441.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const Z0=O("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/**
156
+ * @license lucide-react v0.441.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const Os=O("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
161
+ * @license lucide-react v0.441.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const J0=O("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"}]]);/**
166
+ * @license lucide-react v0.441.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const ex=O("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"}]]);/**
171
+ * @license lucide-react v0.441.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */const wt=O("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);/**
176
+ * @license lucide-react v0.441.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ */const Ac=O("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
181
+ * @license lucide-react v0.441.0 - ISC
182
+ *
183
+ * This source code is licensed under the ISC license.
184
+ * See the LICENSE file in the root directory of this source tree.
185
+ */const xr=O("Flag",[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]]);/**
186
+ * @license lucide-react v0.441.0 - ISC
187
+ *
188
+ * This source code is licensed under the ISC license.
189
+ * See the LICENSE file in the root directory of this source tree.
190
+ */const tx=O("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
191
+ * @license lucide-react v0.441.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ */const Fs=O("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
196
+ * @license lucide-react v0.441.0 - ISC
197
+ *
198
+ * This source code is licensed under the ISC license.
199
+ * See the LICENSE file in the root directory of this source tree.
200
+ */const nx=O("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
201
+ * @license lucide-react v0.441.0 - ISC
202
+ *
203
+ * This source code is licensed under the ISC license.
204
+ * See the LICENSE file in the root directory of this source tree.
205
+ */const Dd=O("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
206
+ * @license lucide-react v0.441.0 - ISC
207
+ *
208
+ * This source code is licensed under the ISC license.
209
+ * See the LICENSE file in the root directory of this source tree.
210
+ */const rx=O("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
211
+ * @license lucide-react v0.441.0 - ISC
212
+ *
213
+ * This source code is licensed under the ISC license.
214
+ * See the LICENSE file in the root directory of this source tree.
215
+ */const sx=O("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
216
+ * @license lucide-react v0.441.0 - ISC
217
+ *
218
+ * This source code is licensed under the ISC license.
219
+ * See the LICENSE file in the root directory of this source tree.
220
+ */const _d=O("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
221
+ * @license lucide-react v0.441.0 - ISC
222
+ *
223
+ * This source code is licensed under the ISC license.
224
+ * See the LICENSE file in the root directory of this source tree.
225
+ */const sn=O("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
226
+ * @license lucide-react v0.441.0 - ISC
227
+ *
228
+ * This source code is licensed under the ISC license.
229
+ * See the LICENSE file in the root directory of this source tree.
230
+ */const jm=O("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
231
+ * @license lucide-react v0.441.0 - ISC
232
+ *
233
+ * This source code is licensed under the ISC license.
234
+ * See the LICENSE file in the root directory of this source tree.
235
+ */const wm=O("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
236
+ * @license lucide-react v0.441.0 - ISC
237
+ *
238
+ * This source code is licensed under the ISC license.
239
+ * See the LICENSE file in the root directory of this source tree.
240
+ */const ix=O("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
241
+ * @license lucide-react v0.441.0 - ISC
242
+ *
243
+ * This source code is licensed under the ISC license.
244
+ * See the LICENSE file in the root directory of this source tree.
245
+ */const ox=O("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
246
+ * @license lucide-react v0.441.0 - ISC
247
+ *
248
+ * This source code is licensed under the ISC license.
249
+ * See the LICENSE file in the root directory of this source tree.
250
+ */const ax=O("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 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 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
251
+ * @license lucide-react v0.441.0 - ISC
252
+ *
253
+ * This source code is licensed under the ISC license.
254
+ * See the LICENSE file in the root directory of this source tree.
255
+ */const qe=O("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"}]]);/**
256
+ * @license lucide-react v0.441.0 - ISC
257
+ *
258
+ * This source code is licensed under the ISC license.
259
+ * See the LICENSE file in the root directory of this source tree.
260
+ */const lx=O("ScanSearch",[["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"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]]);/**
261
+ * @license lucide-react v0.441.0 - ISC
262
+ *
263
+ * This source code is licensed under the ISC license.
264
+ * See the LICENSE file in the root directory of this source tree.
265
+ */const Rc=O("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
266
+ * @license lucide-react v0.441.0 - ISC
267
+ *
268
+ * This source code is licensed under the ISC license.
269
+ * See the LICENSE file in the root directory of this source tree.
270
+ */const Sm=O("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"}]]);/**
271
+ * @license lucide-react v0.441.0 - ISC
272
+ *
273
+ * This source code is licensed under the ISC license.
274
+ * See the LICENSE file in the root directory of this source tree.
275
+ */const cr=O("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
276
+ * @license lucide-react v0.441.0 - ISC
277
+ *
278
+ * This source code is licensed under the ISC license.
279
+ * See the LICENSE file in the root directory of this source tree.
280
+ */const ts=O("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
281
+ * @license lucide-react v0.441.0 - ISC
282
+ *
283
+ * This source code is licensed under the ISC license.
284
+ * See the LICENSE file in the root directory of this source tree.
285
+ */const cx=O("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
286
+ * @license lucide-react v0.441.0 - ISC
287
+ *
288
+ * This source code is licensed under the ISC license.
289
+ * See the LICENSE file in the root directory of this source tree.
290
+ */const ux=O("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
291
+ * @license lucide-react v0.441.0 - ISC
292
+ *
293
+ * This source code is licensed under the ISC license.
294
+ * See the LICENSE file in the root directory of this source tree.
295
+ */const dx=O("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
296
+ * @license lucide-react v0.441.0 - ISC
297
+ *
298
+ * This source code is licensed under the ISC license.
299
+ * See the LICENSE file in the root directory of this source tree.
300
+ */const ro=O("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
301
+ * @license lucide-react v0.441.0 - ISC
302
+ *
303
+ * This source code is licensed under the ISC license.
304
+ * See the LICENSE file in the root directory of this source tree.
305
+ */const km=O("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"}]]);/**
306
+ * @license lucide-react v0.441.0 - ISC
307
+ *
308
+ * This source code is licensed under the ISC license.
309
+ * See the LICENSE file in the root directory of this source tree.
310
+ */const Dc=O("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
311
+ * @license lucide-react v0.441.0 - ISC
312
+ *
313
+ * This source code is licensed under the ISC license.
314
+ * See the LICENSE file in the root directory of this source tree.
315
+ */const Nm=O("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
316
+ * @license lucide-react v0.441.0 - ISC
317
+ *
318
+ * This source code is licensed under the ISC license.
319
+ * See the LICENSE file in the root directory of this source tree.
320
+ */const Ie=O("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
321
+ * @license lucide-react v0.441.0 - ISC
322
+ *
323
+ * This source code is licensed under the ISC license.
324
+ * See the LICENSE file in the root directory of this source tree.
325
+ */const fx=O("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
326
+ * @license lucide-react v0.441.0 - ISC
327
+ *
328
+ * This source code is licensed under the ISC license.
329
+ * See the LICENSE file in the root directory of this source tree.
330
+ */const jr=O("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
331
+ * @license lucide-react v0.441.0 - ISC
332
+ *
333
+ * This source code is licensed under the ISC license.
334
+ * See the LICENSE file in the root directory of this source tree.
335
+ */const _c=O("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
336
+ * @license lucide-react v0.441.0 - ISC
337
+ *
338
+ * This source code is licensed under the ISC license.
339
+ * See the LICENSE file in the root directory of this source tree.
340
+ */const Qt=O("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Lc=w.createContext({});function zc(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const Mo=w.createContext(null),Vc=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class hx extends w.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function px({children:e,isPresent:t}){const n=w.useId(),r=w.useRef(null),s=w.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=w.useContext(Vc);return w.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:u}=s.current;if(t||!r.current||!a||!l)return;r.current.dataset.motionPopId=n;const d=document.createElement("style");return o&&(d.nonce=o),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(`
341
+ [data-motion-pop-id="${n}"] {
342
+ position: absolute !important;
343
+ width: ${a}px !important;
344
+ height: ${l}px !important;
345
+ top: ${c}px !important;
346
+ left: ${u}px !important;
347
+ }
348
+ `),()=>{document.head.removeChild(d)}},[t]),i.jsx(hx,{isPresent:t,childRef:r,sizeRef:s,children:w.cloneElement(e,{ref:r})})}const mx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:a})=>{const l=zc(vx),c=w.useId(),u=w.useCallback(f=>{l.set(f,!0);for(const h of l.values())if(!h)return;r&&r()},[l,r]),d=w.useMemo(()=>({id:c,initial:t,isPresent:n,custom:s,onExitComplete:u,register:f=>(l.set(f,!1),()=>l.delete(f))}),o?[Math.random(),u]:[n,u]);return w.useMemo(()=>{l.forEach((f,h)=>l.set(h,!1))},[n]),w.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=i.jsx(px,{isPresent:n,children:e})),i.jsx(Mo.Provider,{value:d,children:e})};function vx(){return new Map}function Cm(e=!0){const t=w.useContext(Mo);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=w.useId();w.useEffect(()=>{e&&s(o)},[e]);const a=w.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,a]:[!0]}const ai=e=>e.key||"";function Ld(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const Oc=typeof window<"u",Tm=Oc?w.useLayoutEffect:w.useEffect,yx=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:a=!1})=>{const[l,c]=Cm(a),u=w.useMemo(()=>Ld(e),[e]),d=a&&!l?[]:u.map(ai),f=w.useRef(!0),h=w.useRef(u),y=zc(()=>new Map),[g,x]=w.useState(u),[C,m]=w.useState(u);Tm(()=>{f.current=!1,h.current=u;for(let S=0;S<C.length;S++){const j=ai(C[S]);d.includes(j)?y.delete(j):y.get(j)!==!0&&y.set(j,!1)}},[C,d.length,d.join("-")]);const p=[];if(u!==g){let S=[...u];for(let j=0;j<C.length;j++){const k=C[j],N=ai(k);d.includes(N)||(S.splice(j,0,k),p.push(k))}o==="wait"&&p.length&&(S=p),m(Ld(S)),x(u);return}const{forceRender:v}=w.useContext(Lc);return i.jsx(i.Fragment,{children:C.map(S=>{const j=ai(S),k=a&&!l?!1:u===C||d.includes(j),N=()=>{if(y.has(j))y.set(j,!0);else return;let T=!0;y.forEach(R=>{R||(T=!1)}),T&&(v==null||v(),m(h.current),a&&(c==null||c()),r&&r())};return i.jsx(mx,{isPresent:k,initial:!f.current||n?void 0:!1,custom:k?void 0:t,presenceAffectsLayout:s,mode:o,onExitComplete:k?void 0:N,children:S},j)})})},Ke=e=>e;let Pm=Ke;function Fc(e){let t;return()=>(t===void 0&&(t=e()),t)}const wr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},_t=e=>e*1e3,Lt=e=>e/1e3,gx={useManualTiming:!1};function xx(e){let t=new Set,n=new Set,r=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){o.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const y=f&&r?t:n;return d&&o.add(u),y.has(u)||y.add(u),u},cancel:u=>{n.delete(u),o.delete(u)},process:u=>{if(a=u,r){s=!0;return}r=!0,[t,n]=[n,t],t.forEach(l),t.clear(),r=!1,s&&(s=!1,c.process(u))}};return c}const li=["read","resolveKeyframes","update","preRender","render","postRender"],jx=40;function Em(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=li.reduce((m,p)=>(m[p]=xx(o),m),{}),{read:l,resolveKeyframes:c,update:u,preRender:d,render:f,postRender:h}=a,y=()=>{const m=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(m-s.timestamp,jx),1),s.timestamp=m,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),d.process(s),f.process(s),h.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(y))},g=()=>{n=!0,r=!0,s.isProcessing||e(y)};return{schedule:li.reduce((m,p)=>{const v=a[p];return m[p]=(S,j=!1,k=!1)=>(n||g(),v.schedule(S,j,k)),m},{}),cancel:m=>{for(let p=0;p<li.length;p++)a[li[p]].cancel(m)},state:s,steps:a}}const{schedule:te,cancel:un,state:je,steps:la}=Em(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ke,!0),Mm=w.createContext({strict:!1}),zd={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Sr={};for(const e in zd)Sr[e]={isEnabled:t=>zd[e].some(n=>!!t[n])};function wx(e){for(const t in e)Sr[t]={...Sr[t],...e[t]}}const Sx=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function so(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Sx.has(e)}let Am=e=>!so(e);function kx(e){e&&(Am=t=>t.startsWith("on")?!so(t):e(t))}try{kx(require("@emotion/is-prop-valid").default)}catch{}function Nx(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(Am(s)||n===!0&&so(s)||!t&&!so(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function Cx(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const Ao=w.createContext({});function Ts(e){return typeof e=="string"||Array.isArray(e)}function Ro(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Ic=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bc=["initial",...Ic];function Do(e){return Ro(e.animate)||bc.some(t=>Ts(e[t]))}function Rm(e){return!!(Do(e)||e.variants)}function Tx(e,t){if(Do(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ts(n)?n:void 0,animate:Ts(r)?r:void 0}}return e.inherit!==!1?t:{}}function Px(e){const{initial:t,animate:n}=Tx(e,w.useContext(Ao));return w.useMemo(()=>({initial:t,animate:n}),[Vd(t),Vd(n)])}function Vd(e){return Array.isArray(e)?e.join(" "):e}const Ex=Symbol.for("motionComponentSymbol");function Xn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Mx(e,t,n){return w.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Xn(n)&&(n.current=r))},[t])}const $c=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ax="framerAppearId",Dm="data-"+$c(Ax),{schedule:Bc}=Em(queueMicrotask,!1),_m=w.createContext({});function Rx(e,t,n,r,s){var o,a;const{visualElement:l}=w.useContext(Ao),c=w.useContext(Mm),u=w.useContext(Mo),d=w.useContext(Vc).reducedMotion,f=w.useRef(null);r=r||c.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const h=f.current,y=w.useContext(_m);h&&!h.projection&&s&&(h.type==="html"||h.type==="svg")&&Dx(f.current,n,s,y);const g=w.useRef(!1);w.useInsertionEffect(()=>{h&&g.current&&h.update(n,u)});const x=n[Dm],C=w.useRef(!!x&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,x))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,x)));return Tm(()=>{h&&(g.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),Bc.render(h.render),C.current&&h.animationState&&h.animationState.animateChanges())}),w.useEffect(()=>{h&&(!C.current&&h.animationState&&h.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{var m;(m=window.MotionHandoffMarkAsComplete)===null||m===void 0||m.call(window,x)}),C.current=!1))}),h}function Dx(e,t,n,r){const{layoutId:s,layout:o,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Lm(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!a||l&&Xn(l),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:u})}function Lm(e){if(e)return e.options.allowProjection!==!1?e.projection:Lm(e.parent)}function _x({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var o,a;e&&wx(e);function l(u,d){let f;const h={...w.useContext(Vc),...u,layoutId:Lx(u)},{isStatic:y}=h,g=Px(u),x=r(u,y);if(!y&&Oc){zx();const C=Vx(h);f=C.MeasureLayout,g.visualElement=Rx(s,x,h,t,C.ProjectionNode)}return i.jsxs(Ao.Provider,{value:g,children:[f&&g.visualElement?i.jsx(f,{visualElement:g.visualElement,...h}):null,n(s,u,Mx(x,g.visualElement,d),x,y,g.visualElement)]})}l.displayName=`motion.${typeof s=="string"?s:`create(${(a=(o=s.displayName)!==null&&o!==void 0?o:s.name)!==null&&a!==void 0?a:""})`}`;const c=w.forwardRef(l);return c[Ex]=s,c}function Lx({layoutId:e}){const t=w.useContext(Lc).id;return t&&e!==void 0?t+"-"+e:e}function zx(e,t){w.useContext(Mm).strict}function Vx(e){const{drag:t,layout:n}=Sr;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Ox=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Uc(e){return typeof e!="string"||e.includes("-")?!1:!!(Ox.indexOf(e)>-1||/[A-Z]/u.test(e))}function Od(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Hc(e,t,n,r){if(typeof t=="function"){const[s,o]=Od(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=Od(r);t=t(n!==void 0?n:e.custom,s,o)}return t}const xl=e=>Array.isArray(e),Fx=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Ix=e=>xl(e)?e[e.length-1]||0:e,Pe=e=>!!(e&&e.getVelocity);function Mi(e){const t=Pe(e)?e.get():e;return Fx(t)?t.toValue():t}function bx({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,o){const a={latestValues:$x(r,s,o,e),renderState:t()};return n&&(a.onMount=l=>n({props:r,current:l,...a}),a.onUpdate=l=>n(l)),a}const zm=e=>(t,n)=>{const r=w.useContext(Ao),s=w.useContext(Mo),o=()=>bx(e,t,r,s);return n?o():zc(o)};function $x(e,t,n,r){const s={},o=r(e,{});for(const h in o)s[h]=Mi(o[h]);let{initial:a,animate:l}=e;const c=Do(e),u=Rm(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const f=d?l:a;if(f&&typeof f!="boolean"&&!Ro(f)){const h=Array.isArray(f)?f:[f];for(let y=0;y<h.length;y++){const g=Hc(e,h[y]);if(g){const{transitionEnd:x,transition:C,...m}=g;for(const p in m){let v=m[p];if(Array.isArray(v)){const S=d?v.length-1:0;v=v[S]}v!==null&&(s[p]=v)}for(const p in x)s[p]=x[p]}}}return s}const Pr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Vn=new Set(Pr),Vm=e=>t=>typeof t=="string"&&t.startsWith(e),Om=Vm("--"),Bx=Vm("var(--"),Wc=e=>Bx(e)?Ux.test(e.split("/*")[0].trim()):!1,Ux=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Fm=(e,t)=>t&&typeof e=="number"?t.transform(e):e,It=(e,t,n)=>n>t?t:n<e?e:n,Er={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ps={...Er,transform:e=>It(0,1,e)},ci={...Er,default:1},Is=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Bt=Is("deg"),Ct=Is("%"),F=Is("px"),Hx=Is("vh"),Wx=Is("vw"),Fd={...Ct,parse:e=>Ct.parse(e)/100,transform:e=>Ct.transform(e*100)},Kx={borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,radius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,top:F,right:F,bottom:F,left:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,backgroundPositionX:F,backgroundPositionY:F},Gx={rotate:Bt,rotateX:Bt,rotateY:Bt,rotateZ:Bt,scale:ci,scaleX:ci,scaleY:ci,scaleZ:ci,skew:Bt,skewX:Bt,skewY:Bt,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:Ps,originX:Fd,originY:Fd,originZ:F},Id={...Er,transform:Math.round},Kc={...Kx,...Gx,zIndex:Id,size:F,fillOpacity:Ps,strokeOpacity:Ps,numOctaves:Id},qx={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qx=Pr.length;function Yx(e,t,n){let r="",s=!0;for(let o=0;o<Qx;o++){const a=Pr[o],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(a.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=Fm(l,Kc[a]);if(!c){s=!1;const d=qx[a]||a;r+=`${d}(${u}) `}n&&(t[a]=u)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function Gc(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let a=!1,l=!1;for(const c in t){const u=t[c];if(Vn.has(c)){a=!0;continue}else if(Om(c)){s[c]=u;continue}else{const d=Fm(u,Kc[c]);c.startsWith("origin")?(l=!0,o[c]=d):r[c]=d}}if(t.transform||(a||n?r.transform=Yx(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=o;r.transformOrigin=`${c} ${u} ${d}`}}const Xx={offset:"stroke-dashoffset",array:"stroke-dasharray"},Zx={offset:"strokeDashoffset",array:"strokeDasharray"};function Jx(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?Xx:Zx;e[o.offset]=F.transform(-r);const a=F.transform(t),l=F.transform(n);e[o.array]=`${a} ${l}`}function bd(e,t,n){return typeof e=="string"?e:F.transform(t+n*e)}function e1(e,t,n){const r=bd(t,e.x,e.width),s=bd(n,e.y,e.height);return`${r} ${s}`}function qc(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:o,pathLength:a,pathSpacing:l=1,pathOffset:c=0,...u},d,f){if(Gc(e,u,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:y,dimensions:g}=e;h.transform&&(g&&(y.transform=h.transform),delete h.transform),g&&(s!==void 0||o!==void 0||y.transform)&&(y.transformOrigin=e1(g,s!==void 0?s:.5,o!==void 0?o:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),a!==void 0&&Jx(h,a,l,c,!1)}const Qc=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Im=()=>({...Qc(),attrs:{}}),Yc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function bm(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const $m=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Bm(e,t,n,r){bm(e,t,void 0,r);for(const s in t.attrs)e.setAttribute($m.has(s)?s:$c(s),t.attrs[s])}const io={};function t1(e){Object.assign(io,e)}function Um(e,{layout:t,layoutId:n}){return Vn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!io[e]||e==="opacity")}function Xc(e,t,n){var r;const{style:s}=e,o={};for(const a in s)(Pe(s[a])||t.style&&Pe(t.style[a])||Um(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[a]=s[a]);return o}function Hm(e,t,n){const r=Xc(e,t,n);for(const s in e)if(Pe(e[s])||Pe(t[s])){const o=Pr.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}function n1(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const $d=["x","y","width","height","cx","cy","r"],r1={useVisualState:zm({scrapeMotionValuesFromProps:Hm,createRenderState:Im,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:s})=>{if(!n)return;let o=!!e.drag;if(!o){for(const l in s)if(Vn.has(l)){o=!0;break}}if(!o)return;let a=!t;if(t)for(let l=0;l<$d.length;l++){const c=$d[l];e[c]!==t[c]&&(a=!0)}a&&te.read(()=>{n1(n,r),te.render(()=>{qc(r,s,Yc(n.tagName),e.transformTemplate),Bm(n,r)})})}})},s1={useVisualState:zm({scrapeMotionValuesFromProps:Xc,createRenderState:Qc})};function Wm(e,t,n){for(const r in t)!Pe(t[r])&&!Um(r,n)&&(e[r]=t[r])}function i1({transformTemplate:e},t){return w.useMemo(()=>{const n=Qc();return Gc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function o1(e,t){const n=e.style||{},r={};return Wm(r,n,e),Object.assign(r,i1(e,t)),r}function a1(e,t){const n={},r=o1(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function l1(e,t,n,r){const s=w.useMemo(()=>{const o=Im();return qc(o,t,Yc(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Wm(o,e.style,e),s.style={...o,...s.style}}return s}function c1(e=!1){return(n,r,s,{latestValues:o},a)=>{const c=(Uc(n)?l1:a1)(r,o,a,n),u=Nx(r,typeof n=="string",e),d=n!==w.Fragment?{...u,...c,ref:s}:{},{children:f}=r,h=w.useMemo(()=>Pe(f)?f.get():f,[f]);return w.createElement(n,{...d,children:h})}}function u1(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const a={...Uc(r)?r1:s1,preloadedFeatures:e,useRender:c1(s),createVisualElement:t,Component:r};return _x(a)}}function Km(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function _o(e,t,n){const r=e.getProps();return Hc(r,t,n!==void 0?n:r.custom,e)}const d1=Fc(()=>window.ScrollTimeline!==void 0);class f1{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(s=>{if(d1()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,o)=>{s&&s(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class h1 extends f1{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Zc(e,t){return e?e[t]||e.default||e:void 0}const jl=2e4;function Gm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<jl;)t+=n,r=e.next(t);return t>=jl?1/0:t}function Jc(e){return typeof e=="function"}function Bd(e,t){e.timeline=t,e.onfinish=null}const eu=e=>Array.isArray(e)&&typeof e[0]=="number",p1={linearEasing:void 0};function m1(e,t){const n=Fc(e);return()=>{var r;return(r=p1[t])!==null&&r!==void 0?r:n()}}const oo=m1(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),qm=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=e(wr(0,s-1,o))+", ";return`linear(${r.substring(0,r.length-2)})`};function Qm(e){return!!(typeof e=="function"&&oo()||!e||typeof e=="string"&&(e in wl||oo())||eu(e)||Array.isArray(e)&&e.every(Qm))}const Br=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,wl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Br([0,.65,.55,1]),circOut:Br([.55,0,1,.45]),backIn:Br([.31,.01,.66,-.59]),backOut:Br([.33,1.53,.69,.99])};function Ym(e,t){if(e)return typeof e=="function"&&oo()?qm(e,t):eu(e)?Br(e):Array.isArray(e)?e.map(n=>Ym(n,t)||wl.easeOut):wl[e]}const dt={x:!1,y:!1};function Xm(){return dt.x||dt.y}function v1(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let s=document;const o=(r=void 0)!==null&&r!==void 0?r:s.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function Zm(e,t){const n=v1(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function Ud(e){return t=>{t.pointerType==="touch"||Xm()||e(t)}}function y1(e,t,n={}){const[r,s,o]=Zm(e,n),a=Ud(l=>{const{target:c}=l,u=t(l);if(typeof u!="function"||!c)return;const d=Ud(f=>{u(f),c.removeEventListener("pointerleave",d)});c.addEventListener("pointerleave",d,s)});return r.forEach(l=>{l.addEventListener("pointerenter",a,s)}),o}const Jm=(e,t)=>t?e===t?!0:Jm(e,t.parentElement):!1,tu=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,g1=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function x1(e){return g1.has(e.tagName)||e.tabIndex!==-1}const Ur=new WeakSet;function Hd(e){return t=>{t.key==="Enter"&&e(t)}}function ca(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const j1=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Hd(()=>{if(Ur.has(n))return;ca(n,"down");const s=Hd(()=>{ca(n,"up")}),o=()=>ca(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Wd(e){return tu(e)&&!Xm()}function w1(e,t,n={}){const[r,s,o]=Zm(e,n),a=l=>{const c=l.currentTarget;if(!Wd(l)||Ur.has(c))return;Ur.add(c);const u=t(l),d=(y,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),!(!Wd(y)||!Ur.has(c))&&(Ur.delete(c),typeof u=="function"&&u(y,{success:g}))},f=y=>{d(y,n.useGlobalTarget||Jm(c,y.target))},h=y=>{d(y,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",h,s)};return r.forEach(l=>{!x1(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0),(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,s),l.addEventListener("focus",u=>j1(u,s),s)}),o}function S1(e){return e==="x"||e==="y"?dt[e]?null:(dt[e]=!0,()=>{dt[e]=!1}):dt.x||dt.y?null:(dt.x=dt.y=!0,()=>{dt.x=dt.y=!1})}const ev=new Set(["width","height","top","left","right","bottom",...Pr]);let Ai;function k1(){Ai=void 0}const Tt={now:()=>(Ai===void 0&&Tt.set(je.isProcessing||gx.useManualTiming?je.timestamp:performance.now()),Ai),set:e=>{Ai=e,queueMicrotask(k1)}};function nu(e,t){e.indexOf(t)===-1&&e.push(t)}function ru(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class su{constructor(){this.subscriptions=[]}add(t){return nu(this.subscriptions,t),()=>ru(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function tv(e,t){return t?e*(1e3/t):0}const Kd=30,N1=e=>!isNaN(parseFloat(e));class C1{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const o=Tt.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Tt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=N1(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new su);const r=this.events[t].add(n);return t==="change"?()=>{r(),te.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Tt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Kd)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Kd);return tv(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Es(e,t){return new C1(e,t)}function T1(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Es(n))}function P1(e,t){const n=_o(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const a in o){const l=Ix(o[a]);T1(e,a,l)}}function E1(e){return!!(Pe(e)&&e.add)}function Sl(e,t){const n=e.getValue("willChange");if(E1(n))return n.add(t)}function nv(e){return e.props[Dm]}const rv=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,M1=1e-7,A1=12;function R1(e,t,n,r,s){let o,a,l=0;do a=t+(n-t)/2,o=rv(a,r,s)-e,o>0?n=a:t=a;while(Math.abs(o)>M1&&++l<A1);return a}function bs(e,t,n,r){if(e===t&&n===r)return Ke;const s=o=>R1(o,0,1,e,n);return o=>o===0||o===1?o:rv(s(o),t,r)}const sv=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,iv=e=>t=>1-e(1-t),ov=bs(.33,1.53,.69,.99),iu=iv(ov),av=sv(iu),lv=e=>(e*=2)<1?.5*iu(e):.5*(2-Math.pow(2,-10*(e-1))),ou=e=>1-Math.sin(Math.acos(e)),cv=iv(ou),uv=sv(ou),dv=e=>/^0[^.\s]+$/u.test(e);function D1(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||dv(e):!0}const ns=e=>Math.round(e*1e5)/1e5,au=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function _1(e){return e==null}const L1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,lu=(e,t)=>n=>!!(typeof n=="string"&&L1.test(n)&&n.startsWith(e)||t&&!_1(n)&&Object.prototype.hasOwnProperty.call(n,t)),fv=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,a,l]=r.match(au);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},z1=e=>It(0,255,e),ua={...Er,transform:e=>Math.round(z1(e))},Cn={test:lu("rgb","red"),parse:fv("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ua.transform(e)+", "+ua.transform(t)+", "+ua.transform(n)+", "+ns(Ps.transform(r))+")"};function V1(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const kl={test:lu("#"),parse:V1,transform:Cn.transform},Zn={test:lu("hsl","hue"),parse:fv("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ct.transform(ns(t))+", "+Ct.transform(ns(n))+", "+ns(Ps.transform(r))+")"},Ce={test:e=>Cn.test(e)||kl.test(e)||Zn.test(e),parse:e=>Cn.test(e)?Cn.parse(e):Zn.test(e)?Zn.parse(e):kl.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Cn.transform(e):Zn.transform(e)},O1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function F1(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(au))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(O1))===null||n===void 0?void 0:n.length)||0)>0}const hv="number",pv="color",I1="var",b1="var(",Gd="${}",$1=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ms(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const l=t.replace($1,c=>(Ce.test(c)?(r.color.push(o),s.push(pv),n.push(Ce.parse(c))):c.startsWith(b1)?(r.var.push(o),s.push(I1),n.push(c)):(r.number.push(o),s.push(hv),n.push(parseFloat(c))),++o,Gd)).split(Gd);return{values:n,split:l,indexes:r,types:s}}function mv(e){return Ms(e).values}function vv(e){const{split:t,types:n}=Ms(e),r=t.length;return s=>{let o="";for(let a=0;a<r;a++)if(o+=t[a],s[a]!==void 0){const l=n[a];l===hv?o+=ns(s[a]):l===pv?o+=Ce.transform(s[a]):o+=s[a]}return o}}const B1=e=>typeof e=="number"?0:e;function U1(e){const t=mv(e);return vv(e)(t.map(B1))}const dn={test:F1,parse:mv,createTransformer:vv,getAnimatableNone:U1},H1=new Set(["brightness","contrast","saturate","opacity"]);function W1(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(au)||[];if(!r)return e;const s=n.replace(r,"");let o=H1.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const K1=/\b([a-z-]*)\(.*?\)/gu,Nl={...dn,getAnimatableNone:e=>{const t=e.match(K1);return t?t.map(W1).join(" "):e}},G1={...Kc,color:Ce,backgroundColor:Ce,outlineColor:Ce,fill:Ce,stroke:Ce,borderColor:Ce,borderTopColor:Ce,borderRightColor:Ce,borderBottomColor:Ce,borderLeftColor:Ce,filter:Nl,WebkitFilter:Nl},cu=e=>G1[e];function yv(e,t){let n=cu(e);return n!==Nl&&(n=dn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const q1=new Set(["auto","none","0"]);function Q1(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!q1.has(o)&&Ms(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=yv(n,s)}const qd=e=>e===Er||e===F,Qd=(e,t)=>parseFloat(e.split(", ")[t]),Yd=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/u);if(s)return Qd(s[1],t);{const o=r.match(/^matrix\((.+)\)$/u);return o?Qd(o[1],e):0}},Y1=new Set(["x","y","z"]),X1=Pr.filter(e=>!Y1.has(e));function Z1(e){const t=[];return X1.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const kr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Yd(4,13),y:Yd(5,14)};kr.translateX=kr.x;kr.translateY=kr.y;const En=new Set;let Cl=!1,Tl=!1;function gv(){if(Tl){const e=Array.from(En).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=Z1(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,a])=>{var l;(l=r.getValue(o))===null||l===void 0||l.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Tl=!1,Cl=!1,En.forEach(e=>e.complete()),En.clear()}function xv(){En.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Tl=!0)})}function J1(){xv(),gv()}class uu{constructor(t,n,r,s,o,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(En.add(this),Cl||(Cl=!0,te.read(xv),te.resolveKeyframes(gv))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const a=s==null?void 0:s.get(),l=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),s&&a===void 0&&s.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),En.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,En.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const jv=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ej=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function tj(e){const t=ej.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function wv(e,t,n=1){const[r,s]=tj(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return jv(a)?parseFloat(a):a}return Wc(s)?wv(s,t,n+1):s}const Sv=e=>t=>t.test(e),nj={test:e=>e==="auto",parse:e=>e},kv=[Er,F,Ct,Bt,Wx,Hx,nj],Xd=e=>kv.find(Sv(e));class Nv extends uu{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),Wc(u))){const d=wv(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!ev.has(r)||t.length!==2)return;const[s,o]=t,a=Xd(s),l=Xd(o);if(a!==l)if(qd(a)&&qd(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)D1(t[s])&&r.push(s);r.length&&Q1(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=kr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const o=n.getValue(r);o&&o.jump(this.measuredOrigin,!1);const a=s.length-1,l=s[a];s[a]=kr[r](n.measureViewportBox(),window.getComputedStyle(n.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([c,u])=>{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const Zd=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(dn.test(e)||e==="0")&&!e.startsWith("url("));function rj(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function sj(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=Zd(s,t),l=Zd(o,t);return!a||!l?!1:rj(e)||(n==="spring"||Jc(n))&&r}const ij=e=>e!==null;function Lo(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(ij),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return!o||r===void 0?s[o]:r}const oj=40;class Cv{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:a="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Tt.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:a,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>oj?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&J1(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Tt.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:o,delay:a,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!sj(t,r,s,o))if(a)this.options.duration=0;else{c&&c(Lo(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const se=(e,t,n)=>e+(t-e)*n;function da(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function aj({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,a=0;if(!t)s=o=a=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;s=da(c,l,e+1/3),o=da(c,l,e),a=da(c,l,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function ao(e,t){return n=>n>0?t:e}const fa=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},lj=[kl,Cn,Zn],cj=e=>lj.find(t=>t.test(e));function Jd(e){const t=cj(e);if(!t)return!1;let n=t.parse(e);return t===Zn&&(n=aj(n)),n}const ef=(e,t)=>{const n=Jd(e),r=Jd(t);if(!n||!r)return ao(e,t);const s={...n};return o=>(s.red=fa(n.red,r.red,o),s.green=fa(n.green,r.green,o),s.blue=fa(n.blue,r.blue,o),s.alpha=se(n.alpha,r.alpha,o),Cn.transform(s))},uj=(e,t)=>n=>t(e(n)),$s=(...e)=>e.reduce(uj),Pl=new Set(["none","hidden"]);function dj(e,t){return Pl.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function fj(e,t){return n=>se(e,t,n)}function du(e){return typeof e=="number"?fj:typeof e=="string"?Wc(e)?ao:Ce.test(e)?ef:mj:Array.isArray(e)?Tv:typeof e=="object"?Ce.test(e)?ef:hj:ao}function Tv(e,t){const n=[...e],r=n.length,s=e.map((o,a)=>du(o)(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=s[a](o);return n}}function hj(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=du(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function pj(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const a=t.types[o],l=e.indexes[a][s[a]],c=(n=e.values[l])!==null&&n!==void 0?n:0;r[o]=c,s[a]++}return r}const mj=(e,t)=>{const n=dn.createTransformer(t),r=Ms(e),s=Ms(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Pl.has(e)&&!s.values.length||Pl.has(t)&&!r.values.length?dj(e,t):$s(Tv(pj(r,s),s.values),n):ao(e,t)};function Pv(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?se(e,t,n):du(e)(e,t)}const vj=5;function Ev(e,t,n){const r=Math.max(t-vj,0);return tv(n-e(r),t-r)}const ce={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},ha=.001;function yj({duration:e=ce.duration,bounce:t=ce.bounce,velocity:n=ce.velocity,mass:r=ce.mass}){let s,o,a=1-t;a=It(ce.minDamping,ce.maxDamping,a),e=It(ce.minDuration,ce.maxDuration,Lt(e)),a<1?(s=u=>{const d=u*a,f=d*e,h=d-n,y=El(u,a),g=Math.exp(-f);return ha-h/y*g},o=u=>{const f=u*a*e,h=f*n+n,y=Math.pow(a,2)*Math.pow(u,2)*e,g=Math.exp(-f),x=El(Math.pow(u,2),a);return(-s(u)+ha>0?-1:1)*((h-y)*g)/x}):(s=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-ha+d*f},o=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const l=5/e,c=xj(s,o,l);if(e=_t(e),isNaN(c))return{stiffness:ce.stiffness,damping:ce.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const gj=12;function xj(e,t,n){let r=n;for(let s=1;s<gj;s++)r=r-e(r)/t(r);return r}function El(e,t){return e*Math.sqrt(1-t*t)}const jj=["duration","bounce"],wj=["stiffness","damping","mass"];function tf(e,t){return t.some(n=>e[n]!==void 0)}function Sj(e){let t={velocity:ce.velocity,stiffness:ce.stiffness,damping:ce.damping,mass:ce.mass,isResolvedFromDuration:!1,...e};if(!tf(e,wj)&&tf(e,jj))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*It(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:ce.mass,stiffness:s,damping:o}}else{const n=yj(e);t={...t,...n,mass:ce.mass},t.isResolvedFromDuration=!0}return t}function Mv(e=ce.visualDuration,t=ce.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:o},{stiffness:c,damping:u,mass:d,duration:f,velocity:h,isResolvedFromDuration:y}=Sj({...n,velocity:-Lt(n.velocity||0)}),g=h||0,x=u/(2*Math.sqrt(c*d)),C=a-o,m=Lt(Math.sqrt(c/d)),p=Math.abs(C)<5;r||(r=p?ce.restSpeed.granular:ce.restSpeed.default),s||(s=p?ce.restDelta.granular:ce.restDelta.default);let v;if(x<1){const j=El(m,x);v=k=>{const N=Math.exp(-x*m*k);return a-N*((g+x*m*C)/j*Math.sin(j*k)+C*Math.cos(j*k))}}else if(x===1)v=j=>a-Math.exp(-m*j)*(C+(g+m*C)*j);else{const j=m*Math.sqrt(x*x-1);v=k=>{const N=Math.exp(-x*m*k),T=Math.min(j*k,300);return a-N*((g+x*m*C)*Math.sinh(T)+j*C*Math.cosh(T))/j}}const S={calculatedDuration:y&&f||null,next:j=>{const k=v(j);if(y)l.done=j>=f;else{let N=0;x<1&&(N=j===0?_t(g):Ev(v,j,k));const T=Math.abs(N)<=r,R=Math.abs(a-k)<=s;l.done=T&&R}return l.value=l.done?a:k,l},toString:()=>{const j=Math.min(Gm(S),jl),k=qm(N=>S.next(j*N).value,j,30);return j+"ms "+k}};return S}function nf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},y=T=>l!==void 0&&T<l||c!==void 0&&T>c,g=T=>l===void 0?c:c===void 0||Math.abs(l-T)<Math.abs(c-T)?l:c;let x=n*t;const C=f+x,m=a===void 0?C:a(C);m!==C&&(x=m-f);const p=T=>-x*Math.exp(-T/r),v=T=>m+p(T),S=T=>{const R=p(T),P=v(T);h.done=Math.abs(R)<=u,h.value=h.done?m:P};let j,k;const N=T=>{y(h.value)&&(j=T,k=Mv({keyframes:[h.value,g(h.value)],velocity:Ev(v,T,h.value),damping:s,stiffness:o,restDelta:u,restSpeed:d}))};return N(0),{calculatedDuration:null,next:T=>{let R=!1;return!k&&j===void 0&&(R=!0,S(T),N(T)),j!==void 0&&T>=j?k.next(T-j):(!R&&S(T),h)}}}const kj=bs(.42,0,1,1),Nj=bs(0,0,.58,1),Av=bs(.42,0,.58,1),Cj=e=>Array.isArray(e)&&typeof e[0]!="number",Tj={linear:Ke,easeIn:kj,easeInOut:Av,easeOut:Nj,circIn:ou,circInOut:uv,circOut:cv,backIn:iu,backInOut:av,backOut:ov,anticipate:lv},rf=e=>{if(eu(e)){Pm(e.length===4);const[t,n,r,s]=e;return bs(t,n,r,s)}else if(typeof e=="string")return Tj[e];return e};function Pj(e,t,n){const r=[],s=n||Pv,o=e.length-1;for(let a=0;a<o;a++){let l=s(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||Ke:t;l=$s(c,l)}r.push(l)}return r}function Ej(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(Pm(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=Pj(t,r,s),c=l.length,u=d=>{if(a&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const h=wr(e[f],e[f+1],d);return l[f](h)};return n?d=>u(It(e[0],e[o-1],d)):u}function Mj(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=wr(0,t,r);e.push(se(n,1,s))}}function Aj(e){const t=[0];return Mj(t,e.length-1),t}function Rj(e,t){return e.map(n=>n*t)}function Dj(e,t){return e.map(()=>t||Av).splice(0,e.length-1)}function lo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=Cj(r)?r.map(rf):rf(r),o={done:!1,value:t[0]},a=Rj(n&&n.length===t.length?n:Aj(t),e),l=Ej(a,t,{ease:Array.isArray(s)?s:Dj(t,s)});return{calculatedDuration:e,next:c=>(o.value=l(c),o.done=c>=e,o)}}const _j=e=>{const t=({timestamp:n})=>e(n);return{start:()=>te.update(t,!0),stop:()=>un(t),now:()=>je.isProcessing?je.timestamp:Tt.now()}},Lj={decay:nf,inertia:nf,tween:lo,keyframes:lo,spring:Mv},zj=e=>e/100;class fu extends Cv{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:r,element:s,keyframes:o}=this.options,a=(s==null?void 0:s.KeyframeResolver)||uu,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new a(o,l,n,r,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:a=0}=this.options,l=Jc(n)?n:Lj[n]||lo;let c,u;l!==lo&&typeof t[0]!="number"&&(c=$s(zj,Pv(t[0],t[1])),t=[0,100]);const d=l({...this.options,keyframes:t});o==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=Gm(d));const{calculatedDuration:f}=d,h=f+s,y=h*(r+1)-s;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:h,totalDuration:y}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:T}=this.options;return{done:!0,value:T[T.length-1]}}const{finalKeyframe:s,generator:o,mirroredGenerator:a,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:f}=r;if(this.startTime===null)return o.next(0);const{delay:h,repeat:y,repeatType:g,repeatDelay:x,onUpdate:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const m=this.currentTime-h*(this.speed>=0?1:-1),p=this.speed>=0?m<0:m>d;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let v=this.currentTime,S=o;if(y){const T=Math.min(this.currentTime,d)/f;let R=Math.floor(T),P=T%1;!P&&T>=1&&(P=1),P===1&&R--,R=Math.min(R,y+1),!!(R%2)&&(g==="reverse"?(P=1-P,x&&(P-=x/f)):g==="mirror"&&(S=a)),v=It(0,1,P)*f}const j=p?{done:!1,value:c[0]}:S.next(v);l&&(j.value=l(j.value));let{done:k}=j;!p&&u!==null&&(k=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return N&&s!==void 0&&(j.value=Lo(c,this.options,s)),C&&C(j.value),N&&this.finish(),j}get duration(){const{resolved:t}=this;return t?Lt(t.calculatedDuration):0}get time(){return Lt(this.currentTime)}set time(t){t=_t(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Lt(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=_j,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Vj=new Set(["opacity","clipPath","filter","transform"]);function Oj(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:a="loop",ease:l="easeInOut",times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=Ym(l,s);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}const Fj=Fc(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),co=10,Ij=2e4;function bj(e){return Jc(e.type)||e.type==="spring"||!Qm(e.ease)}function $j(e,t){const n=new fu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let o=0;for(;!r.done&&o<Ij;)r=n.sample(o),s.push(r.value),o+=co;return{times:void 0,keyframes:s,duration:o-co,ease:"linear"}}const Rv={anticipate:lv,backInOut:av,circInOut:uv};function Bj(e){return e in Rv}class sf extends Cv{constructor(t){super(t);const{name:n,motionValue:r,element:s,keyframes:o}=this.options;this.resolver=new Nv(o,(a,l)=>this.onKeyframesResolved(a,l),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:o,type:a,motionValue:l,name:c,startTime:u}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof o=="string"&&oo()&&Bj(o)&&(o=Rv[o]),bj(this.options)){const{onComplete:f,onUpdate:h,motionValue:y,element:g,...x}=this.options,C=$j(t,x);t=C.keyframes,t.length===1&&(t[1]=t[0]),r=C.duration,s=C.times,o=C.ease,a="keyframes"}const d=Oj(l.owner.current,c,t,{...this.options,duration:r,times:s,ease:o});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(Bd(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;l.set(Lo(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:s,type:a,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Lt(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Lt(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=_t(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ke;const{animation:r}=n;Bd(r,t)}return Ke}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:s,type:o,ease:a,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:f,element:h,...y}=this.options,g=new fu({...y,keyframes:r,duration:s,type:o,ease:a,times:l,isGenerator:!0}),x=_t(this.time);u.setWithVelocity(g.sample(x-co).value,g.sample(x).value,co)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:s,repeatType:o,damping:a,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return Fj()&&r&&Vj.has(r)&&!c&&!u&&!s&&o!=="mirror"&&a!==0&&l!=="inertia"}}const Uj={type:"spring",stiffness:500,damping:25,restSpeed:10},Hj=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Wj={type:"keyframes",duration:.8},Kj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Gj=(e,{keyframes:t})=>t.length>2?Wj:Vn.has(e)?e.startsWith("scale")?Hj(t[1]):Uj:Kj;function qj({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:a,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const hu=(e,t,n,r={},s,o)=>a=>{const l=Zc(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-_t(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:o?void 0:s};qj(l)||(d={...d,...Gj(e,d)}),d.duration&&(d.duration=_t(d.duration)),d.repeatDelay&&(d.repeatDelay=_t(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!o&&t.get()!==void 0){const h=Lo(d.keyframes,l);if(h!==void 0)return te.update(()=>{d.onUpdate(h),d.onComplete()}),new h1([])}return!o&&sf.supports(d)?new sf(d):new fu(d)};function Qj({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Dv(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:l,...c}=t;r&&(a=r);const u=[],d=s&&e.animationState&&e.animationState.getState()[s];for(const f in c){const h=e.getValue(f,(o=e.latestValues[f])!==null&&o!==void 0?o:null),y=c[f];if(y===void 0||d&&Qj(d,f))continue;const g={delay:n,...Zc(a||{},f)};let x=!1;if(window.MotionHandoffAnimation){const m=nv(e);if(m){const p=window.MotionHandoffAnimation(m,f,te);p!==null&&(g.startTime=p,x=!0)}}Sl(e,f),h.start(hu(f,h,y,e.shouldReduceMotion&&ev.has(f)?{type:!1}:g,e,x));const C=h.animation;C&&u.push(C)}return l&&Promise.all(u).then(()=>{te.update(()=>{l&&P1(e,l)})}),u}function Ml(e,t,n={}){var r;const s=_o(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(o=n.transitionOverride);const a=s?()=>Promise.all(Dv(e,s,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=o;return Yj(e,t,d+u,f,h,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[u,d]=c==="beforeChildren"?[a,l]:[l,a];return u().then(()=>d())}else return Promise.all([a(),l(n.delay)])}function Yj(e,t,n=0,r=0,s=1,o){const a=[],l=(e.variantChildren.size-1)*r,c=s===1?(u=0)=>u*r:(u=0)=>l-u*r;return Array.from(e.variantChildren).sort(Xj).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(Ml(u,t,{...o,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Xj(e,t){return e.sortNodePosition(t)}function Zj(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>Ml(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=Ml(e,t,n);else{const s=typeof t=="function"?_o(e,t,n.custom):t;r=Promise.all(Dv(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Jj=bc.length;function _v(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?_v(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Jj;n++){const r=bc[n],s=e.props[r];(Ts(s)||s===!1)&&(t[r]=s)}return t}const ew=[...Ic].reverse(),tw=Ic.length;function nw(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Zj(e,n,r)))}function rw(e){let t=nw(e),n=of(),r=!0;const s=c=>(u,d)=>{var f;const h=_o(e,d,c==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:y,transitionEnd:g,...x}=h;u={...u,...x,...g}}return u};function o(c){t=c(e)}function a(c){const{props:u}=e,d=_v(e.parent)||{},f=[],h=new Set;let y={},g=1/0;for(let C=0;C<tw;C++){const m=ew[C],p=n[m],v=u[m]!==void 0?u[m]:d[m],S=Ts(v),j=m===c?p.isActive:null;j===!1&&(g=C);let k=v===d[m]&&v!==u[m]&&S;if(k&&r&&e.manuallyAnimateOnMount&&(k=!1),p.protectedKeys={...y},!p.isActive&&j===null||!v&&!p.prevProp||Ro(v)||typeof v=="boolean")continue;const N=sw(p.prevProp,v);let T=N||m===c&&p.isActive&&!k&&S||C>g&&S,R=!1;const P=Array.isArray(v)?v:[v];let $=P.reduce(s(m),{});j===!1&&($={});const{prevResolvedValues:I={}}=p,Q={...I,...$},he=H=>{T=!0,h.has(H)&&(R=!0,h.delete(H)),p.needsAnimating[H]=!0;const A=e.getValue(H);A&&(A.liveStyle=!1)};for(const H in Q){const A=$[H],z=I[H];if(y.hasOwnProperty(H))continue;let V=!1;xl(A)&&xl(z)?V=!Km(A,z):V=A!==z,V?A!=null?he(H):h.add(H):A!==void 0&&h.has(H)?he(H):p.protectedKeys[H]=!0}p.prevProp=v,p.prevResolvedValues=$,p.isActive&&(y={...y,...$}),r&&e.blockInitialAnimation&&(T=!1),T&&(!(k&&N)||R)&&f.push(...P.map(H=>({animation:H,options:{type:m}})))}if(h.size){const C={};h.forEach(m=>{const p=e.getBaseTarget(m),v=e.getValue(m);v&&(v.liveStyle=!0),C[m]=p??null}),f.push({animation:C})}let x=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(f):Promise.resolve()}function l(c,u){var d;if(n[c].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var y;return(y=h.animationState)===null||y===void 0?void 0:y.setActive(c,u)}),n[c].isActive=u;const f=a(c);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=of(),r=!0}}}function sw(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Km(t,e):!1}function vn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function of(){return{animate:vn(!0),whileInView:vn(),whileHover:vn(),whileTap:vn(),whileDrag:vn(),whileFocus:vn(),exit:vn()}}class mn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class iw extends mn{constructor(t){super(t),t.animationState||(t.animationState=rw(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ro(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let ow=0;class aw extends mn{constructor(){super(...arguments),this.id=ow++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const lw={animation:{Feature:iw},exit:{Feature:aw}};function As(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Bs(e){return{point:{x:e.pageX,y:e.pageY}}}const cw=e=>t=>tu(t)&&e(t,Bs(t));function rs(e,t,n,r){return As(e,t,cw(n),r)}const af=(e,t)=>Math.abs(e-t);function uw(e,t){const n=af(e.x,t.x),r=af(e.y,t.y);return Math.sqrt(n**2+r**2)}class Lv{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=ma(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,y=uw(f.offset,{x:0,y:0})>=3;if(!h&&!y)return;const{point:g}=f,{timestamp:x}=je;this.history.push({...g,timestamp:x});const{onStart:C,onMove:m}=this.handlers;h||(C&&C(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=pa(h,this.transformPagePoint),te.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:y,onSessionEnd:g,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const C=ma(f.type==="pointercancel"?this.lastMoveEventInfo:pa(h,this.transformPagePoint),this.history);this.startEvent&&y&&y(f,C),g&&g(f,C)},!tu(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const a=Bs(t),l=pa(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=je;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,ma(l,this.history)),this.removeListeners=$s(rs(this.contextWindow,"pointermove",this.handlePointerMove),rs(this.contextWindow,"pointerup",this.handlePointerUp),rs(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),un(this.updatePoint)}}function pa(e,t){return t?{point:t(e.point)}:e}function lf(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ma({point:e},t){return{point:e,delta:lf(e,zv(t)),offset:lf(e,dw(t)),velocity:fw(t,.1)}}function dw(e){return e[0]}function zv(e){return e[e.length-1]}function fw(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=zv(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>_t(t)));)n--;if(!r)return{x:0,y:0};const o=Lt(s.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}const Vv=1e-4,hw=1-Vv,pw=1+Vv,Ov=.01,mw=0-Ov,vw=0+Ov;function Qe(e){return e.max-e.min}function yw(e,t,n){return Math.abs(e-t)<=n}function cf(e,t,n,r=.5){e.origin=r,e.originPoint=se(t.min,t.max,e.origin),e.scale=Qe(n)/Qe(t),e.translate=se(n.min,n.max,e.origin)-e.originPoint,(e.scale>=hw&&e.scale<=pw||isNaN(e.scale))&&(e.scale=1),(e.translate>=mw&&e.translate<=vw||isNaN(e.translate))&&(e.translate=0)}function ss(e,t,n,r){cf(e.x,t.x,n.x,r?r.originX:void 0),cf(e.y,t.y,n.y,r?r.originY:void 0)}function uf(e,t,n){e.min=n.min+t.min,e.max=e.min+Qe(t)}function gw(e,t,n){uf(e.x,t.x,n.x),uf(e.y,t.y,n.y)}function df(e,t,n){e.min=t.min-n.min,e.max=e.min+Qe(t)}function is(e,t,n){df(e.x,t.x,n.x),df(e.y,t.y,n.y)}function xw(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?se(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?se(n,e,r.max):Math.min(e,n)),e}function ff(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function jw(e,{top:t,left:n,bottom:r,right:s}){return{x:ff(e.x,n,s),y:ff(e.y,t,r)}}function hf(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function ww(e,t){return{x:hf(e.x,t.x),y:hf(e.y,t.y)}}function Sw(e,t){let n=.5;const r=Qe(e),s=Qe(t);return s>r?n=wr(t.min,t.max-r,e.min):r>s&&(n=wr(e.min,e.max-s,t.min)),It(0,1,n)}function kw(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Al=.35;function Nw(e=Al){return e===!1?e=0:e===!0&&(e=Al),{x:pf(e,"left","right"),y:pf(e,"top","bottom")}}function pf(e,t,n){return{min:mf(e,t),max:mf(e,n)}}function mf(e,t){return typeof e=="number"?e:e[t]||0}const vf=()=>({translate:0,scale:1,origin:0,originPoint:0}),Jn=()=>({x:vf(),y:vf()}),yf=()=>({min:0,max:0}),de=()=>({x:yf(),y:yf()});function et(e){return[e("x"),e("y")]}function Fv({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Cw({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Tw(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function va(e){return e===void 0||e===1}function Rl({scale:e,scaleX:t,scaleY:n}){return!va(e)||!va(t)||!va(n)}function jn(e){return Rl(e)||Iv(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Iv(e){return gf(e.x)||gf(e.y)}function gf(e){return e&&e!=="0%"}function uo(e,t,n){const r=e-n,s=t*r;return n+s}function xf(e,t,n,r,s){return s!==void 0&&(e=uo(e,s,r)),uo(e,n,r)+t}function Dl(e,t=0,n=1,r,s){e.min=xf(e.min,t,n,r,s),e.max=xf(e.max,t,n,r,s)}function bv(e,{x:t,y:n}){Dl(e.x,t.translate,t.scale,t.originPoint),Dl(e.y,n.translate,n.scale,n.originPoint)}const jf=.999999999999,wf=1.0000000000001;function Pw(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,a;for(let l=0;l<s;l++){o=n[l],a=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&tr(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,bv(e,a)),r&&jn(o.latestValues)&&tr(e,o.latestValues))}t.x<wf&&t.x>jf&&(t.x=1),t.y<wf&&t.y>jf&&(t.y=1)}function er(e,t){e.min=e.min+t,e.max=e.max+t}function Sf(e,t,n,r,s=.5){const o=se(e.min,e.max,s);Dl(e,t,n,o,r)}function tr(e,t){Sf(e.x,t.x,t.scaleX,t.scale,t.originX),Sf(e.y,t.y,t.scaleY,t.scale,t.originY)}function $v(e,t){return Fv(Tw(e.getBoundingClientRect(),t))}function Ew(e,t,n){const r=$v(e,n),{scroll:s}=t;return s&&(er(r.x,s.offset.x),er(r.y,s.offset.y)),r}const Bv=({current:e})=>e?e.ownerDocument.defaultView:null,Mw=new WeakMap;class Aw{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=de(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Bs(d).point)},o=(d,f)=>{const{drag:h,dragPropagation:y,onDragStart:g}=this.getProps();if(h&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=S1(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),et(C=>{let m=this.getAxisMotionValue(C).get()||0;if(Ct.test(m)){const{projection:p}=this.visualElement;if(p&&p.layout){const v=p.layout.layoutBox[C];v&&(m=Qe(v)*(parseFloat(m)/100))}}this.originPoint[C]=m}),g&&te.postRender(()=>g(d,f)),Sl(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,f)=>{const{dragPropagation:h,dragDirectionLock:y,onDirectionLock:g,onDrag:x}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:C}=f;if(y&&this.currentDirection===null){this.currentDirection=Rw(C),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,C),this.updateAxis("y",f.point,C),this.visualElement.render(),x&&x(d,f)},l=(d,f)=>this.stop(d,f),c=()=>et(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Lv(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Bv(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&te.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!ui(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=xw(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&Xn(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=jw(s.layoutBox,n):this.constraints=!1,this.elastic=Nw(r),o!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&et(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=kw(s.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Xn(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=Ew(r,s.root,this.visualElement.getTransformPagePoint());let a=ww(s.layout.layoutBox,o);if(n){const l=n(Cw(a));this.hasMutatedConstraints=!!l,l&&(a=Fv(l))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=et(d=>{if(!ui(d,n,this.currentDirection))return;let f=c&&c[d]||{};a&&(f={min:0,max:0});const h=s?200:1e6,y=s?40:1e7,g={type:"inertia",velocity:r?t[d]:0,bounceStiffness:h,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Sl(this.visualElement,t),r.start(hu(t,r,0,n,this.visualElement,!1))}stopAnimation(){et(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){et(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){et(n=>{const{drag:r}=this.getProps();if(!ui(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:a,max:l}=s.layout.layoutBox[n];o.set(t[n]-se(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Xn(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};et(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();s[a]=Sw({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),et(a=>{if(!ui(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set(se(c,u,s[a]))})}addListeners(){if(!this.visualElement.current)return;Mw.set(this.visualElement,this);const t=this.visualElement.current,n=rs(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();Xn(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),te.read(r);const a=As(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(et(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:a=Al,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:a,dragMomentum:l}}}function ui(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Rw(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Dw extends mn{constructor(t){super(t),this.removeGroupControls=Ke,this.removeListeners=Ke,this.controls=new Aw(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ke}unmount(){this.removeGroupControls(),this.removeListeners()}}const kf=e=>(t,n)=>{e&&te.postRender(()=>e(t,n))};class _w extends mn{constructor(){super(...arguments),this.removePointerDownListener=Ke}onPointerDown(t){this.session=new Lv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Bv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:kf(t),onStart:kf(n),onMove:r,onEnd:(o,a)=>{delete this.session,s&&te.postRender(()=>s(o,a))}}}mount(){this.removePointerDownListener=rs(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ri={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Nf(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Or={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(F.test(e))e=parseFloat(e);else return e;const n=Nf(e,t.target.x),r=Nf(e,t.target.y);return`${n}% ${r}%`}},Lw={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=dn.parse(e);if(s.length>5)return r;const o=dn.createTransformer(e),a=typeof s[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;s[0+a]/=l,s[1+a]/=c;const u=se(l,c,.5);return typeof s[2+a]=="number"&&(s[2+a]/=u),typeof s[3+a]=="number"&&(s[3+a]/=u),o(s)}};class zw extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;t1(Vw),o&&(n.group&&n.group.add(o),r&&r.register&&s&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Ri.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,s||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||te.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Bc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Uv(e){const[t,n]=Cm(),r=w.useContext(Lc);return i.jsx(zw,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(_m),isPresent:t,safeToRemove:n})}const Vw={borderRadius:{...Or,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Or,borderTopRightRadius:Or,borderBottomLeftRadius:Or,borderBottomRightRadius:Or,boxShadow:Lw};function Ow(e,t,n){const r=Pe(e)?e:Es(e);return r.start(hu("",r,t,n)),r.animation}function Fw(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Iw=(e,t)=>e.depth-t.depth;class bw{constructor(){this.children=[],this.isDirty=!1}add(t){nu(this.children,t),this.isDirty=!0}remove(t){ru(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Iw),this.isDirty=!1,this.children.forEach(t)}}function $w(e,t){const n=Tt.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(un(r),e(o-t))};return te.read(r,!0),()=>un(r)}const Hv=["TopLeft","TopRight","BottomLeft","BottomRight"],Bw=Hv.length,Cf=e=>typeof e=="string"?parseFloat(e):e,Tf=e=>typeof e=="number"||F.test(e);function Uw(e,t,n,r,s,o){s?(e.opacity=se(0,n.opacity!==void 0?n.opacity:1,Hw(r)),e.opacityExit=se(t.opacity!==void 0?t.opacity:1,0,Ww(r))):o&&(e.opacity=se(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<Bw;a++){const l=`border${Hv[a]}Radius`;let c=Pf(t,l),u=Pf(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||Tf(c)===Tf(u)?(e[l]=Math.max(se(Cf(c),Cf(u),r),0),(Ct.test(u)||Ct.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=se(t.rotate||0,n.rotate||0,r))}function Pf(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Hw=Wv(0,.5,cv),Ww=Wv(.5,.95,Ke);function Wv(e,t,n){return r=>r<e?0:r>t?1:n(wr(e,t,r))}function Ef(e,t){e.min=t.min,e.max=t.max}function Je(e,t){Ef(e.x,t.x),Ef(e.y,t.y)}function Mf(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Af(e,t,n,r,s){return e-=t,e=uo(e,1/n,r),s!==void 0&&(e=uo(e,1/s,r)),e}function Kw(e,t=0,n=1,r=.5,s,o=e,a=e){if(Ct.test(t)&&(t=parseFloat(t),t=se(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=se(o.min,o.max,r);e===o&&(l-=t),e.min=Af(e.min,t,n,l,s),e.max=Af(e.max,t,n,l,s)}function Rf(e,t,[n,r,s],o,a){Kw(e,t[n],t[r],t[s],t.scale,o,a)}const Gw=["x","scaleX","originX"],qw=["y","scaleY","originY"];function Df(e,t,n,r){Rf(e.x,t,Gw,n?n.x:void 0,r?r.x:void 0),Rf(e.y,t,qw,n?n.y:void 0,r?r.y:void 0)}function _f(e){return e.translate===0&&e.scale===1}function Kv(e){return _f(e.x)&&_f(e.y)}function Lf(e,t){return e.min===t.min&&e.max===t.max}function Qw(e,t){return Lf(e.x,t.x)&&Lf(e.y,t.y)}function zf(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Gv(e,t){return zf(e.x,t.x)&&zf(e.y,t.y)}function Vf(e){return Qe(e.x)/Qe(e.y)}function Of(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Yw{constructor(){this.members=[]}add(t){nu(this.members,t),t.scheduleRender()}remove(t){if(ru(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Xw(e,t,n){let r="";const s=e.x.translate/t.x,o=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((s||o||a)&&(r=`translate3d(${s}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:h,skewX:y,skewY:g}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),y&&(r+=`skewX(${y}deg) `),g&&(r+=`skewY(${g}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const wn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Hr=typeof window<"u"&&window.MotionDebug!==void 0,ya=["","X","Y","Z"],Zw={visibility:"hidden"},Ff=1e3;let Jw=0;function ga(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function qv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=nv(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",te,!(s||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&qv(r)}function Qv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(a={},l=t==null?void 0:t()){this.id=Jw++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Hr&&(wn.totalNodes=wn.resolvedTargetDeltas=wn.recalculatedProjection=0),this.nodes.forEach(nS),this.nodes.forEach(aS),this.nodes.forEach(lS),this.nodes.forEach(rS),Hr&&window.MotionDebug.record(wn)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new bw)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new su),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Fw(a),this.instance=a;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=$w(h,250),Ri.hasAnimatedSinceResize&&(Ri.hasAnimatedSinceResize=!1,this.nodes.forEach(bf))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:y,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||d.getDefaultTransition()||hS,{onLayoutAnimationStart:C,onLayoutAnimationComplete:m}=d.getProps(),p=!this.targetLayout||!Gv(this.targetLayout,g)||y,v=!h&&y;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||v||h&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,v);const S={...Zc(x,"layout"),onPlay:C,onComplete:m};(d.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else h||bf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,un(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(cS),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&qv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(If);return}this.isUpdating||this.nodes.forEach(iS),this.isUpdating=!1,this.nodes.forEach(oS),this.nodes.forEach(eS),this.nodes.forEach(tS),this.clearAllSnapshots();const l=Tt.now();je.delta=It(0,1e3/60,l-je.timestamp),je.timestamp=l,je.isProcessing=!0,la.update.process(je),la.preRender.process(je),la.render.process(je),je.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Bc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(sS),this.sharedNodes.forEach(uS)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,te.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){te.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=de(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Kv(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(l||jn(this.latestValues)||d)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),pS(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:l}=this.options;if(!l)return de();const c=l.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(mS))){const{scroll:d}=this.root;d&&(er(c.x,d.offset.x),er(c.y,d.offset.y))}return c}removeElementScroll(a){var l;const c=de();if(Je(c,a),!((l=this.scroll)===null||l===void 0)&&l.wasRoot)return c;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:h}=d;d!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&Je(c,a),er(c.x,f.offset.x),er(c.y,f.offset.y))}return c}applyTransform(a,l=!1){const c=de();Je(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&tr(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),jn(d.latestValues)&&tr(c,d.latestValues)}return jn(this.latestValues)&&tr(c,this.latestValues),c}removeTransform(a){const l=de();Je(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!jn(u.latestValues))continue;Rl(u.latestValues)&&u.updateSnapshot();const d=de(),f=u.measurePageBox();Je(d,f),Df(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return jn(this.latestValues)&&Df(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==je.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var l;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=je.timestamp,!this.targetDelta&&!this.relativeTarget){const y=this.getClosestProjectingParent();y&&y.layout&&this.animationProgress!==1?(this.relativeParent=y,this.forceRelativeParentToResolveTarget(),this.relativeTarget=de(),this.relativeTargetOrigin=de(),is(this.relativeTargetOrigin,this.layout.layoutBox,y.layout.layoutBox),Je(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=de(),this.targetWithTransforms=de()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),gw(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Je(this.target,this.layout.layoutBox),bv(this.target,this.targetDelta)):Je(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const y=this.getClosestProjectingParent();y&&!!y.resumingFrom==!!this.resumingFrom&&!y.options.layoutScroll&&y.target&&this.animationProgress!==1?(this.relativeParent=y,this.forceRelativeParentToResolveTarget(),this.relativeTarget=de(),this.relativeTargetOrigin=de(),is(this.relativeTargetOrigin,this.target,y.target),Je(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Hr&&wn.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Rl(this.parent.latestValues)||Iv(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===je.timestamp&&(u=!1),u)return;const{layout:d,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||f))return;Je(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,y=this.treeScale.y;Pw(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=de());const{target:g}=l;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Mf(this.prevProjectionDelta.x,this.projectionDelta.x),Mf(this.prevProjectionDelta.y,this.projectionDelta.y)),ss(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==y||!Of(this.projectionDelta.x,this.prevProjectionDelta.x)||!Of(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g)),Hr&&wn.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)===null||l===void 0||l.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Jn(),this.projectionDelta=Jn(),this.projectionDeltaWithTransform=Jn()}setAnimationOrigin(a,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=Jn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const h=de(),y=c?c.source:void 0,g=this.layout?this.layout.source:void 0,x=y!==g,C=this.getStack(),m=!C||C.members.length<=1,p=!!(x&&!m&&this.options.crossfade===!0&&!this.path.some(fS));this.animationProgress=0;let v;this.mixTargetDelta=S=>{const j=S/1e3;$f(f.x,a.x,j),$f(f.y,a.y,j),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(is(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),dS(this.relativeTarget,this.relativeTargetOrigin,h,j),v&&Qw(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=de()),Je(v,this.relativeTarget)),x&&(this.animationValues=d,Uw(d,u,this.latestValues,j,p,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=j},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(un(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=te.update(()=>{Ri.hasAnimatedSinceResize=!0,this.currentAnimation=Ow(0,Ff,{...a,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ff),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&Yv(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||de();const f=Qe(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+f;const h=Qe(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+h}Je(l,c),tr(l,d),ss(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Yw),this.sharedNodes.get(a).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:l}=this.options;return l?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:l}=this.options;return l?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&ga("z",a,u,this.animationValues);for(let d=0;d<ya.length;d++)ga(`rotate${ya[d]}`,a,u,this.animationValues),ga(`skew${ya[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}getProjectionStyles(a){var l,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Zw;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Mi(a==null?void 0:a.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const x={};return this.options.layoutId&&(x.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,x.pointerEvents=Mi(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!jn(this.latestValues)&&(x.transform=d?d({},""):"none",this.hasProjected=!1),x}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=Xw(this.projectionDeltaWithTransform,this.treeScale,h),d&&(u.transform=d(h,u.transform));const{x:y,y:g}=this.projectionDelta;u.transformOrigin=`${y.origin*100}% ${g.origin*100}% 0`,f.animationValues?u.opacity=f===this?(c=(l=h.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:u.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const x in io){if(h[x]===void 0)continue;const{correct:C,applyTo:m}=io[x],p=u.transform==="none"?h[x]:C(h[x],f);if(m){const v=m.length;for(let S=0;S<v;S++)u[m[S]]=p}else u[x]=p}return this.options.layoutId&&(u.pointerEvents=f===this?Mi(a==null?void 0:a.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(If),this.root.sharedNodes.clear()}}}function eS(e){e.updateLayout()}function tS(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;o==="size"?et(f=>{const h=a?n.measuredBox[f]:n.layoutBox[f],y=Qe(h);h.min=r[f].min,h.max=h.min+y}):Yv(o,n.layoutBox,r)&&et(f=>{const h=a?n.measuredBox[f]:n.layoutBox[f],y=Qe(r[f]);h.max=h.min+y,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+y)});const l=Jn();ss(l,r,n.layoutBox);const c=Jn();a?ss(c,e.applyTransform(s,!0),n.measuredBox):ss(c,r,n.layoutBox);const u=!Kv(l);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:y}=f;if(h&&y){const g=de();is(g,n.layoutBox,h.layoutBox);const x=de();is(x,r,y.layoutBox),Gv(g,x)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=g,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function nS(e){Hr&&wn.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function rS(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function sS(e){e.clearSnapshot()}function If(e){e.clearMeasurements()}function iS(e){e.isLayoutDirty=!1}function oS(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function bf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function aS(e){e.resolveTargetDelta()}function lS(e){e.calcProjection()}function cS(e){e.resetSkewAndRotation()}function uS(e){e.removeLeadSnapshot()}function $f(e,t,n){e.translate=se(t.translate,0,n),e.scale=se(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Bf(e,t,n,r){e.min=se(t.min,n.min,r),e.max=se(t.max,n.max,r)}function dS(e,t,n,r){Bf(e.x,t.x,n.x,r),Bf(e.y,t.y,n.y,r)}function fS(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const hS={duration:.45,ease:[.4,0,.1,1]},Uf=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Hf=Uf("applewebkit/")&&!Uf("chrome/")?Math.round:Ke;function Wf(e){e.min=Hf(e.min),e.max=Hf(e.max)}function pS(e){Wf(e.x),Wf(e.y)}function Yv(e,t,n){return e==="position"||e==="preserve-aspect"&&!yw(Vf(t),Vf(n),.2)}function mS(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const vS=Qv({attachResizeListener:(e,t)=>As(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),xa={current:void 0},Xv=Qv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!xa.current){const e=new vS({});e.mount(window),e.setOptions({layoutScroll:!0}),xa.current=e}return xa.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),yS={pan:{Feature:_w},drag:{Feature:Dw,ProjectionNode:Xv,MeasureLayout:Uv}};function Kf(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&te.postRender(()=>o(t,Bs(t)))}class gS extends mn{mount(){const{current:t}=this.node;t&&(this.unmount=y1(t,n=>(Kf(this.node,n,"Start"),r=>Kf(this.node,r,"End"))))}unmount(){}}class xS extends mn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=$s(As(this.node.current,"focus",()=>this.onFocus()),As(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Gf(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&te.postRender(()=>o(t,Bs(t)))}class jS extends mn{mount(){const{current:t}=this.node;t&&(this.unmount=w1(t,n=>(Gf(this.node,n,"Start"),(r,{success:s})=>Gf(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const _l=new WeakMap,ja=new WeakMap,wS=e=>{const t=_l.get(e.target);t&&t(e)},SS=e=>{e.forEach(wS)};function kS({root:e,...t}){const n=e||document;ja.has(n)||ja.set(n,{});const r=ja.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(SS,{root:e,...t})),r[s]}function NS(e,t,n){const r=kS(t);return _l.set(e,n),r.observe(e),()=>{_l.delete(e),r.unobserve(e)}}const CS={some:0,all:1};class TS extends mn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:CS[s]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=u?d:f;h&&h(c)};return NS(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(PS(t,n))&&this.startObserver()}unmount(){}}function PS({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const ES={inView:{Feature:TS},tap:{Feature:jS},focus:{Feature:xS},hover:{Feature:gS}},MS={layout:{ProjectionNode:Xv,MeasureLayout:Uv}},Ll={current:null},Zv={current:!1};function AS(){if(Zv.current=!0,!!Oc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ll.current=e.matches;e.addListener(t),t()}else Ll.current=!1}const RS=[...kv,Ce,dn],DS=e=>RS.find(Sv(e)),qf=new WeakMap;function _S(e,t,n){for(const r in t){const s=t[r],o=n[r];if(Pe(s))e.addValue(r,s);else if(Pe(o))e.addValue(r,Es(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=e.getStaticValue(r);e.addValue(r,Es(a!==void 0?a:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Qf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class LS{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=uu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const y=Tt.now();this.renderScheduledAt<y&&(this.renderScheduledAt=y,te.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Do(n),this.isVariantNode=Rm(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const y in h){const g=h[y];c[y]!==void 0&&Pe(g)&&g.set(c[y],!1)}}mount(t){this.current=t,qf.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Zv.current||AS(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ll.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){qf.delete(this.current),this.projection&&this.projection.unmount(),un(this.notifyUpdate),un(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Vn.has(t),s=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&te.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Sr){const n=Sr[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):de()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Qf.length;r++){const s=Qf[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,a=t[o];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=_S(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Es(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(jv(s)||dv(s))?s=parseFloat(s):!DS(s)&&dn.test(n)&&(s=yv(t,n)),this.setBaseTarget(t,Pe(s)?s.get():s)),Pe(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const a=Hc(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(s=a[t])}if(r&&s!==void 0)return s;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Pe(o)?o:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new su),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Jv extends LS{constructor(){super(...arguments),this.KeyframeResolver=Nv}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Pe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function zS(e){return window.getComputedStyle(e)}class VS extends Jv{constructor(){super(...arguments),this.type="html",this.renderInstance=bm}readValueFromInstance(t,n){if(Vn.has(n)){const r=cu(n);return r&&r.default||0}else{const r=zS(t),s=(Om(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return $v(t,n)}build(t,n,r){Gc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Xc(t,n,r)}}class OS extends Jv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=de}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Vn.has(n)){const r=cu(n);return r&&r.default||0}return n=$m.has(n)?n:$c(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Hm(t,n,r)}build(t,n,r){qc(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){Bm(t,n,r,s)}mount(t){this.isSVGTag=Yc(t.tagName),super.mount(t)}}const FS=(e,t)=>Uc(e)?new OS(t):new VS(t,{allowProjection:e!==w.Fragment}),IS=u1({...lw,...ES,...yS,...MS},FS),_e=Cx(IS);function Yf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bS(e){if(Array.isArray(e))return e}function $S(e,t,n){return(t=qS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BS(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,o,a,l=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,s=d}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw s}}return l}}function US(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
349
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Zf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xf(Object(n),!0).forEach(function(r){$S(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function HS(e,t){if(e==null)return{};var n,r,s=WS(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}function WS(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function KS(e,t){return bS(e)||BS(e,t)||QS(e,t)||US()}function GS(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qS(e){var t=GS(e,"string");return typeof t=="symbol"?t:t+""}function QS(e,t){if(e){if(typeof e=="string")return Yf(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yf(e,t):void 0}}function YS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function eh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jf(Object(n),!0).forEach(function(r){YS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XS(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(s,o){return o(s)},r)}}function Wr(e){return function t(){for(var n=this,r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return s.length>=e.length?e.apply(this,s):function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return t.apply(n,[].concat(s,l))}}}function fo(e){return{}.toString.call(e).includes("Object")}function ZS(e){return!Object.keys(e).length}function Rs(e){return typeof e=="function"}function JS(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function e2(e,t){return fo(t)||on("changeType"),Object.keys(t).some(function(n){return!JS(e,n)})&&on("changeField"),t}function t2(e){Rs(e)||on("selectorType")}function n2(e){Rs(e)||fo(e)||on("handlerType"),fo(e)&&Object.values(e).some(function(t){return!Rs(t)})&&on("handlersType")}function r2(e){e||on("initialIsRequired"),fo(e)||on("initialType"),ZS(e)&&on("initialContent")}function s2(e,t){throw new Error(e[t]||e.default)}var i2={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},on=Wr(s2)(i2),di={changes:e2,selector:t2,handler:n2,initial:r2};function o2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};di.initial(e),di.handler(t);var n={current:e},r=Wr(c2)(n,t),s=Wr(l2)(n),o=Wr(di.changes)(e),a=Wr(a2)(n);function l(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(d){return d};return di.selector(u),u(n.current)}function c(u){XS(r,s,o,a)(u)}return[l,c]}function a2(e,t){return Rs(t)?t(e.current):t}function l2(e,t){return e.current=eh(eh({},e.current),t),t}function c2(e,t,n){return Rs(t)?t(e.current):Object.keys(n).forEach(function(r){var s;return(s=t[r])===null||s===void 0?void 0:s.call(t,e.current[r])}),n}var u2={create:o2},d2={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function f2(e){return function t(){for(var n=this,r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return s.length>=e.length?e.apply(this,s):function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return t.apply(n,[].concat(s,l))}}}function h2(e){return{}.toString.call(e).includes("Object")}function p2(e){return e||th("configIsRequired"),h2(e)||th("configType"),e.urls?(m2(),{paths:{vs:e.urls.monacoBase}}):e}function m2(){console.warn(ey.deprecation)}function v2(e,t){throw new Error(e[t]||e.default)}var ey={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
350
+ You are using deprecated way of configuration.
351
+
352
+ Instead of using
353
+ monaco.config({ urls: { monacoBase: '...' } })
354
+ use
355
+ monaco.config({ paths: { vs: '...' } })
356
+
357
+ For more please check the link https://github.com/suren-atoyan/monaco-loader#config
358
+ `},th=f2(v2)(ey),y2={config:p2},g2=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(s){return n.reduceRight(function(o,a){return a(o)},s)}};function ty(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],ty(e[n],t[n]))}),Zf(Zf({},e),t)}var x2={type:"cancelation",msg:"operation is manually canceled"};function wa(e){var t=!1,n=new Promise(function(r,s){e.then(function(o){return t?s(x2):r(o)}),e.catch(s)});return n.cancel=function(){return t=!0},n}var j2=["monaco"],w2=u2.create({config:d2,isInitialized:!1,resolve:null,reject:null,monaco:null}),ny=KS(w2,2),Us=ny[0],zo=ny[1];function S2(e){var t=y2.config(e),n=t.monaco,r=HS(t,j2);zo(function(s){return{config:ty(s.config,r),monaco:n}})}function k2(){var e=Us(function(t){var n=t.monaco,r=t.isInitialized,s=t.resolve;return{monaco:n,isInitialized:r,resolve:s}});if(!e.isInitialized){if(zo({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),wa(Sa);if(window.monaco&&window.monaco.editor)return ry(window.monaco),e.resolve(window.monaco),wa(Sa);g2(N2,T2)(P2)}return wa(Sa)}function N2(e){return document.body.appendChild(e)}function C2(e){var t=document.createElement("script");return e&&(t.src=e),t}function T2(e){var t=Us(function(r){var s=r.config,o=r.reject;return{config:s,reject:o}}),n=C2("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function P2(){var e=Us(function(n){var r=n.config,s=n.resolve,o=n.reject;return{config:r,resolve:s,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){var r=n.m||n;ry(r),e.resolve(r)},function(n){e.reject(n)})}function ry(e){Us().monaco||zo({monaco:e})}function E2(){return Us(function(e){var t=e.monaco;return t})}var Sa=new Promise(function(e,t){return zo({resolve:e,reject:t})}),sy={config:S2,init:k2,__getMonacoInstance:E2},M2={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},ka=M2,A2={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},R2=A2;function D2({children:e}){return Ue.createElement("div",{style:R2.container},e)}var _2=D2,L2=_2;function z2({width:e,height:t,isEditorReady:n,loading:r,_ref:s,className:o,wrapperProps:a}){return Ue.createElement("section",{style:{...ka.wrapper,width:e,height:t},...a},!n&&Ue.createElement(L2,null,r),Ue.createElement("div",{ref:s,style:{...ka.fullWidth,...!n&&ka.hide},className:o}))}var V2=z2,iy=w.memo(V2);function O2(e){w.useEffect(e,[])}var oy=O2;function F2(e,t,n=!0){let r=w.useRef(!0);w.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var Be=F2;function os(){}function nr(e,t,n,r){return I2(e,r)||b2(e,t,n,r)}function I2(e,t){return e.editor.getModel(ay(e,t))}function b2(e,t,n,r){return e.editor.createModel(t,n,r?ay(e,r):void 0)}function ay(e,t){return e.Uri.parse(t)}function $2({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:s,originalModelPath:o,modifiedModelPath:a,keepCurrentOriginalModel:l=!1,keepCurrentModifiedModel:c=!1,theme:u="light",loading:d="Loading...",options:f={},height:h="100%",width:y="100%",className:g,wrapperProps:x={},beforeMount:C=os,onMount:m=os}){let[p,v]=w.useState(!1),[S,j]=w.useState(!0),k=w.useRef(null),N=w.useRef(null),T=w.useRef(null),R=w.useRef(m),P=w.useRef(C),$=w.useRef(!1);oy(()=>{let L=sy.init();return L.then(B=>(N.current=B)&&j(!1)).catch(B=>(B==null?void 0:B.type)!=="cancelation"&&console.error("Monaco initialization: error:",B)),()=>k.current?he():L.cancel()}),Be(()=>{if(k.current&&N.current){let L=k.current.getOriginalEditor(),B=nr(N.current,e||"",r||n||"text",o||"");B!==L.getModel()&&L.setModel(B)}},[o],p),Be(()=>{if(k.current&&N.current){let L=k.current.getModifiedEditor(),B=nr(N.current,t||"",s||n||"text",a||"");B!==L.getModel()&&L.setModel(B)}},[a],p),Be(()=>{let L=k.current.getModifiedEditor();L.getOption(N.current.editor.EditorOption.readOnly)?L.setValue(t||""):t!==L.getValue()&&(L.executeEdits("",[{range:L.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),L.pushUndoStop())},[t],p),Be(()=>{var L,B;(B=(L=k.current)==null?void 0:L.getModel())==null||B.original.setValue(e||"")},[e],p),Be(()=>{let{original:L,modified:B}=k.current.getModel();N.current.editor.setModelLanguage(L,r||n||"text"),N.current.editor.setModelLanguage(B,s||n||"text")},[n,r,s],p),Be(()=>{var L;(L=N.current)==null||L.editor.setTheme(u)},[u],p),Be(()=>{var L;(L=k.current)==null||L.updateOptions(f)},[f],p);let I=w.useCallback(()=>{var H;if(!N.current)return;P.current(N.current);let L=nr(N.current,e||"",r||n||"text",o||""),B=nr(N.current,t||"",s||n||"text",a||"");(H=k.current)==null||H.setModel({original:L,modified:B})},[n,t,s,e,r,o,a]),Q=w.useCallback(()=>{var L;!$.current&&T.current&&(k.current=N.current.editor.createDiffEditor(T.current,{automaticLayout:!0,...f}),I(),(L=N.current)==null||L.editor.setTheme(u),v(!0),$.current=!0)},[f,u,I]);w.useEffect(()=>{p&&R.current(k.current,N.current)},[p]),w.useEffect(()=>{!S&&!p&&Q()},[S,p,Q]);function he(){var B,H,A,z;let L=(B=k.current)==null?void 0:B.getModel();l||((H=L==null?void 0:L.original)==null||H.dispose()),c||((A=L==null?void 0:L.modified)==null||A.dispose()),(z=k.current)==null||z.dispose()}return Ue.createElement(iy,{width:y,height:h,isEditorReady:p,loading:d,_ref:T,className:g,wrapperProps:x})}var B2=$2,U2=w.memo(B2);function H2(e){let t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current}var W2=H2,fi=new Map;function K2({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:s,path:o,theme:a="light",line:l,loading:c="Loading...",options:u={},overrideServices:d={},saveViewState:f=!0,keepCurrentModel:h=!1,width:y="100%",height:g="100%",className:x,wrapperProps:C={},beforeMount:m=os,onMount:p=os,onChange:v,onValidate:S=os}){let[j,k]=w.useState(!1),[N,T]=w.useState(!0),R=w.useRef(null),P=w.useRef(null),$=w.useRef(null),I=w.useRef(p),Q=w.useRef(m),he=w.useRef(),L=w.useRef(r),B=W2(o),H=w.useRef(!1),A=w.useRef(!1);oy(()=>{let _=sy.init();return _.then(E=>(R.current=E)&&T(!1)).catch(E=>(E==null?void 0:E.type)!=="cancelation"&&console.error("Monaco initialization: error:",E)),()=>P.current?V():_.cancel()}),Be(()=>{var E,b,G,ae;let _=nr(R.current,e||r||"",t||s||"",o||n||"");_!==((E=P.current)==null?void 0:E.getModel())&&(f&&fi.set(B,(b=P.current)==null?void 0:b.saveViewState()),(G=P.current)==null||G.setModel(_),f&&((ae=P.current)==null||ae.restoreViewState(fi.get(o))))},[o],j),Be(()=>{var _;(_=P.current)==null||_.updateOptions(u)},[u],j),Be(()=>{!P.current||r===void 0||(P.current.getOption(R.current.editor.EditorOption.readOnly)?P.current.setValue(r):r!==P.current.getValue()&&(A.current=!0,P.current.executeEdits("",[{range:P.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),P.current.pushUndoStop(),A.current=!1))},[r],j),Be(()=>{var E,b;let _=(E=P.current)==null?void 0:E.getModel();_&&s&&((b=R.current)==null||b.editor.setModelLanguage(_,s))},[s],j),Be(()=>{var _;l!==void 0&&((_=P.current)==null||_.revealLine(l))},[l],j),Be(()=>{var _;(_=R.current)==null||_.editor.setTheme(a)},[a],j);let z=w.useCallback(()=>{var _;if(!(!$.current||!R.current)&&!H.current){Q.current(R.current);let E=o||n,b=nr(R.current,r||e||"",t||s||"",E||"");P.current=(_=R.current)==null?void 0:_.editor.create($.current,{model:b,automaticLayout:!0,...u},d),f&&P.current.restoreViewState(fi.get(E)),R.current.editor.setTheme(a),l!==void 0&&P.current.revealLine(l),k(!0),H.current=!0}},[e,t,n,r,s,o,u,d,f,a,l]);w.useEffect(()=>{j&&I.current(P.current,R.current)},[j]),w.useEffect(()=>{!N&&!j&&z()},[N,j,z]),L.current=r,w.useEffect(()=>{var _,E;j&&v&&((_=he.current)==null||_.dispose(),he.current=(E=P.current)==null?void 0:E.onDidChangeModelContent(b=>{A.current||v(P.current.getValue(),b)}))},[j,v]),w.useEffect(()=>{if(j){let _=R.current.editor.onDidChangeMarkers(E=>{var G;let b=(G=P.current.getModel())==null?void 0:G.uri;if(b&&E.find(ae=>ae.path===b.path)){let ae=R.current.editor.getModelMarkers({resource:b});S==null||S(ae)}});return()=>{_==null||_.dispose()}}return()=>{}},[j,S]);function V(){var _,E;(_=he.current)==null||_.dispose(),h?f&&fi.set(o,P.current.saveViewState()):(E=P.current.getModel())==null||E.dispose(),P.current.dispose()}return Ue.createElement(iy,{width:y,height:g,isEditorReady:j,loading:c,_ref:$,className:x,wrapperProps:C})}var G2=K2,q2=w.memo(G2);const Q2=e=>{var r;const t=(r=e.split(".").pop())==null?void 0:r.toLowerCase();return{ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",py:"python",rb:"ruby",rs:"rust",go:"go",json:"json",yaml:"yaml",yml:"yaml",md:"markdown",css:"css",scss:"scss",html:"html",xml:"xml",sql:"sql",sh:"shell",bash:"shell",zsh:"shell"}[t||""]||"plaintext"},Y2=new Set(["txt","log","env"]);function X2(e){var n;const t=((n=e.split(".").pop())==null?void 0:n.toLowerCase())||"";return Y2.has(t)}const Z2=({filename:e,originalCode:t,modifiedCode:n,onClose:r,theme:s="dark",violations:o=[]})=>{const a=t!==n,l=Q2(e),c=s==="dark"?"vs-dark":"light",u=X2(e)&&!a,d=f=>{if(!o.length||!f)return;const h=window.monaco;if(!h)return;const y=o.filter(g=>g.line).map(g=>({range:new h.Range(g.line,1,g.endLine||g.line,1),options:{isWholeLine:!0,className:"violation-line-highlight",glyphMarginClassName:"violation-glyph",glyphMarginHoverMessage:{value:`**[${g.id}] ${g.title}**
359
+
360
+ ${g.details}`},overviewRuler:{color:"#f87171",position:h.editor.OverviewRulerLane.Full}}}));f.deltaDecorations([],y)};return i.jsx("div",{className:"diff-viewer-overlay",children:i.jsxs("div",{className:"diff-viewer-window",children:[i.jsxs("div",{className:"diff-viewer-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(wt,{size:18}),i.jsx("span",{children:e}),a&&i.jsx("span",{className:"diff-badge",children:"Modified"}),o.length>0&&i.jsxs("span",{className:"diff-badge",style:{background:"rgba(248, 113, 113, 0.12)",color:"#f87171",borderColor:"rgba(248, 113, 113, 0.3)"},children:[o.length," violation",o.length!==1?"s":""]})]}),i.jsx("button",{onClick:r,className:"close-btn",children:i.jsx(_c,{size:20})})]}),u?i.jsx("pre",{className:"markdown-viewer",children:n}):i.jsx("div",{className:"diff-editor-container",children:a?i.jsx(U2,{height:"100%",language:l,original:t,modified:n,theme:c,options:{renderSideBySide:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13}}):i.jsx(q2,{height:"100%",language:l,value:n,theme:c,onMount:d,options:{readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13,lineNumbers:"on",glyphMargin:o.length>0}})})]})})},J2=(e,t)=>{const n=[];e.forEach(s=>{const o=s.split("/");let a=n,l="";o.forEach((c,u)=>{l=l?`${l}/${c}`:c;const d=u<o.length-1;let f=a.find(h=>h.name===c);f||(f={name:c,path:l,isDirectory:d,children:[],isViolated:t.some(h=>h===l||h.startsWith(`${l}/`))},a.push(f)),a=f.children})});const r=s=>{s.sort((o,a)=>o.isDirectory&&!a.isDirectory?-1:!o.isDirectory&&a.isDirectory?1:o.name.localeCompare(a.name)),s.forEach(o=>r(o.children))};return r(n),n},ly=({node:e,level:t,onSelect:n,activeFile:r})=>{const[s,o]=w.useState(t===0),a=r===e.path,l=c=>{c.stopPropagation(),e.isDirectory?o(!s):n(e.path)};return i.jsxs("div",{className:"tree-node-container",children:[i.jsxs("div",{className:`tree-item ${a?"active":""} ${e.isViolated?"violated":""}`,style:{paddingLeft:`${t*12+8}px`},onClick:l,children:[e.isDirectory?i.jsxs(i.Fragment,{children:[s?i.jsx(yr,{size:14,className:"chevron"}):i.jsx(cn,{size:14,className:"chevron"}),s?i.jsx(tx,{size:14,className:"folder-icon"}):i.jsx(Fs,{size:14,className:"folder-icon"})]}):i.jsx(wt,{size:14,className:"file-icon"}),i.jsx("span",{className:"node-name",title:e.path,children:e.name}),e.isViolated&&i.jsx(Ns,{size:12,className:"violation-icon"})]}),e.isDirectory&&s&&i.jsx("div",{className:"tree-children",children:e.children.map(c=>i.jsx(ly,{node:c,level:t+1,onSelect:n,activeFile:r},c.path))})]})},nh=({files:e,onSelect:t,activeFile:n,violatedFiles:r=[]})=>{const s=w.useMemo(()=>J2(e,r),[e,r]);return i.jsxs("div",{className:"file-tree",children:[i.jsxs("div",{className:"tree-header",children:[i.jsx(Fs,{size:14}),i.jsx("span",{children:"Project Explorer"})]}),i.jsx("div",{className:"tree-list",children:s.length===0?i.jsx("div",{className:"empty-tree-state",children:"No files found"}):s.map(o=>i.jsx(ly,{node:o,level:0,onSelect:t,activeFile:n},o.path))})]})},Na=e=>typeof e=="string"?e:JSON.stringify(e,null,2),ek=()=>{const[e,t]=w.useState({memories:{}}),[n,r]=w.useState(null),[s,o]=w.useState(""),[a,l]=w.useState(!0),[c,u]=w.useState(!1),d=async()=>{l(!0);try{const v=await(await fetch("/api/memory")).json();v.memories?t(v):t({memories:v})}catch(p){console.error("Failed to fetch memory:",p)}finally{l(!1)}};w.useEffect(()=>{d()},[]);const f=Object.entries(e.memories||{}),h=f.filter(([p])=>p.toLowerCase().includes(s.toLowerCase())),y=n?e.memories[n]:null,g=p=>{try{return new Date(p).toLocaleString()}catch{return p}},x=()=>{y&&(navigator.clipboard.writeText(Na(y.value)),u(!0),setTimeout(()=>u(!1),2e3))},C=p=>{const v=Na(p);if(v.includes("1)")&&v.includes("2)")){const S=v.split(/(\d+\))/);return i.jsx("div",{className:"formatted-content",children:S.map((j,k)=>{if(/^\d+\)$/.test(j))return i.jsx("div",{className:"section-marker",children:j},k);if(j.trim().startsWith("Priority:")){const[N,T]=j.split("Priority:");return i.jsxs(Ue.Fragment,{children:[N.trim()&&i.jsx("div",{className:"section-body",children:N.trim()}),i.jsx("div",{className:"priority-box",children:T.trim()})]},k)}return j.trim()?i.jsx("div",{className:"section-body",children:j.trim()},k):null})})}return i.jsx("pre",{children:v})},m=p=>{const v=p.toLowerCase();return v.includes("own")||v.includes("boundary")?"ownership":v.includes("except")||v.includes("allow")?"exception":v.includes("arch")||v.includes("decision")||v.includes("migrat")?"architecture":"stable"};return i.jsxs("div",{className:"memory-bank",children:[i.jsxs("div",{className:"memory-header",children:[i.jsxs("div",{className:"memory-title",children:[i.jsx(at,{size:24}),i.jsx("h2",{children:"Memory Bank"}),i.jsxs("span",{className:"memory-count",children:[f.length," entries"]})]}),i.jsxs("div",{className:"memory-actions",children:[i.jsxs("div",{className:"search-box",children:[i.jsx(Rc,{size:16}),i.jsx("input",{type:"text",placeholder:"Search memories...",value:s,onChange:p=>o(p.target.value)})]}),i.jsx("button",{className:"refresh-btn",onClick:d,disabled:a,children:i.jsx(qe,{size:16,className:a?"spinning":""})})]})]}),i.jsxs("div",{className:"memory-content",children:[i.jsx("div",{className:"memory-list",children:a?i.jsx("div",{className:"memory-loading",children:"Loading memories..."}):h.length===0?i.jsxs("div",{className:"memory-empty glass-card",children:[i.jsx(Os,{size:48}),i.jsx("h3",{children:"No Memories Stored"}),i.jsxs("p",{children:["Persist stable, non-derivable facts with ",i.jsx("code",{children:"rigour_remember"})," — architecture decisions, ownership boundaries, approved exceptions. Studio merges project"," ",i.jsx("code",{children:".rigour/memory.json"})," and global ",i.jsx("code",{children:"~/.rigour/memory.json"}),"."]})]}):h.map(([p,v])=>i.jsxs("div",{className:`memory-item glass-card ${n===p?"active":""}`,onClick:()=>r(p),children:[i.jsxs("div",{className:"memory-item-header",children:[i.jsx(_d,{size:14}),i.jsx("span",{className:"memory-key",children:p}),i.jsx("span",{className:`memory-cat cat-${m(p)}`,children:m(p)}),i.jsx(cn,{size:14,className:"chevron"})]}),i.jsxs("div",{className:"memory-item-meta",children:[i.jsx(gr,{size:12}),i.jsx("span",{children:g(v.timestamp)}),v.source&&i.jsx("span",{className:"meta-chip",children:v.source})]}),i.jsx("div",{className:"memory-item-preview",children:(()=>{const S=Na(v.value);return S.slice(0,100)+(S.length>100?"...":"")})()})]},p))}),i.jsx("div",{className:"memory-detail",children:y?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"detail-header",children:[i.jsx(_d,{size:18}),i.jsx("h3",{children:n})]}),i.jsxs("div",{className:"detail-meta",children:[i.jsxs("div",{className:"meta-left",children:[i.jsx(gr,{size:14}),i.jsxs("span",{children:["Stored: ",g(y.timestamp)]})]}),i.jsxs("button",{className:`copy-btn ${c?"copied":""}`,onClick:x,children:[c?i.jsx(q0,{size:14}):i.jsx(Y0,{size:14}),i.jsx("span",{children:c?"Copied":"Copy"})]})]}),i.jsx("div",{className:"detail-content",children:C(y.value)})]}):i.jsxs("div",{className:"detail-placeholder",children:[i.jsx(at,{size:48}),i.jsx("p",{children:"Select a memory to view its contents"})]})})]})]})},tk=()=>{var j;const[e,t]=w.useState({patterns:[],stats:{totalPatterns:0,totalFiles:0,byType:{}}}),[n,r]=w.useState(null),[s,o]=w.useState(""),[a,l]=w.useState("all"),[c,u]=w.useState(!0),[d,f]=w.useState(!1),[h,y]=w.useState([]),[g,x]=w.useState(!1),C=async()=>{u(!0);try{const N=await(await fetch("/api/index-stats")).json();t(N)}catch(k){console.error("Failed to fetch pattern index:",k)}finally{u(!1)}};w.useEffect(()=>{C()},[]),w.useEffect(()=>{if(!d||s.length<3){y([]);return}const k=setTimeout(async()=>{x(!0);try{const T=await(await fetch(`/api/index-search?q=${encodeURIComponent(s)}`)).json();y(T)}catch(N){console.error("Semantic search failed:",N)}finally{x(!1)}},500);return()=>clearTimeout(k)},[s,d]);const m=d&&s.length>=3?h:e.patterns||[],p=e.stats||{totalPatterns:0,totalFiles:0,byType:{}},v=d&&s.length>=3?m:m.filter(k=>{const N=k.name.toLowerCase().includes(s.toLowerCase())||k.file.toLowerCase().includes(s.toLowerCase()),T=a==="all"||k.type===a;return N&&T}),S=Object.keys(p.byType||{});return i.jsxs("div",{className:"pattern-index",children:[i.jsxs("div",{className:"pattern-header",children:[i.jsxs("div",{className:"pattern-title",children:[i.jsx(sn,{size:24}),i.jsx("h2",{children:"Pattern Index"}),i.jsxs("span",{className:"pattern-count",children:[p.totalPatterns," patterns"]})]}),i.jsxs("div",{className:"pattern-actions",children:[i.jsxs("div",{className:"search-box",children:[i.jsx(Rc,{size:16}),i.jsx("input",{type:"text",placeholder:"Search patterns...",value:s,onChange:k=>o(k.target.value)})]}),i.jsxs("div",{className:"filter-box",children:[i.jsx(Ac,{size:16}),i.jsxs("select",{value:a,onChange:k=>l(k.target.value),children:[i.jsx("option",{value:"all",children:"All Types"}),S.map(k=>i.jsxs("option",{value:k,children:[k," (",p.byType[k],")"]},k))]})]}),i.jsxs("button",{className:`semantic-toggle ${d?"active":""}`,onClick:()=>f(!d),title:"Semantic Search (v2)",children:[i.jsx(Dd,{size:16}),i.jsx("span",{children:"AI Search"})]}),i.jsx("button",{className:"refresh-btn",onClick:C,disabled:c,children:i.jsx(qe,{size:16,className:c?"spinning":""})})]})]}),i.jsxs("div",{className:"pattern-stats",children:[i.jsxs("div",{className:"stat-card",children:[i.jsx(gm,{size:20}),i.jsxs("div",{className:"stat-info",children:[i.jsx("span",{className:"stat-value",children:p.totalPatterns}),i.jsx("span",{className:"stat-label",children:"Total Patterns"})]})]}),i.jsxs("div",{className:"stat-card",children:[i.jsx(wt,{size:20}),i.jsxs("div",{className:"stat-info",children:[i.jsx("span",{className:"stat-value",children:p.totalFiles}),i.jsx("span",{className:"stat-label",children:"Files Indexed"})]})]}),i.jsxs("div",{className:"stat-card",children:[i.jsx(Dd,{size:20}),i.jsxs("div",{className:"stat-info",children:[i.jsx("span",{className:"stat-value",children:S.length}),i.jsx("span",{className:"stat-label",children:"Pattern Types"})]})]}),p.indexDurationMs&&i.jsxs("div",{className:"stat-card",children:[i.jsx(gr,{size:20}),i.jsxs("div",{className:"stat-info",children:[i.jsxs("span",{className:"stat-value",children:[p.indexDurationMs,"ms"]}),i.jsx("span",{className:"stat-label",children:"Index Time"})]})]})]}),i.jsxs("div",{className:"pattern-content",children:[i.jsxs("div",{className:"pattern-list",children:[g&&i.jsxs("div",{className:"searching-indicator",children:[i.jsx(qe,{size:14,className:"spinning"}),i.jsx("span",{children:"AI is analyzing your query..."})]}),c?i.jsx("div",{className:"pattern-loading",children:"Loading patterns..."}):v.length===0?i.jsxs("div",{className:"pattern-empty",children:[i.jsx(sn,{size:48}),i.jsx("h3",{children:"No Patterns Indexed"}),i.jsxs("p",{children:["Run ",i.jsx("code",{children:"rigour index"})," to scan your codebase."]})]}):v.map(k=>i.jsxs("div",{className:`pattern-item ${(n==null?void 0:n.id)===k.id?"active":""}`,onClick:()=>r(k),children:[k.similarity&&i.jsxs("div",{className:"similarity-badge",children:[(k.similarity*100).toFixed(0),"% Match"]}),i.jsxs("div",{className:"pattern-item-header",children:[i.jsx("span",{className:"pattern-type-badge",children:k.type}),i.jsx("span",{className:"pattern-name",children:k.name}),i.jsx(cn,{size:14,className:"chevron"})]}),i.jsxs("div",{className:"pattern-item-file",children:[i.jsx(wt,{size:12}),i.jsxs("span",{children:[k.file,":",k.line]})]}),k.exported&&i.jsx("span",{className:"exported-badge",children:"exported"})]},k.id))]}),i.jsx("div",{className:"pattern-detail",children:n?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"detail-header",children:[i.jsx("span",{className:"pattern-type-badge large",children:n.type}),i.jsx("h3",{children:n.name})]}),i.jsxs("div",{className:"detail-section",children:[i.jsx("h4",{children:"Location"}),i.jsxs("code",{children:[n.file,":",n.line,"-",n.endLine]})]}),n.signature&&i.jsxs("div",{className:"detail-section",children:[i.jsx("h4",{children:"Signature"}),i.jsx("pre",{children:n.signature})]}),n.description&&i.jsxs("div",{className:"detail-section",children:[i.jsx("h4",{children:"Description"}),i.jsx("p",{children:n.description})]}),((j=n.keywords)==null?void 0:j.length)>0&&i.jsxs("div",{className:"detail-section",children:[i.jsx("h4",{children:"Keywords"}),i.jsx("div",{className:"keywords-list",children:n.keywords.map((k,N)=>i.jsx("span",{className:"keyword-tag",children:k},N))})]}),i.jsxs("div",{className:"detail-section",children:[i.jsx("h4",{children:"Usage"}),i.jsxs("p",{children:["Imported in ",i.jsx("strong",{children:n.usageCount})," files"]})]})]}):i.jsxs("div",{className:"detail-placeholder",children:[i.jsx(sn,{size:48}),i.jsx("p",{children:"Select a pattern to view details"})]})})]})]})},nk=()=>{var y,g,x,C,m;const[e,t]=w.useState(null),[n,r]=w.useState(""),[s,o]=w.useState(null),[a,l]=w.useState(!0),[c,u]=w.useState("visual"),d=async()=>{l(!0);try{const v=await(await fetch("/api/config")).text();r(v);const S=f(v);t(S)}catch(p){console.error("Failed to fetch config:",p)}try{const p=await fetch("/api/report-stats");if(p.ok){const v=await p.json();o(v)}}catch{}l(!1)},f=p=>{var v;try{const S=p.split(`
361
+ `),j={};let k=null,N=null;for(const T of S){if(T.startsWith("#")||!T.trim())continue;const R=T.search(/\S/),P=T.trim();if(R===0&&P.includes(":")){const[$]=P.split(":");k=$.trim(),N=null;const I=(v=P.split(":")[1])==null?void 0:v.trim();I&&I!=="{}"&&I!=="[]"?j[k]=isNaN(Number(I))?I:Number(I):j[k]={}}else if(R===2&&k&&P.includes(":")){const[$]=P.split(":");N=$.trim();const I=P.split(":").slice(1).join(":").trim();if(I&&I!=="{}"&&I!=="[]"){typeof j[k]!="object"&&(j[k]={});const Q=I==="true"?!0:I==="false"?!1:isNaN(Number(I))?I:Number(I);j[k][N]=Q}else typeof j[k]!="object"&&(j[k]={}),j[k][N]={}}else if(R===4&&k&&N&&P.includes(":")){const[$]=P.split(":"),I=P.split(":").slice(1).join(":").trim();typeof j[k][N]!="object"&&(j[k][N]={});const Q=I==="true"?!0:I==="false"?!1:isNaN(Number(I))?I:Number(I);j[k][N][$.trim()]=Q}}return j}catch{return{}}};w.useEffect(()=>{d()},[]);const h=(e==null?void 0:e.gates)||{};return i.jsxs("div",{className:"quality-gates",children:[i.jsxs("div",{className:"gates-header",children:[i.jsxs("div",{className:"gates-title",children:[i.jsx(ts,{size:24}),i.jsx("h2",{children:"Quality Gates"}),(e==null?void 0:e.preset)&&i.jsx("span",{className:"preset-badge",children:e.preset})]}),i.jsxs("div",{className:"gates-actions",children:[i.jsxs("div",{className:"view-toggle",children:[i.jsxs("button",{className:c==="visual"?"active":"",onClick:()=>u("visual"),children:[i.jsx(sn,{size:16})," Visual"]}),i.jsxs("button",{className:c==="raw"?"active":"",onClick:()=>u("raw"),children:[i.jsx(wt,{size:16})," YAML"]})]}),i.jsx("button",{className:"refresh-btn",onClick:d,disabled:a,children:i.jsx(qe,{size:16,className:a?"spinning":""})})]})]}),a?i.jsx("div",{className:"gates-loading",children:"Loading configuration..."}):c==="raw"?i.jsx("div",{className:"gates-raw",children:i.jsx("pre",{children:n})}):i.jsxs("div",{className:"gates-content",children:[i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(wt,{size:18}),i.jsx("h3",{children:"Code Quality"})]}),i.jsxs("div",{className:"gate-grid",children:[i.jsx(Z,{label:"Max File Lines",value:h.max_file_lines,icon:i.jsx(wt,{size:16})}),i.jsx(Z,{label:"Forbid TODOs",value:h.forbid_todos,icon:h.forbid_todos?i.jsx(Cs,{size:16}):i.jsx(Nt,{size:16})}),i.jsx(Z,{label:"Forbid FIXMEs",value:h.forbid_fixme,icon:h.forbid_fixme?i.jsx(Cs,{size:16}):i.jsx(Nt,{size:16})})]})]}),h.ast&&i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(nx,{size:18}),i.jsx("h3",{children:"AST Limits"})]}),i.jsxs("div",{className:"gate-grid",children:[i.jsx(Z,{label:"Complexity",value:h.ast.complexity}),i.jsx(Z,{label:"Max Methods",value:h.ast.max_methods}),i.jsx(Z,{label:"Max Params",value:h.ast.max_params}),i.jsx(Z,{label:"Max Nesting",value:h.ast.max_nesting}),i.jsx(Z,{label:"Max Function Lines",value:h.ast.max_function_lines}),i.jsx(Z,{label:"Max Inheritance",value:h.ast.max_inheritance_depth})]})]}),h.safety&&i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(wm,{size:18}),i.jsx("h3",{children:"File Guard"})]}),i.jsx("div",{className:"gate-grid",children:i.jsx(Z,{label:"Max Files/Cycle",value:h.safety.max_files_changed_per_cycle})}),h.safety.protected_paths&&h.safety.protected_paths.length>0&&i.jsxs("div",{className:"protected-paths",children:[i.jsx("h4",{children:"Protected Paths"}),i.jsx("div",{className:"path-list",children:h.safety.protected_paths.map((p,v)=>i.jsx("span",{className:"path-tag",children:p},v))})]})]}),h.required_files&&h.required_files.length>0&&i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(Ie,{size:18}),i.jsx("h3",{children:"Required Files"})]}),i.jsx("div",{className:"file-list",children:h.required_files.map((p,v)=>i.jsxs("div",{className:"file-item",children:[i.jsx(wt,{size:14}),i.jsx("span",{children:p})]},v))})]}),h.context&&i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(Qt,{size:18}),i.jsx("h3",{children:"Context Mining"})]}),i.jsxs("div",{className:"gate-grid",children:[i.jsx(Z,{label:"Enabled",value:h.context.enabled}),i.jsx(Z,{label:"Sensitivity",value:h.context.sensitivity}),i.jsx(Z,{label:"Mining Depth",value:h.context.mining_depth})]})]}),h.retry_loop_breaker&&i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(Sm,{size:18}),i.jsx("h3",{children:"Retry Loop Breaker"})]}),i.jsxs("div",{className:"gate-grid",children:[i.jsx(Z,{label:"Enabled",value:h.retry_loop_breaker.enabled}),i.jsx(Z,{label:"Max Retries",value:h.retry_loop_breaker.max_retries})]})]}),i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(Qt,{size:18}),i.jsx("h3",{children:"AI-Native Gates"})]}),i.jsxs("div",{className:"gate-grid",children:[i.jsx(Z,{label:"Duplication Drift",value:((y=h.duplication_drift)==null?void 0:y.enabled)??!0,icon:i.jsx(Nt,{size:16})}),i.jsx(Z,{label:"Hallucinated Imports",value:((g=h.hallucinated_imports)==null?void 0:g.enabled)??!0,icon:i.jsx(Ie,{size:16})}),i.jsx(Z,{label:"Error Handling",value:((x=h.inconsistent_error_handling)==null?void 0:x.enabled)??!0,icon:i.jsx(ts,{size:16})}),i.jsx(Z,{label:"Context Artifacts",value:((C=h.context_window_artifacts)==null?void 0:C.enabled)??!0,icon:i.jsx(sn,{size:16})}),i.jsx(Z,{label:"Async Safety",value:((m=h.promise_safety)==null?void 0:m.enabled)??!0,icon:i.jsx(Qt,{size:16})})]})]}),s&&i.jsxs("div",{className:"gate-section",children:[i.jsxs("div",{className:"section-header",children:[i.jsx(ts,{size:18}),i.jsx("h3",{children:"Latest Scores"})]}),i.jsxs("div",{className:"gate-grid",children:[s.score!==void 0&&i.jsx(Z,{label:"Overall Score",value:`${s.score}/100`}),s.ai_health_score!==void 0&&i.jsx(Z,{label:"AI Health",value:`${s.ai_health_score}/100`,icon:i.jsx(Qt,{size:16})}),s.structural_score!==void 0&&i.jsx(Z,{label:"Structural",value:`${s.structural_score}/100`,icon:i.jsx(sn,{size:16})})]}),s.severity_breakdown&&i.jsxs("div",{className:"severity-breakdown",children:[i.jsx("h4",{children:"Severity Breakdown"}),i.jsx("div",{className:"gate-grid",children:Object.entries(s.severity_breakdown).filter(([,p])=>p>0).map(([p,v])=>i.jsx(Z,{label:p.charAt(0).toUpperCase()+p.slice(1),value:v},p))})]}),s.provenance_breakdown&&i.jsxs("div",{className:"provenance-breakdown",children:[i.jsx("h4",{children:"Provenance Breakdown"}),i.jsx("div",{className:"gate-grid",children:Object.entries(s.provenance_breakdown).filter(([,p])=>p>0).map(([p,v])=>i.jsx(Z,{label:p,value:v},p))})]})]})]})]})},Z=({label:e,value:t,icon:n})=>{const r=typeof t=="boolean"?t?"Yes":"No":t??"N/A";return i.jsxs("div",{className:"gate-card",children:[n&&i.jsx("div",{className:"gate-icon",children:n}),i.jsxs("div",{className:"gate-info",children:[i.jsx("span",{className:"gate-value",children:r}),i.jsx("span",{className:"gate-label",children:e})]})]})},rk=({logs:e,onClearLogs:t,onSelectLog:n,selectedLog:r})=>{const[s,o]=w.useState(""),[a,l]=w.useState("all"),[c,u]=w.useState("all"),d=Ue.useMemo(()=>{const x={};return e.forEach(C=>{const m=C.requestId||C.id;x[m]?x[m]={...x[m],...C}:x[m]={...C}}),Object.values(x).sort((C,m)=>new Date(m.timestamp).getTime()-new Date(C.timestamp).getTime())},[e]),f=Ue.useMemo(()=>{const x=new Set;return d.forEach(C=>C.tool&&x.add(C.tool)),Array.from(x)},[d]),h=Ue.useMemo(()=>d.filter(x=>{var v;const C=!s||((v=x.tool)==null?void 0:v.toLowerCase().includes(s.toLowerCase()))||JSON.stringify(x.arguments||{}).toLowerCase().includes(s.toLowerCase()),m=a==="all"||x.status===a,p=c==="all"||x.tool===c;return C&&m&&p}),[d,s,a,c]),y=Ue.useMemo(()=>({total:d.length,success:d.filter(x=>x.status==="success").length,error:d.filter(x=>x.status==="error").length,pending:d.filter(x=>!x.status||x.status==="pending").length}),[d]),g=()=>{const x=JSON.stringify(h,null,2),C=new Blob([x],{type:"application/json"}),m=URL.createObjectURL(C),p=document.createElement("a");p.href=m,p.download=`rigour-audit-${new Date().toISOString().split("T")[0]}.json`,p.click()};return i.jsxs("div",{className:"audit-log",children:[i.jsxs("div",{className:"audit-header",children:[i.jsxs("div",{className:"audit-title",children:[i.jsx(Dt,{size:24}),i.jsx("h2",{children:"Audit Trail"}),i.jsxs("span",{className:"log-count",children:[h.length," events"]})]}),i.jsxs("div",{className:"audit-actions",children:[i.jsxs("button",{className:"btn-secondary",onClick:t,children:[i.jsx(km,{size:16})," Clear"]}),i.jsxs("button",{className:"btn-primary",onClick:g,children:[i.jsx(J0,{size:16})," Export"]})]})]}),i.jsxs("div",{className:"audit-stats",children:[i.jsxs("div",{className:"stat-pill",children:[i.jsx(Dt,{size:14}),i.jsxs("span",{children:[y.total," Total"]})]}),i.jsxs("div",{className:"stat-pill success",children:[i.jsx(Nt,{size:14}),i.jsxs("span",{children:[y.success," Success"]})]}),i.jsxs("div",{className:"stat-pill error",children:[i.jsx(Cs,{size:14}),i.jsxs("span",{children:[y.error," Failed"]})]}),i.jsxs("div",{className:"stat-pill pending",children:[i.jsx(Ie,{size:14}),i.jsxs("span",{children:[y.pending," Pending"]})]})]}),i.jsxs("div",{className:"audit-filters",children:[i.jsxs("div",{className:"search-box",children:[i.jsx(Rc,{size:16}),i.jsx("input",{type:"text",placeholder:"Search logs...",value:s,onChange:x=>o(x.target.value)})]}),i.jsxs("div",{className:"filter-box",children:[i.jsx(Ac,{size:16}),i.jsxs("select",{value:a,onChange:x=>l(x.target.value),children:[i.jsx("option",{value:"all",children:"All Status"}),i.jsx("option",{value:"success",children:"Success"}),i.jsx("option",{value:"error",children:"Error"}),i.jsx("option",{value:"pending",children:"Pending"})]})]}),i.jsxs("div",{className:"filter-box",children:[i.jsx(ro,{size:16}),i.jsxs("select",{value:c,onChange:x=>u(x.target.value),children:[i.jsx("option",{value:"all",children:"All Tools"}),f.map(x=>i.jsx("option",{value:x,children:x},x))]})]})]}),i.jsxs("div",{className:"audit-content",children:[i.jsx("div",{className:"log-list",children:h.length===0?i.jsxs("div",{className:"empty-state",children:[i.jsx(ro,{size:48}),i.jsx("h3",{children:"No Interactions Detected"}),i.jsx("p",{children:"Rigour tool calls will appear here in real-time."})]}):h.map(x=>i.jsxs("div",{className:`log-entry ${(r==null?void 0:r.id)===x.id?"active":""} ${x._rigour_report?"has-report":""}`,onClick:()=>n((r==null?void 0:r.id)===x.id?null:x),children:[i.jsxs("div",{className:"log-header",children:[i.jsx("span",{className:`status-dot ${x.status||"pending"}`}),i.jsx("span",{className:"log-tool",children:x.tool}),i.jsxs("span",{className:"log-time",children:[i.jsx(gr,{size:12}),new Date(x.timestamp).toLocaleTimeString()]}),x._rigour_report&&i.jsxs("span",{className:"report-badge",children:[i.jsx(ex,{size:12})," Report"]}),x.arbitrated&&i.jsx("span",{className:`arbitrated-badge ${x.decision}`,children:x.decision==="approve"?"Approved":"Rejected"}),i.jsx(cn,{size:14,className:"chevron"})]}),x.requestId&&i.jsxs("div",{className:"log-request-id",children:["ID: ",x.requestId.slice(0,12),"..."]})]},x.id))}),i.jsx("div",{className:"log-detail",children:r?i.jsx(sk,{log:r,onClose:()=>n(null)}):i.jsxs("div",{className:"detail-placeholder",children:[i.jsx(wt,{size:48}),i.jsx("p",{children:"Select a log entry to view details"})]})})]})]})},sk=({log:e,onClose:t})=>{var o,a,l,c,u,d,f;const n=!!e._rigour_report||["rigour_checkpoint","rigour_agent_register","rigour_handoff"].includes(e.tool),[r,s]=w.useState(n?"report":"args");return i.jsxs("div",{className:"log-detail-view",children:[i.jsxs("div",{className:"detail-header",children:[i.jsxs("div",{className:"detail-info",children:[i.jsxs("span",{className:`status-badge ${e.status||"pending"}`,children:[e.status==="success"?i.jsx(Nt,{size:14}):e.status==="error"?i.jsx(Cs,{size:14}):i.jsx(Ie,{size:14}),e.status||"pending"]}),i.jsx("h3",{children:e.tool})]}),i.jsx("button",{className:"close-btn",onClick:t,children:i.jsx(_c,{size:18})})]}),i.jsxs("div",{className:"detail-meta",children:[i.jsxs("div",{className:"meta-item",children:[i.jsx("span",{className:"meta-label",children:"Timestamp"}),i.jsx("span",{className:"meta-value",children:new Date(e.timestamp).toLocaleString()})]}),e.requestId&&i.jsxs("div",{className:"meta-item",children:[i.jsx("span",{className:"meta-label",children:"Request ID"}),i.jsx("span",{className:"meta-value mono",children:e.requestId})]})]}),n&&i.jsxs("div",{className:"detail-tabs",children:[i.jsx("button",{className:r==="report"?"active":"",onClick:()=>s("report"),children:e._rigour_report?"Verification Report":"Visualized Content"}),i.jsx("button",{className:r==="args"?"active":"",onClick:()=>s("args"),children:"Technical Arguments"})]}),i.jsx("div",{className:"detail-body",children:r==="args"?i.jsxs(i.Fragment,{children:[e.arguments&&i.jsxs("div",{className:"code-section",children:[i.jsx("h4",{children:"Arguments"}),i.jsx("pre",{children:JSON.stringify(e.arguments,null,2)})]}),e.error&&i.jsxs("div",{className:"error-section",children:[i.jsx("h4",{children:"Error"}),i.jsx("div",{className:"error-message",children:e.error})]})]}):i.jsx("div",{className:"verification-view",children:e.tool==="rigour_checkpoint"?i.jsxs("div",{className:"checkpoint-viz",children:[i.jsxs("div",{className:"viz-stats",children:[i.jsxs("div",{className:"viz-stat",children:[i.jsx("span",{className:"label",children:"Progress"}),i.jsxs("span",{className:"value",children:[((o=e.arguments)==null?void 0:o.progressPct)??0,"%"]})]}),i.jsxs("div",{className:"viz-stat",children:[i.jsx("span",{className:"label",children:"Quality"}),i.jsxs("span",{className:"value",style:{color:(((a=e.arguments)==null?void 0:a.qualityScore)??0)>=80?"#34d399":"#f87171"},children:[((l=e.arguments)==null?void 0:l.qualityScore)??0,"%"]})]})]}),i.jsxs("div",{className:"viz-summary",children:[i.jsx("h4",{children:"Summary of Work"}),i.jsx("p",{children:((c=e.arguments)==null?void 0:c.summary)||"No summary provided."})]}),((u=e.arguments)==null?void 0:u.filesChanged)&&e.arguments.filesChanged.length>0&&i.jsxs("div",{className:"viz-files",children:[i.jsx("h4",{children:"Files Changed"}),i.jsx("div",{className:"file-badges",children:e.arguments.filesChanged.map(h=>i.jsx("span",{className:"file-badge",children:h},h))})]})]}):e.tool==="rigour_agent_register"?i.jsxs("div",{className:"agent-viz",children:[i.jsx(Dt,{size:32,className:"viz-icon"}),i.jsx("h3",{children:"Agent Scope Claims"}),i.jsxs("div",{className:"scope-box",children:[i.jsx("h4",{children:"Claimed Scope:"}),i.jsx("div",{className:"scope-list",children:(f=(d=e.arguments)==null?void 0:d.taskScope)==null?void 0:f.map(h=>i.jsx("code",{children:h},h))})]})]}):i.jsxs("div",{className:"code-section",children:[i.jsx("h4",{children:"Rigour Report"}),i.jsx("pre",{children:JSON.stringify(e._rigour_report,null,2)})]})})})]})};function ik(e,t){return e===t?!0:e.startsWith("task:")||t.startsWith("task:")?e===t:((r,s)=>r===s||r.startsWith(`${s}/`)||s.startsWith(`${r}/`))(e,t)}function ok(e){return e.startsWith("CTP-")?e.replace(/-task$/,""):e.length>28?`${e.slice(0,12)}…${e.slice(-8)}`:e}function ak({session:e}){if(!e||e.agents.length===0)return i.jsxs("div",{className:"empty-state glass-card",children:[i.jsx(jr,{size:48}),i.jsx("h3",{children:"No Active Agent Team"}),i.jsxs("p",{children:["Register agents with ",i.jsx("code",{children:"rigour_agent_register"}),", or Studio will derive recent agents from checkpoint metrics in the Brain DB."]}),i.jsx("div",{className:"hint-box",children:i.jsx("span",{children:"Works with any MCP client — Claude, Codex, Cursor, VS Code, and more."})})]});const t=!!e.derived||e.status==="completed",n=s=>{switch(s){case"active":return i.jsx(Ei,{size:10,fill:"#34d399",stroke:"#34d399"});case"idle":return i.jsx(Ei,{size:10,fill:"#fbbf24",stroke:"#fbbf24"});case"completed":return i.jsx(Nt,{size:14,color:"#34d399"});default:return i.jsx(Ei,{size:10})}},r=(s,o)=>t||s.status==="completed"?!1:o.filter(l=>l.agentId!==s.agentId&&l.status!=="completed").some(l=>s.taskScope.some(c=>l.taskScope.some(u=>ik(c,u))));return i.jsxs("div",{className:"agent-teams",children:[i.jsxs("div",{className:"panel-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(jr,{size:18}),i.jsx("span",{children:"Agent Team Session"})]}),i.jsx("div",{className:`session-status ${e.status}`,children:e.status.toUpperCase()})]}),i.jsxs("div",{className:"session-info",children:[i.jsx("span",{className:"session-id",children:e.sessionId}),i.jsxs("span",{className:"agent-count",children:[e.agents.length," agents"]}),e.derived&&i.jsx("span",{className:"meta-chip",children:"Historical (derived)"})]}),i.jsx("div",{className:"agents-grid",children:e.agents.map(s=>{const o=r(s,e.agents);return i.jsxs("div",{className:`agent-card glass-card ${s.status} ${o?"has-conflict":""}`,children:[i.jsxs("div",{className:"agent-header",children:[i.jsxs("div",{className:"agent-id",children:[n(s.status),i.jsx("span",{title:s.agentId,children:ok(s.agentId)})]}),o&&i.jsxs("div",{className:"conflict-badge",children:[i.jsx(Ie,{size:12}),i.jsx("span",{children:"Scope Conflict"})]})]}),i.jsxs("div",{className:"task-scope",children:[i.jsx("h4",{children:"Enforced scope"}),i.jsx("ul",{children:s.taskScope.map((a,l)=>i.jsxs("li",{children:[i.jsx(Fs,{size:12}),i.jsx("code",{children:a})]},l))})]}),i.jsxs("div",{className:"agent-meta",children:[i.jsxs("span",{children:["Registered: ",new Date(s.registeredAt).toLocaleTimeString()]}),s.lastCheckpoint&&i.jsxs("span",{children:["Last checkpoint: ",new Date(s.lastCheckpoint).toLocaleTimeString()]})]}),i.jsx("div",{className:"mono dim agent-raw-id",children:s.agentId})]},s.agentId)})})]})}function lk({checkpoints:e}){if(!e||e.length===0)return i.jsxs("div",{className:"empty-state glass-card",children:[i.jsx(xr,{size:48}),i.jsx("h3",{children:"No Checkpoints Yet"}),i.jsxs("p",{children:["Checkpoints compress agent state for verified handoffs. Call ",i.jsx("code",{children:"rigour_checkpoint"})," before",i.jsx("code",{children:" rigour_handoff"}),". Quality below 80% should pause the loop."]}),i.jsx("div",{className:"hint-box",children:i.jsx("span",{children:"Default interval: 15 minutes"})})]});const t=s=>s>=80?"#34d399":s>=60?"#fbbf24":"#f87171",n=s=>{if(s===0)return null;const o=e[s-1].qualityScore,a=e[s].qualityScore;return a>o+5?i.jsx(Nm,{size:14,color:"#34d399"}):a<o-5?i.jsx(Dc,{size:14,color:"#f87171"}):null},r=e.some((s,o)=>{if(o<2)return!1;const a=e.slice(Math.max(0,o-2),o),l=a.reduce((c,u)=>c+u.qualityScore,0)/a.length;return s.qualityScore<l-10});return i.jsxs("div",{className:"checkpoint-timeline",children:[i.jsxs("div",{className:"panel-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(xr,{size:18}),i.jsx("span",{children:"Checkpoint Timeline"})]}),i.jsxs("div",{className:"drift-visualization",children:[i.jsxs("svg",{width:"120",height:"30",viewBox:"0 0 120 30",className:"drift-sparkline",children:[i.jsx("path",{d:`M ${e.map((s,o)=>`${o/(e.length-1||1)*120} ${30-s.qualityScore/100*30}`).join(" L ")}`,fill:"none",stroke:"var(--accent-primary)",strokeWidth:"2",strokeLinecap:"round"}),e.map((s,o)=>i.jsx("circle",{cx:o/(e.length-1||1)*120,cy:30-s.qualityScore/100*30,r:"2",fill:t(s.qualityScore)},o))]}),i.jsx("span",{className:"drift-label",children:"Session Stability"})]}),r&&i.jsxs("div",{className:"drift-alert",children:[i.jsx(Ie,{size:14}),i.jsx("span",{children:"Drift Detected — quality dropped vs recent average"})]})]}),i.jsxs("div",{className:"timeline-container",children:[i.jsx("div",{className:"timeline-line"}),e.map((s,o)=>{var a;return i.jsxs("div",{className:`checkpoint-entry glass-card ${s.warnings.length>0||s.qualityScore<80?"has-warnings":""}`,children:[i.jsxs("div",{className:"checkpoint-marker",children:[i.jsx("div",{className:"marker-dot",style:{backgroundColor:t(s.qualityScore)}}),s.qualityScore<80&&i.jsx("div",{className:"marker-ring warn","aria-hidden":"true"})]}),i.jsxs("div",{className:"checkpoint-content",children:[i.jsxs("div",{className:"checkpoint-header",children:[i.jsx("span",{className:"checkpoint-summary-lead",children:((a=s.summary)==null?void 0:a.slice(0,80))||s.checkpointId}),i.jsx("span",{className:"checkpoint-time",children:new Date(s.timestamp).toLocaleTimeString()})]}),i.jsx("div",{className:"mono dim checkpoint-id",children:s.checkpointId}),s.qualityScore<80&&i.jsxs("div",{className:"warning-item",children:[i.jsx(Ie,{size:12}),i.jsx("span",{children:"Below threshold — pause handoffs until quality recovers"})]}),i.jsxs("div",{className:"checkpoint-stats",children:[i.jsxs("div",{className:"stat",children:[i.jsx("span",{className:"label",children:"Progress"}),i.jsx("div",{className:"progress-bar",children:i.jsx("div",{className:"progress-fill",style:{width:`${s.progressPct}%`}})}),i.jsxs("span",{className:"value",children:[s.progressPct,"%"]})]}),i.jsxs("div",{className:"stat",children:[i.jsx("span",{className:"label",children:"Quality"}),i.jsxs("span",{className:"value score",style:{color:t(s.qualityScore)},children:[s.qualityScore,"%",n(o)]})]}),i.jsxs("div",{className:"stat",children:[i.jsx("span",{className:"label",children:"Agent"}),i.jsx("span",{className:"value agent-id",children:s.agentId})]})]}),i.jsx("div",{className:"checkpoint-summary",children:i.jsx("p",{children:s.summary})}),s.filesChanged.length>0&&i.jsx("div",{className:"files-changed",children:i.jsxs("span",{className:"count",children:[s.filesChanged.length," files changed"]})}),s.warnings.length>0&&i.jsx("div",{className:"warnings",children:s.warnings.map((l,c)=>i.jsxs("div",{className:"warning-item",children:[i.jsx(Ie,{size:12}),i.jsx("span",{children:l})]},c))})]})]},s.checkpointId)})]})]})}const cy={critical:"var(--status-error)",high:"#f97316",medium:"var(--status-warning)",low:"var(--accent-primary)",info:"var(--text-dim)"},ck={srp_violation:"Single Responsibility",ocp_violation:"Open/Closed Principle",lsp_violation:"Liskov Substitution",isp_violation:"Interface Segregation",dip_violation:"Dependency Inversion",god_class:"God Class",god_function:"God Function",long_params:"Long Parameters",complex_conditional:"Complex Conditional",empty_catch:"Empty Catch Block",error_inconsistency:"Error Inconsistency",race_condition:"Race Condition",goroutine_leak:"Goroutine Leak",channel_misuse:"Channel Misuse",mutex_scope:"Mutex Scope",isp_violation_interface:"Interface Bloat",missing_test:"Missing Tests",long_file:"Long File",magic_number:"Magic Numbers",resource_leak:"Resource Leak",dry_violation:"DRY Violation",feature_envy:"Feature Envy",dead_code:"Dead Code",naming_convention:"Naming Convention",performance:"Performance"},rh={"SOLID Principles":["srp_violation","ocp_violation","lsp_violation","isp_violation","dip_violation"],"Code Smells":["god_class","god_function","long_params","complex_conditional","long_file","magic_number","dead_code","feature_envy"],"Error Handling":["empty_catch","error_inconsistency"],Concurrency:["race_condition","goroutine_leak","channel_misuse","mutex_scope"],Testing:["missing_test"],Architecture:["isp_violation_interface","dry_violation","naming_convention","resource_leak"],Performance:["performance"]},uk=()=>{const[e,t]=w.useState(null),[n,r]=w.useState(!0),[s,o]=w.useState(new Set),[a,l]=w.useState(new Set),[c,u]=w.useState("all"),[d,f]=w.useState(!1),h=async()=>{r(!0);try{const[j,k]=await Promise.all([fetch("/api/report-stats"),fetch("/api/deep-findings")]),N=j.ok?await j.json():{},T=k.ok?await k.json():[];t({...N,findings:T})}catch(j){console.error("Failed to fetch deep analysis data:",j)}r(!1)};w.useEffect(()=>{h()},[]);const y=j=>{o(k=>{const N=new Set(k);return N.has(j)?N.delete(j):N.add(j),N})},g=j=>{l(k=>{const N=new Set(k);return N.has(j)?N.delete(j):N.add(j),N})},x=((e==null?void 0:e.findings)||[]).filter(j=>j.provenance==="deep-analysis"),C=x.filter(j=>!(c!=="all"&&j.severity!==c||d&&!j.verified)),m=Object.entries(rh).map(([j,k])=>{const N=C.filter(T=>k.includes(T.category||""));return{group:j,findings:N}}).filter(j=>j.findings.length>0),p=Object.values(rh).flat(),v=C.filter(j=>!p.includes(j.category||"")),S=e==null?void 0:e.deep;return i.jsxs("div",{className:"deep-analysis",children:[i.jsxs("div",{className:"deep-header",children:[i.jsxs("div",{className:"deep-title",children:[i.jsx(at,{size:24}),i.jsx("h2",{children:"Deep Analysis"}),(S==null?void 0:S.tier)&&i.jsx("span",{className:"tier-badge",children:S.tier})]}),i.jsx("div",{className:"deep-actions",children:i.jsx("button",{className:"refresh-btn",onClick:h,disabled:n,children:i.jsx(qe,{size:16,className:n?"spinning":""})})})]}),n?i.jsx("div",{className:"deep-loading",children:"Loading deep analysis data..."}):!(S!=null&&S.enabled)&&x.length===0?i.jsxs("div",{className:"deep-empty",children:[i.jsx(at,{size:48}),i.jsx("h3",{children:"Deep Analysis Not Yet Run"}),i.jsxs("p",{children:["Run ",i.jsx("code",{children:"rigour check --deep"})," to get LLM-powered code quality analysis with 40+ categories."]}),i.jsxs("div",{className:"empty-features",children:[i.jsxs("div",{className:"feature",children:[i.jsx(ts,{size:16})," SOLID Principles"]}),i.jsxs("div",{className:"feature",children:[i.jsx(sn,{size:16})," Design Patterns"]}),i.jsxs("div",{className:"feature",children:[i.jsx(Qt,{size:16})," Concurrency Safety"]}),i.jsxs("div",{className:"feature",children:[i.jsx(dx,{size:16})," Architecture Quality"]})]})]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"deep-stats-banner",children:[i.jsxs("div",{className:"stat-card",children:[i.jsx("span",{className:"stat-value",children:(S==null?void 0:S.findings_count)??x.length}),i.jsx("span",{className:"stat-label",children:"Findings"})]}),i.jsxs("div",{className:"stat-card",children:[i.jsx("span",{className:"stat-value",children:(S==null?void 0:S.findings_verified)??x.filter(j=>j.verified).length}),i.jsx("span",{className:"stat-label",children:"Verified"})]}),i.jsxs("div",{className:"stat-card",children:[i.jsx("span",{className:"stat-value",children:(S==null?void 0:S.files_analyzed)??"—"}),i.jsx("span",{className:"stat-label",children:"Files Analyzed"})]}),i.jsxs("div",{className:"stat-card",children:[i.jsx("span",{className:"stat-value",children:(S==null?void 0:S.model)||"—"}),i.jsx("span",{className:"stat-label",children:"Model"})]}),(S==null?void 0:S.total_ms)&&i.jsxs("div",{className:"stat-card",children:[i.jsxs("span",{className:"stat-value",children:[(S.total_ms/1e3).toFixed(1),"s"]}),i.jsx("span",{className:"stat-label",children:"Inference"})]})]}),((e==null?void 0:e.score)!==void 0||(e==null?void 0:e.code_quality_score)!==void 0)&&i.jsxs("div",{className:"deep-scores",children:[(e==null?void 0:e.score)!==void 0&&i.jsx(Ca,{label:"Overall",score:e.score}),(e==null?void 0:e.ai_health_score)!==void 0&&i.jsx(Ca,{label:"AI Health",score:e.ai_health_score}),(e==null?void 0:e.structural_score)!==void 0&&i.jsx(Ca,{label:"Structural",score:e.structural_score})]}),i.jsxs("div",{className:"deep-filters",children:[i.jsxs("div",{className:"filter-group",children:[i.jsx(Ac,{size:14}),i.jsxs("select",{value:c,onChange:j=>u(j.target.value),className:"filter-select",children:[i.jsx("option",{value:"all",children:"All Severities"}),i.jsx("option",{value:"critical",children:"Critical"}),i.jsx("option",{value:"high",children:"High"}),i.jsx("option",{value:"medium",children:"Medium"}),i.jsx("option",{value:"low",children:"Low"})]})]}),i.jsxs("button",{className:`filter-toggle ${d?"active":""}`,onClick:()=>f(!d),children:[i.jsx(Nt,{size:14}),"Verified Only"]}),i.jsxs("span",{className:"filter-count",children:[C.length," finding",C.length!==1?"s":""]})]}),i.jsxs("div",{className:"deep-findings",children:[m.map(({group:j,findings:k})=>i.jsxs("div",{className:"finding-group",children:[i.jsxs("button",{className:"group-header",onClick:()=>y(j),children:[s.has(j)?i.jsx(yr,{size:16}):i.jsx(cn,{size:16}),i.jsx("span",{className:"group-name",children:j}),i.jsx("span",{className:"group-count",children:k.length}),i.jsx("div",{className:"group-severity-dots",children:["critical","high","medium","low"].map(N=>{const T=k.filter(R=>R.severity===N).length;return T>0?i.jsx("span",{className:"sev-dot",style:{backgroundColor:cy[N]},title:`${T} ${N}`},N):null})})]}),s.has(j)&&i.jsx("div",{className:"group-findings",children:k.map(N=>i.jsx(sh,{finding:N,expanded:a.has(N.id),onToggle:()=>g(N.id)},N.id))})]},j)),v.length>0&&i.jsxs("div",{className:"finding-group",children:[i.jsxs("button",{className:"group-header",onClick:()=>y("_other"),children:[s.has("_other")?i.jsx(yr,{size:16}):i.jsx(cn,{size:16}),i.jsx("span",{className:"group-name",children:"Other Findings"}),i.jsx("span",{className:"group-count",children:v.length})]}),s.has("_other")&&i.jsx("div",{className:"group-findings",children:v.map(j=>i.jsx(sh,{finding:j,expanded:a.has(j.id),onToggle:()=>g(j.id)},j.id))})]}),C.length===0&&i.jsxs("div",{className:"no-findings",children:[i.jsx(Nt,{size:32}),i.jsx("p",{children:"No deep analysis findings match the current filters."})]})]})]})]})},sh=({finding:e,expanded:t,onToggle:n})=>{const r=cy[e.severity||"info"],s=ck[e.category||""]||e.category||"Unknown";return i.jsxs("div",{className:`finding-card severity-${e.severity||"info"}`,children:[i.jsxs("button",{className:"finding-header",onClick:n,children:[i.jsxs("div",{className:"finding-left",children:[i.jsx("span",{className:"severity-indicator",style:{backgroundColor:r}}),i.jsx("span",{className:"finding-title",children:e.title})]}),i.jsxs("div",{className:"finding-right",children:[i.jsx("span",{className:"category-tag",children:s}),e.verified&&i.jsxs("span",{className:"verified-badge",title:"AST-verified",children:[i.jsx(Nt,{size:12})," Verified"]}),e.confidence!==void 0&&i.jsxs("span",{className:"confidence-badge",title:`Confidence: ${(e.confidence*100).toFixed(0)}%`,children:[(e.confidence*100).toFixed(0),"%"]}),i.jsx("span",{className:"severity-badge",style:{color:r},children:e.severity||"info"}),t?i.jsx(yr,{size:14}):i.jsx(cn,{size:14})]})]}),t&&i.jsxs("div",{className:"finding-body",children:[i.jsx("p",{className:"finding-details",children:e.details}),e.hint&&i.jsxs("div",{className:"finding-hint",children:[i.jsx(Qt,{size:14}),i.jsx("span",{children:e.hint})]}),e.files&&e.files.length>0&&i.jsx("div",{className:"finding-files",children:e.files.map((o,a)=>i.jsxs("span",{className:"file-tag",children:[i.jsx(wt,{size:12}),o,e.line&&`:${e.line}`,e.endLine&&`-${e.endLine}`]},a))}),i.jsx("div",{className:"finding-meta",children:e.source&&i.jsxs("span",{className:"meta-tag",children:["Source: ",e.source]})})]})]})},Ca=({label:e,score:t})=>{const n=2*Math.PI*36,r=n-t/100*n,s=t>=80?"var(--status-success)":t>=60?"var(--status-warning)":"var(--status-error)";return i.jsxs("div",{className:"score-ring",children:[i.jsxs("svg",{width:"88",height:"88",viewBox:"0 0 88 88",children:[i.jsx("circle",{cx:"44",cy:"44",r:"36",fill:"none",stroke:"var(--border-dim)",strokeWidth:"6"}),i.jsx("circle",{cx:"44",cy:"44",r:"36",fill:"none",stroke:s,strokeWidth:"6",strokeDasharray:n,strokeDashoffset:r,strokeLinecap:"round",transform:"rotate(-90 44 44)",style:{transition:"stroke-dashoffset 0.8s ease"}}),i.jsx("text",{x:"44",y:"42",textAnchor:"middle",fill:"var(--text-main)",fontSize:"18",fontWeight:"700",children:t}),i.jsx("text",{x:"44",y:"56",textAnchor:"middle",fill:"var(--text-dim)",fontSize:"9",children:"/100"})]}),i.jsx("span",{className:"score-label",children:e})]})},uy={improving:{color:"#34d399",icon:Nm,label:"Improving"},stable:{color:"var(--accent-primary)",icon:ix,label:"Stable"},degrading:{color:"#f87171",icon:Dc,label:"Degrading"}};function dy({direction:e,zScore:t}){const n=uy[e],r=n.icon;return i.jsxs("span",{className:"direction-badge",style:{color:n.color,borderColor:n.color},children:[i.jsx(r,{size:14}),i.jsx("span",{children:n.label}),t!==void 0&&i.jsxs("span",{className:"z-score",children:["Z=",t.toFixed(1)]})]})}function hi({score:e,label:t,size:n=80}){const r=(n-8)/2,s=2*Math.PI*r,o=e/100*s,a=e>=80?"#34d399":e>=60?"#fbbf24":"#f87171";return i.jsxs("div",{className:"score-ring",style:{width:n,height:n+20},children:[i.jsxs("svg",{width:n,height:n,viewBox:`0 0 ${n} ${n}`,children:[i.jsx("circle",{cx:n/2,cy:n/2,r,fill:"none",stroke:"var(--bg-tertiary)",strokeWidth:"6"}),i.jsx("circle",{cx:n/2,cy:n/2,r,fill:"none",stroke:a,strokeWidth:"6",strokeDasharray:`${o} ${s-o}`,strokeDashoffset:s/4,strokeLinecap:"round",style:{transition:"stroke-dasharray 0.8s ease"}}),i.jsx("text",{x:n/2,y:n/2,textAnchor:"middle",dominantBaseline:"central",fill:"var(--text-primary)",fontSize:"16",fontWeight:"bold",children:Math.round(e)})]}),i.jsx("span",{className:"ring-label",children:t})]})}function dk({series:e,direction:t}){if(e.length<2)return null;const n=200,r=50,s=4,o=e.map(g=>g.ewma),a=Math.min(...o)-5,c=Math.max(...o)+5-a||1,u=e.map((g,x)=>{const C=s+x/(e.length-1)*(n-2*s),m=r-s-(g.ewma-a)/c*(r-2*s);return`${C},${m}`}),d=uy[t].color,f=s,h=s+(e.length-1)/(e.length-1)*(n-2*s),y=`M ${u[0]} L ${u.join(" L ")} L ${h},${r} L ${f},${r} Z`;return i.jsxs("svg",{width:n,height:r,className:"ewma-sparkline",children:[i.jsx("defs",{children:i.jsxs("linearGradient",{id:`grad-${t}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[i.jsx("stop",{offset:"0%",stopColor:d,stopOpacity:"0.3"}),i.jsx("stop",{offset:"100%",stopColor:d,stopOpacity:"0.02"})]})}),i.jsx("path",{d:y,fill:`url(#grad-${t})`}),i.jsx("polyline",{points:u.join(" "),fill:"none",stroke:d,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.jsx("circle",{cx:parseFloat(u[u.length-1].split(",")[0]),cy:parseFloat(u[u.length-1].split(",")[1]),r:"3",fill:d})]})}function pi({name:e,icon:t,stream:n}){return i.jsxs("div",{className:"stream-card",children:[i.jsxs("div",{className:"stream-header",children:[i.jsxs("div",{className:"stream-name",children:[i.jsx(t,{size:16}),i.jsx("span",{children:e})]}),i.jsx(dy,{direction:n.direction,zScore:n.zScore})]}),i.jsxs("div",{className:"stream-body",children:[i.jsx(dk,{series:n.series,direction:n.direction}),i.jsxs("div",{className:"stream-stats",children:[i.jsxs("div",{className:"stat",children:[i.jsx("span",{className:"stat-label",children:"Current EWMA"}),i.jsx("span",{className:"stat-value",children:n.currentEWMA.toFixed(1)})]}),i.jsxs("div",{className:"stat",children:[i.jsx("span",{className:"stat-label",children:"Historical Avg"}),i.jsx("span",{className:"stat-value",children:n.historicalAvg.toFixed(1)})]})]})]})]})}function fk({monthly:e}){const[t,n]=w.useState(!0);return e.length===0?null:i.jsxs("div",{className:"monthly-section",children:[i.jsxs("button",{className:"section-toggle",onClick:()=>n(!t),children:[t?i.jsx(yr,{size:16}):i.jsx(cn,{size:16}),i.jsx(gm,{size:16}),i.jsx("span",{children:"Monthly Breakdown"})]}),t&&i.jsxs("table",{className:"monthly-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Month"}),i.jsx("th",{children:"Score"}),i.jsx("th",{children:"AI Health"}),i.jsx("th",{children:"Structural"}),i.jsx("th",{children:"Scans"}),i.jsx("th",{children:"AI Drift"}),i.jsx("th",{children:"Security"})]})}),i.jsx("tbody",{children:e.slice().reverse().map(r=>{const s=r.avgScore>=80?"#34d399":r.avgScore>=60?"#fbbf24":"#f87171";return i.jsxs("tr",{children:[i.jsx("td",{className:"month-cell",children:r.month}),i.jsx("td",{style:{color:s,fontWeight:600},children:r.avgScore.toFixed(0)}),i.jsx("td",{children:r.avgAiHealth.toFixed(0)}),i.jsx("td",{children:r.avgStructural.toFixed(0)}),i.jsx("td",{className:"dim",children:r.scanCount}),i.jsx("td",{className:"dim",children:r.provenanceBreakdown.aiDrift}),i.jsx("td",{className:"dim",children:r.provenanceBreakdown.security})]},r.month)})})]})]})}function hk(){const[e,t]=w.useState(null),[n,r]=w.useState(!0),[s,o]=w.useState(null),a=async()=>{r(!0),o(null);try{const l=await fetch("/api/drift");if(!l.ok)throw new Error(`HTTP ${l.status}`);const c=await l.json();c&&c.totalScans>0?t(c):t(null)}catch(l){o(l.message)}finally{r(!1)}};return w.useEffect(()=>{a()},[]),n?i.jsxs("div",{className:"empty-state",children:[i.jsx(qe,{size:48,className:"spin"}),i.jsx("h3",{children:"Analyzing Temporal Drift..."}),i.jsx("p",{children:"Reading scan history from SQLite brain."})]}):s?i.jsxs("div",{className:"empty-state",children:[i.jsx(Ie,{size:48}),i.jsx("h3",{children:"Drift Analysis Unavailable"}),i.jsx("p",{children:s}),i.jsx("button",{className:"retry-btn",onClick:a,children:"Retry"})]}):e?i.jsxs("div",{className:"temporal-drift",children:[i.jsxs("div",{className:"panel-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(Dt,{size:18}),i.jsx("span",{children:"Temporal Drift Engine"}),i.jsx("span",{className:"badge",children:"v5 EWMA"})]}),i.jsx("button",{className:"refresh-btn",onClick:a,title:"Refresh",children:i.jsx(qe,{size:16})})]}),i.jsxs("div",{className:`drift-banner drift-${e.overallDirection}`,children:[i.jsxs("div",{className:"banner-main",children:[i.jsx(dy,{direction:e.overallDirection,zScore:e.overallZScore}),i.jsx("span",{className:"banner-repo",children:e.repo}),i.jsxs("span",{className:"banner-meta",children:[e.totalScans," scans over ",e.timeSpanDays," days"]})]}),e.latestScanAnomaly.isAnomaly&&i.jsxs("div",{className:"anomaly-alert",children:[i.jsx(Ie,{size:14}),i.jsx("span",{children:e.latestScanAnomaly.message})]})]}),i.jsxs("div",{className:"score-rings-row",children:[i.jsx(hi,{score:e.streams.overall.currentEWMA,label:"Overall"}),i.jsx(hi,{score:e.streams.aiDrift.currentEWMA,label:"AI Health"}),i.jsx(hi,{score:e.streams.structural.currentEWMA,label:"Structural"}),i.jsx(hi,{score:e.streams.security.currentEWMA,label:"Security"})]}),i.jsxs("div",{className:"streams-grid",children:[i.jsx(pi,{name:"AI Drift",icon:at,stream:e.streams.aiDrift}),i.jsx(pi,{name:"Structural",icon:Qt,stream:e.streams.structural}),i.jsx(pi,{name:"Security",icon:ts,stream:e.streams.security}),i.jsx(pi,{name:"Overall",icon:Dt,stream:e.streams.overall})]}),i.jsx(fk,{monthly:e.monthly}),i.jsxs("div",{className:"narrative-section",children:[i.jsxs("div",{className:"narrative-header",children:[i.jsx(gr,{size:16}),i.jsx("span",{children:"Analysis Narrative"})]}),i.jsx("pre",{className:"narrative-text",children:e.narrative})]})]}):i.jsxs("div",{className:"empty-state",children:[i.jsx(Dt,{size:48}),i.jsx("h3",{children:"Not Enough Data"}),i.jsxs("p",{children:["Run at least 3 scans with ",i.jsx("code",{children:"rigour check"})," to see temporal drift analysis."]}),i.jsx("div",{className:"hint-box",children:i.jsx("span",{children:"Drift detection uses EWMA + Z-score anomaly detection across per-provenance streams."})})]})}function pk(){var xu,ju,wu,Su;const[e,t]=w.useState(null),[n,r]=w.useState(null),[s,o]=w.useState(null),[a,l]=w.useState(null),[c,u]=w.useState(null),[d,f]=w.useState(null),[h,y]=w.useState("services/task"),[g,x]=w.useState(""),[C,m]=w.useState(null),[p,v]=w.useState(""),[S,j]=w.useState(!1),[k,N]=w.useState(),[T,R]=w.useState("none"),[P,$]=w.useState(0),[I,Q]=w.useState(!1),[he,L]=w.useState(null),[B,H]=w.useState(!1),[A,z]=w.useState(!0),V=async()=>{z(!0);try{const[W,Y,my,vy,yy,Ze]=await Promise.all([fetch("/api/context-stats").then(ct=>ct.json()),fetch("/api/task-cost").then(ct=>ct.json()),fetch("/api/cache-stats").then(ct=>ct.json()),fetch("/api/context-scope").then(ct=>ct.json()),fetch("/api/checkpoint-metrics").then(ct=>ct.json()),fetch("/api/cursor-api-key/status").then(ct=>ct.json())]);t(W),r(Y),o(my),l(vy),u(yy),j(!!(Ze!=null&&Ze.configured)),N(Ze==null?void 0:Ze.hint),R((Ze==null?void 0:Ze.source)||"none"),$(Number((Ze==null?void 0:Ze.importedCount)??0))}catch(W){console.error("Failed to fetch cost & context telemetry",W)}finally{z(!1)}};w.useEffect(()=>{V()},[]);const _=async()=>{if(h)try{const W=await fetch(`/api/context-explain?target=${encodeURIComponent(h)}`);f(await W.json())}catch(W){console.error("Failed to get context explanation",W)}},E=async()=>{if(g.trim())try{const Y=await(await fetch("/api/import-cursor-usage",{method:"POST",headers:{"Content-Type":"text/plain"},body:g})).json();Y.success?(m(`Imported ${Y.importedCount} observed usage record(s).`),x(""),V()):m(`Import failed: ${Y.error}`)}catch(W){m(`Import failed: ${W.message}`)}},b=async()=>{if(p.trim()){Q(!0),L(null);try{const Y=await(await fetch("/api/cursor-api-key",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:p.trim()})})).json();Y.success?(j(!0),v(""),N(Y.hint),R(Y.source||"file"),$(Number(Y.importedCount??0)),L(Y.syncError?`Key saved locally. Initial sync failed: ${Y.syncError}`:`Vendor key saved locally. Imported ${Y.importedCount??0} usage event(s).`),V()):L(`Save failed: ${Y.error}`)}catch(W){L(`Save failed: ${W.message}`)}finally{Q(!1)}}},G=async()=>{Q(!0),L(null);try{const Y=await(await fetch("/api/cursor-api-key",{method:"DELETE"})).json();Y.success?(j(!!Y.configured),N(Y.hint),R(Y.source||"none"),L(Y.configured?"Removed file key. Env key still active.":"Removed local vendor key.")):L(`Remove failed: ${Y.error}`)}catch(W){L(`Remove failed: ${W.message}`)}finally{Q(!1)}},ae=async()=>{Q(!0),L(null);try{const Y=await(await fetch("/api/cursor-sync",{method:"POST"})).json();Y.success?($(Number(Y.importedCount??0)),L(`Synced ${Y.importedCount??0} new usage event(s).`),V()):L(`Sync failed: ${Y.error||"Unknown error"}`)}catch(W){L(`Sync failed: ${W.message}`)}finally{Q(!1)}},le=W=>W?W>=1e6?`${(W/1e6).toFixed(2)}M`:W>=1e3?`${(W/1e3).toFixed(1)}K`:W.toString():"0",lt=(e==null?void 0:e.candidateTokens)??0,be=(e==null?void 0:e.returnedTokens)??0,pu=(e==null?void 0:e.potentialAvoidedTokens)??0,mu=lt>0?((lt-be)/lt*100).toFixed(1):"0.0",fy=s!=null&&s.hitRate?Math.round(s.hitRate*100):0,vu=((xu=n==null?void 0:n.actual)==null?void 0:xu.costUsd)??0,yu=((ju=n==null?void 0:n.estimated)==null?void 0:ju.estimatedCostAvoidedUsd)??0,gu=((wu=n==null?void 0:n.actual)==null?void 0:wu.inputTokens)??0,hy=((Su=n==null?void 0:n.actual)==null?void 0:Su.source)||"No usage data",py=((e==null?void 0:e.retrievals)??0)>0||gu>0||((s==null?void 0:s.exactCacheHits)??0)+((s==null?void 0:s.semanticCacheHits)??0)+((s==null?void 0:s.partialCacheHits)??0)+((s==null?void 0:s.cacheMisses)??0)>0||((c==null?void 0:c.checkpointCount)??0)>0;return i.jsxs("div",{className:"cost-context-view",children:[i.jsxs("div",{className:"cost-header",children:[i.jsxs("div",{children:[i.jsxs("h2",{children:[i.jsx(Qt,{size:20,className:"text-amber"}),"Token Savings & Context Efficiency"]}),i.jsx("p",{children:"Rigour-measured avoided context vs optional observed model usage (kept separate on purpose)."})]}),i.jsx("div",{className:"cost-toolbar",children:i.jsxs("button",{type:"button",onClick:V,"aria-label":"Refresh cost and context stats",children:[i.jsx(qe,{size:14,className:A?"spinning":""})," Refresh"]})})]}),!py&&!A&&i.jsxs("div",{className:"cost-banner",children:[i.jsx(Ns,{size:18,className:"text-amber"}),i.jsxs("div",{children:[i.jsx("strong",{children:"No telemetry recorded yet"}),i.jsxs("p",{children:["Use Rigour MCP tools (",i.jsx("code",{children:"rigour_context_scope"}),", ",i.jsx("code",{children:"rigour_checkpoint"}),") or import observed usage below."]})]})]}),i.jsxs("div",{className:"cost-kpi-grid",children:[i.jsxs("div",{className:"cost-kpi-card glass-card",children:[i.jsx("div",{className:"label",children:"Actual model tokens"}),i.jsx("div",{className:"value",children:le(gu)}),i.jsxs("div",{className:"meta text-emerald",children:["Observed via ",hy]})]}),i.jsxs("div",{className:"cost-kpi-card glass-card",children:[i.jsx("div",{className:"label",children:"Potential context avoided"}),i.jsx("div",{className:"value text-amber",children:le(pu)}),i.jsxs("div",{className:"meta",children:["Reduction ratio: ",mu,"%"]})]}),i.jsxs("div",{className:"cost-kpi-card glass-card",children:[i.jsx("div",{className:"label",children:"Cache hit rate"}),i.jsxs("div",{className:"value text-cyan",children:[fy,"%"]}),i.jsx("div",{className:"meta",children:"static & semantic layers"})]}),i.jsxs("div",{className:"cost-kpi-card glass-card",children:[i.jsx("div",{className:"label",children:"Actual vs avoided cost"}),i.jsxs("div",{className:"value",children:[i.jsxs("span",{className:"text-emerald",children:["$",vu.toFixed(2)]})," / ",i.jsxs("span",{className:"text-amber",children:["$",yu.toFixed(2)]})]}),i.jsx("div",{className:"meta",children:"Actual spend / est. avoided"})]})]}),i.jsxs("div",{className:"cost-panel-grid",children:[i.jsxs("div",{className:"cost-panel glass-card",children:[i.jsxs("h3",{children:[i.jsx(sn,{size:16,className:"text-cyan"})," A. Retrieval efficiency"]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Candidates scanned"}),i.jsxs("span",{children:[le(lt)," tokens"]})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Context returned"}),i.jsxs("span",{className:"text-cyan",children:[le(be)," tokens"]})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Potential avoided"}),i.jsxs("span",{className:"text-amber",children:[le(pu)," tokens"]})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Reduction ratio"}),i.jsxs("span",{className:"text-emerald",children:[mu,"%"]})]})]}),i.jsxs("div",{className:"cost-panel glass-card",children:[i.jsxs("h3",{children:[i.jsx(Os,{size:16,className:"text-emerald"})," B. Cache efficiency"]}),i.jsxs("div",{className:"cost-hit-grid",children:[i.jsxs("div",{children:["Exact hits",i.jsx("strong",{className:"text-emerald",children:(s==null?void 0:s.exactCacheHits)??0})]}),i.jsxs("div",{children:["Semantic hits",i.jsx("strong",{className:"text-cyan",children:(s==null?void 0:s.semanticCacheHits)??0})]}),i.jsxs("div",{children:["Partial hits",i.jsx("strong",{className:"text-amber",children:(s==null?void 0:s.partialCacheHits)??0})]}),i.jsxs("div",{children:["Misses",i.jsx("strong",{className:"text-rose",children:(s==null?void 0:s.cacheMisses)??0})]})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Tokens served from cache"}),i.jsx("span",{className:"text-emerald",children:le((s==null?void 0:s.tokensServedFromCache)??0)})]})]}),i.jsxs("div",{className:"cost-panel glass-card",children:[i.jsxs("h3",{children:[i.jsx(cr,{size:16,className:"text-purple"})," C. Duplication prevention"]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Repeated reads prevented"}),i.jsx("span",{className:"text-emerald",children:(e==null?void 0:e.repeatedReadsPrevented)??0})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Overlapping scopes resolved"}),i.jsx("span",{className:"text-cyan",children:(a==null?void 0:a.overlappingScopesResolved)??0})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Always-on rule tokens"}),i.jsx("span",{children:le((a==null?void 0:a.alwaysOnRuleTokens)??0)})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Unused tools filtered"}),i.jsx("span",{className:"text-purple",children:(a==null?void 0:a.unusedToolsFiltered)??0})]})]}),i.jsxs("div",{className:"cost-panel glass-card",children:[i.jsxs("h3",{children:[i.jsx(Mc,{size:16,className:"text-amber"})," D. Checkpoint compression"]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Raw session state"}),i.jsx("span",{children:le((c==null?void 0:c.rawStateTokens)??0)})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Checkpoint packet size"}),i.jsxs("span",{className:"text-emerald",children:[le((c==null?void 0:c.checkpointTokens)??0),((c==null?void 0:c.compressionRatio)??0)>0?` (${c==null?void 0:c.compressionRatio}×)`:""]})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Observed model cost"}),i.jsxs("span",{className:"text-emerald",children:["$",vu.toFixed(2)]})]}),i.jsxs("div",{className:"cost-row",children:[i.jsx("span",{children:"Estimated avoided spend"}),i.jsxs("span",{className:"text-amber",children:["$",yu.toFixed(2)]})]})]})]}),i.jsxs("div",{className:"cost-panel glass-card",children:[i.jsxs("h3",{children:[i.jsx(Q0,{size:16,className:"text-cyan"})," Context explainability"]}),i.jsxs("div",{className:"cost-explain-row",children:[i.jsx("label",{className:"sr-only",htmlFor:"context-explain-target",children:"File, service, or query"}),i.jsx("input",{id:"context-explain-target",type:"text",value:h,onChange:W=>y(W.target.value),placeholder:"File, service, or query (e.g. services/task)"}),i.jsx("button",{type:"button",className:"cost-primary",onClick:_,children:"Explain"})]}),d&&i.jsxs("div",{className:"cost-row",style:{flexDirection:"column",alignItems:"flex-start",gap:6},children:[i.jsxs("div",{children:["Target: ",i.jsx("strong",{children:d.fileOrService})," [",String(d.status||"").toUpperCase(),"]"]}),i.jsxs("div",{children:["Reason: ",d.reason]}),i.jsxs("div",{children:["Cache: ",i.jsx("span",{className:"text-cyan",children:d.cacheStatus})]})]})]}),i.jsxs("div",{className:"cost-panel glass-card",children:[i.jsxs("h3",{children:[i.jsx(fx,{size:16,className:"text-amber"})," Import observed model usage"]}),i.jsx("p",{className:"cost-panel-help",children:"Vendor-agnostic CSV/JSON import for actual token spend. Does not require any Admin API key."}),i.jsx("label",{className:"sr-only",htmlFor:"observed-usage-import",children:"Observed usage CSV or JSON"}),i.jsx("textarea",{id:"observed-usage-import",rows:4,value:g,onChange:W=>x(W.target.value),placeholder:`Date,Model,Input Tokens,Output Tokens,Cost
362
+ 2026-08-05,claude-3-5-sonnet,510000,62000,4.83`,style:{marginBottom:10}}),i.jsxs("div",{className:"cost-actions",children:[i.jsx("button",{type:"button",className:"cost-primary",onClick:E,children:"Import usage data"}),C&&i.jsx("span",{role:"alert",className:C.includes("failed")?"text-rose":"text-emerald",style:{fontSize:"0.78rem"},children:C})]})]}),i.jsxs("div",{className:"cost-panel glass-card vendor-adapters",children:[i.jsxs("button",{type:"button",className:"vendor-adapters-toggle",onClick:()=>H(W=>!W),"aria-expanded":B,children:[i.jsxs("span",{children:[i.jsx(sx,{size:16,className:"text-cyan"})," Vendor adapters"]}),i.jsx(yr,{size:16,className:B?"rotated":""})]}),B&&i.jsxs("div",{className:"vendor-adapters-body",children:[i.jsx("h4",{children:"Cursor Admin API (optional)"}),i.jsxs("p",{className:"cost-panel-help",children:["Optional verification for teams that already use Cursor Admin API. Rigour does not require this. Prefer ",i.jsx("code",{children:"RIGOUR_CURSOR_API_KEY"})," or ",i.jsx("code",{children:"CURSOR_ADMIN_API_KEY"})," in the environment. File storage stays on this machine only (",i.jsx("code",{children:"~/.rigour/settings.json"}),", mode 600)."]}),i.jsx("p",{className:"cost-panel-help",children:S?`Configured${k?` (${k})`:""} via ${T}.${P>0?` ${P} event(s) imported.`:""}`:"No vendor key configured."}),i.jsxs("div",{className:"cost-actions",style:{marginBottom:8},children:[i.jsx("label",{className:"sr-only",htmlFor:"cursor-vendor-key",children:"Cursor Admin API key"}),i.jsx("input",{id:"cursor-vendor-key",type:"password",autoComplete:"off",value:p,onChange:W=>v(W.target.value),placeholder:"Paste key only if not using env",disabled:I}),i.jsx("button",{type:"button",className:"cost-primary",onClick:b,disabled:I||!p.trim(),children:I?"Saving…":"Save key"}),i.jsxs("button",{type:"button",onClick:ae,disabled:I||!S,"aria-label":"Sync Cursor usage",children:[i.jsx(qe,{size:14,className:I?"spinning":""}),"Sync"]}),i.jsxs("button",{type:"button",onClick:G,disabled:I||T==="env"||!S,"aria-label":"Remove local Cursor API key",title:T==="env"?"Remove env var in your shell":"Remove file key",children:[i.jsx(km,{size:14}),"Remove"]})]}),he&&i.jsx("span",{role:"alert",className:he.includes("failed")?"text-rose":"text-emerald",style:{fontSize:"0.78rem"},children:he})]})]})]})}function yn(e){const t=e??0;return t>=1e6?`${(t/1e6).toFixed(2)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:String(t)}function mk({onNavigate:e}){var g,x,C,m,p,v,S,j,k,N,T,R,P,$,I,Q,he,L,B,H,A,z,V;const[t,n]=w.useState(null),[r,s]=w.useState(!0),[o,a]=w.useState(null),l=async()=>{s(!0),a(null);try{const _=await fetch("/api/overview");if(!_.ok)throw new Error(`HTTP ${_.status}`);const E=await _.json();if(E.error)throw new Error(E.error);n(E)}catch(_){a(_.message||"Failed to load overview")}finally{s(!1)}};w.useEffect(()=>{l()},[]);const c=((g=t==null?void 0:t.context)==null?void 0:g.potentialAvoidedTokens)??0,u=((x=t==null?void 0:t.context)==null?void 0:x.checkpointReplayAvoided)??0,d=Math.round((((C=t==null?void 0:t.cache)==null?void 0:C.hitRate)??0)*100),f=((p=(m=t==null?void 0:t.cost)==null?void 0:m.actual)==null?void 0:p.costUsd)??0,h=((S=(v=t==null?void 0:t.cost)==null?void 0:v.estimated)==null?void 0:S.estimatedCostAvoidedUsd)??0,y=(((j=t==null?void 0:t.context)==null?void 0:j.retrievals)??0)>0||((t==null?void 0:t.checkpointCount)??0)>0||((t==null?void 0:t.memoryCount)??0)>0||(((N=(k=t==null?void 0:t.cost)==null?void 0:k.actual)==null?void 0:N.inputTokens)??0)>0;return i.jsxs("div",{className:"overview-view",children:[i.jsxs("div",{className:"overview-header",children:[i.jsxs("div",{children:[i.jsxs("h2",{children:[i.jsx(jm,{size:22}),"Governance Overview"]}),i.jsx("p",{className:"overview-dek",children:"Local governance signal — measured context avoided, cache hits, checkpoints. Spend is observed; avoided $ is always an estimate."})]}),i.jsxs("button",{className:"refresh-btn",onClick:l,disabled:r,type:"button",children:[i.jsx(qe,{size:16,className:r?"spinning":""}),"Refresh"]})]}),o&&i.jsxs("div",{className:"overview-banner warn",children:[i.jsx(Ns,{size:18}),i.jsxs("div",{children:[i.jsx("strong",{children:"Could not load telemetry"}),i.jsxs("p",{children:[o,". Confirm Studio is serving ",i.jsx("code",{children:"/api/overview"})," on the same port as the UI."]})]})]}),!o&&!r&&!y&&i.jsxs("div",{className:"overview-banner warn",children:[i.jsx(Ns,{size:18}),i.jsxs("div",{children:[i.jsx("strong",{children:"No agent telemetry yet"}),i.jsxs("p",{children:["Run agents with Rigour MCP (",i.jsx("code",{children:"rigour_recall"}),", ",i.jsx("code",{children:"rigour_context_scope"}),","," ",i.jsx("code",{children:"rigour_checkpoint"}),") or import observed usage under Cost & Context."]})]})]}),i.jsxs("div",{className:"overview-kpi-grid",children:[i.jsxs("button",{type:"button",className:"overview-kpi",onClick:()=>e("cost"),children:[i.jsx("span",{className:"kpi-label",children:"Context avoided"}),i.jsx("span",{className:"kpi-value amber",children:yn(c+u)}),i.jsx("span",{className:"kpi-meta",children:"retrieval + checkpoint replay"})]}),i.jsxs("button",{type:"button",className:"overview-kpi",onClick:()=>e("cost"),children:[i.jsx("span",{className:"kpi-label",children:"Cache hit rate"}),i.jsxs("span",{className:"kpi-value cyan",children:[d,"%"]}),i.jsxs("span",{className:"kpi-meta",children:[((T=t==null?void 0:t.cache)==null?void 0:T.exactCacheHits)??0," exact · ",((R=t==null?void 0:t.cache)==null?void 0:R.semanticCacheHits)??0," semantic"]})]}),i.jsxs("button",{type:"button",className:"overview-kpi",onClick:()=>e("checkpoints"),children:[i.jsx("span",{className:"kpi-label",children:"Checkpoints"}),i.jsx("span",{className:"kpi-value",children:(t==null?void 0:t.checkpointCount)??0}),i.jsx("span",{className:"kpi-meta",children:(P=t==null?void 0:t.checkpointSummary)!=null&&P.compressionRatio?`${t.checkpointSummary.compressionRatio}× avg compression`:"from Brain DB"})]}),i.jsxs("button",{type:"button",className:"overview-kpi",onClick:()=>e("cost"),children:[i.jsx("span",{className:"kpi-label",children:"Observed spend / est. avoided"}),i.jsxs("span",{className:"kpi-value",children:["$",f.toFixed(2),i.jsxs("span",{className:"kpi-split",children:[" / $",h.toFixed(2)]})]}),i.jsx("span",{className:"kpi-meta",children:(((I=($=t==null?void 0:t.cost)==null?void 0:$.actual)==null?void 0:I.source)||"no usage source")+" · avoided $ is estimated"})]})]}),i.jsxs("div",{className:"overview-panels",children:[i.jsxs("section",{className:"overview-card",children:[i.jsxs("header",{children:[i.jsx(Dt,{size:16}),i.jsx("h3",{children:"Live signal"})]}),i.jsxs("dl",{className:"overview-dl",children:[i.jsxs("div",{children:[i.jsx("dt",{children:"Context retrievals"}),i.jsx("dd",{children:((Q=t==null?void 0:t.context)==null?void 0:Q.retrievals)??0})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Candidate → returned"}),i.jsxs("dd",{children:[yn((he=t==null?void 0:t.context)==null?void 0:he.candidateTokens)," →"," ",yn((L=t==null?void 0:t.context)==null?void 0:L.returnedTokens)]})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Project events"}),i.jsx("dd",{children:((t==null?void 0:t.eventCount)??0).toLocaleString()})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Tokens from cache"}),i.jsx("dd",{children:yn((B=t==null?void 0:t.cache)==null?void 0:B.tokensServedFromCache)})]})]}),i.jsxs("button",{type:"button",className:"overview-link",onClick:()=>e("audit"),children:["Open audit log ",i.jsx(Yn,{size:14})]})]}),i.jsxs("section",{className:"overview-card",children:[i.jsxs("header",{children:[i.jsx(at,{size:16}),i.jsx("h3",{children:"How Rigour learns"})]}),i.jsxs("p",{className:"overview-learn-note",children:["Memory = stable facts agents wrote via ",i.jsx("code",{children:"rigour_remember"}),". Patterns = indexed symbols from scans (not a full training log). Enforcement + checkpoints show live governance learning."]}),i.jsxs("dl",{className:"overview-dl",children:[i.jsxs("div",{children:[i.jsx("dt",{children:"Memories"}),i.jsxs("dd",{children:[(t==null?void 0:t.memoryCount)??0,(H=t==null?void 0:t.memorySources)!=null&&H.length?` (${t.memorySources.join(" + ")})`:""]})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Pattern index"}),i.jsxs("dd",{children:[(t==null?void 0:t.patternCount)??0," patterns / ",(t==null?void 0:t.patternFiles)??0," files"]})]})]}),i.jsxs("div",{className:"overview-actions",children:[i.jsxs("button",{type:"button",className:"overview-link",onClick:()=>e("memory"),children:["Memory bank ",i.jsx(Yn,{size:14})]}),i.jsxs("button",{type:"button",className:"overview-link",onClick:()=>e("patterns"),children:["Patterns ",i.jsx(Yn,{size:14})]})]})]}),i.jsxs("section",{className:"overview-card",children:[i.jsxs("header",{children:[i.jsx(xr,{size:16}),i.jsx("h3",{children:"Checkpoint compression"})]}),i.jsxs("dl",{className:"overview-dl",children:[i.jsxs("div",{children:[i.jsx("dt",{children:"Raw session state"}),i.jsx("dd",{children:yn((A=t==null?void 0:t.checkpointSummary)==null?void 0:A.rawStateTokens)})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Checkpoint packets"}),i.jsx("dd",{children:yn((z=t==null?void 0:t.checkpointSummary)==null?void 0:z.checkpointTokens)})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Replay avoided"}),i.jsx("dd",{className:"amber",children:yn((V=t==null?void 0:t.checkpointSummary)==null?void 0:V.replayTokensAvoided)})]})]}),i.jsxs("button",{type:"button",className:"overview-link",onClick:()=>e("checkpoints"),children:["Timeline ",i.jsx(Yn,{size:14})]})]}),i.jsxs("section",{className:"overview-card",children:[i.jsxs("header",{children:[i.jsx(Fs,{size:16}),i.jsx("h3",{children:"Where data lives"})]}),i.jsxs("dl",{className:"overview-dl paths",children:[i.jsxs("div",{children:[i.jsx("dt",{children:"Project"}),i.jsx("dd",{title:t==null?void 0:t.projectPath,children:(t==null?void 0:t.projectPath)||"—"})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Brain DB"}),i.jsx("dd",{title:t==null?void 0:t.brainDb,children:(t==null?void 0:t.brainDb)||"~/.rigour/rigour.db"})]})]}),i.jsxs("p",{className:"overview-hint",children:["Studio reads Brain SQLite for cost/cache/checkpoints and merges project + global"," ",i.jsx("code",{children:"memory.json"}),"."]})]})]}),i.jsxs("div",{className:"overview-quick-nav",children:[i.jsxs("button",{type:"button",onClick:()=>e("cost"),children:[i.jsx(Mc,{size:16})," Cost & Context"]}),i.jsxs("button",{type:"button",onClick:()=>e("checkpoints"),children:[i.jsx(xr,{size:16})," Checkpoints"]}),i.jsxs("button",{type:"button",onClick:()=>e("memory"),children:[i.jsx(at,{size:16})," Memory"]}),i.jsxs("button",{type:"button",onClick:()=>e("patterns"),children:[i.jsx(Os,{size:16})," Patterns"]})]})]})}const vk={register:"agents",scope:"cost",gates:"gates",checkpoint:"checkpoints",handoff:"handoffs",memory:"memory"},yk={register:i.jsx(jr,{size:16}),scope:i.jsx(Z0,{size:16}),gates:i.jsx(cr,{size:16}),checkpoint:i.jsx(xr,{size:16}),handoff:i.jsx(no,{size:16}),memory:i.jsx(at,{size:16})};function gk(e){switch(e){case"pass":return i.jsx(xm,{size:14,className:"text-emerald"});case"warn":return i.jsx(Ie,{size:14,className:"text-amber"});case"block":return i.jsx(Ie,{size:14,className:"text-rose"});default:return i.jsx(Ei,{size:12,className:"text-dim"})}}function xk({onNavigate:e}){var d;const[t,n]=w.useState(null),[r,s]=w.useState(!0),[o,a]=w.useState(null),l=async()=>{s(!0),a(null);try{const f=await fetch("/api/enforcement");if(!f.ok){let h="";if(f.status===404)try{const y=await fetch("/api/info").then(x=>x.ok?x.json():null);h=` API/UI mismatch — Studio shell is newer than the CLI serving /api (studioVersion=${(y==null?void 0:y.studioVersion)||(y==null?void 0:y.mcpVersion)||"unknown"}). Restart with the local 5.5.0+ CLI: \`node …/rigour-cli/dist/cli.js studio -p <port>\` and open http://127.0.0.1:<port>.`}catch{h=" Restart Studio with a CLI that includes /api/enforcement (5.5.0+)."}throw new Error(`HTTP ${f.status}.${h}`)}n(await f.json())}catch(f){a(f.message||"Failed to load enforcement")}finally{s(!1)}};w.useEffect(()=>{l();const f=setInterval(l,15e3);return()=>clearInterval(f)},[]);const c=(t==null?void 0:t.stages)||[],u=c.map((f,h)=>{if(h===0)return null;const y=c[h-1].count;return y<=0?null:Math.min(100,Math.round(f.count/y*100))});return i.jsxs("div",{className:"enforcement-view",children:[i.jsxs("div",{className:"panel-header enforcement-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(cr,{size:18}),i.jsx("span",{children:"Enforcement Loop"})]}),i.jsxs("div",{className:"enforcement-header-meta",children:[(t==null?void 0:t.derived)&&i.jsx("span",{className:"meta-chip",children:"Derived from checkpoints"}),i.jsxs("span",{className:"meta-chip",children:[(t==null?void 0:t.agentCount)??0," agents"]}),i.jsx("button",{type:"button",className:"icon-btn",onClick:l,"aria-label":"Refresh enforcement",children:i.jsx(qe,{size:14,className:r?"spinning":""})})]})]}),i.jsx("p",{className:"enforcement-lead",children:"How Rigour bounds agents: register scope, constrain context, run gates, compress checkpoints, verify handoffs, and store stable memory — for any MCP client."}),o&&i.jsxs("div",{className:"cost-banner",role:"alert",children:[i.jsx(Ie,{size:18,className:"text-rose"}),i.jsxs("div",{children:[i.jsx("strong",{children:"Could not load enforcement"}),i.jsx("p",{children:o})]})]}),r&&!t&&i.jsx("div",{className:"enforcement-skeleton","aria-busy":"true",children:Array.from({length:6}).map((f,h)=>i.jsx("div",{className:"skeleton-card"},h))}),c.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("ol",{className:"enforcement-rail","aria-label":"Enforcement stages",children:c.map((f,h)=>i.jsxs("li",{className:`enforcement-stage status-${f.status}`,children:[h>0&&i.jsx("div",{className:"stage-connector","aria-hidden":"true",children:u[h]!=null&&i.jsxs("span",{className:"conversion",children:[u[h],"%"]})}),i.jsxs("button",{type:"button",className:"stage-card glass-card",onClick:()=>e==null?void 0:e(vk[f.id]||"overview"),children:[i.jsxs("div",{className:"stage-top",children:[i.jsx("span",{className:"stage-icon",children:yk[f.id]}),gk(f.status)]}),i.jsx("div",{className:"stage-label",children:f.label}),i.jsx("div",{className:"stage-count",children:f.count}),i.jsx("div",{className:"stage-detail",children:f.detail})]})]},f.id))}),i.jsx("ul",{className:"enforcement-list-fallback",children:c.map(f=>i.jsxs("li",{children:[i.jsx("strong",{children:f.label}),": ",f.count," — ",f.detail," (",f.status,")"]},`list-${f.id}`))})]}),i.jsxs("div",{className:"enforcement-timeline glass-card",children:[i.jsx("h3",{children:"Recent enforcement events"}),(d=t==null?void 0:t.timeline)!=null&&d.length?i.jsx("ul",{children:t.timeline.slice(0,12).map((f,h)=>i.jsxs("li",{children:[i.jsx("span",{className:`tl-type type-${f.type}`,children:f.type}),i.jsx("span",{className:"tl-summary",children:f.summary}),i.jsxs("span",{className:"tl-meta mono",children:[f.agentId||"—",f.timestamp?` · ${new Date(f.timestamp).toLocaleTimeString()}`:""]})]},`${f.type}-${h}`))}):i.jsx("p",{className:"empty-inline",children:"No gate/checkpoint/handoff events yet. Drive agents through MCP tools."})]})]})}function jk(){const[e,t]=w.useState([]),[n,r]=w.useState(!0),s=async()=>{r(!0);try{const a=await(await fetch("/api/handoffs")).json();t(Array.isArray(a.handoffs)?a.handoffs:[])}catch(o){console.error("Failed to load handoffs",o)}finally{r(!1)}};return w.useEffect(()=>{s()},[]),!n&&e.length===0?i.jsxs("div",{className:"empty-state glass-card",children:[i.jsx(no,{size:48}),i.jsx("h3",{children:"No Handoffs Yet"}),i.jsxs("p",{children:["Compress state with ",i.jsx("code",{children:"rigour_checkpoint"}),", then transfer with"," ",i.jsx("code",{children:"rigour_handoff"}),". The receiving agent accepts via ",i.jsx("code",{children:"rigour_handoff_accept"}),"."]}),i.jsx("div",{className:"hint-box",children:i.jsx("span",{children:"Verified handoffs carry checkpoint packets — not parent transcripts."})})]}):i.jsxs("div",{className:"handoff-flow",children:[i.jsxs("div",{className:"panel-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(no,{size:18}),i.jsx("span",{children:"Agent Handoffs"})]}),i.jsx("button",{type:"button",className:"icon-btn",onClick:s,"aria-label":"Refresh handoffs",children:i.jsx(qe,{size:14,className:n?"spinning":""})})]}),i.jsx("div",{className:"handoff-list",children:e.map(o=>{const a=o.status==="accepted"||!!o.acceptedAt;return i.jsxs("article",{className:`handoff-card glass-card ${a?"accepted":"pending"}`,children:[i.jsxs("div",{className:"handoff-status",children:[a?i.jsxs("span",{className:"status-pill pass",children:[i.jsx(xm,{size:12})," Accepted"]}):i.jsxs("span",{className:"status-pill warn",children:[i.jsx(gr,{size:12})," Pending"]}),i.jsx("span",{className:"mono dim",children:o.handoffId})]}),i.jsxs("div",{className:"handoff-flow-row",children:[i.jsxs("div",{className:"handoff-agent",children:[i.jsx(jr,{size:14}),i.jsx("code",{children:o.fromAgentId})]}),i.jsx(Yn,{size:16,className:"text-cyan"}),i.jsxs("div",{className:"handoff-packet",children:[i.jsx(ax,{size:14}),i.jsx("span",{children:o.contextTokens!=null?`${o.contextTokens} tok`:"packet"})]}),i.jsx(Yn,{size:16,className:"text-cyan"}),i.jsxs("div",{className:"handoff-agent",children:[i.jsx(jr,{size:14}),i.jsx("code",{children:o.toAgentId})]})]}),o.taskDescription&&i.jsx("p",{className:"handoff-task",children:o.taskDescription}),o.filesInScope&&o.filesInScope.length>0&&i.jsxs("div",{className:"handoff-files",children:[o.filesInScope.slice(0,4).map(l=>i.jsx("code",{children:l},l)),o.filesInScope.length>4&&i.jsxs("span",{className:"dim",children:["+",o.filesInScope.length-4," more"]})]})]},o.handoffId)})})]})}function wk({onNavigate:e}){var h,y;const[t,n]=w.useState(null),[r,s]=w.useState(!0),[o,a]=w.useState(null),l=async()=>{s(!0),a(null);try{const g=await fetch("/api/overview");if(!g.ok)throw new Error(`HTTP ${g.status}`);n(await g.json())}catch(g){a(g.message||"Failed to load learning signals")}finally{s(!1)}};w.useEffect(()=>{l()},[]);const c=t==null?void 0:t.cache,u=((c==null?void 0:c.exactCacheHits)??0)+((c==null?void 0:c.semanticCacheHits)??0)+((c==null?void 0:c.partialCacheHits)??0),d=(c==null?void 0:c.cacheMisses)??0,f=Math.round(((c==null?void 0:c.hitRate)??0)*100);return i.jsxs("div",{className:"learning-brain",children:[i.jsxs("div",{className:"panel-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(at,{size:18}),i.jsx("span",{children:"How Rigour Learns"})]}),i.jsx("button",{type:"button",className:"icon-btn",onClick:l,"aria-label":"Refresh learning",children:i.jsx(qe,{size:14,className:r?"spinning":""})})]}),i.jsx("p",{className:"enforcement-lead",children:"Scans feed the pattern index; agents write stable memory; context scope + cache reuse cut reread cost; checkpoints compress handoffs. This is governance learning — not model fine-tuning."}),o&&i.jsxs("div",{className:"cost-banner",role:"alert",children:[i.jsx(Ns,{size:18,className:"text-rose"}),i.jsxs("div",{children:[i.jsx("strong",{children:"Could not load learning signals"}),i.jsx("p",{children:o})]})]}),i.jsxs("div",{className:"learning-grid",children:[i.jsxs("article",{className:"glass-card learning-card",children:[i.jsxs("header",{children:[i.jsx(lx,{size:16,className:"text-cyan"}),i.jsx("h3",{children:"Pattern index (from scans)"})]}),i.jsx("div",{className:"learning-kpi",children:(t==null?void 0:t.patternCount)??0}),i.jsxs("p",{className:"dim",children:[(t==null?void 0:t.patternFiles)??0," files indexed. Refresh with ",i.jsx("code",{children:"rigour index"})," after large refactors."]}),i.jsx("button",{type:"button",className:"overview-link",onClick:()=>e==null?void 0:e("patterns"),children:"Open Pattern Index"})]}),i.jsxs("article",{className:"glass-card learning-card",children:[i.jsxs("header",{children:[i.jsx(cx,{size:16,className:"text-amber"}),i.jsx("h3",{children:"Stable memory"})]}),i.jsx("div",{className:"learning-kpi",children:(t==null?void 0:t.memoryCount)??0}),i.jsxs("p",{className:"dim",children:["Deliberate facts via ",i.jsx("code",{children:"rigour_remember"}),(h=t==null?void 0:t.memorySources)!=null&&h.length?` · ${t.memorySources.join(" + ")}`:"",". Not a scan log."]}),i.jsx("button",{type:"button",className:"overview-link",onClick:()=>e==null?void 0:e("memory"),children:"Open Memory Bank"})]}),i.jsxs("article",{className:"glass-card learning-card",children:[i.jsxs("header",{children:[i.jsx(Os,{size:16,className:"text-emerald"}),i.jsx("h3",{children:"Context cache power"})]}),i.jsxs("div",{className:"learning-kpi text-cyan",children:[f,"%"]}),i.jsxs("p",{className:"dim",children:[u," hits (",(c==null?void 0:c.exactCacheHits)??0," exact · ",(c==null?void 0:c.semanticCacheHits)??0," semantic ·"," ",(c==null?void 0:c.partialCacheHits)??0," partial) / ",d," misses · ",((y=t==null?void 0:t.context)==null?void 0:y.retrievals)??0," ","retrievals"]}),i.jsx("button",{type:"button",className:"overview-link",onClick:()=>e==null?void 0:e("cost"),children:"Open Cost & Context"})]}),i.jsxs("article",{className:"glass-card learning-card",children:[i.jsxs("header",{children:[i.jsx(at,{size:16,className:"text-purple"}),i.jsx("h3",{children:"Governance trail"})]}),i.jsx("div",{className:"learning-kpi",children:(t==null?void 0:t.checkpointCount)??0}),i.jsxs("p",{className:"dim",children:["Checkpoints compressed · ",((t==null?void 0:t.eventCount)??0).toLocaleString()," project events in"," ",i.jsx("code",{children:".rigour/events.jsonl"})," / Brain DB."]}),i.jsx("button",{type:"button",className:"overview-link",onClick:()=>e==null?void 0:e("enforcement"),children:"Open Enforcement Loop"})]})]})]})}const mi={initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.28,ease:[.16,1,.3,1]}};function Sk(){var A,z,V,_;const[e,t]=w.useState(()=>localStorage.getItem("rigour-theme")||"dark"),[n,r]=w.useState("enforcement"),[s,o]=w.useState([]),[a,l]=w.useState(null),[c,u]=w.useState(null),[d,f]=w.useState(!1),[h,y]=w.useState([]),[g,x]=w.useState(null);Ue.useEffect(()=>{const E=new EventSource("/api/events");return E.onmessage=b=>{try{const G=JSON.parse(b.data);o(ae=>[G,...ae].slice(0,100))}catch(G){console.error("Failed to parse event",G)}},fetch("/api/tree").then(b=>b.json()).then(y).catch(b=>console.error("Failed to fetch tree",b)),fetch("/api/info").then(b=>b.json()).then(x).catch(b=>console.error("Failed to fetch info",b)),()=>E.close()},[]),w.useEffect(()=>{document.documentElement.setAttribute("data-theme",e),localStorage.setItem("rigour-theme",e)},[e]);const C=()=>t(E=>E==="dark"?"light":"dark"),[m,p]=w.useState(""),[v,S]=w.useState({}),[j,k]=w.useState({}),[N,T]=w.useState(null),[R,P]=w.useState(null);w.useEffect(()=>{(async()=>{try{const[b,G,ae,le,lt]=await Promise.all([fetch("/api/config").then(be=>be.ok?be.text():""),fetch("/api/memory").then(be=>be.json()),fetch("/api/index-stats").then(be=>be.json()),fetch("/api/agents").then(be=>be.json()),fetch("/api/checkpoints").then(be=>be.json())]);p(b),S(G),k(ae),T(le),P(lt)}catch(b){console.error("Failed to fetch meta data",b)}})()},[]);const $=async E=>{try{const b=E.replace(/\s*\(\d+\s*lines\)$/,""),ae=await(await fetch(`/api/file?path=${encodeURIComponent(b)}`)).text();l({filename:b,original:ae,modified:ae})}catch(b){console.error("Failed to fetch file content",b)}},I=async E=>{if(c)try{await fetch("/api/arbitrate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({requestId:c.requestId||c.id,decision:E,timestamp:new Date().toISOString()})}),o(b=>b.map(G=>(G.requestId||G.id)===(c.requestId||c.id)?{...G,status:E==="approve"?"success":"error",arbitrated:!0,decision:E}:G)),f(!1),u(null)}catch(b){console.error("Arbitration failed",b)}},Q=[{id:"enforcement",label:"Enforcement",icon:cr},{id:"learning",label:"Learning",icon:at},{id:"overview",label:"Overview",icon:jm},{id:"agents",label:"Agent Teams",icon:jr},{id:"handoffs",label:"Handoffs",icon:no},{id:"checkpoints",label:"Checkpoints",icon:xr},{id:"memory",label:"Memory Bank",icon:X0},{id:"cost",label:"Cost & Context",icon:Mc},{id:"audit",label:"Audit Log",icon:ro},{id:"gates",label:"Quality Gates",icon:Dt},{id:"patterns",label:"Pattern Index",icon:Os},{id:"deep",label:"Deep Analysis",icon:at},{id:"drift",label:"Temporal Drift",icon:Dc}],he=(g==null?void 0:g.studioVersion)||(g==null?void 0:g.mcpVersion)||"—",L=(g==null?void 0:g.projectVersion)||(g==null?void 0:g.version)||"—",B=(g==null?void 0:g.projectName)||(g==null?void 0:g.name)||"project",H=(g==null?void 0:g.projectPath)||(g==null?void 0:g.path)||"";return i.jsxs("div",{className:"studio",children:[i.jsxs("div",{className:"cinema-ambient","aria-hidden":"true",children:[i.jsx("div",{className:"ambient-blob blob-a"}),i.jsx("div",{className:"ambient-blob blob-b"})]}),i.jsxs("aside",{className:"sidebar glass-shell",children:[i.jsxs("div",{className:"brand",children:[i.jsx("div",{className:"logo-icon",children:i.jsx(cr,{size:18})}),i.jsx("span",{children:"Rigour Studio"}),i.jsxs("div",{className:"version-pill",children:["v",he]})]}),i.jsx("nav",{children:Q.map(E=>i.jsxs("button",{className:`nav-item ${n===E.id?"active":""}`,onClick:()=>r(E.id),children:[i.jsx(E.icon,{size:18}),i.jsx("span",{children:E.label}),n===E.id&&i.jsx(_e.div,{layoutId:"nav-glow",className:"nav-glow"})]},E.id))}),i.jsxs("div",{className:"sidebar-footer",children:[i.jsxs("div",{className:"trust-indicator",children:[i.jsx(wm,{size:14}),i.jsx("span",{children:"Local Governance"})]}),i.jsx("button",{className:"footer-item",children:i.jsx(Sm,{size:18})}),i.jsx("button",{className:"footer-item",children:i.jsx(rx,{size:18})})]})]}),i.jsxs("main",{className:"main-content",children:[i.jsxs("header",{className:"glass-shell",children:[i.jsx("div",{className:"header-left",children:g&&i.jsxs("div",{className:"project-identity",children:[i.jsx(Fs,{size:14,className:"folder-icon"}),i.jsx("span",{className:"project-name",children:B}),i.jsxs("span",{className:"project-version-pill",children:["v",L]}),i.jsx("span",{className:"project-path",children:H})]})}),i.jsxs("div",{className:"header-right",children:[i.jsx("div",{className:"connection-status",children:i.jsxs("div",{className:"status-indicator",children:[i.jsx("div",{className:"pulse-emitter"}),i.jsx("span",{children:"LIVE"})]})}),i.jsx("button",{className:"theme-toggle",onClick:C,"aria-label":"Toggle theme",children:e==="dark"?i.jsx(ux,{size:18}):i.jsx(ox,{size:18})})]})]}),i.jsxs("div",{className:"view-container",children:[i.jsxs(yx,{mode:"wait",children:[n==="enforcement"&&i.jsx(_e.div,{...mi,className:"full-view",children:i.jsx(xk,{onNavigate:r})},"enforcement"),n==="learning"&&i.jsx(_e.div,{...mi,className:"full-view",children:i.jsx(wk,{onNavigate:r})},"learning"),n==="overview"&&i.jsx(_e.div,{...mi,className:"full-view",children:i.jsx(mk,{onNavigate:r})},"overview"),n==="handoffs"&&i.jsx(_e.div,{...mi,className:"full-view",children:i.jsx(jk,{})},"handoffs"),n==="audit"&&i.jsx(_e.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(rk,{logs:s,onClearLogs:()=>o([]),onSelectLog:E=>{var b,G,ae;if(u(E),E!=null&&E._rigour_report||(E==null?void 0:E.type)==="interception_requested"){if(E!=null&&E._rigour_report){const le=(ae=(G=(b=E._rigour_report.failures)==null?void 0:b[0])==null?void 0:G.files)==null?void 0:ae[0];le?$(le):l(null)}else l(null);f(!0)}else l(null),f(!1)},selectedLog:c})},"audit"),n==="gates"&&i.jsx(_e.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(nk,{})},"gates"),n==="deep"&&i.jsx(_e.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(uk,{})},"deep"),n==="drift"&&i.jsx(_e.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(hk,{})},"drift"),n==="patterns"&&i.jsx(_e.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(tk,{})},"patterns"),n==="memory"&&i.jsx(_e.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(ek,{})},"memory"),n==="agents"&&i.jsx(_e.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(ak,{session:N})},"agents"),n==="checkpoints"&&i.jsx(_e.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(lk,{checkpoints:(R==null?void 0:R.checkpoints)||[]})},"checkpoints"),n==="cost"&&i.jsx(_e.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"full-view",children:i.jsx(pk,{})},"cost")]}),c&&d&&i.jsx("div",{className:"governance-overlay",children:i.jsxs("div",{className:"governance-window",children:[i.jsxs("div",{className:"governance-header",children:[i.jsxs("div",{className:"title",children:[i.jsx(cr,{size:20}),i.jsxs("span",{children:["Governance Audit: ",c.tool]})]}),i.jsxs("div",{className:"hitl-actions",children:[c.type==="interception_requested"&&i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"btn-approve",onClick:()=>I("approve"),children:[i.jsx(Nt,{size:16})," Approve"]}),i.jsxs("button",{className:"btn-reject",onClick:()=>I("reject"),children:[i.jsx(Cs,{size:16})," Reject"]}),i.jsx("div",{className:"divider"})]}),i.jsx("button",{onClick:()=>f(!1),className:"close-btn",children:i.jsx(_c,{size:20})})]})]}),i.jsx("div",{className:"governance-body",children:c.type==="interception_requested"?i.jsxs("div",{className:"interception-view",children:[i.jsxs("div",{className:"interception-card",children:[i.jsx(ro,{size:48}),i.jsx("h4",{children:"Command Intercepted"}),i.jsx("div",{className:"command-box",children:i.jsx("code",{children:c.command})}),i.jsx("p",{children:"An AI agent is requesting to execute this command. Review the project state below before arbitrating."}),i.jsxs("div",{className:"warning-note",children:[i.jsx(Ie,{size:16}),i.jsx("span",{children:"Critical actions should be manually verified."})]})]}),i.jsx(nh,{files:h.map(E=>E.replace(/\s*\(\d+\s*lines\)$/,"")),onSelect:E=>$(E),activeFile:a==null?void 0:a.filename,violatedFiles:[]})]}):i.jsxs(i.Fragment,{children:[i.jsx(nh,{files:(((z=(A=c._rigour_report)==null?void 0:A.failures)==null?void 0:z.flatMap(E=>E.files||[]))||h).map(E=>E.replace(/\s*\(\d+\s*lines\)$/,"")),onSelect:E=>$(E),activeFile:a==null?void 0:a.filename,violatedFiles:(((_=(V=c._rigour_report)==null?void 0:V.failures)==null?void 0:_.flatMap(E=>E.files||[]))||[]).map(E=>E.replace(/\s*\(\d+\s*lines\)$/,""))}),i.jsx("div",{className:"diff-view-area",children:a?i.jsx(Z2,{filename:a.filename,originalCode:a.original,modifiedCode:a.modified,onClose:()=>l(null),theme:e}):i.jsxs("div",{className:"diff-placeholder",children:[i.jsx(Dt,{size:48}),i.jsx("p",{children:"Select a file to audit the proposed changes"})]})})]})})]})})]})]})]})}Ta.createRoot(document.getElementById("root")).render(i.jsx(Ue.StrictMode,{children:i.jsx(Sk,{})}));