@neuroverseos/nv-sim 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +346 -68
- package/dist/adapters/mirofish.js +461 -0
- package/dist/adapters/scienceclaw.js +750 -0
- package/dist/assets/index-B64NuIXu.css +1 -0
- package/dist/assets/index-DbzSnYxr.js +532 -0
- package/dist/assets/{reportEngine-BfteK4MN.js → reportEngine-DKWTrP6-.js} +1 -1
- package/dist/components/ConstraintsPanel.js +11 -0
- package/dist/components/StakeholderBuilder.js +32 -0
- package/dist/components/ui/badge.js +24 -0
- package/dist/components/ui/button.js +70 -0
- package/dist/components/ui/card.js +57 -0
- package/dist/components/ui/input.js +44 -0
- package/dist/components/ui/label.js +45 -0
- package/dist/components/ui/select.js +70 -0
- package/dist/engine/aiProvider.js +427 -2
- package/dist/engine/auditTrace.js +352 -0
- package/dist/engine/behavioralAnalysis.js +605 -0
- package/dist/engine/cli.js +1087 -13
- package/dist/engine/dynamicsGovernance.js +588 -0
- package/dist/engine/fullGovernedLoop.js +367 -0
- package/dist/engine/governedSimulation.js +77 -6
- package/dist/engine/index.js +41 -1
- package/dist/engine/liveVisualizer.js +2787 -360
- package/dist/engine/metrics/science.metrics.js +335 -0
- package/dist/engine/narrativeInjection.js +55 -0
- package/dist/engine/policyEnforcement.js +1611 -0
- package/dist/engine/policyEngine.js +799 -0
- package/dist/engine/primeRadiant.js +540 -0
- package/dist/engine/scenarioCapsule.js +56 -0
- package/dist/engine/scenarioComparison.js +463 -0
- package/dist/engine/scenarioLibrary.js +17 -0
- package/dist/engine/swarmSimulation.js +54 -1
- package/dist/engine/worldComparison.js +164 -0
- package/dist/engine/worldStorage.js +232 -0
- package/dist/index.html +2 -2
- package/dist/lib/reasoningEngine.js +290 -0
- package/dist/lib/simulationAdapter.js +686 -0
- package/dist/lib/swarmParser.js +291 -0
- package/dist/lib/types.js +2 -0
- package/dist/lib/utils.js +8 -0
- package/dist/runtime/govern.js +473 -0
- package/dist/runtime/index.js +75 -0
- package/dist/runtime/types.js +11 -0
- package/package.json +5 -2
- package/dist/assets/index-DHKd4rcV.js +0 -338
- package/dist/assets/index-SyyA3z3U.css +0 -1
- package/dist/assets/swarmSimulation-DHDqjfMa.js +0 -1
|
@@ -1,338 +0,0 @@
|
|
|
1
|
-
var q0=Object.defineProperty;var bf=e=>{throw TypeError(e)};var Z0=(e,t,n)=>t in e?q0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Sf=(e,t,n)=>Z0(e,typeof t!="symbol"?t+"":t,n),Nl=(e,t,n)=>t.has(e)||bf("Cannot "+n);var R=(e,t,n)=>(Nl(e,t,"read from private field"),n?n.call(e):t.get(e)),ie=(e,t,n)=>t.has(e)?bf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),J=(e,t,n,r)=>(Nl(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ge=(e,t,n)=>(Nl(e,t,"access private method"),n);var oi=(e,t,n,r)=>({set _(o){J(e,t,o,n)},get _(){return R(e,t,r)}});function J0(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();function Kp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qp={exports:{}},Ta={},Yp={exports:{}},te={};/**
|
|
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 Ws=Symbol.for("react.element"),ew=Symbol.for("react.portal"),tw=Symbol.for("react.fragment"),nw=Symbol.for("react.strict_mode"),rw=Symbol.for("react.profiler"),ow=Symbol.for("react.provider"),sw=Symbol.for("react.context"),iw=Symbol.for("react.forward_ref"),aw=Symbol.for("react.suspense"),lw=Symbol.for("react.memo"),cw=Symbol.for("react.lazy"),Nf=Symbol.iterator;function uw(e){return e===null||typeof e!="object"?null:(e=Nf&&e[Nf]||e["@@iterator"],typeof e=="function"?e:null)}var Xp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qp=Object.assign,Zp={};function Fo(e,t,n){this.props=e,this.context=t,this.refs=Zp,this.updater=n||Xp}Fo.prototype.isReactComponent={};Fo.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")};Fo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Jp(){}Jp.prototype=Fo.prototype;function Fu(e,t,n){this.props=e,this.context=t,this.refs=Zp,this.updater=n||Xp}var zu=Fu.prototype=new Jp;zu.constructor=Fu;qp(zu,Fo.prototype);zu.isPureReactComponent=!0;var kf=Array.isArray,eh=Object.prototype.hasOwnProperty,Bu={current:null},th={key:!0,ref:!0,__self:!0,__source:!0};function nh(e,t,n){var r,o={},s=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)eh.call(t,r)&&!th.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)o[r]===void 0&&(o[r]=l[r]);return{$$typeof:Ws,type:e,key:s,ref:i,props:o,_owner:Bu.current}}function dw(e,t){return{$$typeof:Ws,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Vu(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ws}function fw(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Cf=/\/+/g;function kl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?fw(""+e.key):t.toString(36)}function Ti(e,t,n,r,o){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Ws:case ew:i=!0}}if(i)return i=e,o=o(i),e=r===""?"."+kl(i,0):r,kf(o)?(n="",e!=null&&(n=e.replace(Cf,"$&/")+"/"),Ti(o,t,n,"",function(u){return u})):o!=null&&(Vu(o)&&(o=dw(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(Cf,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=r===""?".":r+":",kf(e))for(var l=0;l<e.length;l++){s=e[l];var c=r+kl(s,l);i+=Ti(s,t,n,c,o)}else if(c=uw(e),typeof c=="function")for(e=c.call(e),l=0;!(s=e.next()).done;)s=s.value,c=r+kl(s,l++),i+=Ti(s,t,n,c,o);else if(s==="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 i}function si(e,t,n){if(e==null)return e;var r=[],o=0;return Ti(e,r,"","",function(s){return t.call(n,s,o++)}),r}function mw(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 st={current:null},Ai={transition:null},pw={ReactCurrentDispatcher:st,ReactCurrentBatchConfig:Ai,ReactCurrentOwner:Bu};function rh(){throw Error("act(...) is not supported in production builds of React.")}te.Children={map:si,forEach:function(e,t,n){si(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return si(e,function(){t++}),t},toArray:function(e){return si(e,function(t){return t})||[]},only:function(e){if(!Vu(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};te.Component=Fo;te.Fragment=tw;te.Profiler=rw;te.PureComponent=Fu;te.StrictMode=nw;te.Suspense=aw;te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pw;te.act=rh;te.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=qp({},e.props),o=e.key,s=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,i=Bu.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)eh.call(t,c)&&!th.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:Ws,type:e.type,key:o,ref:s,props:r,_owner:i}};te.createContext=function(e){return e={$$typeof:sw,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:ow,_context:e},e.Consumer=e};te.createElement=nh;te.createFactory=function(e){var t=nh.bind(null,e);return t.type=e,t};te.createRef=function(){return{current:null}};te.forwardRef=function(e){return{$$typeof:iw,render:e}};te.isValidElement=Vu;te.lazy=function(e){return{$$typeof:cw,_payload:{_status:-1,_result:e},_init:mw}};te.memo=function(e,t){return{$$typeof:lw,type:e,compare:t===void 0?null:t}};te.startTransition=function(e){var t=Ai.transition;Ai.transition={};try{e()}finally{Ai.transition=t}};te.unstable_act=rh;te.useCallback=function(e,t){return st.current.useCallback(e,t)};te.useContext=function(e){return st.current.useContext(e)};te.useDebugValue=function(){};te.useDeferredValue=function(e){return st.current.useDeferredValue(e)};te.useEffect=function(e,t){return st.current.useEffect(e,t)};te.useId=function(){return st.current.useId()};te.useImperativeHandle=function(e,t,n){return st.current.useImperativeHandle(e,t,n)};te.useInsertionEffect=function(e,t){return st.current.useInsertionEffect(e,t)};te.useLayoutEffect=function(e,t){return st.current.useLayoutEffect(e,t)};te.useMemo=function(e,t){return st.current.useMemo(e,t)};te.useReducer=function(e,t,n){return st.current.useReducer(e,t,n)};te.useRef=function(e){return st.current.useRef(e)};te.useState=function(e){return st.current.useState(e)};te.useSyncExternalStore=function(e,t,n){return st.current.useSyncExternalStore(e,t,n)};te.useTransition=function(){return st.current.useTransition()};te.version="18.3.1";Yp.exports=te;var g=Yp.exports;const D=Kp(g),Uu=J0({__proto__:null,default:D},[g]);/**
|
|
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 hw=g,gw=Symbol.for("react.element"),vw=Symbol.for("react.fragment"),yw=Object.prototype.hasOwnProperty,xw=hw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ww={key:!0,ref:!0,__self:!0,__source:!0};function oh(e,t,n){var r,o={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)yw.call(t,r)&&!ww.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:gw,type:e,key:s,ref:i,props:o,_owner:xw.current}}Ta.Fragment=vw;Ta.jsx=oh;Ta.jsxs=oh;Qp.exports=Ta;var a=Qp.exports,sh={exports:{}},bt={},ih={exports:{}},ah={};/**
|
|
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(E,_){var L=E.length;E.push(_);e:for(;0<L;){var G=L-1>>>1,H=E[G];if(0<o(H,_))E[G]=_,E[L]=H,L=G;else break e}}function n(E){return E.length===0?null:E[0]}function r(E){if(E.length===0)return null;var _=E[0],L=E.pop();if(L!==_){E[0]=L;e:for(var G=0,H=E.length,Y=H>>>1;G<Y;){var X=2*(G+1)-1,pe=E[X],be=X+1,F=E[be];if(0>o(pe,L))be<H&&0>o(F,pe)?(E[G]=F,E[be]=L,G=be):(E[G]=pe,E[X]=L,G=X);else if(be<H&&0>o(F,L))E[G]=F,E[be]=L,G=be;else break e}}return _}function o(E,_){var L=E.sortIndex-_.sortIndex;return L!==0?L:E.id-_.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var c=[],u=[],f=1,d=null,p=3,m=!1,b=!1,h=!1,x=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(E){for(var _=n(u);_!==null;){if(_.callback===null)r(u);else if(_.startTime<=E)r(u),_.sortIndex=_.expirationTime,t(c,_);else break;_=n(u)}}function S(E){if(h=!1,w(E),!b)if(n(c)!==null)b=!0,$(N);else{var _=n(u);_!==null&&B(S,_.startTime-E)}}function N(E,_){b=!1,h&&(h=!1,y(j),j=-1),m=!0;var L=p;try{for(w(_),d=n(c);d!==null&&(!(d.expirationTime>_)||E&&!O());){var G=d.callback;if(typeof G=="function"){d.callback=null,p=d.priorityLevel;var H=G(d.expirationTime<=_);_=e.unstable_now(),typeof H=="function"?d.callback=H:d===n(c)&&r(c),w(_)}else r(c);d=n(c)}if(d!==null)var Y=!0;else{var X=n(u);X!==null&&B(S,X.startTime-_),Y=!1}return Y}finally{d=null,p=L,m=!1}}var C=!1,k=null,j=-1,A=5,P=-1;function O(){return!(e.unstable_now()-P<A)}function M(){if(k!==null){var E=e.unstable_now();P=E;var _=!0;try{_=k(!0,E)}finally{_?U():(C=!1,k=null)}}else C=!1}var U;if(typeof v=="function")U=function(){v(M)};else if(typeof MessageChannel<"u"){var T=new MessageChannel,z=T.port2;T.port1.onmessage=M,U=function(){z.postMessage(null)}}else U=function(){x(M,0)};function $(E){k=E,C||(C=!0,U())}function B(E,_){j=x(function(){E(e.unstable_now())},_)}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(E){E.callback=null},e.unstable_continueExecution=function(){b||m||(b=!0,$(N))},e.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<E?Math.floor(1e3/E):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(E){switch(p){case 1:case 2:case 3:var _=3;break;default:_=p}var L=p;p=_;try{return E()}finally{p=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(E,_){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var L=p;p=E;try{return _()}finally{p=L}},e.unstable_scheduleCallback=function(E,_,L){var G=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?G+L:G):L=G,E){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=L+H,E={id:f++,callback:_,priorityLevel:E,startTime:L,expirationTime:H,sortIndex:-1},L>G?(E.sortIndex=L,t(u,E),n(c)===null&&E===n(u)&&(h?(y(j),j=-1):h=!0,B(S,L-G))):(E.sortIndex=H,t(c,E),b||m||(b=!0,$(N))),E},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(E){var _=p;return function(){var L=p;p=_;try{return E.apply(this,arguments)}finally{p=L}}}})(ah);ih.exports=ah;var bw=ih.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 Sw=g,wt=bw;function I(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 lh=new Set,bs={};function Br(e,t){Po(e,t),Po(e+"Capture",t)}function Po(e,t){for(bs[e]=t,e=0;e<t.length;e++)lh.add(t[e])}var En=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),hc=Object.prototype.hasOwnProperty,Nw=/^[: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]*$/,Ef={},jf={};function kw(e){return hc.call(jf,e)?!0:hc.call(Ef,e)?!1:Nw.test(e)?jf[e]=!0:(Ef[e]=!0,!1)}function Cw(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 Ew(e,t,n,r){if(t===null||typeof t>"u"||Cw(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 it(e,t,n,r,o,s,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=i}var We={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){We[e]=new it(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];We[t]=new it(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){We[e]=new it(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){We[e]=new it(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){We[e]=new it(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){We[e]=new it(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){We[e]=new it(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){We[e]=new it(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){We[e]=new it(e,5,!1,e.toLowerCase(),null,!1,!1)});var Hu=/[\-:]([a-z])/g;function Wu(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(Hu,Wu);We[t]=new it(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(Hu,Wu);We[t]=new it(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(Hu,Wu);We[t]=new it(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){We[e]=new it(e,1,!1,e.toLowerCase(),null,!1,!1)});We.xlinkHref=new it("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){We[e]=new it(e,1,!1,e.toLowerCase(),null,!0,!0)});function Gu(e,t,n,r){var o=We.hasOwnProperty(t)?We[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Ew(t,n,o,r)&&(n=null),r||o===null?kw(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var An=Sw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ii=Symbol.for("react.element"),qr=Symbol.for("react.portal"),Zr=Symbol.for("react.fragment"),Ku=Symbol.for("react.strict_mode"),gc=Symbol.for("react.profiler"),ch=Symbol.for("react.provider"),uh=Symbol.for("react.context"),Qu=Symbol.for("react.forward_ref"),vc=Symbol.for("react.suspense"),yc=Symbol.for("react.suspense_list"),Yu=Symbol.for("react.memo"),Bn=Symbol.for("react.lazy"),dh=Symbol.for("react.offscreen"),_f=Symbol.iterator;function Qo(e){return e===null||typeof e!="object"?null:(e=_f&&e[_f]||e["@@iterator"],typeof e=="function"?e:null)}var _e=Object.assign,Cl;function os(e){if(Cl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Cl=t&&t[1]||""}return`
|
|
34
|
-
`+Cl+e}var El=!1;function jl(e,t){if(!e||El)return"";El=!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 o=u.stack.split(`
|
|
35
|
-
`),s=r.stack.split(`
|
|
36
|
-
`),i=o.length-1,l=s.length-1;1<=i&&0<=l&&o[i]!==s[l];)l--;for(;1<=i&&0<=l;i--,l--)if(o[i]!==s[l]){if(i!==1||l!==1)do if(i--,l--,0>l||o[i]!==s[l]){var c=`
|
|
37
|
-
`+o[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=l);break}}}finally{El=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?os(e):""}function jw(e){switch(e.tag){case 5:return os(e.type);case 16:return os("Lazy");case 13:return os("Suspense");case 19:return os("SuspenseList");case 0:case 2:case 15:return e=jl(e.type,!1),e;case 11:return e=jl(e.type.render,!1),e;case 1:return e=jl(e.type,!0),e;default:return""}}function xc(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 Zr:return"Fragment";case qr:return"Portal";case gc:return"Profiler";case Ku:return"StrictMode";case vc:return"Suspense";case yc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case uh:return(e.displayName||"Context")+".Consumer";case ch:return(e._context.displayName||"Context")+".Provider";case Qu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Yu:return t=e.displayName||null,t!==null?t:xc(e.type)||"Memo";case Bn:t=e._payload,e=e._init;try{return xc(e(t))}catch{}}return null}function _w(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 xc(t);case 8:return t===Ku?"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 ar(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Rw(e){var t=fh(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 o=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ai(e){e._valueTracker||(e._valueTracker=Rw(e))}function mh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=fh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Xi(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 wc(e,t){var n=t.checked;return _e({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Rf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ar(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 ph(e,t){t=t.checked,t!=null&&Gu(e,"checked",t,!1)}function bc(e,t){ph(e,t);var n=ar(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")?Sc(e,t.type,n):t.hasOwnProperty("defaultValue")&&Sc(e,t.type,ar(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Pf(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 Sc(e,t,n){(t!=="number"||Xi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ss=Array.isArray;function co(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ar(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Nc(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(I(91));return _e({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Tf(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(I(92));if(ss(n)){if(1<n.length)throw Error(I(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ar(n)}}function hh(e,t){var n=ar(t.value),r=ar(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 Af(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function gh(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 kc(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?gh(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var li,vh=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(li=li||document.createElement("div"),li.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=li.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ss(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var us={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},Pw=["Webkit","ms","Moz","O"];Object.keys(us).forEach(function(e){Pw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),us[t]=us[e]})});function yh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||us.hasOwnProperty(e)&&us[e]?(""+t).trim():t+"px"}function xh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=yh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Tw=_e({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 Cc(e,t){if(t){if(Tw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(I(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(I(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(I(61))}if(t.style!=null&&typeof t.style!="object")throw Error(I(62))}}function Ec(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 jc=null;function Xu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _c=null,uo=null,fo=null;function If(e){if(e=Qs(e)){if(typeof _c!="function")throw Error(I(280));var t=e.stateNode;t&&(t=La(t),_c(e.stateNode,e.type,t))}}function wh(e){uo?fo?fo.push(e):fo=[e]:uo=e}function bh(){if(uo){var e=uo,t=fo;if(fo=uo=null,If(e),t)for(e=0;e<t.length;e++)If(t[e])}}function Sh(e,t){return e(t)}function Nh(){}var _l=!1;function kh(e,t,n){if(_l)return e(t,n);_l=!0;try{return Sh(e,t,n)}finally{_l=!1,(uo!==null||fo!==null)&&(Nh(),bh())}}function Ns(e,t){var n=e.stateNode;if(n===null)return null;var r=La(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(I(231,t,typeof n));return n}var Rc=!1;if(En)try{var Yo={};Object.defineProperty(Yo,"passive",{get:function(){Rc=!0}}),window.addEventListener("test",Yo,Yo),window.removeEventListener("test",Yo,Yo)}catch{Rc=!1}function Aw(e,t,n,r,o,s,i,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(f){this.onError(f)}}var ds=!1,qi=null,Zi=!1,Pc=null,Iw={onError:function(e){ds=!0,qi=e}};function Mw(e,t,n,r,o,s,i,l,c){ds=!1,qi=null,Aw.apply(Iw,arguments)}function Ow(e,t,n,r,o,s,i,l,c){if(Mw.apply(this,arguments),ds){if(ds){var u=qi;ds=!1,qi=null}else throw Error(I(198));Zi||(Zi=!0,Pc=u)}}function Vr(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 Ch(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 Mf(e){if(Vr(e)!==e)throw Error(I(188))}function Lw(e){var t=e.alternate;if(!t){if(t=Vr(e),t===null)throw Error(I(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var s=o.alternate;if(s===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return Mf(o),e;if(s===r)return Mf(o),t;s=s.sibling}throw Error(I(188))}if(n.return!==r.return)n=o,r=s;else{for(var i=!1,l=o.child;l;){if(l===n){i=!0,n=o,r=s;break}if(l===r){i=!0,r=o,n=s;break}l=l.sibling}if(!i){for(l=s.child;l;){if(l===n){i=!0,n=s,r=o;break}if(l===r){i=!0,r=s,n=o;break}l=l.sibling}if(!i)throw Error(I(189))}}if(n.alternate!==r)throw Error(I(190))}if(n.tag!==3)throw Error(I(188));return n.stateNode.current===n?e:t}function Eh(e){return e=Lw(e),e!==null?jh(e):null}function jh(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=jh(e);if(t!==null)return t;e=e.sibling}return null}var _h=wt.unstable_scheduleCallback,Of=wt.unstable_cancelCallback,Dw=wt.unstable_shouldYield,$w=wt.unstable_requestPaint,Ie=wt.unstable_now,Fw=wt.unstable_getCurrentPriorityLevel,qu=wt.unstable_ImmediatePriority,Rh=wt.unstable_UserBlockingPriority,Ji=wt.unstable_NormalPriority,zw=wt.unstable_LowPriority,Ph=wt.unstable_IdlePriority,Aa=null,un=null;function Bw(e){if(un&&typeof un.onCommitFiberRoot=="function")try{un.onCommitFiberRoot(Aa,e,void 0,(e.current.flags&128)===128)}catch{}}var Gt=Math.clz32?Math.clz32:Hw,Vw=Math.log,Uw=Math.LN2;function Hw(e){return e>>>=0,e===0?32:31-(Vw(e)/Uw|0)|0}var ci=64,ui=4194304;function is(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 ea(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var l=i&~o;l!==0?r=is(l):(s&=i,s!==0&&(r=is(s)))}else i=n&~o,i!==0?r=is(i):s!==0&&(r=is(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,s=t&-t,o>=s||o===16&&(s&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-Gt(t),o=1<<n,r|=e[n],t&=~o;return r}function Ww(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 Gw(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-Gt(s),l=1<<i,c=o[i];c===-1?(!(l&n)||l&r)&&(o[i]=Ww(l,t)):c<=t&&(e.expiredLanes|=l),s&=~l}}function Tc(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Th(){var e=ci;return ci<<=1,!(ci&4194240)&&(ci=64),e}function Rl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Gs(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Gt(t),e[t]=n}function Kw(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 o=31-Gt(n),s=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~s}}function Zu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Gt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var de=0;function Ah(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Ih,Ju,Mh,Oh,Lh,Ac=!1,di=[],Jn=null,er=null,tr=null,ks=new Map,Cs=new Map,Un=[],Qw="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 Lf(e,t){switch(e){case"focusin":case"focusout":Jn=null;break;case"dragenter":case"dragleave":er=null;break;case"mouseover":case"mouseout":tr=null;break;case"pointerover":case"pointerout":ks.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cs.delete(t.pointerId)}}function Xo(e,t,n,r,o,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[o]},t!==null&&(t=Qs(t),t!==null&&Ju(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Yw(e,t,n,r,o){switch(t){case"focusin":return Jn=Xo(Jn,e,t,n,r,o),!0;case"dragenter":return er=Xo(er,e,t,n,r,o),!0;case"mouseover":return tr=Xo(tr,e,t,n,r,o),!0;case"pointerover":var s=o.pointerId;return ks.set(s,Xo(ks.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,Cs.set(s,Xo(Cs.get(s)||null,e,t,n,r,o)),!0}return!1}function Dh(e){var t=br(e.target);if(t!==null){var n=Vr(t);if(n!==null){if(t=n.tag,t===13){if(t=Ch(n),t!==null){e.blockedOn=t,Lh(e.priority,function(){Mh(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 Ii(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ic(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);jc=r,n.target.dispatchEvent(r),jc=null}else return t=Qs(n),t!==null&&Ju(t),e.blockedOn=n,!1;t.shift()}return!0}function Df(e,t,n){Ii(e)&&n.delete(t)}function Xw(){Ac=!1,Jn!==null&&Ii(Jn)&&(Jn=null),er!==null&&Ii(er)&&(er=null),tr!==null&&Ii(tr)&&(tr=null),ks.forEach(Df),Cs.forEach(Df)}function qo(e,t){e.blockedOn===t&&(e.blockedOn=null,Ac||(Ac=!0,wt.unstable_scheduleCallback(wt.unstable_NormalPriority,Xw)))}function Es(e){function t(o){return qo(o,e)}if(0<di.length){qo(di[0],e);for(var n=1;n<di.length;n++){var r=di[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Jn!==null&&qo(Jn,e),er!==null&&qo(er,e),tr!==null&&qo(tr,e),ks.forEach(t),Cs.forEach(t),n=0;n<Un.length;n++)r=Un[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Un.length&&(n=Un[0],n.blockedOn===null);)Dh(n),n.blockedOn===null&&Un.shift()}var mo=An.ReactCurrentBatchConfig,ta=!0;function qw(e,t,n,r){var o=de,s=mo.transition;mo.transition=null;try{de=1,ed(e,t,n,r)}finally{de=o,mo.transition=s}}function Zw(e,t,n,r){var o=de,s=mo.transition;mo.transition=null;try{de=4,ed(e,t,n,r)}finally{de=o,mo.transition=s}}function ed(e,t,n,r){if(ta){var o=Ic(e,t,n,r);if(o===null)Fl(e,t,r,na,n),Lf(e,r);else if(Yw(o,e,t,n,r))r.stopPropagation();else if(Lf(e,r),t&4&&-1<Qw.indexOf(e)){for(;o!==null;){var s=Qs(o);if(s!==null&&Ih(s),s=Ic(e,t,n,r),s===null&&Fl(e,t,r,na,n),s===o)break;o=s}o!==null&&r.stopPropagation()}else Fl(e,t,r,null,n)}}var na=null;function Ic(e,t,n,r){if(na=null,e=Xu(r),e=br(e),e!==null)if(t=Vr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Ch(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 na=e,null}function $h(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(Fw()){case qu:return 1;case Rh:return 4;case Ji:case zw:return 16;case Ph:return 536870912;default:return 16}default:return 16}}var Xn=null,td=null,Mi=null;function Fh(){if(Mi)return Mi;var e,t=td,n=t.length,r,o="value"in Xn?Xn.value:Xn.textContent,s=o.length;for(e=0;e<n&&t[e]===o[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===o[s-r];r++);return Mi=o.slice(e,1<r?1-r:void 0)}function Oi(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 fi(){return!0}function $f(){return!1}function St(e){function t(n,r,o,s,i){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?fi:$f,this.isPropagationStopped=$f,this}return _e(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=fi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=fi)},persist:function(){},isPersistent:fi}),t}var zo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nd=St(zo),Ks=_e({},zo,{view:0,detail:0}),Jw=St(Ks),Pl,Tl,Zo,Ia=_e({},Ks,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rd,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!==Zo&&(Zo&&e.type==="mousemove"?(Pl=e.screenX-Zo.screenX,Tl=e.screenY-Zo.screenY):Tl=Pl=0,Zo=e),Pl)},movementY:function(e){return"movementY"in e?e.movementY:Tl}}),Ff=St(Ia),eb=_e({},Ia,{dataTransfer:0}),tb=St(eb),nb=_e({},Ks,{relatedTarget:0}),Al=St(nb),rb=_e({},zo,{animationName:0,elapsedTime:0,pseudoElement:0}),ob=St(rb),sb=_e({},zo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ib=St(sb),ab=_e({},zo,{data:0}),zf=St(ab),lb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cb={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"},ub={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function db(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ub[e])?!!t[e]:!1}function rd(){return db}var fb=_e({},Ks,{key:function(e){if(e.key){var t=lb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Oi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?cb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rd,charCode:function(e){return e.type==="keypress"?Oi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Oi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),mb=St(fb),pb=_e({},Ia,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bf=St(pb),hb=_e({},Ks,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rd}),gb=St(hb),vb=_e({},zo,{propertyName:0,elapsedTime:0,pseudoElement:0}),yb=St(vb),xb=_e({},Ia,{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}),wb=St(xb),bb=[9,13,27,32],od=En&&"CompositionEvent"in window,fs=null;En&&"documentMode"in document&&(fs=document.documentMode);var Sb=En&&"TextEvent"in window&&!fs,zh=En&&(!od||fs&&8<fs&&11>=fs),Vf=" ",Uf=!1;function Bh(e,t){switch(e){case"keyup":return bb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Jr=!1;function Nb(e,t){switch(e){case"compositionend":return Vh(t);case"keypress":return t.which!==32?null:(Uf=!0,Vf);case"textInput":return e=t.data,e===Vf&&Uf?null:e;default:return null}}function kb(e,t){if(Jr)return e==="compositionend"||!od&&Bh(e,t)?(e=Fh(),Mi=td=Xn=null,Jr=!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 zh&&t.locale!=="ko"?null:t.data;default:return null}}var Cb={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 Hf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Cb[e.type]:t==="textarea"}function Uh(e,t,n,r){wh(r),t=ra(t,"onChange"),0<t.length&&(n=new nd("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ms=null,js=null;function Eb(e){eg(e,0)}function Ma(e){var t=no(e);if(mh(t))return e}function jb(e,t){if(e==="change")return t}var Hh=!1;if(En){var Il;if(En){var Ml="oninput"in document;if(!Ml){var Wf=document.createElement("div");Wf.setAttribute("oninput","return;"),Ml=typeof Wf.oninput=="function"}Il=Ml}else Il=!1;Hh=Il&&(!document.documentMode||9<document.documentMode)}function Gf(){ms&&(ms.detachEvent("onpropertychange",Wh),js=ms=null)}function Wh(e){if(e.propertyName==="value"&&Ma(js)){var t=[];Uh(t,js,e,Xu(e)),kh(Eb,t)}}function _b(e,t,n){e==="focusin"?(Gf(),ms=t,js=n,ms.attachEvent("onpropertychange",Wh)):e==="focusout"&&Gf()}function Rb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ma(js)}function Pb(e,t){if(e==="click")return Ma(t)}function Tb(e,t){if(e==="input"||e==="change")return Ma(t)}function Ab(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qt=typeof Object.is=="function"?Object.is:Ab;function _s(e,t){if(Qt(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 o=n[r];if(!hc.call(t,o)||!Qt(e[o],t[o]))return!1}return!0}function Kf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Qf(e,t){var n=Kf(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=Kf(n)}}function Gh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kh(){for(var e=window,t=Xi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Xi(e.document)}return t}function sd(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 Ib(e){var t=Kh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Gh(n.ownerDocument.documentElement,n)){if(r!==null&&sd(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 o=n.textContent.length,s=Math.min(r.start,o);r=r.end===void 0?s:Math.min(r.end,o),!e.extend&&s>r&&(o=r,r=s,s=o),o=Qf(n,s);var i=Qf(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.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 Mb=En&&"documentMode"in document&&11>=document.documentMode,eo=null,Mc=null,ps=null,Oc=!1;function Yf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Oc||eo==null||eo!==Xi(r)||(r=eo,"selectionStart"in r&&sd(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}),ps&&_s(ps,r)||(ps=r,r=ra(Mc,"onSelect"),0<r.length&&(t=new nd("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=eo)))}function mi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var to={animationend:mi("Animation","AnimationEnd"),animationiteration:mi("Animation","AnimationIteration"),animationstart:mi("Animation","AnimationStart"),transitionend:mi("Transition","TransitionEnd")},Ol={},Qh={};En&&(Qh=document.createElement("div").style,"AnimationEvent"in window||(delete to.animationend.animation,delete to.animationiteration.animation,delete to.animationstart.animation),"TransitionEvent"in window||delete to.transitionend.transition);function Oa(e){if(Ol[e])return Ol[e];if(!to[e])return e;var t=to[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Qh)return Ol[e]=t[n];return e}var Yh=Oa("animationend"),Xh=Oa("animationiteration"),qh=Oa("animationstart"),Zh=Oa("transitionend"),Jh=new Map,Xf="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 fr(e,t){Jh.set(e,t),Br(t,[e])}for(var Ll=0;Ll<Xf.length;Ll++){var Dl=Xf[Ll],Ob=Dl.toLowerCase(),Lb=Dl[0].toUpperCase()+Dl.slice(1);fr(Ob,"on"+Lb)}fr(Yh,"onAnimationEnd");fr(Xh,"onAnimationIteration");fr(qh,"onAnimationStart");fr("dblclick","onDoubleClick");fr("focusin","onFocus");fr("focusout","onBlur");fr(Zh,"onTransitionEnd");Po("onMouseEnter",["mouseout","mouseover"]);Po("onMouseLeave",["mouseout","mouseover"]);Po("onPointerEnter",["pointerout","pointerover"]);Po("onPointerLeave",["pointerout","pointerover"]);Br("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Br("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Br("onBeforeInput",["compositionend","keypress","textInput","paste"]);Br("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Br("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Br("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var as="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(" "),Db=new Set("cancel close invalid load scroll toggle".split(" ").concat(as));function qf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Ow(r,t,void 0,e),e.currentTarget=null}function eg(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==s&&o.isPropagationStopped())break e;qf(o,l,u),s=c}else for(i=0;i<r.length;i++){if(l=r[i],c=l.instance,u=l.currentTarget,l=l.listener,c!==s&&o.isPropagationStopped())break e;qf(o,l,u),s=c}}}if(Zi)throw e=Pc,Zi=!1,Pc=null,e}function xe(e,t){var n=t[zc];n===void 0&&(n=t[zc]=new Set);var r=e+"__bubble";n.has(r)||(tg(t,e,2,!1),n.add(r))}function $l(e,t,n){var r=0;t&&(r|=4),tg(n,e,r,t)}var pi="_reactListening"+Math.random().toString(36).slice(2);function Rs(e){if(!e[pi]){e[pi]=!0,lh.forEach(function(n){n!=="selectionchange"&&(Db.has(n)||$l(n,!1,e),$l(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[pi]||(t[pi]=!0,$l("selectionchange",!1,t))}}function tg(e,t,n,r){switch($h(t)){case 1:var o=qw;break;case 4:o=Zw;break;default:o=ed}n=o.bind(null,t,n,e),o=void 0,!Rc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Fl(e,t,n,r,o){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var l=r.stateNode.containerInfo;if(l===o||l.nodeType===8&&l.parentNode===o)break;if(i===4)for(i=r.return;i!==null;){var c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===o||c.nodeType===8&&c.parentNode===o))return;i=i.return}for(;l!==null;){if(i=br(l),i===null)return;if(c=i.tag,c===5||c===6){r=s=i;continue e}l=l.parentNode}}r=r.return}kh(function(){var u=s,f=Xu(n),d=[];e:{var p=Jh.get(e);if(p!==void 0){var m=nd,b=e;switch(e){case"keypress":if(Oi(n)===0)break e;case"keydown":case"keyup":m=mb;break;case"focusin":b="focus",m=Al;break;case"focusout":b="blur",m=Al;break;case"beforeblur":case"afterblur":m=Al;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":m=Ff;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=tb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=gb;break;case Yh:case Xh:case qh:m=ob;break;case Zh:m=yb;break;case"scroll":m=Jw;break;case"wheel":m=wb;break;case"copy":case"cut":case"paste":m=ib;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Bf}var h=(t&4)!==0,x=!h&&e==="scroll",y=h?p!==null?p+"Capture":null:p;h=[];for(var v=u,w;v!==null;){w=v;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,y!==null&&(S=Ns(v,y),S!=null&&h.push(Ps(v,S,w)))),x)break;v=v.return}0<h.length&&(p=new m(p,b,null,n,f),d.push({event:p,listeners:h}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",p&&n!==jc&&(b=n.relatedTarget||n.fromElement)&&(br(b)||b[jn]))break e;if((m||p)&&(p=f.window===f?f:(p=f.ownerDocument)?p.defaultView||p.parentWindow:window,m?(b=n.relatedTarget||n.toElement,m=u,b=b?br(b):null,b!==null&&(x=Vr(b),b!==x||b.tag!==5&&b.tag!==6)&&(b=null)):(m=null,b=u),m!==b)){if(h=Ff,S="onMouseLeave",y="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(h=Bf,S="onPointerLeave",y="onPointerEnter",v="pointer"),x=m==null?p:no(m),w=b==null?p:no(b),p=new h(S,v+"leave",m,n,f),p.target=x,p.relatedTarget=w,S=null,br(f)===u&&(h=new h(y,v+"enter",b,n,f),h.target=w,h.relatedTarget=x,S=h),x=S,m&&b)t:{for(h=m,y=b,v=0,w=h;w;w=Kr(w))v++;for(w=0,S=y;S;S=Kr(S))w++;for(;0<v-w;)h=Kr(h),v--;for(;0<w-v;)y=Kr(y),w--;for(;v--;){if(h===y||y!==null&&h===y.alternate)break t;h=Kr(h),y=Kr(y)}h=null}else h=null;m!==null&&Zf(d,p,m,h,!1),b!==null&&x!==null&&Zf(d,x,b,h,!0)}}e:{if(p=u?no(u):window,m=p.nodeName&&p.nodeName.toLowerCase(),m==="select"||m==="input"&&p.type==="file")var N=jb;else if(Hf(p))if(Hh)N=Tb;else{N=Rb;var C=_b}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(N=Pb);if(N&&(N=N(e,u))){Uh(d,N,n,f);break e}C&&C(e,p,u),e==="focusout"&&(C=p._wrapperState)&&C.controlled&&p.type==="number"&&Sc(p,"number",p.value)}switch(C=u?no(u):window,e){case"focusin":(Hf(C)||C.contentEditable==="true")&&(eo=C,Mc=u,ps=null);break;case"focusout":ps=Mc=eo=null;break;case"mousedown":Oc=!0;break;case"contextmenu":case"mouseup":case"dragend":Oc=!1,Yf(d,n,f);break;case"selectionchange":if(Mb)break;case"keydown":case"keyup":Yf(d,n,f)}var k;if(od)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else Jr?Bh(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(zh&&n.locale!=="ko"&&(Jr||j!=="onCompositionStart"?j==="onCompositionEnd"&&Jr&&(k=Fh()):(Xn=f,td="value"in Xn?Xn.value:Xn.textContent,Jr=!0)),C=ra(u,j),0<C.length&&(j=new zf(j,e,null,n,f),d.push({event:j,listeners:C}),k?j.data=k:(k=Vh(n),k!==null&&(j.data=k)))),(k=Sb?Nb(e,n):kb(e,n))&&(u=ra(u,"onBeforeInput"),0<u.length&&(f=new zf("onBeforeInput","beforeinput",null,n,f),d.push({event:f,listeners:u}),f.data=k))}eg(d,t)})}function Ps(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ra(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=Ns(e,n),s!=null&&r.unshift(Ps(e,s,o)),s=Ns(e,t),s!=null&&r.push(Ps(e,s,o))),e=e.return}return r}function Kr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Zf(e,t,n,r,o){for(var s=t._reactName,i=[];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,o?(c=Ns(n,s),c!=null&&i.unshift(Ps(n,c,l))):o||(c=Ns(n,s),c!=null&&i.push(Ps(n,c,l)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var $b=/\r\n?/g,Fb=/\u0000|\uFFFD/g;function Jf(e){return(typeof e=="string"?e:""+e).replace($b,`
|
|
38
|
-
`).replace(Fb,"")}function hi(e,t,n){if(t=Jf(t),Jf(e)!==t&&n)throw Error(I(425))}function oa(){}var Lc=null,Dc=null;function $c(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 Fc=typeof setTimeout=="function"?setTimeout:void 0,zb=typeof clearTimeout=="function"?clearTimeout:void 0,em=typeof Promise=="function"?Promise:void 0,Bb=typeof queueMicrotask=="function"?queueMicrotask:typeof em<"u"?function(e){return em.resolve(null).then(e).catch(Vb)}:Fc;function Vb(e){setTimeout(function(){throw e})}function zl(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Es(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Es(t)}function nr(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 tm(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 Bo=Math.random().toString(36).slice(2),an="__reactFiber$"+Bo,Ts="__reactProps$"+Bo,jn="__reactContainer$"+Bo,zc="__reactEvents$"+Bo,Ub="__reactListeners$"+Bo,Hb="__reactHandles$"+Bo;function br(e){var t=e[an];if(t)return t;for(var n=e.parentNode;n;){if(t=n[jn]||n[an]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=tm(e);e!==null;){if(n=e[an])return n;e=tm(e)}return t}e=n,n=e.parentNode}return null}function Qs(e){return e=e[an]||e[jn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function no(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(I(33))}function La(e){return e[Ts]||null}var Bc=[],ro=-1;function mr(e){return{current:e}}function we(e){0>ro||(e.current=Bc[ro],Bc[ro]=null,ro--)}function ge(e,t){ro++,Bc[ro]=e.current,e.current=t}var lr={},qe=mr(lr),ut=mr(!1),Ar=lr;function To(e,t){var n=e.type.contextTypes;if(!n)return lr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},s;for(s in n)o[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function dt(e){return e=e.childContextTypes,e!=null}function sa(){we(ut),we(qe)}function nm(e,t,n){if(qe.current!==lr)throw Error(I(168));ge(qe,t),ge(ut,n)}function ng(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(I(108,_w(e)||"Unknown",o));return _e({},n,r)}function ia(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||lr,Ar=qe.current,ge(qe,e),ge(ut,ut.current),!0}function rm(e,t,n){var r=e.stateNode;if(!r)throw Error(I(169));n?(e=ng(e,t,Ar),r.__reactInternalMemoizedMergedChildContext=e,we(ut),we(qe),ge(qe,e)):we(ut),ge(ut,n)}var bn=null,Da=!1,Bl=!1;function rg(e){bn===null?bn=[e]:bn.push(e)}function Wb(e){Da=!0,rg(e)}function pr(){if(!Bl&&bn!==null){Bl=!0;var e=0,t=de;try{var n=bn;for(de=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}bn=null,Da=!1}catch(o){throw bn!==null&&(bn=bn.slice(e+1)),_h(qu,pr),o}finally{de=t,Bl=!1}}return null}var oo=[],so=0,aa=null,la=0,Et=[],jt=0,Ir=null,Nn=1,kn="";function xr(e,t){oo[so++]=la,oo[so++]=aa,aa=e,la=t}function og(e,t,n){Et[jt++]=Nn,Et[jt++]=kn,Et[jt++]=Ir,Ir=e;var r=Nn;e=kn;var o=32-Gt(r)-1;r&=~(1<<o),n+=1;var s=32-Gt(t)+o;if(30<s){var i=o-o%5;s=(r&(1<<i)-1).toString(32),r>>=i,o-=i,Nn=1<<32-Gt(t)+o|n<<o|r,kn=s+e}else Nn=1<<s|n<<o|r,kn=e}function id(e){e.return!==null&&(xr(e,1),og(e,1,0))}function ad(e){for(;e===aa;)aa=oo[--so],oo[so]=null,la=oo[--so],oo[so]=null;for(;e===Ir;)Ir=Et[--jt],Et[jt]=null,kn=Et[--jt],Et[jt]=null,Nn=Et[--jt],Et[jt]=null}var yt=null,gt=null,ke=!1,Ht=null;function sg(e,t){var n=_t(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 om(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,yt=e,gt=nr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,yt=e,gt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ir!==null?{id:Nn,overflow:kn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=_t(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,yt=e,gt=null,!0):!1;default:return!1}}function Vc(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Uc(e){if(ke){var t=gt;if(t){var n=t;if(!om(e,t)){if(Vc(e))throw Error(I(418));t=nr(n.nextSibling);var r=yt;t&&om(e,t)?sg(r,n):(e.flags=e.flags&-4097|2,ke=!1,yt=e)}}else{if(Vc(e))throw Error(I(418));e.flags=e.flags&-4097|2,ke=!1,yt=e}}}function sm(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;yt=e}function gi(e){if(e!==yt)return!1;if(!ke)return sm(e),ke=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!$c(e.type,e.memoizedProps)),t&&(t=gt)){if(Vc(e))throw ig(),Error(I(418));for(;t;)sg(e,t),t=nr(t.nextSibling)}if(sm(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){gt=nr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}gt=null}}else gt=yt?nr(e.stateNode.nextSibling):null;return!0}function ig(){for(var e=gt;e;)e=nr(e.nextSibling)}function Ao(){gt=yt=null,ke=!1}function ld(e){Ht===null?Ht=[e]:Ht.push(e)}var Gb=An.ReactCurrentBatchConfig;function Jo(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(I(309));var r=n.stateNode}if(!r)throw Error(I(147,e));var o=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(i){var l=o.refs;i===null?delete l[s]:l[s]=i},t._stringRef=s,t)}if(typeof e!="string")throw Error(I(284));if(!n._owner)throw Error(I(290,e))}return e}function vi(e,t){throw e=Object.prototype.toString.call(t),Error(I(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function im(e){var t=e._init;return t(e._payload)}function ag(e){function t(y,v){if(e){var w=y.deletions;w===null?(y.deletions=[v],y.flags|=16):w.push(v)}}function n(y,v){if(!e)return null;for(;v!==null;)t(y,v),v=v.sibling;return null}function r(y,v){for(y=new Map;v!==null;)v.key!==null?y.set(v.key,v):y.set(v.index,v),v=v.sibling;return y}function o(y,v){return y=ir(y,v),y.index=0,y.sibling=null,y}function s(y,v,w){return y.index=w,e?(w=y.alternate,w!==null?(w=w.index,w<v?(y.flags|=2,v):w):(y.flags|=2,v)):(y.flags|=1048576,v)}function i(y){return e&&y.alternate===null&&(y.flags|=2),y}function l(y,v,w,S){return v===null||v.tag!==6?(v=Ql(w,y.mode,S),v.return=y,v):(v=o(v,w),v.return=y,v)}function c(y,v,w,S){var N=w.type;return N===Zr?f(y,v,w.props.children,S,w.key):v!==null&&(v.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Bn&&im(N)===v.type)?(S=o(v,w.props),S.ref=Jo(y,v,w),S.return=y,S):(S=Vi(w.type,w.key,w.props,null,y.mode,S),S.ref=Jo(y,v,w),S.return=y,S)}function u(y,v,w,S){return v===null||v.tag!==4||v.stateNode.containerInfo!==w.containerInfo||v.stateNode.implementation!==w.implementation?(v=Yl(w,y.mode,S),v.return=y,v):(v=o(v,w.children||[]),v.return=y,v)}function f(y,v,w,S,N){return v===null||v.tag!==7?(v=Tr(w,y.mode,S,N),v.return=y,v):(v=o(v,w),v.return=y,v)}function d(y,v,w){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Ql(""+v,y.mode,w),v.return=y,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case ii:return w=Vi(v.type,v.key,v.props,null,y.mode,w),w.ref=Jo(y,null,v),w.return=y,w;case qr:return v=Yl(v,y.mode,w),v.return=y,v;case Bn:var S=v._init;return d(y,S(v._payload),w)}if(ss(v)||Qo(v))return v=Tr(v,y.mode,w,null),v.return=y,v;vi(y,v)}return null}function p(y,v,w,S){var N=v!==null?v.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return N!==null?null:l(y,v,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ii:return w.key===N?c(y,v,w,S):null;case qr:return w.key===N?u(y,v,w,S):null;case Bn:return N=w._init,p(y,v,N(w._payload),S)}if(ss(w)||Qo(w))return N!==null?null:f(y,v,w,S,null);vi(y,w)}return null}function m(y,v,w,S,N){if(typeof S=="string"&&S!==""||typeof S=="number")return y=y.get(w)||null,l(v,y,""+S,N);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case ii:return y=y.get(S.key===null?w:S.key)||null,c(v,y,S,N);case qr:return y=y.get(S.key===null?w:S.key)||null,u(v,y,S,N);case Bn:var C=S._init;return m(y,v,w,C(S._payload),N)}if(ss(S)||Qo(S))return y=y.get(w)||null,f(v,y,S,N,null);vi(v,S)}return null}function b(y,v,w,S){for(var N=null,C=null,k=v,j=v=0,A=null;k!==null&&j<w.length;j++){k.index>j?(A=k,k=null):A=k.sibling;var P=p(y,k,w[j],S);if(P===null){k===null&&(k=A);break}e&&k&&P.alternate===null&&t(y,k),v=s(P,v,j),C===null?N=P:C.sibling=P,C=P,k=A}if(j===w.length)return n(y,k),ke&&xr(y,j),N;if(k===null){for(;j<w.length;j++)k=d(y,w[j],S),k!==null&&(v=s(k,v,j),C===null?N=k:C.sibling=k,C=k);return ke&&xr(y,j),N}for(k=r(y,k);j<w.length;j++)A=m(k,y,j,w[j],S),A!==null&&(e&&A.alternate!==null&&k.delete(A.key===null?j:A.key),v=s(A,v,j),C===null?N=A:C.sibling=A,C=A);return e&&k.forEach(function(O){return t(y,O)}),ke&&xr(y,j),N}function h(y,v,w,S){var N=Qo(w);if(typeof N!="function")throw Error(I(150));if(w=N.call(w),w==null)throw Error(I(151));for(var C=N=null,k=v,j=v=0,A=null,P=w.next();k!==null&&!P.done;j++,P=w.next()){k.index>j?(A=k,k=null):A=k.sibling;var O=p(y,k,P.value,S);if(O===null){k===null&&(k=A);break}e&&k&&O.alternate===null&&t(y,k),v=s(O,v,j),C===null?N=O:C.sibling=O,C=O,k=A}if(P.done)return n(y,k),ke&&xr(y,j),N;if(k===null){for(;!P.done;j++,P=w.next())P=d(y,P.value,S),P!==null&&(v=s(P,v,j),C===null?N=P:C.sibling=P,C=P);return ke&&xr(y,j),N}for(k=r(y,k);!P.done;j++,P=w.next())P=m(k,y,j,P.value,S),P!==null&&(e&&P.alternate!==null&&k.delete(P.key===null?j:P.key),v=s(P,v,j),C===null?N=P:C.sibling=P,C=P);return e&&k.forEach(function(M){return t(y,M)}),ke&&xr(y,j),N}function x(y,v,w,S){if(typeof w=="object"&&w!==null&&w.type===Zr&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case ii:e:{for(var N=w.key,C=v;C!==null;){if(C.key===N){if(N=w.type,N===Zr){if(C.tag===7){n(y,C.sibling),v=o(C,w.props.children),v.return=y,y=v;break e}}else if(C.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Bn&&im(N)===C.type){n(y,C.sibling),v=o(C,w.props),v.ref=Jo(y,C,w),v.return=y,y=v;break e}n(y,C);break}else t(y,C);C=C.sibling}w.type===Zr?(v=Tr(w.props.children,y.mode,S,w.key),v.return=y,y=v):(S=Vi(w.type,w.key,w.props,null,y.mode,S),S.ref=Jo(y,v,w),S.return=y,y=S)}return i(y);case qr:e:{for(C=w.key;v!==null;){if(v.key===C)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(y,v.sibling),v=o(v,w.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=Yl(w,y.mode,S),v.return=y,y=v}return i(y);case Bn:return C=w._init,x(y,v,C(w._payload),S)}if(ss(w))return b(y,v,w,S);if(Qo(w))return h(y,v,w,S);vi(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(n(y,v.sibling),v=o(v,w),v.return=y,y=v):(n(y,v),v=Ql(w,y.mode,S),v.return=y,y=v),i(y)):n(y,v)}return x}var Io=ag(!0),lg=ag(!1),ca=mr(null),ua=null,io=null,cd=null;function ud(){cd=io=ua=null}function dd(e){var t=ca.current;we(ca),e._currentValue=t}function Hc(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 po(e,t){ua=e,cd=io=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ct=!0),e.firstContext=null)}function Pt(e){var t=e._currentValue;if(cd!==e)if(e={context:e,memoizedValue:t,next:null},io===null){if(ua===null)throw Error(I(308));io=e,ua.dependencies={lanes:0,firstContext:e}}else io=io.next=e;return t}var Sr=null;function fd(e){Sr===null?Sr=[e]:Sr.push(e)}function cg(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,fd(t)):(n.next=o.next,o.next=n),t.interleaved=n,_n(e,r)}function _n(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 Vn=!1;function md(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ug(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 Cn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function rr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,se&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,_n(e,n)}return o=r.interleaved,o===null?(t.next=t,fd(r)):(t.next=o.next,o.next=t),r.interleaved=t,_n(e,n)}function Li(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,Zu(e,n)}}function am(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?o=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?o=s=t:s=s.next=t}else o=s=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:s,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 da(e,t,n,r){var o=e.updateQueue;Vn=!1;var s=o.firstBaseUpdate,i=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var c=l,u=c.next;c.next=null,i===null?s=u:i.next=u,i=c;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==i&&(l===null?f.firstBaseUpdate=u:l.next=u,f.lastBaseUpdate=c))}if(s!==null){var d=o.baseState;i=0,f=u=c=null,l=s;do{var p=l.lane,m=l.eventTime;if((r&p)===p){f!==null&&(f=f.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var b=e,h=l;switch(p=t,m=n,h.tag){case 1:if(b=h.payload,typeof b=="function"){d=b.call(m,d,p);break e}d=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=h.payload,p=typeof b=="function"?b.call(m,d,p):b,p==null)break e;d=_e({},d,p);break e;case 2:Vn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=o.effects,p===null?o.effects=[l]:p.push(l))}else m={eventTime:m,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(u=f=m,c=d):f=f.next=m,i|=p;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;p=l,l=p.next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}while(!0);if(f===null&&(c=d),o.baseState=c,o.firstBaseUpdate=u,o.lastBaseUpdate=f,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else s===null&&(o.shared.lanes=0);Or|=i,e.lanes=i,e.memoizedState=d}}function lm(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(I(191,o));o.call(r)}}}var Ys={},dn=mr(Ys),As=mr(Ys),Is=mr(Ys);function Nr(e){if(e===Ys)throw Error(I(174));return e}function pd(e,t){switch(ge(Is,t),ge(As,e),ge(dn,Ys),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:kc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=kc(t,e)}we(dn),ge(dn,t)}function Mo(){we(dn),we(As),we(Is)}function dg(e){Nr(Is.current);var t=Nr(dn.current),n=kc(t,e.type);t!==n&&(ge(As,e),ge(dn,n))}function hd(e){As.current===e&&(we(dn),we(As))}var Ee=mr(0);function fa(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 Vl=[];function gd(){for(var e=0;e<Vl.length;e++)Vl[e]._workInProgressVersionPrimary=null;Vl.length=0}var Di=An.ReactCurrentDispatcher,Ul=An.ReactCurrentBatchConfig,Mr=0,je=null,Oe=null,ze=null,ma=!1,hs=!1,Ms=0,Kb=0;function Ke(){throw Error(I(321))}function vd(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Qt(e[n],t[n]))return!1;return!0}function yd(e,t,n,r,o,s){if(Mr=s,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Di.current=e===null||e.memoizedState===null?qb:Zb,e=n(r,o),hs){s=0;do{if(hs=!1,Ms=0,25<=s)throw Error(I(301));s+=1,ze=Oe=null,t.updateQueue=null,Di.current=Jb,e=n(r,o)}while(hs)}if(Di.current=pa,t=Oe!==null&&Oe.next!==null,Mr=0,ze=Oe=je=null,ma=!1,t)throw Error(I(300));return e}function xd(){var e=Ms!==0;return Ms=0,e}function tn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ze===null?je.memoizedState=ze=e:ze=ze.next=e,ze}function Tt(){if(Oe===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var t=ze===null?je.memoizedState:ze.next;if(t!==null)ze=t,Oe=e;else{if(e===null)throw Error(I(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},ze===null?je.memoizedState=ze=e:ze=ze.next=e}return ze}function Os(e,t){return typeof t=="function"?t(e):t}function Hl(e){var t=Tt(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var r=Oe,o=r.baseQueue,s=n.pending;if(s!==null){if(o!==null){var i=o.next;o.next=s.next,s.next=i}r.baseQueue=o=s,n.pending=null}if(o!==null){s=o.next,r=r.baseState;var l=i=null,c=null,u=s;do{var f=u.lane;if((Mr&f)===f)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 d={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=d,i=r):c=c.next=d,je.lanes|=f,Or|=f}u=u.next}while(u!==null&&u!==s);c===null?i=r:c.next=l,Qt(r,t.memoizedState)||(ct=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do s=o.lane,je.lanes|=s,Or|=s,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Wl(e){var t=Tt(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,s=t.memoizedState;if(o!==null){n.pending=null;var i=o=o.next;do s=e(s,i.action),i=i.next;while(i!==o);Qt(s,t.memoizedState)||(ct=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function fg(){}function mg(e,t){var n=je,r=Tt(),o=t(),s=!Qt(r.memoizedState,o);if(s&&(r.memoizedState=o,ct=!0),r=r.queue,wd(gg.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||ze!==null&&ze.memoizedState.tag&1){if(n.flags|=2048,Ls(9,hg.bind(null,n,r,o,t),void 0,null),Be===null)throw Error(I(349));Mr&30||pg(n,t,o)}return o}function pg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=je.updateQueue,t===null?(t={lastEffect:null,stores:null},je.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hg(e,t,n,r){t.value=n,t.getSnapshot=r,vg(t)&&yg(e)}function gg(e,t,n){return n(function(){vg(t)&&yg(e)})}function vg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qt(e,n)}catch{return!0}}function yg(e){var t=_n(e,1);t!==null&&Kt(t,e,1,-1)}function cm(e){var t=tn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Os,lastRenderedState:e},t.queue=e,e=e.dispatch=Xb.bind(null,je,e),[t.memoizedState,e]}function Ls(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=je.updateQueue,t===null?(t={lastEffect:null,stores:null},je.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 xg(){return Tt().memoizedState}function $i(e,t,n,r){var o=tn();je.flags|=e,o.memoizedState=Ls(1|t,n,void 0,r===void 0?null:r)}function $a(e,t,n,r){var o=Tt();r=r===void 0?null:r;var s=void 0;if(Oe!==null){var i=Oe.memoizedState;if(s=i.destroy,r!==null&&vd(r,i.deps)){o.memoizedState=Ls(t,n,s,r);return}}je.flags|=e,o.memoizedState=Ls(1|t,n,s,r)}function um(e,t){return $i(8390656,8,e,t)}function wd(e,t){return $a(2048,8,e,t)}function wg(e,t){return $a(4,2,e,t)}function bg(e,t){return $a(4,4,e,t)}function Sg(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 Ng(e,t,n){return n=n!=null?n.concat([e]):null,$a(4,4,Sg.bind(null,t,e),n)}function bd(){}function kg(e,t){var n=Tt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&vd(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Cg(e,t){var n=Tt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&vd(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Eg(e,t,n){return Mr&21?(Qt(n,t)||(n=Th(),je.lanes|=n,Or|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ct=!0),e.memoizedState=n)}function Qb(e,t){var n=de;de=n!==0&&4>n?n:4,e(!0);var r=Ul.transition;Ul.transition={};try{e(!1),t()}finally{de=n,Ul.transition=r}}function jg(){return Tt().memoizedState}function Yb(e,t,n){var r=sr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},_g(e))Rg(t,n);else if(n=cg(e,t,n,r),n!==null){var o=ot();Kt(n,e,r,o),Pg(n,t,r)}}function Xb(e,t,n){var r=sr(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(_g(e))Rg(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,l=s(i,n);if(o.hasEagerState=!0,o.eagerState=l,Qt(l,i)){var c=t.interleaved;c===null?(o.next=o,fd(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=cg(e,t,o,r),n!==null&&(o=ot(),Kt(n,e,r,o),Pg(n,t,r))}}function _g(e){var t=e.alternate;return e===je||t!==null&&t===je}function Rg(e,t){hs=ma=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Pg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Zu(e,n)}}var pa={readContext:Pt,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},qb={readContext:Pt,useCallback:function(e,t){return tn().memoizedState=[e,t===void 0?null:t],e},useContext:Pt,useEffect:um,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,$i(4194308,4,Sg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $i(4194308,4,e,t)},useInsertionEffect:function(e,t){return $i(4,2,e,t)},useMemo:function(e,t){var n=tn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=tn();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=Yb.bind(null,je,e),[r.memoizedState,e]},useRef:function(e){var t=tn();return e={current:e},t.memoizedState=e},useState:cm,useDebugValue:bd,useDeferredValue:function(e){return tn().memoizedState=e},useTransition:function(){var e=cm(!1),t=e[0];return e=Qb.bind(null,e[1]),tn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=je,o=tn();if(ke){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),Be===null)throw Error(I(349));Mr&30||pg(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,um(gg.bind(null,r,s,e),[e]),r.flags|=2048,Ls(9,hg.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=tn(),t=Be.identifierPrefix;if(ke){var n=kn,r=Nn;n=(r&~(1<<32-Gt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ms++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Kb++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Zb={readContext:Pt,useCallback:kg,useContext:Pt,useEffect:wd,useImperativeHandle:Ng,useInsertionEffect:wg,useLayoutEffect:bg,useMemo:Cg,useReducer:Hl,useRef:xg,useState:function(){return Hl(Os)},useDebugValue:bd,useDeferredValue:function(e){var t=Tt();return Eg(t,Oe.memoizedState,e)},useTransition:function(){var e=Hl(Os)[0],t=Tt().memoizedState;return[e,t]},useMutableSource:fg,useSyncExternalStore:mg,useId:jg,unstable_isNewReconciler:!1},Jb={readContext:Pt,useCallback:kg,useContext:Pt,useEffect:wd,useImperativeHandle:Ng,useInsertionEffect:wg,useLayoutEffect:bg,useMemo:Cg,useReducer:Wl,useRef:xg,useState:function(){return Wl(Os)},useDebugValue:bd,useDeferredValue:function(e){var t=Tt();return Oe===null?t.memoizedState=e:Eg(t,Oe.memoizedState,e)},useTransition:function(){var e=Wl(Os)[0],t=Tt().memoizedState;return[e,t]},useMutableSource:fg,useSyncExternalStore:mg,useId:jg,unstable_isNewReconciler:!1};function Ft(e,t){if(e&&e.defaultProps){t=_e({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Wc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:_e({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Fa={isMounted:function(e){return(e=e._reactInternals)?Vr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ot(),o=sr(e),s=Cn(r,o);s.payload=t,n!=null&&(s.callback=n),t=rr(e,s,o),t!==null&&(Kt(t,e,o,r),Li(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ot(),o=sr(e),s=Cn(r,o);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=rr(e,s,o),t!==null&&(Kt(t,e,o,r),Li(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ot(),r=sr(e),o=Cn(n,r);o.tag=2,t!=null&&(o.callback=t),t=rr(e,o,r),t!==null&&(Kt(t,e,r,n),Li(t,e,r))}};function dm(e,t,n,r,o,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,i):t.prototype&&t.prototype.isPureReactComponent?!_s(n,r)||!_s(o,s):!0}function Tg(e,t,n){var r=!1,o=lr,s=t.contextType;return typeof s=="object"&&s!==null?s=Pt(s):(o=dt(t)?Ar:qe.current,r=t.contextTypes,s=(r=r!=null)?To(e,o):lr),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Fa,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=s),t}function fm(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&&Fa.enqueueReplaceState(t,t.state,null)}function Gc(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},md(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=Pt(s):(s=dt(t)?Ar:qe.current,o.context=To(e,s)),o.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Wc(e,t,s,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Fa.enqueueReplaceState(o,o.state,null),da(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Oo(e,t){try{var n="",r=t;do n+=jw(r),r=r.return;while(r);var o=n}catch(s){o=`
|
|
39
|
-
Error generating stack: `+s.message+`
|
|
40
|
-
`+s.stack}return{value:e,source:t,stack:o,digest:null}}function Gl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Kc(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var e1=typeof WeakMap=="function"?WeakMap:Map;function Ag(e,t,n){n=Cn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ga||(ga=!0,ru=r),Kc(e,t)},n}function Ig(e,t,n){n=Cn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Kc(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Kc(e,t),typeof r!="function"&&(or===null?or=new Set([this]):or.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function mm(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new e1;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=p1.bind(null,e,t,n),t.then(e,e))}function pm(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 hm(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,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=Cn(-1,1),t.tag=2,rr(n,t,1))),n.lanes|=1),e)}var t1=An.ReactCurrentOwner,ct=!1;function nt(e,t,n,r){t.child=e===null?lg(t,null,n,r):Io(t,e.child,n,r)}function gm(e,t,n,r,o){n=n.render;var s=t.ref;return po(t,o),r=yd(e,t,n,r,s,o),n=xd(),e!==null&&!ct?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Rn(e,t,o)):(ke&&n&&id(t),t.flags|=1,nt(e,t,r,o),t.child)}function vm(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!Rd(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Mg(e,t,s,r,o)):(e=Vi(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&o)){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:_s,n(i,r)&&e.ref===t.ref)return Rn(e,t,o)}return t.flags|=1,e=ir(s,r),e.ref=t.ref,e.return=t,t.child=e}function Mg(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(_s(s,r)&&e.ref===t.ref)if(ct=!1,t.pendingProps=r=s,(e.lanes&o)!==0)e.flags&131072&&(ct=!0);else return t.lanes=e.lanes,Rn(e,t,o)}return Qc(e,t,n,r,o)}function Og(e,t,n){var r=t.pendingProps,o=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ge(lo,pt),pt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ge(lo,pt),pt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,ge(lo,pt),pt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,ge(lo,pt),pt|=r;return nt(e,t,o,n),t.child}function Lg(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Qc(e,t,n,r,o){var s=dt(n)?Ar:qe.current;return s=To(t,s),po(t,o),n=yd(e,t,n,r,s,o),r=xd(),e!==null&&!ct?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Rn(e,t,o)):(ke&&r&&id(t),t.flags|=1,nt(e,t,n,o),t.child)}function ym(e,t,n,r,o){if(dt(n)){var s=!0;ia(t)}else s=!1;if(po(t,o),t.stateNode===null)Fi(e,t),Tg(t,n,r),Gc(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var c=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=Pt(u):(u=dt(n)?Ar:qe.current,u=To(t,u));var f=n.getDerivedStateFromProps,d=typeof f=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==r||c!==u)&&fm(t,i,r,u),Vn=!1;var p=t.memoizedState;i.state=p,da(t,r,i,o),c=t.memoizedState,l!==r||p!==c||ut.current||Vn?(typeof f=="function"&&(Wc(t,n,f,r),c=t.memoizedState),(l=Vn||dm(t,n,l,r,p,c,u))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=u,r=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,ug(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Ft(t.type,l),i.props=u,d=t.pendingProps,p=i.context,c=n.contextType,typeof c=="object"&&c!==null?c=Pt(c):(c=dt(n)?Ar:qe.current,c=To(t,c));var m=n.getDerivedStateFromProps;(f=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==d||p!==c)&&fm(t,i,r,c),Vn=!1,p=t.memoizedState,i.state=p,da(t,r,i,o);var b=t.memoizedState;l!==d||p!==b||ut.current||Vn?(typeof m=="function"&&(Wc(t,n,m,r),b=t.memoizedState),(u=Vn||dm(t,n,u,r,p,b,c)||!1)?(f||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,b,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,b,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=b),i.props=r,i.state=b,i.context=c,r=u):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Yc(e,t,n,r,s,o)}function Yc(e,t,n,r,o,s){Lg(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&rm(t,n,!1),Rn(e,t,s);r=t.stateNode,t1.current=t;var l=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Io(t,e.child,null,s),t.child=Io(t,null,l,s)):nt(e,t,l,s),t.memoizedState=r.state,o&&rm(t,n,!0),t.child}function Dg(e){var t=e.stateNode;t.pendingContext?nm(e,t.pendingContext,t.pendingContext!==t.context):t.context&&nm(e,t.context,!1),pd(e,t.containerInfo)}function xm(e,t,n,r,o){return Ao(),ld(o),t.flags|=256,nt(e,t,n,r),t.child}var Xc={dehydrated:null,treeContext:null,retryLane:0};function qc(e){return{baseLanes:e,cachePool:null,transitions:null}}function $g(e,t,n){var r=t.pendingProps,o=Ee.current,s=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ge(Ee,o&1),e===null)return Uc(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):(i=r.children,e=r.fallback,s?(r=t.mode,s=t.child,i={mode:"hidden",children:i},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=i):s=Va(i,r,0,null),e=Tr(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=qc(n),t.memoizedState=Xc,e):Sd(t,i));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return n1(e,t,i,r,l,o,n);if(s){s=r.fallback,i=t.mode,o=e.child,l=o.sibling;var c={mode:"hidden",children:r.children};return!(i&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=ir(o,c),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?s=ir(l,s):(s=Tr(s,i,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,i=e.child.memoizedState,i=i===null?qc(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=Xc,r}return s=e.child,e=s.sibling,r=ir(s,{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 Sd(e,t){return t=Va({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function yi(e,t,n,r){return r!==null&&ld(r),Io(t,e.child,null,n),e=Sd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function n1(e,t,n,r,o,s,i){if(n)return t.flags&256?(t.flags&=-257,r=Gl(Error(I(422))),yi(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=Va({mode:"visible",children:r.children},o,0,null),s=Tr(s,o,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Io(t,e.child,null,i),t.child.memoizedState=qc(i),t.memoizedState=Xc,s);if(!(t.mode&1))return yi(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,s=Error(I(419)),r=Gl(s,r,void 0),yi(e,t,i,r)}if(l=(i&e.childLanes)!==0,ct||l){if(r=Be,r!==null){switch(i&-i){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|i)?0:o,o!==0&&o!==s.retryLane&&(s.retryLane=o,_n(e,o),Kt(r,e,o,-1))}return _d(),r=Gl(Error(I(421))),yi(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=h1.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,gt=nr(o.nextSibling),yt=t,ke=!0,Ht=null,e!==null&&(Et[jt++]=Nn,Et[jt++]=kn,Et[jt++]=Ir,Nn=e.id,kn=e.overflow,Ir=t),t=Sd(t,r.children),t.flags|=4096,t)}function wm(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Hc(e.return,t,n)}function Kl(e,t,n,r,o){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o)}function Fg(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=r.tail;if(nt(e,t,r.children,n),r=Ee.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&&wm(e,n,t);else if(e.tag===19)wm(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(ge(Ee,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&fa(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Kl(t,!1,o,n,s);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&fa(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Kl(t,!0,n,null,s);break;case"together":Kl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Fi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Rn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Or|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(I(153));if(t.child!==null){for(e=t.child,n=ir(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ir(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function r1(e,t,n){switch(t.tag){case 3:Dg(t),Ao();break;case 5:dg(t);break;case 1:dt(t.type)&&ia(t);break;case 4:pd(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ge(ca,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ge(Ee,Ee.current&1),t.flags|=128,null):n&t.child.childLanes?$g(e,t,n):(ge(Ee,Ee.current&1),e=Rn(e,t,n),e!==null?e.sibling:null);ge(Ee,Ee.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Fg(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ge(Ee,Ee.current),r)break;return null;case 22:case 23:return t.lanes=0,Og(e,t,n)}return Rn(e,t,n)}var zg,Zc,Bg,Vg;zg=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}};Zc=function(){};Bg=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Nr(dn.current);var s=null;switch(n){case"input":o=wc(e,o),r=wc(e,r),s=[];break;case"select":o=_e({},o,{value:void 0}),r=_e({},r,{value:void 0}),s=[];break;case"textarea":o=Nc(e,o),r=Nc(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=oa)}Cc(n,r);var i;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(bs.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var c=r[u];if(l=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&l[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(s||(s=[]),s.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(s=s||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(s=s||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(bs.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&xe("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};Vg=function(e,t,n,r){n!==r&&(t.flags|=4)};function es(e,t){if(!ke)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 Qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function o1(e,t,n){var r=t.pendingProps;switch(ad(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qe(t),null;case 1:return dt(t.type)&&sa(),Qe(t),null;case 3:return r=t.stateNode,Mo(),we(ut),we(qe),gd(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(gi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ht!==null&&(iu(Ht),Ht=null))),Zc(e,t),Qe(t),null;case 5:hd(t);var o=Nr(Is.current);if(n=t.type,e!==null&&t.stateNode!=null)Bg(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(I(166));return Qe(t),null}if(e=Nr(dn.current),gi(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[an]=t,r[Ts]=s,e=(t.mode&1)!==0,n){case"dialog":xe("cancel",r),xe("close",r);break;case"iframe":case"object":case"embed":xe("load",r);break;case"video":case"audio":for(o=0;o<as.length;o++)xe(as[o],r);break;case"source":xe("error",r);break;case"img":case"image":case"link":xe("error",r),xe("load",r);break;case"details":xe("toggle",r);break;case"input":Rf(r,s),xe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},xe("invalid",r);break;case"textarea":Tf(r,s),xe("invalid",r)}Cc(n,s),o=null;for(var i in s)if(s.hasOwnProperty(i)){var l=s[i];i==="children"?typeof l=="string"?r.textContent!==l&&(s.suppressHydrationWarning!==!0&&hi(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&hi(r.textContent,l,e),o=["children",""+l]):bs.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&xe("scroll",r)}switch(n){case"input":ai(r),Pf(r,s,!0);break;case"textarea":ai(r),Af(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=oa)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=gh(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[an]=t,e[Ts]=r,zg(e,t,!1,!1),t.stateNode=e;e:{switch(i=Ec(n,r),n){case"dialog":xe("cancel",e),xe("close",e),o=r;break;case"iframe":case"object":case"embed":xe("load",e),o=r;break;case"video":case"audio":for(o=0;o<as.length;o++)xe(as[o],e);o=r;break;case"source":xe("error",e),o=r;break;case"img":case"image":case"link":xe("error",e),xe("load",e),o=r;break;case"details":xe("toggle",e),o=r;break;case"input":Rf(e,r),o=wc(e,r),xe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=_e({},r,{value:void 0}),xe("invalid",e);break;case"textarea":Tf(e,r),o=Nc(e,r),xe("invalid",e);break;default:o=r}Cc(n,o),l=o;for(s in l)if(l.hasOwnProperty(s)){var c=l[s];s==="style"?xh(e,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&vh(e,c)):s==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Ss(e,c):typeof c=="number"&&Ss(e,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(bs.hasOwnProperty(s)?c!=null&&s==="onScroll"&&xe("scroll",e):c!=null&&Gu(e,s,c,i))}switch(n){case"input":ai(e),Pf(e,r,!1);break;case"textarea":ai(e),Af(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ar(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?co(e,!!r.multiple,s,!1):r.defaultValue!=null&&co(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=oa)}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 Qe(t),null;case 6:if(e&&t.stateNode!=null)Vg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(I(166));if(n=Nr(Is.current),Nr(dn.current),gi(t)){if(r=t.stateNode,n=t.memoizedProps,r[an]=t,(s=r.nodeValue!==n)&&(e=yt,e!==null))switch(e.tag){case 3:hi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&hi(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[an]=t,t.stateNode=r}return Qe(t),null;case 13:if(we(Ee),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ke&>!==null&&t.mode&1&&!(t.flags&128))ig(),Ao(),t.flags|=98560,s=!1;else if(s=gi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(I(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(I(317));s[an]=t}else Ao(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Qe(t),s=!1}else Ht!==null&&(iu(Ht),Ht=null),s=!0;if(!s)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||Ee.current&1?Le===0&&(Le=3):_d())),t.updateQueue!==null&&(t.flags|=4),Qe(t),null);case 4:return Mo(),Zc(e,t),e===null&&Rs(t.stateNode.containerInfo),Qe(t),null;case 10:return dd(t.type._context),Qe(t),null;case 17:return dt(t.type)&&sa(),Qe(t),null;case 19:if(we(Ee),s=t.memoizedState,s===null)return Qe(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)es(s,!1);else{if(Le!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=fa(e),i!==null){for(t.flags|=128,es(s,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,e=i.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ge(Ee,Ee.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ie()>Lo&&(t.flags|=128,r=!0,es(s,!1),t.lanes=4194304)}else{if(!r)if(e=fa(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),es(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!ke)return Qe(t),null}else 2*Ie()-s.renderingStartTime>Lo&&n!==1073741824&&(t.flags|=128,r=!0,es(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ie(),t.sibling=null,n=Ee.current,ge(Ee,r?n&1|2:n&1),t):(Qe(t),null);case 22:case 23:return jd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?pt&1073741824&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function s1(e,t){switch(ad(t),t.tag){case 1:return dt(t.type)&&sa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Mo(),we(ut),we(qe),gd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return hd(t),null;case 13:if(we(Ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));Ao()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return we(Ee),null;case 4:return Mo(),null;case 10:return dd(t.type._context),null;case 22:case 23:return jd(),null;case 24:return null;default:return null}}var xi=!1,Xe=!1,i1=typeof WeakSet=="function"?WeakSet:Set,V=null;function ao(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Pe(e,t,r)}else n.current=null}function Jc(e,t,n){try{n()}catch(r){Pe(e,t,r)}}var bm=!1;function a1(e,t){if(Lc=ta,e=Kh(),sd(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 o=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,l=-1,c=-1,u=0,f=0,d=e,p=null;t:for(;;){for(var m;d!==n||o!==0&&d.nodeType!==3||(l=i+o),d!==s||r!==0&&d.nodeType!==3||(c=i+r),d.nodeType===3&&(i+=d.nodeValue.length),(m=d.firstChild)!==null;)p=d,d=m;for(;;){if(d===e)break t;if(p===n&&++u===o&&(l=i),p===s&&++f===r&&(c=i),(m=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=m}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Dc={focusedElem:e,selectionRange:n},ta=!1,V=t;V!==null;)if(t=V,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,V=e;else for(;V!==null;){t=V;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var h=b.memoizedProps,x=b.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?h:Ft(t.type,h),x);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(S){Pe(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,V=e;break}V=t.return}return b=bm,bm=!1,b}function gs(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var s=o.destroy;o.destroy=void 0,s!==void 0&&Jc(t,n,s)}o=o.next}while(o!==r)}}function za(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 eu(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 Ug(e){var t=e.alternate;t!==null&&(e.alternate=null,Ug(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[an],delete t[Ts],delete t[zc],delete t[Ub],delete t[Hb])),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 Hg(e){return e.tag===5||e.tag===3||e.tag===4}function Sm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hg(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 tu(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=oa));else if(r!==4&&(e=e.child,e!==null))for(tu(e,t,n),e=e.sibling;e!==null;)tu(e,t,n),e=e.sibling}function nu(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(nu(e,t,n),e=e.sibling;e!==null;)nu(e,t,n),e=e.sibling}var Ue=null,Ut=!1;function Ln(e,t,n){for(n=n.child;n!==null;)Wg(e,t,n),n=n.sibling}function Wg(e,t,n){if(un&&typeof un.onCommitFiberUnmount=="function")try{un.onCommitFiberUnmount(Aa,n)}catch{}switch(n.tag){case 5:Xe||ao(n,t);case 6:var r=Ue,o=Ut;Ue=null,Ln(e,t,n),Ue=r,Ut=o,Ue!==null&&(Ut?(e=Ue,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ue.removeChild(n.stateNode));break;case 18:Ue!==null&&(Ut?(e=Ue,n=n.stateNode,e.nodeType===8?zl(e.parentNode,n):e.nodeType===1&&zl(e,n),Es(e)):zl(Ue,n.stateNode));break;case 4:r=Ue,o=Ut,Ue=n.stateNode.containerInfo,Ut=!0,Ln(e,t,n),Ue=r,Ut=o;break;case 0:case 11:case 14:case 15:if(!Xe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var s=o,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&Jc(n,t,i),o=o.next}while(o!==r)}Ln(e,t,n);break;case 1:if(!Xe&&(ao(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Pe(n,t,l)}Ln(e,t,n);break;case 21:Ln(e,t,n);break;case 22:n.mode&1?(Xe=(r=Xe)||n.memoizedState!==null,Ln(e,t,n),Xe=r):Ln(e,t,n);break;default:Ln(e,t,n)}}function Nm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new i1),t.forEach(function(r){var o=g1.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Lt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var s=e,i=t,l=i;e:for(;l!==null;){switch(l.tag){case 5:Ue=l.stateNode,Ut=!1;break e;case 3:Ue=l.stateNode.containerInfo,Ut=!0;break e;case 4:Ue=l.stateNode.containerInfo,Ut=!0;break e}l=l.return}if(Ue===null)throw Error(I(160));Wg(s,i,o),Ue=null,Ut=!1;var c=o.alternate;c!==null&&(c.return=null),o.return=null}catch(u){Pe(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Gg(t,e),t=t.sibling}function Gg(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Lt(t,e),en(e),r&4){try{gs(3,e,e.return),za(3,e)}catch(h){Pe(e,e.return,h)}try{gs(5,e,e.return)}catch(h){Pe(e,e.return,h)}}break;case 1:Lt(t,e),en(e),r&512&&n!==null&&ao(n,n.return);break;case 5:if(Lt(t,e),en(e),r&512&&n!==null&&ao(n,n.return),e.flags&32){var o=e.stateNode;try{Ss(o,"")}catch(h){Pe(e,e.return,h)}}if(r&4&&(o=e.stateNode,o!=null)){var s=e.memoizedProps,i=n!==null?n.memoizedProps:s,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&ph(o,s),Ec(l,i);var u=Ec(l,s);for(i=0;i<c.length;i+=2){var f=c[i],d=c[i+1];f==="style"?xh(o,d):f==="dangerouslySetInnerHTML"?vh(o,d):f==="children"?Ss(o,d):Gu(o,f,d,u)}switch(l){case"input":bc(o,s);break;case"textarea":hh(o,s);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var m=s.value;m!=null?co(o,!!s.multiple,m,!1):p!==!!s.multiple&&(s.defaultValue!=null?co(o,!!s.multiple,s.defaultValue,!0):co(o,!!s.multiple,s.multiple?[]:"",!1))}o[Ts]=s}catch(h){Pe(e,e.return,h)}}break;case 6:if(Lt(t,e),en(e),r&4){if(e.stateNode===null)throw Error(I(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(h){Pe(e,e.return,h)}}break;case 3:if(Lt(t,e),en(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Es(t.containerInfo)}catch(h){Pe(e,e.return,h)}break;case 4:Lt(t,e),en(e);break;case 13:Lt(t,e),en(e),o=e.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(Cd=Ie())),r&4&&Nm(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(Xe=(u=Xe)||f,Lt(t,e),Xe=u):Lt(t,e),en(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(V=e,f=e.child;f!==null;){for(d=V=f;V!==null;){switch(p=V,m=p.child,p.tag){case 0:case 11:case 14:case 15:gs(4,p,p.return);break;case 1:ao(p,p.return);var b=p.stateNode;if(typeof b.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,b.props=t.memoizedProps,b.state=t.memoizedState,b.componentWillUnmount()}catch(h){Pe(r,n,h)}}break;case 5:ao(p,p.return);break;case 22:if(p.memoizedState!==null){Cm(d);continue}}m!==null?(m.return=p,V=m):Cm(d)}f=f.sibling}e:for(f=null,d=e;;){if(d.tag===5){if(f===null){f=d;try{o=d.stateNode,u?(s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=d.stateNode,c=d.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=yh("display",i))}catch(h){Pe(e,e.return,h)}}}else if(d.tag===6){if(f===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(h){Pe(e,e.return,h)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Lt(t,e),en(e),r&4&&Nm(e);break;case 21:break;default:Lt(t,e),en(e)}}function en(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Hg(n)){var r=n;break e}n=n.return}throw Error(I(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Ss(o,""),r.flags&=-33);var s=Sm(e);nu(e,s,o);break;case 3:case 4:var i=r.stateNode.containerInfo,l=Sm(e);tu(e,l,i);break;default:throw Error(I(161))}}catch(c){Pe(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function l1(e,t,n){V=e,Kg(e)}function Kg(e,t,n){for(var r=(e.mode&1)!==0;V!==null;){var o=V,s=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||xi;if(!i){var l=o.alternate,c=l!==null&&l.memoizedState!==null||Xe;l=xi;var u=Xe;if(xi=i,(Xe=c)&&!u)for(V=o;V!==null;)i=V,c=i.child,i.tag===22&&i.memoizedState!==null?Em(o):c!==null?(c.return=i,V=c):Em(o);for(;s!==null;)V=s,Kg(s),s=s.sibling;V=o,xi=l,Xe=u}km(e)}else o.subtreeFlags&8772&&s!==null?(s.return=o,V=s):km(e)}}function km(e){for(;V!==null;){var t=V;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Xe||za(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Xe)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Ft(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&lm(t,s,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}lm(t,i,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 f=u.memoizedState;if(f!==null){var d=f.dehydrated;d!==null&&Es(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(I(163))}Xe||t.flags&512&&eu(t)}catch(p){Pe(t,t.return,p)}}if(t===e){V=null;break}if(n=t.sibling,n!==null){n.return=t.return,V=n;break}V=t.return}}function Cm(e){for(;V!==null;){var t=V;if(t===e){V=null;break}var n=t.sibling;if(n!==null){n.return=t.return,V=n;break}V=t.return}}function Em(e){for(;V!==null;){var t=V;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{za(4,t)}catch(c){Pe(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(c){Pe(t,o,c)}}var s=t.return;try{eu(t)}catch(c){Pe(t,s,c)}break;case 5:var i=t.return;try{eu(t)}catch(c){Pe(t,i,c)}}}catch(c){Pe(t,t.return,c)}if(t===e){V=null;break}var l=t.sibling;if(l!==null){l.return=t.return,V=l;break}V=t.return}}var c1=Math.ceil,ha=An.ReactCurrentDispatcher,Nd=An.ReactCurrentOwner,Rt=An.ReactCurrentBatchConfig,se=0,Be=null,Me=null,He=0,pt=0,lo=mr(0),Le=0,Ds=null,Or=0,Ba=0,kd=0,vs=null,lt=null,Cd=0,Lo=1/0,wn=null,ga=!1,ru=null,or=null,wi=!1,qn=null,va=0,ys=0,ou=null,zi=-1,Bi=0;function ot(){return se&6?Ie():zi!==-1?zi:zi=Ie()}function sr(e){return e.mode&1?se&2&&He!==0?He&-He:Gb.transition!==null?(Bi===0&&(Bi=Th()),Bi):(e=de,e!==0||(e=window.event,e=e===void 0?16:$h(e.type)),e):1}function Kt(e,t,n,r){if(50<ys)throw ys=0,ou=null,Error(I(185));Gs(e,n,r),(!(se&2)||e!==Be)&&(e===Be&&(!(se&2)&&(Ba|=n),Le===4&&Hn(e,He)),ft(e,r),n===1&&se===0&&!(t.mode&1)&&(Lo=Ie()+500,Da&&pr()))}function ft(e,t){var n=e.callbackNode;Gw(e,t);var r=ea(e,e===Be?He:0);if(r===0)n!==null&&Of(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Of(n),t===1)e.tag===0?Wb(jm.bind(null,e)):rg(jm.bind(null,e)),Bb(function(){!(se&6)&&pr()}),n=null;else{switch(Ah(r)){case 1:n=qu;break;case 4:n=Rh;break;case 16:n=Ji;break;case 536870912:n=Ph;break;default:n=Ji}n=tv(n,Qg.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Qg(e,t){if(zi=-1,Bi=0,se&6)throw Error(I(327));var n=e.callbackNode;if(ho()&&e.callbackNode!==n)return null;var r=ea(e,e===Be?He:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ya(e,r);else{t=r;var o=se;se|=2;var s=Xg();(Be!==e||He!==t)&&(wn=null,Lo=Ie()+500,Pr(e,t));do try{f1();break}catch(l){Yg(e,l)}while(!0);ud(),ha.current=s,se=o,Me!==null?t=0:(Be=null,He=0,t=Le)}if(t!==0){if(t===2&&(o=Tc(e),o!==0&&(r=o,t=su(e,o))),t===1)throw n=Ds,Pr(e,0),Hn(e,r),ft(e,Ie()),n;if(t===6)Hn(e,r);else{if(o=e.current.alternate,!(r&30)&&!u1(o)&&(t=ya(e,r),t===2&&(s=Tc(e),s!==0&&(r=s,t=su(e,s))),t===1))throw n=Ds,Pr(e,0),Hn(e,r),ft(e,Ie()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(I(345));case 2:wr(e,lt,wn);break;case 3:if(Hn(e,r),(r&130023424)===r&&(t=Cd+500-Ie(),10<t)){if(ea(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){ot(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Fc(wr.bind(null,e,lt,wn),t);break}wr(e,lt,wn);break;case 4:if(Hn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-Gt(r);s=1<<i,i=t[i],i>o&&(o=i),r&=~s}if(r=o,r=Ie()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*c1(r/1960))-r,10<r){e.timeoutHandle=Fc(wr.bind(null,e,lt,wn),r);break}wr(e,lt,wn);break;case 5:wr(e,lt,wn);break;default:throw Error(I(329))}}}return ft(e,Ie()),e.callbackNode===n?Qg.bind(null,e):null}function su(e,t){var n=vs;return e.current.memoizedState.isDehydrated&&(Pr(e,t).flags|=256),e=ya(e,t),e!==2&&(t=lt,lt=n,t!==null&&iu(t)),e}function iu(e){lt===null?lt=e:lt.push.apply(lt,e)}function u1(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 o=n[r],s=o.getSnapshot;o=o.value;try{if(!Qt(s(),o))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 Hn(e,t){for(t&=~kd,t&=~Ba,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Gt(t),r=1<<n;e[n]=-1,t&=~r}}function jm(e){if(se&6)throw Error(I(327));ho();var t=ea(e,0);if(!(t&1))return ft(e,Ie()),null;var n=ya(e,t);if(e.tag!==0&&n===2){var r=Tc(e);r!==0&&(t=r,n=su(e,r))}if(n===1)throw n=Ds,Pr(e,0),Hn(e,t),ft(e,Ie()),n;if(n===6)throw Error(I(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wr(e,lt,wn),ft(e,Ie()),null}function Ed(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&(Lo=Ie()+500,Da&&pr())}}function Lr(e){qn!==null&&qn.tag===0&&!(se&6)&&ho();var t=se;se|=1;var n=Rt.transition,r=de;try{if(Rt.transition=null,de=1,e)return e()}finally{de=r,Rt.transition=n,se=t,!(se&6)&&pr()}}function jd(){pt=lo.current,we(lo)}function Pr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,zb(n)),Me!==null)for(n=Me.return;n!==null;){var r=n;switch(ad(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&sa();break;case 3:Mo(),we(ut),we(qe),gd();break;case 5:hd(r);break;case 4:Mo();break;case 13:we(Ee);break;case 19:we(Ee);break;case 10:dd(r.type._context);break;case 22:case 23:jd()}n=n.return}if(Be=e,Me=e=ir(e.current,null),He=pt=t,Le=0,Ds=null,kd=Ba=Or=0,lt=vs=null,Sr!==null){for(t=0;t<Sr.length;t++)if(n=Sr[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,s=n.pending;if(s!==null){var i=s.next;s.next=o,r.next=i}n.pending=r}Sr=null}return e}function Yg(e,t){do{var n=Me;try{if(ud(),Di.current=pa,ma){for(var r=je.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}ma=!1}if(Mr=0,ze=Oe=je=null,hs=!1,Ms=0,Nd.current=null,n===null||n.return===null){Le=1,Ds=t,Me=null;break}e:{var s=e,i=n.return,l=n,c=t;if(t=He,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,f=l,d=f.tag;if(!(f.mode&1)&&(d===0||d===11||d===15)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var m=pm(i);if(m!==null){m.flags&=-257,hm(m,i,l,s,t),m.mode&1&&mm(s,u,t),t=m,c=u;var b=t.updateQueue;if(b===null){var h=new Set;h.add(c),t.updateQueue=h}else b.add(c);break e}else{if(!(t&1)){mm(s,u,t),_d();break e}c=Error(I(426))}}else if(ke&&l.mode&1){var x=pm(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),hm(x,i,l,s,t),ld(Oo(c,l));break e}}s=c=Oo(c,l),Le!==4&&(Le=2),vs===null?vs=[s]:vs.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var y=Ag(s,c,t);am(s,y);break e;case 1:l=c;var v=s.type,w=s.stateNode;if(!(s.flags&128)&&(typeof v.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(or===null||!or.has(w)))){s.flags|=65536,t&=-t,s.lanes|=t;var S=Ig(s,l,t);am(s,S);break e}}s=s.return}while(s!==null)}Zg(n)}catch(N){t=N,Me===n&&n!==null&&(Me=n=n.return);continue}break}while(!0)}function Xg(){var e=ha.current;return ha.current=pa,e===null?pa:e}function _d(){(Le===0||Le===3||Le===2)&&(Le=4),Be===null||!(Or&268435455)&&!(Ba&268435455)||Hn(Be,He)}function ya(e,t){var n=se;se|=2;var r=Xg();(Be!==e||He!==t)&&(wn=null,Pr(e,t));do try{d1();break}catch(o){Yg(e,o)}while(!0);if(ud(),se=n,ha.current=r,Me!==null)throw Error(I(261));return Be=null,He=0,Le}function d1(){for(;Me!==null;)qg(Me)}function f1(){for(;Me!==null&&!Dw();)qg(Me)}function qg(e){var t=ev(e.alternate,e,pt);e.memoizedProps=e.pendingProps,t===null?Zg(e):Me=t,Nd.current=null}function Zg(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=s1(n,t),n!==null){n.flags&=32767,Me=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Le=6,Me=null;return}}else if(n=o1(n,t,pt),n!==null){Me=n;return}if(t=t.sibling,t!==null){Me=t;return}Me=t=e}while(t!==null);Le===0&&(Le=5)}function wr(e,t,n){var r=de,o=Rt.transition;try{Rt.transition=null,de=1,m1(e,t,n,r)}finally{Rt.transition=o,de=r}return null}function m1(e,t,n,r){do ho();while(qn!==null);if(se&6)throw Error(I(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(I(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(Kw(e,s),e===Be&&(Me=Be=null,He=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||wi||(wi=!0,tv(Ji,function(){return ho(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Rt.transition,Rt.transition=null;var i=de;de=1;var l=se;se|=4,Nd.current=null,a1(e,n),Gg(n,e),Ib(Dc),ta=!!Lc,Dc=Lc=null,e.current=n,l1(n),$w(),se=l,de=i,Rt.transition=s}else e.current=n;if(wi&&(wi=!1,qn=e,va=o),s=e.pendingLanes,s===0&&(or=null),Bw(n.stateNode),ft(e,Ie()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(ga)throw ga=!1,e=ru,ru=null,e;return va&1&&e.tag!==0&&ho(),s=e.pendingLanes,s&1?e===ou?ys++:(ys=0,ou=e):ys=0,pr(),null}function ho(){if(qn!==null){var e=Ah(va),t=Rt.transition,n=de;try{if(Rt.transition=null,de=16>e?16:e,qn===null)var r=!1;else{if(e=qn,qn=null,va=0,se&6)throw Error(I(331));var o=se;for(se|=4,V=e.current;V!==null;){var s=V,i=s.child;if(V.flags&16){var l=s.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(V=u;V!==null;){var f=V;switch(f.tag){case 0:case 11:case 15:gs(8,f,s)}var d=f.child;if(d!==null)d.return=f,V=d;else for(;V!==null;){f=V;var p=f.sibling,m=f.return;if(Ug(f),f===u){V=null;break}if(p!==null){p.return=m,V=p;break}V=m}}}var b=s.alternate;if(b!==null){var h=b.child;if(h!==null){b.child=null;do{var x=h.sibling;h.sibling=null,h=x}while(h!==null)}}V=s}}if(s.subtreeFlags&2064&&i!==null)i.return=s,V=i;else e:for(;V!==null;){if(s=V,s.flags&2048)switch(s.tag){case 0:case 11:case 15:gs(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,V=y;break e}V=s.return}}var v=e.current;for(V=v;V!==null;){i=V;var w=i.child;if(i.subtreeFlags&2064&&w!==null)w.return=i,V=w;else e:for(i=v;V!==null;){if(l=V,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:za(9,l)}}catch(N){Pe(l,l.return,N)}if(l===i){V=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,V=S;break e}V=l.return}}if(se=o,pr(),un&&typeof un.onPostCommitFiberRoot=="function")try{un.onPostCommitFiberRoot(Aa,e)}catch{}r=!0}return r}finally{de=n,Rt.transition=t}}return!1}function _m(e,t,n){t=Oo(n,t),t=Ag(e,t,1),e=rr(e,t,1),t=ot(),e!==null&&(Gs(e,1,t),ft(e,t))}function Pe(e,t,n){if(e.tag===3)_m(e,e,n);else for(;t!==null;){if(t.tag===3){_m(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(or===null||!or.has(r))){e=Oo(n,e),e=Ig(t,e,1),t=rr(t,e,1),e=ot(),t!==null&&(Gs(t,1,e),ft(t,e));break}}t=t.return}}function p1(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ot(),e.pingedLanes|=e.suspendedLanes&n,Be===e&&(He&n)===n&&(Le===4||Le===3&&(He&130023424)===He&&500>Ie()-Cd?Pr(e,0):kd|=n),ft(e,t)}function Jg(e,t){t===0&&(e.mode&1?(t=ui,ui<<=1,!(ui&130023424)&&(ui=4194304)):t=1);var n=ot();e=_n(e,t),e!==null&&(Gs(e,t,n),ft(e,n))}function h1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Jg(e,n)}function g1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(I(314))}r!==null&&r.delete(t),Jg(e,n)}var ev;ev=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ut.current)ct=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ct=!1,r1(e,t,n);ct=!!(e.flags&131072)}else ct=!1,ke&&t.flags&1048576&&og(t,la,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Fi(e,t),e=t.pendingProps;var o=To(t,qe.current);po(t,n),o=yd(null,t,r,e,o,n);var s=xd();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,dt(r)?(s=!0,ia(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,md(t),o.updater=Fa,t.stateNode=o,o._reactInternals=t,Gc(t,r,e,n),t=Yc(null,t,r,!0,s,n)):(t.tag=0,ke&&s&&id(t),nt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Fi(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=y1(r),e=Ft(r,e),o){case 0:t=Qc(null,t,r,e,n);break e;case 1:t=ym(null,t,r,e,n);break e;case 11:t=gm(null,t,r,e,n);break e;case 14:t=vm(null,t,r,Ft(r.type,e),n);break e}throw Error(I(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ft(r,o),Qc(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ft(r,o),ym(e,t,r,o,n);case 3:e:{if(Dg(t),e===null)throw Error(I(387));r=t.pendingProps,s=t.memoizedState,o=s.element,ug(e,t),da(t,r,null,n);var i=t.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){o=Oo(Error(I(423)),t),t=xm(e,t,r,n,o);break e}else if(r!==o){o=Oo(Error(I(424)),t),t=xm(e,t,r,n,o);break e}else for(gt=nr(t.stateNode.containerInfo.firstChild),yt=t,ke=!0,Ht=null,n=lg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ao(),r===o){t=Rn(e,t,n);break e}nt(e,t,r,n)}t=t.child}return t;case 5:return dg(t),e===null&&Uc(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,$c(r,o)?i=null:s!==null&&$c(r,s)&&(t.flags|=32),Lg(e,t),nt(e,t,i,n),t.child;case 6:return e===null&&Uc(t),null;case 13:return $g(e,t,n);case 4:return pd(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Io(t,null,r,n):nt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ft(r,o),gm(e,t,r,o,n);case 7:return nt(e,t,t.pendingProps,n),t.child;case 8:return nt(e,t,t.pendingProps.children,n),t.child;case 12:return nt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value,ge(ca,r._currentValue),r._currentValue=i,s!==null)if(Qt(s.value,i)){if(s.children===o.children&&!ut.current){t=Rn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){i=s.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(s.tag===1){c=Cn(-1,n&-n),c.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?c.next=c:(c.next=f.next,f.next=c),u.pending=c}}s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),Hc(s.return,n,t),l.lanes|=n;break}c=c.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(I(341));i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Hc(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}nt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,po(t,n),o=Pt(o),r=r(o),t.flags|=1,nt(e,t,r,n),t.child;case 14:return r=t.type,o=Ft(r,t.pendingProps),o=Ft(r.type,o),vm(e,t,r,o,n);case 15:return Mg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ft(r,o),Fi(e,t),t.tag=1,dt(r)?(e=!0,ia(t)):e=!1,po(t,n),Tg(t,r,o),Gc(t,r,o,n),Yc(null,t,r,!0,e,n);case 19:return Fg(e,t,n);case 22:return Og(e,t,n)}throw Error(I(156,t.tag))};function tv(e,t){return _h(e,t)}function v1(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 _t(e,t,n,r){return new v1(e,t,n,r)}function Rd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function y1(e){if(typeof e=="function")return Rd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Qu)return 11;if(e===Yu)return 14}return 2}function ir(e,t){var n=e.alternate;return n===null?(n=_t(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 Vi(e,t,n,r,o,s){var i=2;if(r=e,typeof e=="function")Rd(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Zr:return Tr(n.children,o,s,t);case Ku:i=8,o|=8;break;case gc:return e=_t(12,n,t,o|2),e.elementType=gc,e.lanes=s,e;case vc:return e=_t(13,n,t,o),e.elementType=vc,e.lanes=s,e;case yc:return e=_t(19,n,t,o),e.elementType=yc,e.lanes=s,e;case dh:return Va(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ch:i=10;break e;case uh:i=9;break e;case Qu:i=11;break e;case Yu:i=14;break e;case Bn:i=16,r=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=_t(i,n,t,o),t.elementType=e,t.type=r,t.lanes=s,t}function Tr(e,t,n,r){return e=_t(7,e,r,t),e.lanes=n,e}function Va(e,t,n,r){return e=_t(22,e,r,t),e.elementType=dh,e.lanes=n,e.stateNode={isHidden:!1},e}function Ql(e,t,n){return e=_t(6,e,null,t),e.lanes=n,e}function Yl(e,t,n){return t=_t(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function x1(e,t,n,r,o){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=Rl(0),this.expirationTimes=Rl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rl(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Pd(e,t,n,r,o,s,i,l,c){return e=new x1(e,t,n,l,c),t===1?(t=1,s===!0&&(t|=8)):t=0,s=_t(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},md(s),e}function w1(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:qr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function nv(e){if(!e)return lr;e=e._reactInternals;e:{if(Vr(e)!==e||e.tag!==1)throw Error(I(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(dt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(I(171))}if(e.tag===1){var n=e.type;if(dt(n))return ng(e,n,t)}return t}function rv(e,t,n,r,o,s,i,l,c){return e=Pd(n,r,!0,e,o,s,i,l,c),e.context=nv(null),n=e.current,r=ot(),o=sr(n),s=Cn(r,o),s.callback=t??null,rr(n,s,o),e.current.lanes=o,Gs(e,o,r),ft(e,r),e}function Ua(e,t,n,r){var o=t.current,s=ot(),i=sr(o);return n=nv(n),t.context===null?t.context=n:t.pendingContext=n,t=Cn(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=rr(o,t,i),e!==null&&(Kt(e,o,i,s),Li(e,o,i)),i}function xa(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 Rm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Td(e,t){Rm(e,t),(e=e.alternate)&&Rm(e,t)}function b1(){return null}var ov=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ad(e){this._internalRoot=e}Ha.prototype.render=Ad.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(I(409));Ua(e,t,null,null)};Ha.prototype.unmount=Ad.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Lr(function(){Ua(null,e,null,null)}),t[jn]=null}};function Ha(e){this._internalRoot=e}Ha.prototype.unstable_scheduleHydration=function(e){if(e){var t=Oh();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Un.length&&t!==0&&t<Un[n].priority;n++);Un.splice(n,0,e),n===0&&Dh(e)}};function Id(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Wa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Pm(){}function S1(e,t,n,r,o){if(o){if(typeof r=="function"){var s=r;r=function(){var u=xa(i);s.call(u)}}var i=rv(t,r,e,0,null,!1,!1,"",Pm);return e._reactRootContainer=i,e[jn]=i.current,Rs(e.nodeType===8?e.parentNode:e),Lr(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var u=xa(c);l.call(u)}}var c=Pd(e,0,!1,null,null,!1,!1,"",Pm);return e._reactRootContainer=c,e[jn]=c.current,Rs(e.nodeType===8?e.parentNode:e),Lr(function(){Ua(t,c,n,r)}),c}function Ga(e,t,n,r,o){var s=n._reactRootContainer;if(s){var i=s;if(typeof o=="function"){var l=o;o=function(){var c=xa(i);l.call(c)}}Ua(t,i,e,o)}else i=S1(n,t,e,o,r);return xa(i)}Ih=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=is(t.pendingLanes);n!==0&&(Zu(t,n|1),ft(t,Ie()),!(se&6)&&(Lo=Ie()+500,pr()))}break;case 13:Lr(function(){var r=_n(e,1);if(r!==null){var o=ot();Kt(r,e,1,o)}}),Td(e,1)}};Ju=function(e){if(e.tag===13){var t=_n(e,134217728);if(t!==null){var n=ot();Kt(t,e,134217728,n)}Td(e,134217728)}};Mh=function(e){if(e.tag===13){var t=sr(e),n=_n(e,t);if(n!==null){var r=ot();Kt(n,e,t,r)}Td(e,t)}};Oh=function(){return de};Lh=function(e,t){var n=de;try{return de=e,t()}finally{de=n}};_c=function(e,t,n){switch(t){case"input":if(bc(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 o=La(r);if(!o)throw Error(I(90));mh(r),bc(r,o)}}}break;case"textarea":hh(e,n);break;case"select":t=n.value,t!=null&&co(e,!!n.multiple,t,!1)}};Sh=Ed;Nh=Lr;var N1={usingClientEntryPoint:!1,Events:[Qs,no,La,wh,bh,Ed]},ts={findFiberByHostInstance:br,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},k1={bundleType:ts.bundleType,version:ts.version,rendererPackageName:ts.rendererPackageName,rendererConfig:ts.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:An.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Eh(e),e===null?null:e.stateNode},findFiberByHostInstance:ts.findFiberByHostInstance||b1,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 bi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bi.isDisabled&&bi.supportsFiber)try{Aa=bi.inject(k1),un=bi}catch{}}bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N1;bt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Id(t))throw Error(I(200));return w1(e,t,null,n)};bt.createRoot=function(e,t){if(!Id(e))throw Error(I(299));var n=!1,r="",o=ov;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Pd(e,1,!1,null,null,n,!1,r,o),e[jn]=t.current,Rs(e.nodeType===8?e.parentNode:e),new Ad(t)};bt.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(I(188)):(e=Object.keys(e).join(","),Error(I(268,e)));return e=Eh(t),e=e===null?null:e.stateNode,e};bt.flushSync=function(e){return Lr(e)};bt.hydrate=function(e,t,n){if(!Wa(t))throw Error(I(200));return Ga(null,e,t,!0,n)};bt.hydrateRoot=function(e,t,n){if(!Id(e))throw Error(I(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=ov;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=rv(t,null,e,1,n??null,o,!1,s,i),e[jn]=t.current,Rs(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Ha(t)};bt.render=function(e,t,n){if(!Wa(t))throw Error(I(200));return Ga(null,e,t,!1,n)};bt.unmountComponentAtNode=function(e){if(!Wa(e))throw Error(I(40));return e._reactRootContainer?(Lr(function(){Ga(null,null,e,!1,function(){e._reactRootContainer=null,e[jn]=null})}),!0):!1};bt.unstable_batchedUpdates=Ed;bt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Wa(n))throw Error(I(200));if(e==null||e._reactInternals===void 0)throw Error(I(38));return Ga(e,t,n,!1,r)};bt.version="18.3.1-next-f1338f8080-20240426";function sv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(sv)}catch(e){console.error(e)}}sv(),sh.exports=bt;var Ur=sh.exports;const iv=Kp(Ur);var av,Tm=Ur;av=Tm.createRoot,Tm.hydrateRoot;var Ka=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Qa=typeof window>"u"||"Deno"in globalThis;function zt(){}function C1(e,t){return typeof e=="function"?e(t):e}function E1(e){return typeof e=="number"&&e>=0&&e!==1/0}function j1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function au(e,t){return typeof e=="function"?e(t):e}function _1(e,t){return typeof e=="function"?e(t):e}function Am(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:l}=e;if(i){if(r){if(t.queryHash!==Md(i,t.options))return!1}else if(!Fs(t.queryKey,i))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||o&&o!==t.state.fetchStatus||s&&!s(t))}function Im(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if($s(t.options.mutationKey)!==$s(s))return!1}else if(!Fs(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Md(e,t){return((t==null?void 0:t.queryKeyHashFn)||$s)(e)}function $s(e){return JSON.stringify(e,(t,n)=>lu(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Fs(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Fs(e[n],t[n])):!1}function lv(e,t){if(e===t)return e;const n=Mm(e)&&Mm(t);if(n||lu(e)&&lu(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),i=s.length,l=n?[]:{},c=new Set(r);let u=0;for(let f=0;f<i;f++){const d=n?f:s[f];(!n&&c.has(d)||n)&&e[d]===void 0&&t[d]===void 0?(l[d]=void 0,u++):(l[d]=lv(e[d],t[d]),l[d]===e[d]&&e[d]!==void 0&&u++)}return o===i&&u===o?e:l}return t}function Mm(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function lu(e){if(!Om(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Om(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Om(e){return Object.prototype.toString.call(e)==="[object Object]"}function R1(e){return new Promise(t=>{setTimeout(t,e)})}function P1(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?lv(e,t):t}function T1(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function A1(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Od=Symbol();function cv(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Od?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var kr,Wn,So,Fp,I1=(Fp=class extends Ka{constructor(){super();ie(this,kr);ie(this,Wn);ie(this,So);J(this,So,t=>{if(!Qa&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){R(this,Wn)||this.setEventListener(R(this,So))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,Wn))==null||t.call(this),J(this,Wn,void 0))}setEventListener(t){var n;J(this,So,t),(n=R(this,Wn))==null||n.call(this),J(this,Wn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){R(this,kr)!==t&&(J(this,kr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof R(this,kr)=="boolean"?R(this,kr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},kr=new WeakMap,Wn=new WeakMap,So=new WeakMap,Fp),uv=new I1,No,Gn,ko,zp,M1=(zp=class extends Ka{constructor(){super();ie(this,No,!0);ie(this,Gn);ie(this,ko);J(this,ko,t=>{if(!Qa&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){R(this,Gn)||this.setEventListener(R(this,ko))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,Gn))==null||t.call(this),J(this,Gn,void 0))}setEventListener(t){var n;J(this,ko,t),(n=R(this,Gn))==null||n.call(this),J(this,Gn,t(this.setOnline.bind(this)))}setOnline(t){R(this,No)!==t&&(J(this,No,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return R(this,No)}},No=new WeakMap,Gn=new WeakMap,ko=new WeakMap,zp),wa=new M1;function O1(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function L1(e){return Math.min(1e3*2**e,3e4)}function dv(e){return(e??"online")==="online"?wa.isOnline():!0}var fv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Xl(e){return e instanceof fv}function mv(e){let t=!1,n=0,r=!1,o;const s=O1(),i=h=>{var x;r||(p(new fv(h)),(x=e.abort)==null||x.call(e))},l=()=>{t=!0},c=()=>{t=!1},u=()=>uv.isFocused()&&(e.networkMode==="always"||wa.isOnline())&&e.canRun(),f=()=>dv(e.networkMode)&&e.canRun(),d=h=>{var x;r||(r=!0,(x=e.onSuccess)==null||x.call(e,h),o==null||o(),s.resolve(h))},p=h=>{var x;r||(r=!0,(x=e.onError)==null||x.call(e,h),o==null||o(),s.reject(h))},m=()=>new Promise(h=>{var x;o=y=>{(r||u())&&h(y)},(x=e.onPause)==null||x.call(e)}).then(()=>{var h;o=void 0,r||(h=e.onContinue)==null||h.call(e)}),b=()=>{if(r)return;let h;const x=n===0?e.initialPromise:void 0;try{h=x??e.fn()}catch(y){h=Promise.reject(y)}Promise.resolve(h).then(d).catch(y=>{var C;if(r)return;const v=e.retry??(Qa?0:3),w=e.retryDelay??L1,S=typeof w=="function"?w(n,y):w,N=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,y);if(t||!N){p(y);return}n++,(C=e.onFail)==null||C.call(e,n,y),R1(S).then(()=>u()?void 0:m()).then(()=>{t?p(y):b()})})};return{promise:s,cancel:i,continue:()=>(o==null||o(),s),cancelRetry:l,continueRetry:c,canStart:f,start:()=>(f()?b():m().then(b),s)}}var D1=e=>setTimeout(e,0);function $1(){let e=[],t=0,n=l=>{l()},r=l=>{l()},o=D1;const s=l=>{t?e.push(l):o(()=>{n(l)})},i=()=>{const l=e;e=[],l.length&&o(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||i()}return c},batchCalls:l=>(...c)=>{s(()=>{l(...c)})},schedule:s,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{o=l}}}var rt=$1(),Cr,Bp,pv=(Bp=class{constructor(){ie(this,Cr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),E1(this.gcTime)&&J(this,Cr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qa?1/0:5*60*1e3))}clearGcTimeout(){R(this,Cr)&&(clearTimeout(R(this,Cr)),J(this,Cr,void 0))}},Cr=new WeakMap,Bp),Co,Er,Ct,jr,Ye,Us,_r,Bt,xn,Vp,F1=(Vp=class extends pv{constructor(t){super();ie(this,Bt);ie(this,Co);ie(this,Er);ie(this,Ct);ie(this,jr);ie(this,Ye);ie(this,Us);ie(this,_r);J(this,_r,!1),J(this,Us,t.defaultOptions),this.setOptions(t.options),this.observers=[],J(this,jr,t.client),J(this,Ct,R(this,jr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,J(this,Co,B1(this.options)),this.state=t.state??R(this,Co),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=R(this,Ye))==null?void 0:t.promise}setOptions(t){this.options={...R(this,Us),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,Ct).remove(this)}setData(t,n){const r=P1(this.state.data,t,this.options);return Ge(this,Bt,xn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Ge(this,Bt,xn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=R(this,Ye))==null?void 0:r.promise;return(o=R(this,Ye))==null||o.cancel(t),n?n.then(zt).catch(zt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,Co))}isActive(){return this.observers.some(t=>_1(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Od||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>au(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!j1(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,Ye))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,Ye))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,Ct).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(R(this,Ye)&&(R(this,_r)?R(this,Ye).cancel({revert:!0}):R(this,Ye).cancelRetry()),this.scheduleGc()),R(this,Ct).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ge(this,Bt,xn).call(this,{type:"invalidate"})}fetch(t,n){var u,f,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(R(this,Ye))return R(this,Ye).continueRetry(),R(this,Ye).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(m=>m.options.queryFn);p&&this.setOptions(p.options)}const r=new AbortController,o=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(J(this,_r,!0),r.signal)})},s=()=>{const p=cv(this.options,n),b=(()=>{const h={client:R(this,jr),queryKey:this.queryKey,meta:this.meta};return o(h),h})();return J(this,_r,!1),this.options.persister?this.options.persister(p,b,this):p(b)},l=(()=>{const p={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:R(this,jr),state:this.state,fetchFn:s};return o(p),p})();(u=this.options.behavior)==null||u.onFetch(l,this),J(this,Er,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=l.fetchOptions)==null?void 0:f.meta))&&Ge(this,Bt,xn).call(this,{type:"fetch",meta:(d=l.fetchOptions)==null?void 0:d.meta});const c=p=>{var m,b,h,x;Xl(p)&&p.silent||Ge(this,Bt,xn).call(this,{type:"error",error:p}),Xl(p)||((b=(m=R(this,Ct).config).onError)==null||b.call(m,p,this),(x=(h=R(this,Ct).config).onSettled)==null||x.call(h,this.state.data,p,this)),this.scheduleGc()};return J(this,Ye,mv({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,abort:r.abort.bind(r),onSuccess:p=>{var m,b,h,x;if(p===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(y){c(y);return}(b=(m=R(this,Ct).config).onSuccess)==null||b.call(m,p,this),(x=(h=R(this,Ct).config).onSettled)==null||x.call(h,p,this.state.error,this),this.scheduleGc()},onError:c,onFail:(p,m)=>{Ge(this,Bt,xn).call(this,{type:"failed",failureCount:p,error:m})},onPause:()=>{Ge(this,Bt,xn).call(this,{type:"pause"})},onContinue:()=>{Ge(this,Bt,xn).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),R(this,Ye).start()}},Co=new WeakMap,Er=new WeakMap,Ct=new WeakMap,jr=new WeakMap,Ye=new WeakMap,Us=new WeakMap,_r=new WeakMap,Bt=new WeakSet,xn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...z1(r.data,this.options),fetchMeta:t.meta??null};case"success":return J(this,Er,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return Xl(o)&&o.revert&&R(this,Er)?{...R(this,Er),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),rt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),R(this,Ct).notify({query:this,type:"updated",action:t})})},Vp);function z1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:dv(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function B1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var nn,Up,V1=(Up=class extends Ka{constructor(t={}){super();ie(this,nn);this.config=t,J(this,nn,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Md(o,n);let i=this.get(s);return i||(i=new F1({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){R(this,nn).has(t.queryHash)||(R(this,nn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=R(this,nn).get(t.queryHash);n&&(t.destroy(),n===t&&R(this,nn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){rt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,nn).get(t)}getAll(){return[...R(this,nn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Am(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Am(t,r)):n}notify(t){rt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){rt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){rt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},nn=new WeakMap,Up),rn,tt,Rr,on,Fn,Hp,U1=(Hp=class extends pv{constructor(t){super();ie(this,on);ie(this,rn);ie(this,tt);ie(this,Rr);this.mutationId=t.mutationId,J(this,tt,t.mutationCache),J(this,rn,[]),this.state=t.state||H1(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,rn).includes(t)||(R(this,rn).push(t),this.clearGcTimeout(),R(this,tt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){J(this,rn,R(this,rn).filter(n=>n!==t)),this.scheduleGc(),R(this,tt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,rn).length||(this.state.status==="pending"?this.scheduleGc():R(this,tt).remove(this))}continue(){var t;return((t=R(this,Rr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,l,c,u,f,d,p,m,b,h,x,y,v,w,S,N,C,k,j;const n=()=>{Ge(this,on,Fn).call(this,{type:"continue"})};J(this,Rr,mv({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,P)=>{Ge(this,on,Fn).call(this,{type:"failed",failureCount:A,error:P})},onPause:()=>{Ge(this,on,Fn).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,tt).canRun(this)}));const r=this.state.status==="pending",o=!R(this,Rr).canStart();try{if(r)n();else{Ge(this,on,Fn).call(this,{type:"pending",variables:t,isPaused:o}),await((i=(s=R(this,tt).config).onMutate)==null?void 0:i.call(s,t,this));const P=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));P!==this.state.context&&Ge(this,on,Fn).call(this,{type:"pending",context:P,variables:t,isPaused:o})}const A=await R(this,Rr).start();return await((f=(u=R(this,tt).config).onSuccess)==null?void 0:f.call(u,A,t,this.state.context,this)),await((p=(d=this.options).onSuccess)==null?void 0:p.call(d,A,t,this.state.context)),await((b=(m=R(this,tt).config).onSettled)==null?void 0:b.call(m,A,null,this.state.variables,this.state.context,this)),await((x=(h=this.options).onSettled)==null?void 0:x.call(h,A,null,t,this.state.context)),Ge(this,on,Fn).call(this,{type:"success",data:A}),A}catch(A){try{throw await((v=(y=R(this,tt).config).onError)==null?void 0:v.call(y,A,t,this.state.context,this)),await((S=(w=this.options).onError)==null?void 0:S.call(w,A,t,this.state.context)),await((C=(N=R(this,tt).config).onSettled)==null?void 0:C.call(N,void 0,A,this.state.variables,this.state.context,this)),await((j=(k=this.options).onSettled)==null?void 0:j.call(k,void 0,A,t,this.state.context)),A}finally{Ge(this,on,Fn).call(this,{type:"error",error:A})}}finally{R(this,tt).runNext(this)}}},rn=new WeakMap,tt=new WeakMap,Rr=new WeakMap,on=new WeakSet,Fn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),rt.batch(()=>{R(this,rn).forEach(r=>{r.onMutationUpdate(t)}),R(this,tt).notify({mutation:this,type:"updated",action:t})})},Hp);function H1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Sn,Vt,Hs,Wp,W1=(Wp=class extends Ka{constructor(t={}){super();ie(this,Sn);ie(this,Vt);ie(this,Hs);this.config=t,J(this,Sn,new Set),J(this,Vt,new Map),J(this,Hs,0)}build(t,n,r){const o=new U1({mutationCache:this,mutationId:++oi(this,Hs)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){R(this,Sn).add(t);const n=Si(t);if(typeof n=="string"){const r=R(this,Vt).get(n);r?r.push(t):R(this,Vt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(R(this,Sn).delete(t)){const n=Si(t);if(typeof n=="string"){const r=R(this,Vt).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&R(this,Vt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Si(t);if(typeof n=="string"){const r=R(this,Vt).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=Si(t);if(typeof n=="string"){const o=(r=R(this,Vt).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){rt.batch(()=>{R(this,Sn).forEach(t=>{this.notify({type:"removed",mutation:t})}),R(this,Sn).clear(),R(this,Vt).clear()})}getAll(){return Array.from(R(this,Sn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Im(n,r))}findAll(t={}){return this.getAll().filter(n=>Im(t,n))}notify(t){rt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return rt.batch(()=>Promise.all(t.map(n=>n.continue().catch(zt))))}},Sn=new WeakMap,Vt=new WeakMap,Hs=new WeakMap,Wp);function Si(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Lm(e){return{onFetch:(t,n)=>{var f,d,p,m,b;const r=t.options,o=(p=(d=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,s=((m=t.state.data)==null?void 0:m.pages)||[],i=((b=t.state.data)==null?void 0:b.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let h=!1;const x=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?h=!0:t.signal.addEventListener("abort",()=>{h=!0}),t.signal)})},y=cv(t.options,t.fetchOptions),v=async(w,S,N)=>{if(h)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const k=(()=>{const O={client:t.client,queryKey:t.queryKey,pageParam:S,direction:N?"backward":"forward",meta:t.options.meta};return x(O),O})(),j=await y(k),{maxPages:A}=t.options,P=N?A1:T1;return{pages:P(w.pages,j,A),pageParams:P(w.pageParams,S,A)}};if(o&&s.length){const w=o==="backward",S=w?G1:Dm,N={pages:s,pageParams:i},C=S(r,N);l=await v(N,C,w)}else{const w=e??s.length;do{const S=c===0?i[0]??r.initialPageParam:Dm(r,l);if(c>0&&S==null)break;l=await v(l,S),c++}while(c<w)}return l};t.options.persister?t.fetchFn=()=>{var h,x;return(x=(h=t.options).persister)==null?void 0:x.call(h,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Dm(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function G1(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Re,Kn,Qn,Eo,jo,Yn,_o,Ro,Gp,K1=(Gp=class{constructor(e={}){ie(this,Re);ie(this,Kn);ie(this,Qn);ie(this,Eo);ie(this,jo);ie(this,Yn);ie(this,_o);ie(this,Ro);J(this,Re,e.queryCache||new V1),J(this,Kn,e.mutationCache||new W1),J(this,Qn,e.defaultOptions||{}),J(this,Eo,new Map),J(this,jo,new Map),J(this,Yn,0)}mount(){oi(this,Yn)._++,R(this,Yn)===1&&(J(this,_o,uv.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,Re).onFocus())})),J(this,Ro,wa.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,Re).onOnline())})))}unmount(){var e,t;oi(this,Yn)._--,R(this,Yn)===0&&((e=R(this,_o))==null||e.call(this),J(this,_o,void 0),(t=R(this,Ro))==null||t.call(this),J(this,Ro,void 0))}isFetching(e){return R(this,Re).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return R(this,Kn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=R(this,Re).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=R(this,Re).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(au(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return R(this,Re).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=R(this,Re).get(r.queryHash),s=o==null?void 0:o.state.data,i=C1(t,s);if(i!==void 0)return R(this,Re).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return rt.batch(()=>R(this,Re).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=R(this,Re).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=R(this,Re);rt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=R(this,Re);return rt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=rt.batch(()=>R(this,Re).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(zt).catch(zt)}invalidateQueries(e,t={}){return rt.batch(()=>(R(this,Re).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=rt.batch(()=>R(this,Re).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(zt)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(zt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=R(this,Re).build(this,t);return n.isStaleByTime(au(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(zt).catch(zt)}fetchInfiniteQuery(e){return e.behavior=Lm(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(zt).catch(zt)}ensureInfiniteQueryData(e){return e.behavior=Lm(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return wa.isOnline()?R(this,Kn).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,Re)}getMutationCache(){return R(this,Kn)}getDefaultOptions(){return R(this,Qn)}setDefaultOptions(e){J(this,Qn,e)}setQueryDefaults(e,t){R(this,Eo).set($s(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...R(this,Eo).values()],n={};return t.forEach(r=>{Fs(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){R(this,jo).set($s(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...R(this,jo).values()],n={};return t.forEach(r=>{Fs(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...R(this,Qn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Md(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Od&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...R(this,Qn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){R(this,Re).clear(),R(this,Kn).clear()}},Re=new WeakMap,Kn=new WeakMap,Qn=new WeakMap,Eo=new WeakMap,jo=new WeakMap,Yn=new WeakMap,_o=new WeakMap,Ro=new WeakMap,Gp),Q1=g.createContext(void 0),Y1=({client:e,children:t})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),a.jsx(Q1.Provider,{value:e,children:t}));/**
|
|
41
|
-
* @remix-run/router v1.23.0
|
|
42
|
-
*
|
|
43
|
-
* Copyright (c) Remix Software Inc.
|
|
44
|
-
*
|
|
45
|
-
* This source code is licensed under the MIT license found in the
|
|
46
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
-
*
|
|
48
|
-
* @license MIT
|
|
49
|
-
*/function ba(){return ba=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ba.apply(this,arguments)}var Zn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Zn||(Zn={}));const $m="popstate";function X1(e){e===void 0&&(e={});function t(r,o){let{pathname:s,search:i,hash:l}=r.location;return cu("",{pathname:s,search:i,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:gv(o)}return Z1(t,n,null,e)}function mt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function hv(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function q1(){return Math.random().toString(36).substr(2,8)}function Fm(e,t){return{usr:e.state,key:e.key,idx:t}}function cu(e,t,n,r){return n===void 0&&(n=null),ba({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ya(t):t,{state:n,key:t&&t.key||r||q1()})}function gv(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ya(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Z1(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:s=!1}=r,i=o.history,l=Zn.Pop,c=null,u=f();u==null&&(u=0,i.replaceState(ba({},i.state,{idx:u}),""));function f(){return(i.state||{idx:null}).idx}function d(){l=Zn.Pop;let x=f(),y=x==null?null:x-u;u=x,c&&c({action:l,location:h.location,delta:y})}function p(x,y){l=Zn.Push;let v=cu(h.location,x,y);u=f()+1;let w=Fm(v,u),S=h.createHref(v);try{i.pushState(w,"",S)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;o.location.assign(S)}s&&c&&c({action:l,location:h.location,delta:1})}function m(x,y){l=Zn.Replace;let v=cu(h.location,x,y);u=f();let w=Fm(v,u),S=h.createHref(v);i.replaceState(w,"",S),s&&c&&c({action:l,location:h.location,delta:0})}function b(x){let y=o.location.origin!=="null"?o.location.origin:o.location.href,v=typeof x=="string"?x:gv(x);return v=v.replace(/ $/,"%20"),mt(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let h={get action(){return l},get location(){return e(o,i)},listen(x){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener($m,d),c=x,()=>{o.removeEventListener($m,d),c=null}},createHref(x){return t(o,x)},createURL:b,encodeLocation(x){let y=b(x);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:p,replace:m,go(x){return i.go(x)}};return h}var zm;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(zm||(zm={}));function J1(e,t,n){return n===void 0&&(n="/"),eS(e,t,n,!1)}function eS(e,t,n,r){let o=typeof t=="string"?Ya(t):t,s=xv(o.pathname||"/",n);if(s==null)return null;let i=vv(e);tS(i);let l=null;for(let c=0;l==null&&c<i.length;++c){let u=fS(s);l=uS(i[c],u,r)}return l}function vv(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(s,i,l)=>{let c={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:i,route:s};c.relativePath.startsWith("/")&&(mt(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=go([r,c.relativePath]),f=n.concat(c);s.children&&s.children.length>0&&(mt(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),vv(s.children,t,f,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:lS(u,s.index),routesMeta:f})};return e.forEach((s,i)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))o(s,i);else for(let c of yv(s.path))o(s,i,c)}),t}function yv(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return o?[s,""]:[s];let i=yv(r.join("/")),l=[];return l.push(...i.map(c=>c===""?s:[s,c].join("/"))),o&&l.push(...i),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function tS(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:cS(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const nS=/^:[\w-]+$/,rS=3,oS=2,sS=1,iS=10,aS=-2,Bm=e=>e==="*";function lS(e,t){let n=e.split("/"),r=n.length;return n.some(Bm)&&(r+=aS),t&&(r+=oS),n.filter(o=>!Bm(o)).reduce((o,s)=>o+(nS.test(s)?rS:s===""?sS:iS),r)}function cS(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function uS(e,t,n){let{routesMeta:r}=e,o={},s="/",i=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,f=s==="/"?t:t.slice(s.length)||"/",d=Vm({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},f),p=c.route;if(!d&&u&&n&&!r[r.length-1].route.index&&(d=Vm({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},f)),!d)return null;Object.assign(o,d.params),i.push({params:o,pathname:go([s,d.pathname]),pathnameBase:mS(go([s,d.pathnameBase])),route:p}),d.pathnameBase!=="/"&&(s=go([s,d.pathnameBase]))}return i}function Vm(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=dS(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let s=o[0],i=s.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce((u,f,d)=>{let{paramName:p,isOptional:m}=f;if(p==="*"){let h=l[d]||"";i=s.slice(0,s.length-h.length).replace(/(.)\/+$/,"$1")}const b=l[d];return m&&!b?u[p]=void 0:u[p]=(b||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:i,pattern:e}}function dS(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),hv(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function fS(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return hv(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function xv(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const go=e=>e.join("/").replace(/\/\/+/g,"/"),mS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function pS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const wv=["post","put","patch","delete"];new Set(wv);const hS=["get",...wv];new Set(hS);/**
|
|
50
|
-
* React Router v6.30.1
|
|
51
|
-
*
|
|
52
|
-
* Copyright (c) Remix Software Inc.
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the MIT license found in the
|
|
55
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
-
*
|
|
57
|
-
* @license MIT
|
|
58
|
-
*/function Sa(){return Sa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sa.apply(this,arguments)}const gS=g.createContext(null),vS=g.createContext(null),bv=g.createContext(null),Xa=g.createContext(null),qa=g.createContext({outlet:null,matches:[],isDataRoute:!1}),Sv=g.createContext(null);function Ld(){return g.useContext(Xa)!=null}function Nv(){return Ld()||mt(!1),g.useContext(Xa).location}function yS(e,t){return xS(e,t)}function xS(e,t,n,r){Ld()||mt(!1);let{navigator:o}=g.useContext(bv),{matches:s}=g.useContext(qa),i=s[s.length-1],l=i?i.params:{};i&&i.pathname;let c=i?i.pathnameBase:"/";i&&i.route;let u=Nv(),f;if(t){var d;let x=typeof t=="string"?Ya(t):t;c==="/"||(d=x.pathname)!=null&&d.startsWith(c)||mt(!1),f=x}else f=u;let p=f.pathname||"/",m=p;if(c!=="/"){let x=c.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(x.length).join("/")}let b=J1(e,{pathname:m}),h=kS(b&&b.map(x=>Object.assign({},x,{params:Object.assign({},l,x.params),pathname:go([c,o.encodeLocation?o.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?c:go([c,o.encodeLocation?o.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),s,n,r);return t&&h?g.createElement(Xa.Provider,{value:{location:Sa({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Zn.Pop}},h):h}function wS(){let e=_S(),t=pS(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:o},n):null,null)}const bS=g.createElement(wS,null);class SS extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?g.createElement(qa.Provider,{value:this.props.routeContext},g.createElement(Sv.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function NS(e){let{routeContext:t,match:n,children:r}=e,o=g.useContext(gS);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),g.createElement(qa.Provider,{value:t},r)}function kS(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,l=(o=n)==null?void 0:o.errors;if(l!=null){let f=i.findIndex(d=>d.route.id&&(l==null?void 0:l[d.route.id])!==void 0);f>=0||mt(!1),i=i.slice(0,Math.min(i.length,f+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<i.length;f++){let d=i[f];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=f),d.route.id){let{loaderData:p,errors:m}=n,b=d.route.loader&&p[d.route.id]===void 0&&(!m||m[d.route.id]===void 0);if(d.route.lazy||b){c=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((f,d,p)=>{let m,b=!1,h=null,x=null;n&&(m=l&&d.route.id?l[d.route.id]:void 0,h=d.route.errorElement||bS,c&&(u<0&&p===0?(b=!0,x=null):u===p&&(b=!0,x=d.route.hydrateFallbackElement||null)));let y=t.concat(i.slice(0,p+1)),v=()=>{let w;return m?w=h:b?w=x:d.route.Component?w=g.createElement(d.route.Component,null):d.route.element?w=d.route.element:w=f,g.createElement(NS,{match:d,routeContext:{outlet:f,matches:y,isDataRoute:n!=null},children:w})};return n&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?g.createElement(SS,{location:n.location,revalidation:n.revalidation,component:h,error:m,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}var uu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(uu||{});function CS(e){let t=g.useContext(vS);return t||mt(!1),t}function ES(e){let t=g.useContext(qa);return t||mt(!1),t}function jS(e){let t=ES(),n=t.matches[t.matches.length-1];return n.route.id||mt(!1),n.route.id}function _S(){var e;let t=g.useContext(Sv),n=CS(uu.UseRouteError),r=jS(uu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function RS(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function du(e){mt(!1)}function PS(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Zn.Pop,navigator:s,static:i=!1,future:l}=e;Ld()&&mt(!1);let c=t.replace(/^\/*/,"/"),u=g.useMemo(()=>({basename:c,navigator:s,static:i,future:Sa({v7_relativeSplatPath:!1},l)}),[c,l,s,i]);typeof r=="string"&&(r=Ya(r));let{pathname:f="/",search:d="",hash:p="",state:m=null,key:b="default"}=r,h=g.useMemo(()=>{let x=xv(f,c);return x==null?null:{location:{pathname:x,search:d,hash:p,state:m,key:b},navigationType:o}},[c,f,d,p,m,b,o]);return h==null?null:g.createElement(bv.Provider,{value:u},g.createElement(Xa.Provider,{children:n,value:h}))}function TS(e){let{children:t,location:n}=e;return yS(fu(t),n)}new Promise(()=>{});function fu(e,t){t===void 0&&(t=[]);let n=[];return g.Children.forEach(e,(r,o)=>{if(!g.isValidElement(r))return;let s=[...t,o];if(r.type===g.Fragment){n.push.apply(n,fu(r.props.children,s));return}r.type!==du&&mt(!1),!r.props.index||!r.props.children||mt(!1);let i={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=fu(r.props.children,s)),n.push(i)}),n}/**
|
|
59
|
-
* React Router DOM v6.30.1
|
|
60
|
-
*
|
|
61
|
-
* Copyright (c) Remix Software Inc.
|
|
62
|
-
*
|
|
63
|
-
* This source code is licensed under the MIT license found in the
|
|
64
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
65
|
-
*
|
|
66
|
-
* @license MIT
|
|
67
|
-
*/const AS="6";try{window.__reactRouterVersion=AS}catch{}const IS="startTransition",Um=Uu[IS];function MS(e){let{basename:t,children:n,future:r,window:o}=e,s=g.useRef();s.current==null&&(s.current=X1({window:o,v5Compat:!0}));let i=s.current,[l,c]=g.useState({action:i.action,location:i.location}),{v7_startTransition:u}=r||{},f=g.useCallback(d=>{u&&Um?Um(()=>c(d)):c(d)},[c,u]);return g.useLayoutEffect(()=>i.listen(f),[i,f]),g.useEffect(()=>RS(r),[r]),g.createElement(PS,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:i,future:r})}var Hm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Hm||(Hm={}));var Wm;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Wm||(Wm={}));var Gm=["light","dark"],OS="(prefers-color-scheme: dark)",LS=g.createContext(void 0),DS={setTheme:e=>{},themes:[]},$S=()=>{var e;return(e=g.useContext(LS))!=null?e:DS};g.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:s,value:i,attrs:l,nonce:c})=>{let u=s==="system",f=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(b=>`'${b}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=o?Gm.includes(s)&&s?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${s}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(b,h=!1,x=!0)=>{let y=i?i[b]:b,v=h?b+"|| ''":`'${y}'`,w="";return o&&x&&!h&&Gm.includes(b)&&(w+=`d.style.colorScheme = '${b}';`),n==="class"?h||y?w+=`c.add(${v})`:w+="null":y&&(w+=`d[s](n,${v})`),w},m=e?`!function(){${f}${p(e)}}()`:r?`!function(){try{${f}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${OS}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${p(i?"x[e]":"e",!0)}}${u?"":"else{"+p(s,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${f}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${p(i?"x[e]":"e",!0)}}else{${p(s,!1,!1)};}${d}}catch(t){}}();`;return g.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:m}})});var FS=e=>{switch(e){case"success":return VS;case"info":return HS;case"warning":return US;case"error":return WS;default:return null}},zS=Array(12).fill(0),BS=({visible:e,className:t})=>D.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},D.createElement("div",{className:"sonner-spinner"},zS.map((n,r)=>D.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),VS=D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},D.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),US=D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},D.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),HS=D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},D.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),WS=D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},D.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),GS=D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},D.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),D.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),KS=()=>{let[e,t]=D.useState(document.hidden);return D.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},mu=1,QS=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:mu++,s=this.toasts.find(l=>l.id===o),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),s?this.toasts=this.toasts.map(l=>l.id===o?(this.publish({...l,...e,id:o,title:n}),{...l,...e,id:o,dismissible:i,title:n}):l):this.addToast({title:n,...r,dismissible:i,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,s,i=r.then(async c=>{if(s=["resolve",c],D.isValidElement(c))o=!1,this.create({id:n,type:"default",message:c});else if(XS(c)&&!c.ok){o=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:u,description:f})}else if(t.success!==void 0){o=!1;let u=typeof t.success=="function"?await t.success(c):t.success,f=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:u,description:f})}}).catch(async c=>{if(s=["reject",c],t.error!==void 0){o=!1;let u=typeof t.error=="function"?await t.error(c):t.error,f=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:u,description:f})}}).finally(()=>{var c;o&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>i.then(()=>s[0]==="reject"?u(s[1]):c(s[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||mu++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},at=new QS,YS=(e,t)=>{let n=(t==null?void 0:t.id)||mu++;return at.addToast({title:e,...t,id:n}),n},XS=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",qS=YS,ZS=()=>at.toasts,JS=()=>at.getActiveToasts();Object.assign(qS,{success:at.success,info:at.info,warning:at.warning,error:at.error,custom:at.custom,message:at.message,promise:at.promise,dismiss:at.dismiss,loading:at.loading},{getHistory:ZS,getToasts:JS});function eN(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}eN(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
68
|
-
`);function Ni(e){return e.label!==void 0}var tN=3,nN="32px",rN="16px",Km=4e3,oN=356,sN=14,iN=20,aN=200;function Dt(...e){return e.filter(Boolean).join(" ")}function lN(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var cN=e=>{var t,n,r,o,s,i,l,c,u,f,d;let{invert:p,toast:m,unstyled:b,interacting:h,setHeights:x,visibleToasts:y,heights:v,index:w,toasts:S,expanded:N,removeToast:C,defaultRichColors:k,closeButton:j,style:A,cancelButtonStyle:P,actionButtonStyle:O,className:M="",descriptionClassName:U="",duration:T,position:z,gap:$,loadingIcon:B,expandByDefault:E,classNames:_,icons:L,closeButtonAriaLabel:G="Close toast",pauseWhenPageIsHidden:H}=e,[Y,X]=D.useState(null),[pe,be]=D.useState(null),[F,ce]=D.useState(!1),[Se,oe]=D.useState(!1),[ne,re]=D.useState(!1),[$e,et]=D.useState(!1),[hn,Zt]=D.useState(!1),[gn,vr]=D.useState(0),[vn,ti]=D.useState(0),Fe=D.useRef(m.duration||T||Km),ni=D.useRef(null),q=D.useRef(null),ve=w===0,ue=w+1<=y,fe=m.type,Nt=m.dismissible!==!1,kt=m.className||"",he=m.descriptionClassName||"",Hr=D.useMemo(()=>v.findIndex(Z=>Z.toastId===m.id)||0,[v,m.id]),ri=D.useMemo(()=>{var Z;return(Z=m.closeButton)!=null?Z:j},[m.closeButton,j]),Jt=D.useMemo(()=>m.duration||T||Km,[m.duration,T]),bl=D.useRef(0),Wr=D.useRef(0),yf=D.useRef(0),Gr=D.useRef(null),[K0,Q0]=z.split("-"),xf=D.useMemo(()=>v.reduce((Z,me,Ne)=>Ne>=Hr?Z:Z+me.height,0),[v,Hr]),wf=KS(),Y0=m.invert||p,Sl=fe==="loading";Wr.current=D.useMemo(()=>Hr*$+xf,[Hr,xf]),D.useEffect(()=>{Fe.current=Jt},[Jt]),D.useEffect(()=>{ce(!0)},[]),D.useEffect(()=>{let Z=q.current;if(Z){let me=Z.getBoundingClientRect().height;return ti(me),x(Ne=>[{toastId:m.id,height:me,position:m.position},...Ne]),()=>x(Ne=>Ne.filter(It=>It.toastId!==m.id))}},[x,m.id]),D.useLayoutEffect(()=>{if(!F)return;let Z=q.current,me=Z.style.height;Z.style.height="auto";let Ne=Z.getBoundingClientRect().height;Z.style.height=me,ti(Ne),x(It=>It.find(Mt=>Mt.toastId===m.id)?It.map(Mt=>Mt.toastId===m.id?{...Mt,height:Ne}:Mt):[{toastId:m.id,height:Ne,position:m.position},...It])},[F,m.title,m.description,x,m.id]);let In=D.useCallback(()=>{oe(!0),vr(Wr.current),x(Z=>Z.filter(me=>me.toastId!==m.id)),setTimeout(()=>{C(m)},aN)},[m,C,x,Wr]);D.useEffect(()=>{if(m.promise&&fe==="loading"||m.duration===1/0||m.type==="loading")return;let Z;return N||h||H&&wf?(()=>{if(yf.current<bl.current){let me=new Date().getTime()-bl.current;Fe.current=Fe.current-me}yf.current=new Date().getTime()})():Fe.current!==1/0&&(bl.current=new Date().getTime(),Z=setTimeout(()=>{var me;(me=m.onAutoClose)==null||me.call(m,m),In()},Fe.current)),()=>clearTimeout(Z)},[N,h,m,fe,H,wf,In]),D.useEffect(()=>{m.delete&&In()},[In,m.delete]);function X0(){var Z,me,Ne;return L!=null&&L.loading?D.createElement("div",{className:Dt(_==null?void 0:_.loader,(Z=m==null?void 0:m.classNames)==null?void 0:Z.loader,"sonner-loader"),"data-visible":fe==="loading"},L.loading):B?D.createElement("div",{className:Dt(_==null?void 0:_.loader,(me=m==null?void 0:m.classNames)==null?void 0:me.loader,"sonner-loader"),"data-visible":fe==="loading"},B):D.createElement(BS,{className:Dt(_==null?void 0:_.loader,(Ne=m==null?void 0:m.classNames)==null?void 0:Ne.loader),visible:fe==="loading"})}return D.createElement("li",{tabIndex:0,ref:q,className:Dt(M,kt,_==null?void 0:_.toast,(t=m==null?void 0:m.classNames)==null?void 0:t.toast,_==null?void 0:_.default,_==null?void 0:_[fe],(n=m==null?void 0:m.classNames)==null?void 0:n[fe]),"data-sonner-toast":"","data-rich-colors":(r=m.richColors)!=null?r:k,"data-styled":!(m.jsx||m.unstyled||b),"data-mounted":F,"data-promise":!!m.promise,"data-swiped":hn,"data-removed":Se,"data-visible":ue,"data-y-position":K0,"data-x-position":Q0,"data-index":w,"data-front":ve,"data-swiping":ne,"data-dismissible":Nt,"data-type":fe,"data-invert":Y0,"data-swipe-out":$e,"data-swipe-direction":pe,"data-expanded":!!(N||E&&F),style:{"--index":w,"--toasts-before":w,"--z-index":S.length-w,"--offset":`${Se?gn:Wr.current}px`,"--initial-height":E?"auto":`${vn}px`,...A,...m.style},onDragEnd:()=>{re(!1),X(null),Gr.current=null},onPointerDown:Z=>{Sl||!Nt||(ni.current=new Date,vr(Wr.current),Z.target.setPointerCapture(Z.pointerId),Z.target.tagName!=="BUTTON"&&(re(!0),Gr.current={x:Z.clientX,y:Z.clientY}))},onPointerUp:()=>{var Z,me,Ne,It;if($e||!Nt)return;Gr.current=null;let Mt=Number(((Z=q.current)==null?void 0:Z.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Mn=Number(((me=q.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),yr=new Date().getTime()-((Ne=ni.current)==null?void 0:Ne.getTime()),Ot=Y==="x"?Mt:Mn,On=Math.abs(Ot)/yr;if(Math.abs(Ot)>=iN||On>.11){vr(Wr.current),(It=m.onDismiss)==null||It.call(m,m),be(Y==="x"?Mt>0?"right":"left":Mn>0?"down":"up"),In(),et(!0),Zt(!1);return}re(!1),X(null)},onPointerMove:Z=>{var me,Ne,It,Mt;if(!Gr.current||!Nt||((me=window.getSelection())==null?void 0:me.toString().length)>0)return;let Mn=Z.clientY-Gr.current.y,yr=Z.clientX-Gr.current.x,Ot=(Ne=e.swipeDirections)!=null?Ne:lN(z);!Y&&(Math.abs(yr)>1||Math.abs(Mn)>1)&&X(Math.abs(yr)>Math.abs(Mn)?"x":"y");let On={x:0,y:0};Y==="y"?(Ot.includes("top")||Ot.includes("bottom"))&&(Ot.includes("top")&&Mn<0||Ot.includes("bottom")&&Mn>0)&&(On.y=Mn):Y==="x"&&(Ot.includes("left")||Ot.includes("right"))&&(Ot.includes("left")&&yr<0||Ot.includes("right")&&yr>0)&&(On.x=yr),(Math.abs(On.x)>0||Math.abs(On.y)>0)&&Zt(!0),(It=q.current)==null||It.style.setProperty("--swipe-amount-x",`${On.x}px`),(Mt=q.current)==null||Mt.style.setProperty("--swipe-amount-y",`${On.y}px`)}},ri&&!m.jsx?D.createElement("button",{"aria-label":G,"data-disabled":Sl,"data-close-button":!0,onClick:Sl||!Nt?()=>{}:()=>{var Z;In(),(Z=m.onDismiss)==null||Z.call(m,m)},className:Dt(_==null?void 0:_.closeButton,(o=m==null?void 0:m.classNames)==null?void 0:o.closeButton)},(s=L==null?void 0:L.close)!=null?s:GS):null,m.jsx||g.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:D.createElement(D.Fragment,null,fe||m.icon||m.promise?D.createElement("div",{"data-icon":"",className:Dt(_==null?void 0:_.icon,(i=m==null?void 0:m.classNames)==null?void 0:i.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||X0():null,m.type!=="loading"?m.icon||(L==null?void 0:L[fe])||FS(fe):null):null,D.createElement("div",{"data-content":"",className:Dt(_==null?void 0:_.content,(l=m==null?void 0:m.classNames)==null?void 0:l.content)},D.createElement("div",{"data-title":"",className:Dt(_==null?void 0:_.title,(c=m==null?void 0:m.classNames)==null?void 0:c.title)},typeof m.title=="function"?m.title():m.title),m.description?D.createElement("div",{"data-description":"",className:Dt(U,he,_==null?void 0:_.description,(u=m==null?void 0:m.classNames)==null?void 0:u.description)},typeof m.description=="function"?m.description():m.description):null),g.isValidElement(m.cancel)?m.cancel:m.cancel&&Ni(m.cancel)?D.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||P,onClick:Z=>{var me,Ne;Ni(m.cancel)&&Nt&&((Ne=(me=m.cancel).onClick)==null||Ne.call(me,Z),In())},className:Dt(_==null?void 0:_.cancelButton,(f=m==null?void 0:m.classNames)==null?void 0:f.cancelButton)},m.cancel.label):null,g.isValidElement(m.action)?m.action:m.action&&Ni(m.action)?D.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||O,onClick:Z=>{var me,Ne;Ni(m.action)&&((Ne=(me=m.action).onClick)==null||Ne.call(me,Z),!Z.defaultPrevented&&In())},className:Dt(_==null?void 0:_.actionButton,(d=m==null?void 0:m.classNames)==null?void 0:d.actionButton)},m.action.label):null))};function Qm(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function uN(e,t){let n={};return[e,t].forEach((r,o)=>{let s=o===1,i=s?"--mobile-offset":"--offset",l=s?rN:nN;function c(u){["top","right","bottom","left"].forEach(f=>{n[`${i}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${i}-${u}`]=l:n[`${i}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(l)}),n}var dN=g.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:s,closeButton:i,className:l,offset:c,mobileOffset:u,theme:f="light",richColors:d,duration:p,style:m,visibleToasts:b=tN,toastOptions:h,dir:x=Qm(),gap:y=sN,loadingIcon:v,icons:w,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:N}=e,[C,k]=D.useState([]),j=D.useMemo(()=>Array.from(new Set([r].concat(C.filter(H=>H.position).map(H=>H.position)))),[C,r]),[A,P]=D.useState([]),[O,M]=D.useState(!1),[U,T]=D.useState(!1),[z,$]=D.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=D.useRef(null),E=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=D.useRef(null),L=D.useRef(!1),G=D.useCallback(H=>{k(Y=>{var X;return(X=Y.find(pe=>pe.id===H.id))!=null&&X.delete||at.dismiss(H.id),Y.filter(({id:pe})=>pe!==H.id)})},[]);return D.useEffect(()=>at.subscribe(H=>{if(H.dismiss){k(Y=>Y.map(X=>X.id===H.id?{...X,delete:!0}:X));return}setTimeout(()=>{iv.flushSync(()=>{k(Y=>{let X=Y.findIndex(pe=>pe.id===H.id);return X!==-1?[...Y.slice(0,X),{...Y[X],...H},...Y.slice(X+1)]:[H,...Y]})})})}),[]),D.useEffect(()=>{if(f!=="system"){$(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;let H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:Y})=>{$(Y?"dark":"light")})}catch{H.addListener(({matches:X})=>{try{$(X?"dark":"light")}catch(pe){console.error(pe)}})}},[f]),D.useEffect(()=>{C.length<=1&&M(!1)},[C]),D.useEffect(()=>{let H=Y=>{var X,pe;o.every(be=>Y[be]||Y.code===be)&&(M(!0),(X=B.current)==null||X.focus()),Y.code==="Escape"&&(document.activeElement===B.current||(pe=B.current)!=null&&pe.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[o]),D.useEffect(()=>{if(B.current)return()=>{_.current&&(_.current.focus({preventScroll:!0}),_.current=null,L.current=!1)}},[B.current]),D.createElement("section",{ref:t,"aria-label":`${S} ${E}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},j.map((H,Y)=>{var X;let[pe,be]=H.split("-");return C.length?D.createElement("ol",{key:H,dir:x==="auto"?Qm():x,tabIndex:-1,ref:B,className:l,"data-sonner-toaster":!0,"data-theme":z,"data-y-position":pe,"data-lifted":O&&C.length>1&&!s,"data-x-position":be,style:{"--front-toast-height":`${((X=A[0])==null?void 0:X.height)||0}px`,"--width":`${oN}px`,"--gap":`${y}px`,...m,...uN(c,u)},onBlur:F=>{L.current&&!F.currentTarget.contains(F.relatedTarget)&&(L.current=!1,_.current&&(_.current.focus({preventScroll:!0}),_.current=null))},onFocus:F=>{F.target instanceof HTMLElement&&F.target.dataset.dismissible==="false"||L.current||(L.current=!0,_.current=F.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{U||M(!1)},onDragEnd:()=>M(!1),onPointerDown:F=>{F.target instanceof HTMLElement&&F.target.dataset.dismissible==="false"||T(!0)},onPointerUp:()=>T(!1)},C.filter(F=>!F.position&&Y===0||F.position===H).map((F,ce)=>{var Se,oe;return D.createElement(cN,{key:F.id,icons:w,index:ce,toast:F,defaultRichColors:d,duration:(Se=h==null?void 0:h.duration)!=null?Se:p,className:h==null?void 0:h.className,descriptionClassName:h==null?void 0:h.descriptionClassName,invert:n,visibleToasts:b,closeButton:(oe=h==null?void 0:h.closeButton)!=null?oe:i,interacting:U,position:H,style:h==null?void 0:h.style,unstyled:h==null?void 0:h.unstyled,classNames:h==null?void 0:h.classNames,cancelButtonStyle:h==null?void 0:h.cancelButtonStyle,actionButtonStyle:h==null?void 0:h.actionButtonStyle,removeToast:G,toasts:C.filter(ne=>ne.position==F.position),heights:A.filter(ne=>ne.position==F.position),setHeights:P,expandByDefault:s,gap:y,loadingIcon:v,expanded:O,pauseWhenPageIsHidden:N,swipeDirections:e.swipeDirections})})):null}))});const fN=({...e})=>{const{theme:t="system"}=$S();return a.jsx(dN,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})},mN=1,pN=1e6;let ql=0;function hN(){return ql=(ql+1)%Number.MAX_SAFE_INTEGER,ql.toString()}const Zl=new Map,Ym=e=>{if(Zl.has(e))return;const t=setTimeout(()=>{Zl.delete(e),xs({type:"REMOVE_TOAST",toastId:e})},pN);Zl.set(e,t)},gN=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,mN)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Ym(n):e.toasts.forEach(r=>{Ym(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Ui=[];let Hi={toasts:[]};function xs(e){Hi=gN(Hi,e),Ui.forEach(t=>{t(Hi)})}function vN({...e}){const t=hN(),n=o=>xs({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>xs({type:"DISMISS_TOAST",toastId:t});return xs({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function yN(){const[e,t]=g.useState(Hi);return g.useEffect(()=>(Ui.push(t),()=>{const n=Ui.indexOf(t);n>-1&&Ui.splice(n,1)}),[e]),{...e,toast:vN,dismiss:n=>xs({type:"DISMISS_TOAST",toastId:n})}}function K(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Xm(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function kv(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Xm(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Xm(e[o],null)}}}}function ae(...e){return g.useCallback(kv(...e),e)}function qt(e,t=[]){let n=[];function r(s,i){const l=g.createContext(i),c=n.length;n=[...n,i];const u=d=>{var y;const{scope:p,children:m,...b}=d,h=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,x=g.useMemo(()=>b,Object.values(b));return a.jsx(h.Provider,{value:x,children:m})};u.displayName=s+"Provider";function f(d,p){var h;const m=((h=p==null?void 0:p[e])==null?void 0:h[c])||l,b=g.useContext(m);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=n.map(i=>g.createContext(i));return function(l){const c=(l==null?void 0:l[e])||s;return g.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[r,xN(o,...t)]}function xN(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function zs(e){const t=bN(e),n=g.forwardRef((r,o)=>{const{children:s,...i}=r,l=g.Children.toArray(s),c=l.find(NN);if(c){const u=c.props.children,f=l.map(d=>d===c?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:d);return a.jsx(t,{...i,ref:o,children:g.isValidElement(u)?g.cloneElement(u,void 0,f):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var wN=zs("Slot");function bN(e){const t=g.forwardRef((n,r)=>{const{children:o,...s}=n;if(g.isValidElement(o)){const i=CN(o),l=kN(s,o.props);return o.type!==g.Fragment&&(l.ref=r?kv(r,i):i),g.cloneElement(o,l)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Cv=Symbol("radix.slottable");function SN(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Cv,t}function NN(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Cv}function kN(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const c=s(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function CN(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Za(e){const t=e+"CollectionProvider",[n,r]=qt(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:x,children:y}=h,v=D.useRef(null),w=D.useRef(new Map).current;return a.jsx(o,{scope:x,itemMap:w,collectionRef:v,children:y})};i.displayName=t;const l=e+"CollectionSlot",c=zs(l),u=D.forwardRef((h,x)=>{const{scope:y,children:v}=h,w=s(l,y),S=ae(x,w.collectionRef);return a.jsx(c,{ref:S,children:v})});u.displayName=l;const f=e+"CollectionItemSlot",d="data-radix-collection-item",p=zs(f),m=D.forwardRef((h,x)=>{const{scope:y,children:v,...w}=h,S=D.useRef(null),N=ae(x,S),C=s(f,y);return D.useEffect(()=>(C.itemMap.set(S,{ref:S,...w}),()=>void C.itemMap.delete(S))),a.jsx(p,{[d]:"",ref:N,children:v})});m.displayName=f;function b(h){const x=s(e+"CollectionConsumer",h);return D.useCallback(()=>{const v=x.collectionRef.current;if(!v)return[];const w=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((C,k)=>w.indexOf(C.ref.current)-w.indexOf(k.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:u,ItemSlot:m},b,r]}var EN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Q=EN.reduce((e,t)=>{const n=zs(`Primitive.${t}`),r=g.forwardRef((o,s)=>{const{asChild:i,...l}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(c,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ev(e,t){e&&Ur.flushSync(()=>e.dispatchEvent(t))}function At(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function jN(e,t=globalThis==null?void 0:globalThis.document){const n=At(e);g.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var _N="DismissableLayer",pu="dismissableLayer.update",RN="dismissableLayer.pointerDownOutside",PN="dismissableLayer.focusOutside",qm,jv=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ja=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:l,...c}=e,u=g.useContext(jv),[f,d]=g.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=g.useState({}),b=ae(t,k=>d(k)),h=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(x),v=f?h.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=v>=y,N=AN(k=>{const j=k.target,A=[...u.branches].some(P=>P.contains(j));!S||A||(o==null||o(k),i==null||i(k),k.defaultPrevented||l==null||l())},p),C=IN(k=>{const j=k.target;[...u.branches].some(P=>P.contains(j))||(s==null||s(k),i==null||i(k),k.defaultPrevented||l==null||l())},p);return jN(k=>{v===u.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&l&&(k.preventDefault(),l()))},p),g.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(qm=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Zm(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=qm)}},[f,p,n,u]),g.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Zm())},[f,u]),g.useEffect(()=>{const k=()=>m({});return document.addEventListener(pu,k),()=>document.removeEventListener(pu,k)},[]),a.jsx(Q.div,{...c,ref:b,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,C.onFocusCapture),onBlurCapture:K(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,N.onPointerDownCapture)})});Ja.displayName=_N;var TN="DismissableLayerBranch",_v=g.forwardRef((e,t)=>{const n=g.useContext(jv),r=g.useRef(null),o=ae(t,r);return g.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),a.jsx(Q.div,{...e,ref:o})});_v.displayName=TN;function AN(e,t=globalThis==null?void 0:globalThis.document){const n=At(e),r=g.useRef(!1),o=g.useRef(()=>{});return g.useEffect(()=>{const s=l=>{if(l.target&&!r.current){let c=function(){Rv(RN,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function IN(e,t=globalThis==null?void 0:globalThis.document){const n=At(e),r=g.useRef(!1);return g.useEffect(()=>{const o=s=>{s.target&&!r.current&&Rv(PN,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Zm(){const e=new CustomEvent(pu);document.dispatchEvent(e)}function Rv(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ev(o,s):o.dispatchEvent(s)}var MN=Ja,ON=_v,Ve=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},LN="Portal",Dd=g.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,s]=g.useState(!1);Ve(()=>s(!0),[]);const i=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?iv.createPortal(a.jsx(Q.div,{...r,ref:t}),i):null});Dd.displayName=LN;function DN(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var Xs=e=>{const{present:t,children:n}=e,r=$N(t),o=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),s=ae(r.ref,FN(o));return typeof n=="function"||r.isPresent?g.cloneElement(o,{ref:s}):null};Xs.displayName="Presence";function $N(e){const[t,n]=g.useState(),r=g.useRef(null),o=g.useRef(e),s=g.useRef("none"),i=e?"mounted":"unmounted",[l,c]=DN(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=ki(r.current);s.current=l==="mounted"?u:"none"},[l]),Ve(()=>{const u=r.current,f=o.current;if(f!==e){const p=s.current,m=ki(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&p!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Ve(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,d=m=>{const h=ki(r.current).includes(m.animationName);if(m.target===t&&h&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},p=m=>{m.target===t&&(s.current=ki(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:g.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function ki(e){return(e==null?void 0:e.animationName)||"none"}function FN(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var zN=Uu[" useInsertionEffect ".trim().toString()]||Ve;function cr({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=BN({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:o;{const f=g.useRef(e!==void 0);g.useEffect(()=>{const d=f.current;d!==l&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=l},[l,r])}const u=g.useCallback(f=>{var d;if(l){const p=VN(f)?f(e):f;p!==e&&((d=i.current)==null||d.call(i,p))}else s(f)},[l,e,s,i]);return[c,u]}function BN({defaultProp:e,onChange:t}){const[n,r]=g.useState(e),o=g.useRef(n),s=g.useRef(t);return zN(()=>{s.current=t},[t]),g.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function VN(e){return typeof e=="function"}var Pv=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),UN="VisuallyHidden",el=g.forwardRef((e,t)=>a.jsx(Q.span,{...e,ref:t,style:{...Pv,...e.style}}));el.displayName=UN;var HN=el,$d="ToastProvider",[Fd,WN,GN]=Za("Toast"),[Tv,gT]=qt("Toast",[GN]),[KN,tl]=Tv($d),Av=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:i}=e,[l,c]=g.useState(null),[u,f]=g.useState(0),d=g.useRef(!1),p=g.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${$d}\`. Expected non-empty \`string\`.`),a.jsx(Fd.Provider,{scope:t,children:a.jsx(KN,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:g.useCallback(()=>f(m=>m+1),[]),onToastRemove:g.useCallback(()=>f(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:i})})};Av.displayName=$d;var Iv="ToastViewport",QN=["F8"],hu="toast.viewportPause",gu="toast.viewportResume",Mv=g.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=QN,label:o="Notifications ({hotkey})",...s}=e,i=tl(Iv,n),l=WN(n),c=g.useRef(null),u=g.useRef(null),f=g.useRef(null),d=g.useRef(null),p=ae(t,d,i.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=i.toastCount>0;g.useEffect(()=>{const x=y=>{var w;r.length!==0&&r.every(S=>y[S]||y.code===S)&&((w=d.current)==null||w.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),g.useEffect(()=>{const x=c.current,y=d.current;if(b&&x&&y){const v=()=>{if(!i.isClosePausedRef.current){const C=new CustomEvent(hu);y.dispatchEvent(C),i.isClosePausedRef.current=!0}},w=()=>{if(i.isClosePausedRef.current){const C=new CustomEvent(gu);y.dispatchEvent(C),i.isClosePausedRef.current=!1}},S=C=>{!x.contains(C.relatedTarget)&&w()},N=()=>{x.contains(document.activeElement)||w()};return x.addEventListener("focusin",v),x.addEventListener("focusout",S),x.addEventListener("pointermove",v),x.addEventListener("pointerleave",N),window.addEventListener("blur",v),window.addEventListener("focus",w),()=>{x.removeEventListener("focusin",v),x.removeEventListener("focusout",S),x.removeEventListener("pointermove",v),x.removeEventListener("pointerleave",N),window.removeEventListener("blur",v),window.removeEventListener("focus",w)}}},[b,i.isClosePausedRef]);const h=g.useCallback(({tabbingDirection:x})=>{const v=l().map(w=>{const S=w.ref.current,N=[S,...ak(S)];return x==="forwards"?N:N.reverse()});return(x==="forwards"?v.reverse():v).flat()},[l]);return g.useEffect(()=>{const x=d.current;if(x){const y=v=>{var N,C,k;const w=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!w){const j=document.activeElement,A=v.shiftKey;if(v.target===x&&A){(N=u.current)==null||N.focus();return}const M=h({tabbingDirection:A?"backwards":"forwards"}),U=M.findIndex(T=>T===j);Jl(M.slice(U+1))?v.preventDefault():A?(C=u.current)==null||C.focus():(k=f.current)==null||k.focus()}};return x.addEventListener("keydown",y),()=>x.removeEventListener("keydown",y)}},[l,h]),a.jsxs(ON,{ref:c,role:"region","aria-label":o.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&a.jsx(vu,{ref:u,onFocusFromOutsideViewport:()=>{const x=h({tabbingDirection:"forwards"});Jl(x)}}),a.jsx(Fd.Slot,{scope:n,children:a.jsx(Q.ol,{tabIndex:-1,...s,ref:p})}),b&&a.jsx(vu,{ref:f,onFocusFromOutsideViewport:()=>{const x=h({tabbingDirection:"backwards"});Jl(x)}})]})});Mv.displayName=Iv;var Ov="ToastFocusProxy",vu=g.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=tl(Ov,n);return a.jsx(el,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const l=i.relatedTarget;!((u=s.viewport)!=null&&u.contains(l))&&r()}})});vu.displayName=Ov;var qs="Toast",YN="toast.swipeStart",XN="toast.swipeMove",qN="toast.swipeCancel",ZN="toast.swipeEnd",Lv=g.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[l,c]=cr({prop:r,defaultProp:o??!0,onChange:s,caller:qs});return a.jsx(Xs,{present:n||l,children:a.jsx(tk,{open:l,...i,ref:t,onClose:()=>c(!1),onPause:At(e.onPause),onResume:At(e.onResume),onSwipeStart:K(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:K(e.onSwipeMove,u=>{const{x:f,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:K(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:K(e.onSwipeEnd,u=>{const{x:f,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),c(!1)})})})});Lv.displayName=qs;var[JN,ek]=Tv(qs,{onClose(){}}),tk=g.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:i,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:f,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:m,...b}=e,h=tl(qs,n),[x,y]=g.useState(null),v=ae(t,T=>y(T)),w=g.useRef(null),S=g.useRef(null),N=o||h.duration,C=g.useRef(0),k=g.useRef(N),j=g.useRef(0),{onToastAdd:A,onToastRemove:P}=h,O=At(()=>{var z;(x==null?void 0:x.contains(document.activeElement))&&((z=h.viewport)==null||z.focus()),i()}),M=g.useCallback(T=>{!T||T===1/0||(window.clearTimeout(j.current),C.current=new Date().getTime(),j.current=window.setTimeout(O,T))},[O]);g.useEffect(()=>{const T=h.viewport;if(T){const z=()=>{M(k.current),u==null||u()},$=()=>{const B=new Date().getTime()-C.current;k.current=k.current-B,window.clearTimeout(j.current),c==null||c()};return T.addEventListener(hu,$),T.addEventListener(gu,z),()=>{T.removeEventListener(hu,$),T.removeEventListener(gu,z)}}},[h.viewport,N,c,u,M]),g.useEffect(()=>{s&&!h.isClosePausedRef.current&&M(N)},[s,N,h.isClosePausedRef,M]),g.useEffect(()=>(A(),()=>P()),[A,P]);const U=g.useMemo(()=>x?Uv(x):null,[x]);return h.viewport?a.jsxs(a.Fragment,{children:[U&&a.jsx(nk,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:U}),a.jsx(JN,{scope:n,onClose:O,children:Ur.createPortal(a.jsx(Fd.ItemSlot,{scope:n,children:a.jsx(MN,{asChild:!0,onEscapeKeyDown:K(l,()=>{h.isFocusedToastEscapeKeyDownRef.current||O(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:a.jsx(Q.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":h.swipeDirection,...b,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:K(e.onKeyDown,T=>{T.key==="Escape"&&(l==null||l(T.nativeEvent),T.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:K(e.onPointerDown,T=>{T.button===0&&(w.current={x:T.clientX,y:T.clientY})}),onPointerMove:K(e.onPointerMove,T=>{if(!w.current)return;const z=T.clientX-w.current.x,$=T.clientY-w.current.y,B=!!S.current,E=["left","right"].includes(h.swipeDirection),_=["left","up"].includes(h.swipeDirection)?Math.min:Math.max,L=E?_(0,z):0,G=E?0:_(0,$),H=T.pointerType==="touch"?10:2,Y={x:L,y:G},X={originalEvent:T,delta:Y};B?(S.current=Y,Ci(XN,d,X,{discrete:!1})):Jm(Y,h.swipeDirection,H)?(S.current=Y,Ci(YN,f,X,{discrete:!1}),T.target.setPointerCapture(T.pointerId)):(Math.abs(z)>H||Math.abs($)>H)&&(w.current=null)}),onPointerUp:K(e.onPointerUp,T=>{const z=S.current,$=T.target;if($.hasPointerCapture(T.pointerId)&&$.releasePointerCapture(T.pointerId),S.current=null,w.current=null,z){const B=T.currentTarget,E={originalEvent:T,delta:z};Jm(z,h.swipeDirection,h.swipeThreshold)?Ci(ZN,m,E,{discrete:!0}):Ci(qN,p,E,{discrete:!0}),B.addEventListener("click",_=>_.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),nk=e=>{const{__scopeToast:t,children:n,...r}=e,o=tl(qs,t),[s,i]=g.useState(!1),[l,c]=g.useState(!1);return sk(()=>i(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:a.jsx(Dd,{asChild:!0,children:a.jsx(el,{...r,children:s&&a.jsxs(a.Fragment,{children:[o.label," ",n]})})})},rk="ToastTitle",Dv=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return a.jsx(Q.div,{...r,ref:t})});Dv.displayName=rk;var ok="ToastDescription",$v=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return a.jsx(Q.div,{...r,ref:t})});$v.displayName=ok;var Fv="ToastAction",zv=g.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?a.jsx(Vv,{altText:n,asChild:!0,children:a.jsx(zd,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Fv}\`. Expected non-empty \`string\`.`),null)});zv.displayName=Fv;var Bv="ToastClose",zd=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=ek(Bv,n);return a.jsx(Vv,{asChild:!0,children:a.jsx(Q.button,{type:"button",...r,ref:t,onClick:K(e.onClick,o.onClose)})})});zd.displayName=Bv;var Vv=g.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return a.jsx(Q.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Uv(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),ik(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Uv(r))}}),t}function Ci(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ev(o,s):o.dispatchEvent(s)}var Jm=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function sk(e=()=>{}){const t=At(e);Ve(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function ik(e){return e.nodeType===e.ELEMENT_NODE}function ak(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Jl(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var lk=Av,Hv=Mv,Wv=Lv,Gv=Dv,Kv=$v,Qv=zv,Yv=zd;function Xv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Xv(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function qv(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Xv(e))&&(r&&(r+=" "),r+=t);return r}const ep=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,tp=qv,nl=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return tp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const f=n==null?void 0:n[u],d=s==null?void 0:s[u];if(f===null)return null;const p=ep(f)||ep(d);return o[u][p]}),l=n&&Object.entries(n).reduce((u,f)=>{let[d,p]=f;return p===void 0||(u[d]=p),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:d,className:p,...m}=f;return Object.entries(m).every(b=>{let[h,x]=b;return Array.isArray(x)?x.includes({...s,...l}[h]):{...s,...l}[h]===x})?[...u,d,p]:u},[]);return tp(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)};/**
|
|
69
|
-
* @license lucide-react v0.462.0 - ISC
|
|
70
|
-
*
|
|
71
|
-
* This source code is licensed under the ISC license.
|
|
72
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
-
*/const ck=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Zv=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
74
|
-
* @license lucide-react v0.462.0 - ISC
|
|
75
|
-
*
|
|
76
|
-
* This source code is licensed under the ISC license.
|
|
77
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
-
*/var uk={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"};/**
|
|
79
|
-
* @license lucide-react v0.462.0 - ISC
|
|
80
|
-
*
|
|
81
|
-
* This source code is licensed under the ISC license.
|
|
82
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
-
*/const dk=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...l},c)=>g.createElement("svg",{ref:c,...uk,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Zv("lucide",o),...l},[...i.map(([u,f])=>g.createElement(u,f)),...Array.isArray(s)?s:[s]]));/**
|
|
84
|
-
* @license lucide-react v0.462.0 - ISC
|
|
85
|
-
*
|
|
86
|
-
* This source code is licensed under the ISC license.
|
|
87
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
-
*/const le=(e,t)=>{const n=g.forwardRef(({className:r,...o},s)=>g.createElement(dk,{ref:s,iconNode:t,className:Zv(`lucide-${ck(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
89
|
-
* @license lucide-react v0.462.0 - ISC
|
|
90
|
-
*
|
|
91
|
-
* This source code is licensed under the ISC license.
|
|
92
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
-
*/const fk=le("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"}]]);/**
|
|
94
|
-
* @license lucide-react v0.462.0 - ISC
|
|
95
|
-
*
|
|
96
|
-
* This source code is licensed under the ISC license.
|
|
97
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
-
*/const mk=le("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
99
|
-
* @license lucide-react v0.462.0 - ISC
|
|
100
|
-
*
|
|
101
|
-
* This source code is licensed under the ISC license.
|
|
102
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
-
*/const pk=le("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
104
|
-
* @license lucide-react v0.462.0 - ISC
|
|
105
|
-
*
|
|
106
|
-
* This source code is licensed under the ISC license.
|
|
107
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
-
*/const hk=le("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
109
|
-
* @license lucide-react v0.462.0 - ISC
|
|
110
|
-
*
|
|
111
|
-
* This source code is licensed under the ISC license.
|
|
112
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
-
*/const Bd=le("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
114
|
-
* @license lucide-react v0.462.0 - ISC
|
|
115
|
-
*
|
|
116
|
-
* This source code is licensed under the ISC license.
|
|
117
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
-
*/const Zs=le("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
119
|
-
* @license lucide-react v0.462.0 - ISC
|
|
120
|
-
*
|
|
121
|
-
* This source code is licensed under the ISC license.
|
|
122
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
-
*/const gk=le("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
124
|
-
* @license lucide-react v0.462.0 - ISC
|
|
125
|
-
*
|
|
126
|
-
* This source code is licensed under the ISC license.
|
|
127
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
-
*/const vk=le("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
129
|
-
* @license lucide-react v0.462.0 - ISC
|
|
130
|
-
*
|
|
131
|
-
* This source code is licensed under the ISC license.
|
|
132
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
-
*/const Vd=le("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
134
|
-
* @license lucide-react v0.462.0 - ISC
|
|
135
|
-
*
|
|
136
|
-
* This source code is licensed under the ISC license.
|
|
137
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
-
*/const Jv=le("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"}]]);/**
|
|
139
|
-
* @license lucide-react v0.462.0 - ISC
|
|
140
|
-
*
|
|
141
|
-
* This source code is licensed under the ISC license.
|
|
142
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
-
*/const yk=le("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"}]]);/**
|
|
144
|
-
* @license lucide-react v0.462.0 - ISC
|
|
145
|
-
*
|
|
146
|
-
* This source code is licensed under the ISC license.
|
|
147
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
-
*/const np=le("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
149
|
-
* @license lucide-react v0.462.0 - ISC
|
|
150
|
-
*
|
|
151
|
-
* This source code is licensed under the ISC license.
|
|
152
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
-
*/const xk=le("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
154
|
-
* @license lucide-react v0.462.0 - ISC
|
|
155
|
-
*
|
|
156
|
-
* This source code is licensed under the ISC license.
|
|
157
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
-
*/const ey=le("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"}]]);/**
|
|
159
|
-
* @license lucide-react v0.462.0 - ISC
|
|
160
|
-
*
|
|
161
|
-
* This source code is licensed under the ISC license.
|
|
162
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
-
*/const yu=le("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
164
|
-
* @license lucide-react v0.462.0 - ISC
|
|
165
|
-
*
|
|
166
|
-
* This source code is licensed under the ISC license.
|
|
167
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
168
|
-
*/const wk=le("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);/**
|
|
169
|
-
* @license lucide-react v0.462.0 - ISC
|
|
170
|
-
*
|
|
171
|
-
* This source code is licensed under the ISC license.
|
|
172
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
-
*/const Ud=le("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"}]]);/**
|
|
174
|
-
* @license lucide-react v0.462.0 - ISC
|
|
175
|
-
*
|
|
176
|
-
* This source code is licensed under the ISC license.
|
|
177
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
-
*/const bk=le("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"}]]);/**
|
|
179
|
-
* @license lucide-react v0.462.0 - ISC
|
|
180
|
-
*
|
|
181
|
-
* This source code is licensed under the ISC license.
|
|
182
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
183
|
-
*/const Sk=le("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
|
|
184
|
-
* @license lucide-react v0.462.0 - ISC
|
|
185
|
-
*
|
|
186
|
-
* This source code is licensed under the ISC license.
|
|
187
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
-
*/const Nk=le("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
189
|
-
* @license lucide-react v0.462.0 - ISC
|
|
190
|
-
*
|
|
191
|
-
* This source code is licensed under the ISC license.
|
|
192
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
193
|
-
*/const kk=le("OctagonX",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
194
|
-
* @license lucide-react v0.462.0 - ISC
|
|
195
|
-
*
|
|
196
|
-
* This source code is licensed under the ISC license.
|
|
197
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
198
|
-
*/const Ck=le("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
199
|
-
* @license lucide-react v0.462.0 - ISC
|
|
200
|
-
*
|
|
201
|
-
* This source code is licensed under the ISC license.
|
|
202
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
203
|
-
*/const Wi=le("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
204
|
-
* @license lucide-react v0.462.0 - ISC
|
|
205
|
-
*
|
|
206
|
-
* This source code is licensed under the ISC license.
|
|
207
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
208
|
-
*/const ty=le("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/**
|
|
209
|
-
* @license lucide-react v0.462.0 - ISC
|
|
210
|
-
*
|
|
211
|
-
* This source code is licensed under the ISC license.
|
|
212
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
213
|
-
*/const Ek=le("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/**
|
|
214
|
-
* @license lucide-react v0.462.0 - ISC
|
|
215
|
-
*
|
|
216
|
-
* This source code is licensed under the ISC license.
|
|
217
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
218
|
-
*/const jk=le("ShieldAlert",[["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:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
|
|
219
|
-
* @license lucide-react v0.462.0 - ISC
|
|
220
|
-
*
|
|
221
|
-
* This source code is licensed under the ISC license.
|
|
222
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
223
|
-
*/const Gi=le("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"}]]);/**
|
|
224
|
-
* @license lucide-react v0.462.0 - ISC
|
|
225
|
-
*
|
|
226
|
-
* This source code is licensed under the ISC license.
|
|
227
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
228
|
-
*/const rp=le("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"}]]);/**
|
|
229
|
-
* @license lucide-react v0.462.0 - ISC
|
|
230
|
-
*
|
|
231
|
-
* This source code is licensed under the ISC license.
|
|
232
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
233
|
-
*/const _k=le("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"}]]);/**
|
|
234
|
-
* @license lucide-react v0.462.0 - ISC
|
|
235
|
-
*
|
|
236
|
-
* This source code is licensed under the ISC license.
|
|
237
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
238
|
-
*/const Rk=le("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"}]]);/**
|
|
239
|
-
* @license lucide-react v0.462.0 - ISC
|
|
240
|
-
*
|
|
241
|
-
* This source code is licensed under the ISC license.
|
|
242
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
243
|
-
*/const ws=le("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
244
|
-
* @license lucide-react v0.462.0 - ISC
|
|
245
|
-
*
|
|
246
|
-
* This source code is licensed under the ISC license.
|
|
247
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
248
|
-
*/const ec=le("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"}]]),Hd="-",Pk=e=>{const t=Ak(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const l=i.split(Hd);return l[0]===""&&l.length!==1&&l.shift(),ny(l,t)||Tk(i)},getConflictingClassGroupIds:(i,l)=>{const c=n[i]||[];return l&&r[i]?[...c,...r[i]]:c}}},ny=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ny(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Hd);return(i=t.validators.find(({validator:l})=>l(s)))==null?void 0:i.classGroupId},op=/^\[(.+)\]$/,Tk=e=>{if(op.test(e)){const t=op.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Ak=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Mk(Object.entries(e.classGroups),n).forEach(([s,i])=>{xu(i,r,s,t)}),r},xu=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:sp(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Ik(o)){xu(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{xu(i,sp(t,s),n,r)})})},sp=(e,t)=>{let n=e;return t.split(Hd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Ik=e=>e.isThemeGetter,Mk=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,l])=>[t+i,l])):s);return[n,o]}):e,Ok=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},ry="!",Lk=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,i=l=>{const c=[];let u=0,f=0,d;for(let x=0;x<l.length;x++){let y=l[x];if(u===0){if(y===o&&(r||l.slice(x,x+s)===t)){c.push(l.slice(f,x)),f=x+s;continue}if(y==="/"){d=x;continue}}y==="["?u++:y==="]"&&u--}const p=c.length===0?l:l.substring(f),m=p.startsWith(ry),b=m?p.substring(1):p,h=d&&d>f?d-f:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:h}};return n?l=>n({className:l,parseClassName:i}):i},Dk=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},$k=e=>({cache:Ok(e.cacheSize),parseClassName:Lk(e),...Pk(e)}),Fk=/\s+/,zk=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],i=e.trim().split(Fk);let l="";for(let c=i.length-1;c>=0;c-=1){const u=i[c],{modifiers:f,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:m}=n(u);let b=!!m,h=r(b?p.substring(0,m):p);if(!h){if(!b){l=u+(l.length>0?" "+l:l);continue}if(h=r(p),!h){l=u+(l.length>0?" "+l:l);continue}b=!1}const x=Dk(f).join(":"),y=d?x+ry:x,v=y+h;if(s.includes(v))continue;s.push(v);const w=o(h,b);for(let S=0;S<w.length;++S){const N=w[S];s.push(y+N)}l=u+(l.length>0?" "+l:l)}return l};function Bk(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=oy(t))&&(r&&(r+=" "),r+=n);return r}const oy=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=oy(e[r]))&&(n&&(n+=" "),n+=t);return n};function Vk(e,...t){let n,r,o,s=i;function i(c){const u=t.reduce((f,d)=>d(f),e());return n=$k(u),r=n.cache.get,o=n.cache.set,s=l,l(c)}function l(c){const u=r(c);if(u)return u;const f=zk(c,n);return o(c,f),f}return function(){return s(Bk.apply(null,arguments))}}const ye=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},sy=/^\[(?:([a-z-]+):)?(.+)\]$/i,Uk=/^\d+\/\d+$/,Hk=new Set(["px","full","screen"]),Wk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Gk=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Kk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Qk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Yk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yn=e=>vo(e)||Hk.has(e)||Uk.test(e),Dn=e=>Vo(e,"length",rC),vo=e=>!!e&&!Number.isNaN(Number(e)),tc=e=>Vo(e,"number",vo),ns=e=>!!e&&Number.isInteger(Number(e)),Xk=e=>e.endsWith("%")&&vo(e.slice(0,-1)),ee=e=>sy.test(e),$n=e=>Wk.test(e),qk=new Set(["length","size","percentage"]),Zk=e=>Vo(e,qk,iy),Jk=e=>Vo(e,"position",iy),eC=new Set(["image","url"]),tC=e=>Vo(e,eC,sC),nC=e=>Vo(e,"",oC),rs=()=>!0,Vo=(e,t,n)=>{const r=sy.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},rC=e=>Gk.test(e)&&!Kk.test(e),iy=()=>!1,oC=e=>Qk.test(e),sC=e=>Yk.test(e),iC=()=>{const e=ye("colors"),t=ye("spacing"),n=ye("blur"),r=ye("brightness"),o=ye("borderColor"),s=ye("borderRadius"),i=ye("borderSpacing"),l=ye("borderWidth"),c=ye("contrast"),u=ye("grayscale"),f=ye("hueRotate"),d=ye("invert"),p=ye("gap"),m=ye("gradientColorStops"),b=ye("gradientColorStopPositions"),h=ye("inset"),x=ye("margin"),y=ye("opacity"),v=ye("padding"),w=ye("saturate"),S=ye("scale"),N=ye("sepia"),C=ye("skew"),k=ye("space"),j=ye("translate"),A=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",ee,t],M=()=>[ee,t],U=()=>["",yn,Dn],T=()=>["auto",vo,ee],z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],E=()=>["start","end","center","between","around","evenly","stretch"],_=()=>["","0",ee],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>[vo,ee];return{cacheSize:500,separator:":",theme:{colors:[rs],spacing:[yn,Dn],blur:["none","",$n,ee],brightness:G(),borderColor:[e],borderRadius:["none","","full",$n,ee],borderSpacing:M(),borderWidth:U(),contrast:G(),grayscale:_(),hueRotate:G(),invert:_(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[Xk,Dn],inset:O(),margin:O(),opacity:G(),padding:M(),saturate:G(),scale:G(),sepia:_(),skew:G(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",ee]}],container:["container"],columns:[{columns:[$n]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...z(),ee]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ns,ee]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ee]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",ns,ee]}],"grid-cols":[{"grid-cols":[rs]}],"col-start-end":[{col:["auto",{span:["full",ns,ee]},ee]}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":[rs]}],"row-start-end":[{row:["auto",{span:[ns,ee]},ee]}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ee]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ee]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...E()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...E(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...E(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ee,t]}],"min-w":[{"min-w":[ee,t,"min","max","fit"]}],"max-w":[{"max-w":[ee,t,"none","full","min","max","fit","prose",{screen:[$n]},$n]}],h:[{h:[ee,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ee,t,"auto","min","max","fit"]}],"font-size":[{text:["base",$n,Dn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",tc]}],"font-family":[{font:[rs]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ee]}],"line-clamp":[{"line-clamp":["none",vo,tc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",yn,ee]}],"list-image":[{"list-image":["none",ee]}],"list-style-type":[{list:["none","disc","decimal",ee]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",yn,Dn]}],"underline-offset":[{"underline-offset":["auto",yn,ee]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...z(),Jk]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Zk]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},tC]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:$()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[yn,ee]}],"outline-w":[{outline:[yn,Dn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[yn,Dn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",$n,nC]}],"shadow-color":[{shadow:[rs]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",$n,ee]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ee]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",ee]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",ee]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[ns,ee]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ee]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ee]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[yn,Dn,tc]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},aC=Vk(iC);function W(...e){return aC(qv(e))}const lC=lk,ay=g.forwardRef(({className:e,...t},n)=>a.jsx(Hv,{ref:n,className:W("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));ay.displayName=Hv.displayName;const cC=nl("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),ly=g.forwardRef(({className:e,variant:t,...n},r)=>a.jsx(Wv,{ref:r,className:W(cC({variant:t}),e),...n}));ly.displayName=Wv.displayName;const uC=g.forwardRef(({className:e,...t},n)=>a.jsx(Qv,{ref:n,className:W("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));uC.displayName=Qv.displayName;const cy=g.forwardRef(({className:e,...t},n)=>a.jsx(Yv,{ref:n,className:W("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:a.jsx(ws,{className:"h-4 w-4"})}));cy.displayName=Yv.displayName;const uy=g.forwardRef(({className:e,...t},n)=>a.jsx(Gv,{ref:n,className:W("text-sm font-semibold",e),...t}));uy.displayName=Gv.displayName;const dy=g.forwardRef(({className:e,...t},n)=>a.jsx(Kv,{ref:n,className:W("text-sm opacity-90",e),...t}));dy.displayName=Kv.displayName;function dC(){const{toasts:e}=yN();return a.jsxs(lC,{children:[e.map(function({id:t,title:n,description:r,action:o,...s}){return a.jsxs(ly,{...s,children:[a.jsxs("div",{className:"grid gap-1",children:[n&&a.jsx(uy,{children:n}),r&&a.jsx(dy,{children:r})]}),o,a.jsx(cy,{})]},t)}),a.jsx(ay,{})]})}var fC=Uu[" useId ".trim().toString()]||(()=>{}),mC=0;function Uo(e){const[t,n]=g.useState(fC());return Ve(()=>{n(r=>r??String(mC++))},[e]),t?`radix-${t}`:""}const pC=["top","right","bottom","left"],ur=Math.min,ht=Math.max,Na=Math.round,Ei=Math.floor,fn=e=>({x:e,y:e}),hC={left:"right",right:"left",bottom:"top",top:"bottom"},gC={start:"end",end:"start"};function wu(e,t,n){return ht(e,ur(t,n))}function Pn(e,t){return typeof e=="function"?e(t):e}function Tn(e){return e.split("-")[0]}function Ho(e){return e.split("-")[1]}function Wd(e){return e==="x"?"y":"x"}function Gd(e){return e==="y"?"height":"width"}const vC=new Set(["top","bottom"]);function cn(e){return vC.has(Tn(e))?"y":"x"}function Kd(e){return Wd(cn(e))}function yC(e,t,n){n===void 0&&(n=!1);const r=Ho(e),o=Kd(e),s=Gd(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=ka(i)),[i,ka(i)]}function xC(e){const t=ka(e);return[bu(e),t,bu(t)]}function bu(e){return e.replace(/start|end/g,t=>gC[t])}const ip=["left","right"],ap=["right","left"],wC=["top","bottom"],bC=["bottom","top"];function SC(e,t,n){switch(e){case"top":case"bottom":return n?t?ap:ip:t?ip:ap;case"left":case"right":return t?wC:bC;default:return[]}}function NC(e,t,n,r){const o=Ho(e);let s=SC(Tn(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(bu)))),s}function ka(e){return e.replace(/left|right|bottom|top/g,t=>hC[t])}function kC(e){return{top:0,right:0,bottom:0,left:0,...e}}function fy(e){return typeof e!="number"?kC(e):{top:e,right:e,bottom:e,left:e}}function Ca(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function lp(e,t,n){let{reference:r,floating:o}=e;const s=cn(t),i=Kd(t),l=Gd(i),c=Tn(t),u=s==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[l]/2-o[l]/2;let m;switch(c){case"top":m={x:f,y:r.y-o.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(Ho(t)){case"start":m[i]-=p*(n&&u?-1:1);break;case"end":m[i]+=p*(n&&u?-1:1);break}return m}const CC=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,l=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=lp(u,r,c),p=r,m={},b=0;for(let h=0;h<l.length;h++){const{name:x,fn:y}=l[h],{x:v,y:w,data:S,reset:N}=await y({x:f,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});f=v??f,d=w??d,m={...m,[x]:{...m[x],...S}},N&&b<=50&&(b++,typeof N=="object"&&(N.placement&&(p=N.placement),N.rects&&(u=N.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):N.rects),{x:f,y:d}=lp(u,p,c)),h=-1)}return{x:f,y:d,placement:p,strategy:o,middlewareData:m}};async function Bs(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:m=0}=Pn(t,e),b=fy(m),x=l[p?d==="floating"?"reference":"floating":d],y=Ca(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:c})),v=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},N=Ca(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:w,strategy:c}):v);return{top:(y.top-N.top+b.top)/S.y,bottom:(N.bottom-y.bottom+b.bottom)/S.y,left:(y.left-N.left+b.left)/S.x,right:(N.right-y.right+b.right)/S.x}}const EC=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:l,middlewareData:c}=t,{element:u,padding:f=0}=Pn(e,t)||{};if(u==null)return{};const d=fy(f),p={x:n,y:r},m=Kd(o),b=Gd(m),h=await i.getDimensions(u),x=m==="y",y=x?"top":"left",v=x?"bottom":"right",w=x?"clientHeight":"clientWidth",S=s.reference[b]+s.reference[m]-p[m]-s.floating[b],N=p[m]-s.reference[m],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let k=C?C[w]:0;(!k||!await(i.isElement==null?void 0:i.isElement(C)))&&(k=l.floating[w]||s.floating[b]);const j=S/2-N/2,A=k/2-h[b]/2-1,P=ur(d[y],A),O=ur(d[v],A),M=P,U=k-h[b]-O,T=k/2-h[b]/2+j,z=wu(M,T,U),$=!c.arrow&&Ho(o)!=null&&T!==z&&s.reference[b]/2-(T<M?P:O)-h[b]/2<0,B=$?T<M?T-M:T-U:0;return{[m]:p[m]+B,data:{[m]:z,centerOffset:T-z-B,...$&&{alignmentOffset:B}},reset:$}}}),jC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:h=!0,...x}=Pn(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Tn(o),v=cn(l),w=Tn(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),N=p||(w||!h?[ka(l)]:xC(l)),C=b!=="none";!p&&C&&N.push(...NC(l,h,b,S));const k=[l,...N],j=await Bs(t,x),A=[];let P=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&A.push(j[y]),d){const T=yC(o,i,S);A.push(j[T[0]],j[T[1]])}if(P=[...P,{placement:o,overflows:A}],!A.every(T=>T<=0)){var O,M;const T=(((O=s.flip)==null?void 0:O.index)||0)+1,z=k[T];if(z&&(!(d==="alignment"?v!==cn(z):!1)||P.every(E=>E.overflows[0]>0&&cn(E.placement)===v)))return{data:{index:T,overflows:P},reset:{placement:z}};let $=(M=P.filter(B=>B.overflows[0]<=0).sort((B,E)=>B.overflows[1]-E.overflows[1])[0])==null?void 0:M.placement;if(!$)switch(m){case"bestFit":{var U;const B=(U=P.filter(E=>{if(C){const _=cn(E.placement);return _===v||_==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(_=>_>0).reduce((_,L)=>_+L,0)]).sort((E,_)=>E[1]-_[1])[0])==null?void 0:U[0];B&&($=B);break}case"initialPlacement":$=l;break}if(o!==$)return{reset:{placement:$}}}return{}}}};function cp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function up(e){return pC.some(t=>e[t]>=0)}const _C=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Pn(e,t);switch(r){case"referenceHidden":{const s=await Bs(t,{...o,elementContext:"reference"}),i=cp(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:up(i)}}}case"escaped":{const s=await Bs(t,{...o,altBoundary:!0}),i=cp(s,n.floating);return{data:{escapedOffsets:i,escaped:up(i)}}}default:return{}}}}},my=new Set(["left","top"]);async function RC(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Tn(n),l=Ho(n),c=cn(n)==="y",u=my.has(i)?-1:1,f=s&&c?-1:1,d=Pn(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof b=="number"&&(m=l==="end"?b*-1:b),c?{x:m*f,y:p*u}:{x:p*u,y:m*f}}const PC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:l}=t,c=await RC(t,e);return i===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},TC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:x=>{let{x:y,y:v}=x;return{x:y,y:v}}},...c}=Pn(e,t),u={x:n,y:r},f=await Bs(t,c),d=cn(Tn(o)),p=Wd(d);let m=u[p],b=u[d];if(s){const x=p==="y"?"top":"left",y=p==="y"?"bottom":"right",v=m+f[x],w=m-f[y];m=wu(v,m,w)}if(i){const x=d==="y"?"top":"left",y=d==="y"?"bottom":"right",v=b+f[x],w=b-f[y];b=wu(v,b,w)}const h=l.fn({...t,[p]:m,[d]:b});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:s,[d]:i}}}}}},AC=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Pn(e,t),f={x:n,y:r},d=cn(o),p=Wd(d);let m=f[p],b=f[d];const h=Pn(l,t),x=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const w=p==="y"?"height":"width",S=s.reference[p]-s.floating[w]+x.mainAxis,N=s.reference[p]+s.reference[w]-x.mainAxis;m<S?m=S:m>N&&(m=N)}if(u){var y,v;const w=p==="y"?"width":"height",S=my.has(Tn(o)),N=s.reference[d]-s.floating[w]+(S&&((y=i.offset)==null?void 0:y[d])||0)+(S?0:x.crossAxis),C=s.reference[d]+s.reference[w]+(S?0:((v=i.offset)==null?void 0:v[d])||0)-(S?x.crossAxis:0);b<N?b=N:b>C&&(b=C)}return{[p]:m,[d]:b}}}},IC=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:l}=t,{apply:c=()=>{},...u}=Pn(e,t),f=await Bs(t,u),d=Tn(o),p=Ho(o),m=cn(o)==="y",{width:b,height:h}=s.floating;let x,y;d==="top"||d==="bottom"?(x=d,y=p===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(y=d,x=p==="end"?"top":"bottom");const v=h-f.top-f.bottom,w=b-f.left-f.right,S=ur(h-f[x],v),N=ur(b-f[y],w),C=!t.middlewareData.shift;let k=S,j=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=v),C&&!p){const P=ht(f.left,0),O=ht(f.right,0),M=ht(f.top,0),U=ht(f.bottom,0);m?j=b-2*(P!==0||O!==0?P+O:ht(f.left,f.right)):k=h-2*(M!==0||U!==0?M+U:ht(f.top,f.bottom))}await c({...t,availableWidth:j,availableHeight:k});const A=await i.getDimensions(l.floating);return b!==A.width||h!==A.height?{reset:{rects:!0}}:{}}}};function rl(){return typeof window<"u"}function Wo(e){return py(e)?(e.nodeName||"").toLowerCase():"#document"}function xt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pn(e){var t;return(t=(py(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function py(e){return rl()?e instanceof Node||e instanceof xt(e).Node:!1}function Yt(e){return rl()?e instanceof Element||e instanceof xt(e).Element:!1}function mn(e){return rl()?e instanceof HTMLElement||e instanceof xt(e).HTMLElement:!1}function dp(e){return!rl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xt(e).ShadowRoot}const MC=new Set(["inline","contents"]);function Js(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Xt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!MC.has(o)}const OC=new Set(["table","td","th"]);function LC(e){return OC.has(Wo(e))}const DC=[":popover-open",":modal"];function ol(e){return DC.some(t=>{try{return e.matches(t)}catch{return!1}})}const $C=["transform","translate","scale","rotate","perspective"],FC=["transform","translate","scale","rotate","perspective","filter"],zC=["paint","layout","strict","content"];function Qd(e){const t=Yd(),n=Yt(e)?Xt(e):e;return $C.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||FC.some(r=>(n.willChange||"").includes(r))||zC.some(r=>(n.contain||"").includes(r))}function BC(e){let t=dr(e);for(;mn(t)&&!Do(t);){if(Qd(t))return t;if(ol(t))return null;t=dr(t)}return null}function Yd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const VC=new Set(["html","body","#document"]);function Do(e){return VC.has(Wo(e))}function Xt(e){return xt(e).getComputedStyle(e)}function sl(e){return Yt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function dr(e){if(Wo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||dp(e)&&e.host||pn(e);return dp(t)?t.host:t}function hy(e){const t=dr(e);return Do(t)?e.ownerDocument?e.ownerDocument.body:e.body:mn(t)&&Js(t)?t:hy(t)}function Vs(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=hy(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=xt(o);if(s){const l=Su(i);return t.concat(i,i.visualViewport||[],Js(o)?o:[],l&&n?Vs(l):[])}return t.concat(o,Vs(o,[],n))}function Su(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gy(e){const t=Xt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=mn(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=Na(n)!==s||Na(r)!==i;return l&&(n=s,r=i),{width:n,height:r,$:l}}function Xd(e){return Yt(e)?e:e.contextElement}function yo(e){const t=Xd(e);if(!mn(t))return fn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=gy(t);let i=(s?Na(n.width):n.width)/r,l=(s?Na(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const UC=fn(0);function vy(e){const t=xt(e);return!Yd()||!t.visualViewport?UC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function HC(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==xt(e)?!1:t}function Dr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Xd(e);let i=fn(1);t&&(r?Yt(r)&&(i=yo(r)):i=yo(e));const l=HC(s,n,r)?vy(s):fn(0);let c=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,f=o.width/i.x,d=o.height/i.y;if(s){const p=xt(s),m=r&&Yt(r)?xt(r):r;let b=p,h=Su(b);for(;h&&r&&m!==b;){const x=yo(h),y=h.getBoundingClientRect(),v=Xt(h),w=y.left+(h.clientLeft+parseFloat(v.paddingLeft))*x.x,S=y.top+(h.clientTop+parseFloat(v.paddingTop))*x.y;c*=x.x,u*=x.y,f*=x.x,d*=x.y,c+=w,u+=S,b=xt(h),h=Su(b)}}return Ca({width:f,height:d,x:c,y:u})}function qd(e,t){const n=sl(e).scrollLeft;return t?t.left+n:Dr(pn(e)).left+n}function yy(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:qd(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function WC(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=pn(r),l=t?ol(t.floating):!1;if(r===i||l&&s)return n;let c={scrollLeft:0,scrollTop:0},u=fn(1);const f=fn(0),d=mn(r);if((d||!d&&!s)&&((Wo(r)!=="body"||Js(i))&&(c=sl(r)),mn(r))){const m=Dr(r);u=yo(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const p=i&&!d&&!s?yy(i,c,!0):fn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+p.x,y:n.y*u.y-c.scrollTop*u.y+f.y+p.y}}function GC(e){return Array.from(e.getClientRects())}function KC(e){const t=pn(e),n=sl(e),r=e.ownerDocument.body,o=ht(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=ht(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+qd(e);const l=-n.scrollTop;return Xt(r).direction==="rtl"&&(i+=ht(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:l}}function QC(e,t){const n=xt(e),r=pn(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,l=0,c=0;if(o){s=o.width,i=o.height;const u=Yd();(!u||u&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:l,y:c}}const YC=new Set(["absolute","fixed"]);function XC(e,t){const n=Dr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=mn(e)?yo(e):fn(1),i=e.clientWidth*s.x,l=e.clientHeight*s.y,c=o*s.x,u=r*s.y;return{width:i,height:l,x:c,y:u}}function fp(e,t,n){let r;if(t==="viewport")r=QC(e,n);else if(t==="document")r=KC(pn(e));else if(Yt(t))r=XC(t,n);else{const o=vy(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ca(r)}function xy(e,t){const n=dr(e);return n===t||!Yt(n)||Do(n)?!1:Xt(n).position==="fixed"||xy(n,t)}function qC(e,t){const n=t.get(e);if(n)return n;let r=Vs(e,[],!1).filter(l=>Yt(l)&&Wo(l)!=="body"),o=null;const s=Xt(e).position==="fixed";let i=s?dr(e):e;for(;Yt(i)&&!Do(i);){const l=Xt(i),c=Qd(i);!c&&l.position==="fixed"&&(o=null),(s?!c&&!o:!c&&l.position==="static"&&!!o&&YC.has(o.position)||Js(i)&&!c&&xy(e,i))?r=r.filter(f=>f!==i):o=l,i=dr(i)}return t.set(e,r),r}function ZC(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?ol(t)?[]:qC(t,this._c):[].concat(n),r],l=i[0],c=i.reduce((u,f)=>{const d=fp(t,f,o);return u.top=ht(d.top,u.top),u.right=ur(d.right,u.right),u.bottom=ur(d.bottom,u.bottom),u.left=ht(d.left,u.left),u},fp(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function JC(e){const{width:t,height:n}=gy(e);return{width:t,height:n}}function eE(e,t,n){const r=mn(t),o=pn(t),s=n==="fixed",i=Dr(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const c=fn(0);function u(){c.x=qd(o)}if(r||!r&&!s)if((Wo(t)!=="body"||Js(o))&&(l=sl(t)),r){const m=Dr(t,!0,s,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else o&&u();s&&!r&&o&&u();const f=o&&!r&&!s?yy(o,l):fn(0),d=i.left+l.scrollLeft-c.x-f.x,p=i.top+l.scrollTop-c.y-f.y;return{x:d,y:p,width:i.width,height:i.height}}function nc(e){return Xt(e).position==="static"}function mp(e,t){if(!mn(e)||Xt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return pn(e)===n&&(n=n.ownerDocument.body),n}function wy(e,t){const n=xt(e);if(ol(e))return n;if(!mn(e)){let o=dr(e);for(;o&&!Do(o);){if(Yt(o)&&!nc(o))return o;o=dr(o)}return n}let r=mp(e,t);for(;r&&LC(r)&&nc(r);)r=mp(r,t);return r&&Do(r)&&nc(r)&&!Qd(r)?n:r||BC(e)||n}const tE=async function(e){const t=this.getOffsetParent||wy,n=this.getDimensions,r=await n(e.floating);return{reference:eE(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function nE(e){return Xt(e).direction==="rtl"}const rE={convertOffsetParentRelativeRectToViewportRelativeRect:WC,getDocumentElement:pn,getClippingRect:ZC,getOffsetParent:wy,getElementRects:tE,getClientRects:GC,getDimensions:JC,getScale:yo,isElement:Yt,isRTL:nE};function by(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function oE(e,t){let n=null,r;const o=pn(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:f,top:d,width:p,height:m}=u;if(l||t(),!p||!m)return;const b=Ei(d),h=Ei(o.clientWidth-(f+p)),x=Ei(o.clientHeight-(d+m)),y=Ei(f),w={rootMargin:-b+"px "+-h+"px "+-x+"px "+-y+"px",threshold:ht(0,ur(1,c))||1};let S=!0;function N(C){const k=C[0].intersectionRatio;if(k!==c){if(!S)return i();k?i(!1,k):r=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!by(u,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(N,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(N,w)}n.observe(e)}return i(!0),s}function sE(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Xd(e),f=o||s?[...u?Vs(u):[],...Vs(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const d=u&&l?oE(u,n):null;let p=-1,m=null;i&&(m=new ResizeObserver(y=>{let[v]=y;v&&v.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let b,h=c?Dr(e):null;c&&x();function x(){const y=Dr(e);h&&!by(h,y)&&n(),h=y,b=requestAnimationFrame(x)}return n(),()=>{var y;f.forEach(v=>{o&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),d==null||d(),(y=m)==null||y.disconnect(),m=null,c&&cancelAnimationFrame(b)}}const iE=PC,aE=TC,lE=jC,cE=IC,uE=_C,pp=EC,dE=AC,fE=(e,t,n)=>{const r=new Map,o={platform:rE,...n},s={...o.platform,_c:r};return CC(e,t,{...o,platform:s})};var mE=typeof document<"u",pE=function(){},Ki=mE?g.useLayoutEffect:pE;function Ea(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ea(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Ea(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Sy(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hp(e,t){const n=Sy(e);return Math.round(t*n)/n}function rc(e){const t=g.useRef(e);return Ki(()=>{t.current=e}),t}function hE(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[f,d]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=g.useState(r);Ea(p,r)||m(r);const[b,h]=g.useState(null),[x,y]=g.useState(null),v=g.useCallback(E=>{E!==C.current&&(C.current=E,h(E))},[]),w=g.useCallback(E=>{E!==k.current&&(k.current=E,y(E))},[]),S=s||b,N=i||x,C=g.useRef(null),k=g.useRef(null),j=g.useRef(f),A=c!=null,P=rc(c),O=rc(o),M=rc(u),U=g.useCallback(()=>{if(!C.current||!k.current)return;const E={placement:t,strategy:n,middleware:p};O.current&&(E.platform=O.current),fE(C.current,k.current,E).then(_=>{const L={..._,isPositioned:M.current!==!1};T.current&&!Ea(j.current,L)&&(j.current=L,Ur.flushSync(()=>{d(L)}))})},[p,t,n,O,M]);Ki(()=>{u===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,d(E=>({...E,isPositioned:!1})))},[u]);const T=g.useRef(!1);Ki(()=>(T.current=!0,()=>{T.current=!1}),[]),Ki(()=>{if(S&&(C.current=S),N&&(k.current=N),S&&N){if(P.current)return P.current(S,N,U);U()}},[S,N,U,P,A]);const z=g.useMemo(()=>({reference:C,floating:k,setReference:v,setFloating:w}),[v,w]),$=g.useMemo(()=>({reference:S,floating:N}),[S,N]),B=g.useMemo(()=>{const E={position:n,left:0,top:0};if(!$.floating)return E;const _=hp($.floating,f.x),L=hp($.floating,f.y);return l?{...E,transform:"translate("+_+"px, "+L+"px)",...Sy($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:L}},[n,l,$.floating,f.x,f.y]);return g.useMemo(()=>({...f,update:U,refs:z,elements:$,floatingStyles:B}),[f,U,z,$,B])}const gE=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?pp({element:r.current,padding:o}).fn(n):{}:r?pp({element:r,padding:o}).fn(n):{}}}},vE=(e,t)=>({...iE(e),options:[e,t]}),yE=(e,t)=>({...aE(e),options:[e,t]}),xE=(e,t)=>({...dE(e),options:[e,t]}),wE=(e,t)=>({...lE(e),options:[e,t]}),bE=(e,t)=>({...cE(e),options:[e,t]}),SE=(e,t)=>({...uE(e),options:[e,t]}),NE=(e,t)=>({...gE(e),options:[e,t]});var kE="Arrow",Ny=g.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return a.jsx(Q.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ny.displayName=kE;var CE=Ny;function Zd(e){const[t,n]=g.useState(void 0);return Ve(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,l;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,l=u.blockSize}else i=e.offsetWidth,l=e.offsetHeight;n({width:i,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Jd="Popper",[ky,il]=qt(Jd),[EE,Cy]=ky(Jd),Ey=e=>{const{__scopePopper:t,children:n}=e,[r,o]=g.useState(null);return a.jsx(EE,{scope:t,anchor:r,onAnchorChange:o,children:n})};Ey.displayName=Jd;var jy="PopperAnchor",_y=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Cy(jy,n),i=g.useRef(null),l=ae(t,i);return g.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:a.jsx(Q.div,{...o,ref:l})});_y.displayName=jy;var ef="PopperContent",[jE,_E]=ky(ef),Ry=g.forwardRef((e,t)=>{var F,ce,Se,oe,ne,re;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:b,...h}=e,x=Cy(ef,n),[y,v]=g.useState(null),w=ae(t,$e=>v($e)),[S,N]=g.useState(null),C=Zd(S),k=(C==null?void 0:C.width)??0,j=(C==null?void 0:C.height)??0,A=r+(s!=="center"?"-"+s:""),P=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},O=Array.isArray(u)?u:[u],M=O.length>0,U={padding:P,boundary:O.filter(PE),altBoundary:M},{refs:T,floatingStyles:z,placement:$,isPositioned:B,middlewareData:E}=hE({strategy:"fixed",placement:A,whileElementsMounted:(...$e)=>sE(...$e,{animationFrame:m==="always"}),elements:{reference:x.anchor},middleware:[vE({mainAxis:o+j,alignmentAxis:i}),c&&yE({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?xE():void 0,...U}),c&&wE({...U}),bE({...U,apply:({elements:$e,rects:et,availableWidth:hn,availableHeight:Zt})=>{const{width:gn,height:vr}=et.reference,vn=$e.floating.style;vn.setProperty("--radix-popper-available-width",`${hn}px`),vn.setProperty("--radix-popper-available-height",`${Zt}px`),vn.setProperty("--radix-popper-anchor-width",`${gn}px`),vn.setProperty("--radix-popper-anchor-height",`${vr}px`)}}),S&&NE({element:S,padding:l}),TE({arrowWidth:k,arrowHeight:j}),p&&SE({strategy:"referenceHidden",...U})]}),[_,L]=Ay($),G=At(b);Ve(()=>{B&&(G==null||G())},[B,G]);const H=(F=E.arrow)==null?void 0:F.x,Y=(ce=E.arrow)==null?void 0:ce.y,X=((Se=E.arrow)==null?void 0:Se.centerOffset)!==0,[pe,be]=g.useState();return Ve(()=>{y&&be(window.getComputedStyle(y).zIndex)},[y]),a.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:B?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[(oe=E.transformOrigin)==null?void 0:oe.x,(ne=E.transformOrigin)==null?void 0:ne.y].join(" "),...((re=E.hide)==null?void 0:re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(jE,{scope:n,placedSide:_,onArrowChange:N,arrowX:H,arrowY:Y,shouldHideArrow:X,children:a.jsx(Q.div,{"data-side":_,"data-align":L,...h,ref:w,style:{...h.style,animation:B?void 0:"none"}})})})});Ry.displayName=ef;var Py="PopperArrow",RE={top:"bottom",right:"left",bottom:"top",left:"right"},Ty=g.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=_E(Py,r),i=RE[s.placedSide];return a.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:a.jsx(CE,{...o,ref:n,style:{...o.style,display:"block"}})})});Ty.displayName=Py;function PE(e){return e!==null}var TE=e=>({name:"transformOrigin",options:e,fn(t){var x,y,v;const{placement:n,rects:r,middlewareData:o}=t,i=((x=o.arrow)==null?void 0:x.centerOffset)!==0,l=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,f]=Ay(n),d={start:"0%",center:"50%",end:"100%"}[f],p=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,m=(((v=o.arrow)==null?void 0:v.y)??0)+c/2;let b="",h="";return u==="bottom"?(b=i?d:`${p}px`,h=`${-c}px`):u==="top"?(b=i?d:`${p}px`,h=`${r.floating.height+c}px`):u==="right"?(b=`${-c}px`,h=i?d:`${m}px`):u==="left"&&(b=`${r.floating.width+c}px`,h=i?d:`${m}px`),{data:{x:b,y:h}}}});function Ay(e){const[t,n="center"]=e.split("-");return[t,n]}var AE=Ey,Iy=_y,My=Ry,Oy=Ty,[al,vT]=qt("Tooltip",[il]),tf=il(),Ly="TooltipProvider",IE=700,gp="tooltip.open",[ME,Dy]=al(Ly),$y=e=>{const{__scopeTooltip:t,delayDuration:n=IE,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=g.useRef(!0),l=g.useRef(!1),c=g.useRef(0);return g.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),a.jsx(ME,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:g.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:s})};$y.displayName=Ly;var Fy="Tooltip",[yT,ll]=al(Fy),Nu="TooltipTrigger",OE=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ll(Nu,n),s=Dy(Nu,n),i=tf(n),l=g.useRef(null),c=ae(t,l,o.onTriggerChange),u=g.useRef(!1),f=g.useRef(!1),d=g.useCallback(()=>u.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),a.jsx(Iy,{asChild:!0,...i,children:a.jsx(Q.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:K(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:K(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:K(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:K(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:K(e.onBlur,o.onClose),onClick:K(e.onClick,o.onClose)})})});OE.displayName=Nu;var LE="TooltipPortal",[xT,DE]=al(LE,{forceMount:void 0}),$o="TooltipContent",zy=g.forwardRef((e,t)=>{const n=DE($o,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=ll($o,e.__scopeTooltip);return a.jsx(Xs,{present:r||i.open,children:i.disableHoverableContent?a.jsx(By,{side:o,...s,ref:t}):a.jsx($E,{side:o,...s,ref:t})})}),$E=g.forwardRef((e,t)=>{const n=ll($o,e.__scopeTooltip),r=Dy($o,e.__scopeTooltip),o=g.useRef(null),s=ae(t,o),[i,l]=g.useState(null),{trigger:c,onClose:u}=n,f=o.current,{onPointerInTransitChange:d}=r,p=g.useCallback(()=>{l(null),d(!1)},[d]),m=g.useCallback((b,h)=>{const x=b.currentTarget,y={x:b.clientX,y:b.clientY},v=UE(y,x.getBoundingClientRect()),w=HE(y,v),S=WE(h.getBoundingClientRect()),N=KE([...w,...S]);l(N),d(!0)},[d]);return g.useEffect(()=>()=>p(),[p]),g.useEffect(()=>{if(c&&f){const b=x=>m(x,f),h=x=>m(x,c);return c.addEventListener("pointerleave",b),f.addEventListener("pointerleave",h),()=>{c.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",h)}}},[c,f,m,p]),g.useEffect(()=>{if(i){const b=h=>{const x=h.target,y={x:h.clientX,y:h.clientY},v=(c==null?void 0:c.contains(x))||(f==null?void 0:f.contains(x)),w=!GE(y,i);v?p():w&&(p(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,i,u,p]),a.jsx(By,{...e,ref:s})}),[FE,zE]=al(Fy,{isInside:!1}),BE=SN("TooltipContent"),By=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...l}=e,c=ll($o,n),u=tf(n),{onClose:f}=c;return g.useEffect(()=>(document.addEventListener(gp,f),()=>document.removeEventListener(gp,f)),[f]),g.useEffect(()=>{if(c.trigger){const d=p=>{const m=p.target;m!=null&&m.contains(c.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,f]),a.jsx(Ja,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:a.jsxs(My,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[a.jsx(BE,{children:r}),a.jsx(FE,{scope:n,isInside:!0,children:a.jsx(HN,{id:c.contentId,role:"tooltip",children:o||r})})]})})});zy.displayName=$o;var Vy="TooltipArrow",VE=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=tf(n);return zE(Vy,n).isInside?null:a.jsx(Oy,{...o,...r,ref:t})});VE.displayName=Vy;function UE(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function HE(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function WE(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function GE(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const l=t[s],c=t[i],u=l.x,f=l.y,d=c.x,p=c.y;f>r!=p>r&&n<(d-u)*(r-f)/(p-f)+u&&(o=!o)}return o}function KE(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),QE(t)}function QE(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var YE=$y,Uy=zy;const XE=YE,qE=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(Uy,{ref:r,sideOffset:t,className:W("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));qE.displayName=Uy.displayName;const ZE="modulepreload",JE=function(e){return"/"+e},vp={},ku=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));o=Promise.allSettled(n.map(c=>{if(c=JE(c),c in vp)return;vp[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":ZE,u||(d.as="script"),d.crossOrigin="",d.href=c,l&&d.setAttribute("nonce",l),document.head.appendChild(d),u)return new Promise((p,m)=>{d.addEventListener("load",p),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return o.then(i=>{for(const l of i||[])l.status==="rejected"&&s(l.reason);return t().catch(s)})};async function Hy(e,t,n,r,o){const{runSwarmSimulation:s}=await ku(async()=>{const{runSwarmSimulation:l}=await import("./swarmSimulation-DHDqjfMa.js");return{runSwarmSimulation:l}},[]);return{result:await s(e,t,n,r),source:"echelon-native"}}function ej(e,t,n){const r=[],o=e.toLowerCase();return n.outcome.toLowerCase(),(o.includes("oil")||o.includes("gas")||o.includes("energy")||o.includes("price"))&&r.push("Strategic petroleum reserve release","Fuel tax adjustment","Refinery capacity incentives","Alternative energy subsidies","Import diversification"),(o.includes("strait")||o.includes("military")||o.includes("war")||o.includes("conflict")||o.includes("sanctions"))&&r.push("Diplomatic engagement","Coalition building","Sanctions/trade policy","Military posture adjustment","Back-channel communication"),(o.includes("regulation")||o.includes("law")||o.includes("compliance")||o.includes("policy"))&&r.push("Lobbying and advocacy","Compliance framework investment","Industry coalition formation","Public comment campaigns","Alternative regulatory proposals"),(o.includes("breach")||o.includes("crisis")||o.includes("scandal")||o.includes("reputation"))&&r.push("Transparent disclosure","Stakeholder communication plan","Third-party audit/investigation","Remediation program","Leadership accountability"),(o.includes("market")||o.includes("company")||o.includes("business")||o.includes("startup"))&&r.push("Pricing strategy","Partnership/acquisition","Market positioning pivot","Capital allocation","Talent/team restructuring"),r.length===0&&r.push("Stakeholder engagement","Resource reallocation","Communication strategy","Policy change","Coalition building"),r}function tj(e,t,n,r){const o=[],s=t.priority??"important",i=t.red_lines??[];o.push({id:"strategy_direct",label:"Direct Path",description:`Aggressive, multi-lever approach to reach "${t.outcome}" as quickly as possible. Uses the most available levers simultaneously for maximum force.`,steps:nj(t,r),levers_used:r.slice(0,3),success_probability:s==="critical"?.55:.45,estimated_timeframe:t.timeframe??"30 days",risk:"high",red_line_violations:oc("direct",i,r.slice(0,3)),dependencies:["Multiple levers must be available simultaneously","Stakeholders must not coordinate opposition","No secondary crisis emerges during execution"],failure_modes:["Aggressive action triggers backlash coalition","Resource overcommitment leaves no fallback","Speed creates execution errors"],likely_allies:n.filter(c=>c.disposition==="supportive").map(c=>c.id),likely_opponents:n.filter(c=>c.disposition==="hostile").map(c=>c.id)});const l=n.filter(c=>c.disposition==="supportive"||c.disposition==="neutral");return o.push({id:"strategy_coalition",label:"Coalition Path",description:`Build a stakeholder coalition first, then apply coordinated pressure toward "${t.outcome}". Slower but more sustainable — collective action is harder to resist.`,steps:rj(t,r,l),levers_used:["Coalition building",...r.slice(0,2)],success_probability:.6,estimated_timeframe:yp(t.timeframe??"30 days",1.5),risk:"moderate",red_line_violations:oc("coalition",i,["Coalition building",...r.slice(0,2)]),dependencies:["Key neutral stakeholders are persuadable","Coalition members maintain alignment throughout execution","No external shock dissolves the coalition"],failure_modes:["Coalition fractures under pressure","Opponents form counter-coalition faster","Consensus-building delays miss the window"],likely_allies:l.map(c=>c.id),likely_opponents:n.filter(c=>c.disposition==="hostile").map(c=>c.id)}),o.push({id:"strategy_incremental",label:"Incremental Path",description:`Move toward "${t.outcome}" through small, reversible steps. Each step is tested before committing further. Preserves optionality.`,steps:oj(t,r),levers_used:r.slice(0,2),success_probability:.65,estimated_timeframe:yp(t.timeframe??"30 days",2),risk:"low",red_line_violations:[],dependencies:["Sufficient time to iterate","Each step produces measurable feedback","The goal remains viable throughout the process"],failure_modes:["Window of opportunity closes before full execution","Incremental moves are individually too small to create momentum","Competitors move faster with bolder strategies"],likely_allies:n.filter(c=>c.disposition!=="hostile").map(c=>c.id)}),r.length>=3&&o.push({id:"strategy_asymmetric",label:"Asymmetric Path",description:`Find the one lever that has outsized impact on achieving "${t.outcome}". Instead of pushing many levers, find the fulcrum.`,steps:sj(t,r),levers_used:[r[r.length-1]],success_probability:.35,estimated_timeframe:t.timeframe??"30 days",risk:"moderate",red_line_violations:oc("asymmetric",i,[r[r.length-1]]),dependencies:["The identified fulcrum lever actually has the projected influence","Opponents don't anticipate this approach","No defensive positions are pre-established against this lever"],failure_modes:["The fulcrum lever doesn't have the expected effect","Narrow approach is easily countered once recognized","Success depends on a single point of leverage that may not hold"]}),o}function nj(e,t){const n=[],r=e.timeframe??"30 days";return n.push({order:1,action:"Deploy primary lever immediately",timeframe:"Day 1-3",lever:t[0]??"Primary action",expected_effect:"Establish momentum and signal commitment to the goal",risk:"Early commitment before full information"}),t.length>=2&&n.push({order:2,action:"Activate secondary lever to create pressure from a different angle",timeframe:"Day 3-7",lever:t[1],expected_effect:"Create multi-directional pressure that's harder to resist",risk:"Resource strain from parallel execution"}),t.length>=3&&n.push({order:3,action:"Apply tertiary lever to close remaining gaps",timeframe:"Day 7-14",lever:t[2],expected_effect:"Address residual resistance and accelerate toward goal",risk:"Overextension if earlier levers haven't produced results"}),n.push({order:n.length+1,action:"Evaluate progress against success criteria and adjust",timeframe:`Day 14-${r}`,lever:"Assessment and adjustment",expected_effect:"Course correction based on actual results vs. projections",risk:"Sunk cost bias may prevent necessary pivots"}),n}function rj(e,t,n){return[{order:1,action:`Build coalition with ${n.length>0?n.map(r=>r.id).slice(0,3).join(", "):"key neutral stakeholders"}`,timeframe:"Week 1-2",lever:"Coalition building",expected_effect:"Create collective leverage that exceeds individual power",risk:"Coalition formation takes time; window may narrow"},{order:2,action:"Align coalition on shared strategy and communication",timeframe:"Week 2-3",lever:"Coordination",expected_effect:"Unified messaging prevents opponents from dividing the coalition",risk:"Internal disagreements may surface during alignment"},{order:3,action:"Execute coordinated lever deployment",timeframe:"Week 3-4",lever:t[0]??"Primary collective action",expected_effect:`Coalition moves together toward "${e.outcome}"`,risk:"Weakest coalition member may defect under pressure"},{order:4,action:"Sustain pressure and consolidate gains",timeframe:"Week 4+",lever:t[1]??"Sustained engagement",expected_effect:"Lock in progress and prevent rollback",risk:"Coalition fatigue and attention drift"}]}function oj(e,t){return[{order:1,action:"Take smallest possible step toward the goal to test feasibility",timeframe:"Week 1",lever:t[0]??"Pilot action",expected_effect:"Generate signal about whether this direction works",risk:"Minimal — designed to be reversible"},{order:2,action:"Evaluate step 1 results against success criteria",timeframe:"Week 2",lever:"Assessment",expected_effect:"Determine if the approach is viable before scaling",risk:"May not be enough data for confident evaluation"},{order:3,action:"Scale up if step 1 produced positive signal; pivot if not",timeframe:"Week 3-4",lever:t[1]??t[0]??"Scaled action",expected_effect:"Either accelerate a proven approach or redirect resources",risk:"Competitors may move faster with bolder approaches"},{order:4,action:"Continue test-and-scale cycle until success criteria met",timeframe:"Ongoing",lever:"Iterative execution",expected_effect:"Converge toward the goal through validated learning",risk:"Window of opportunity may close before iteration completes"}]}function sj(e,t){const n=t[t.length-1];return[{order:1,action:`Identify the highest-leverage point in the system — test "${n}"`,timeframe:"Day 1-5",lever:"Analysis and targeting",expected_effect:"Find the single point where minimal force creates maximum effect",risk:"Analysis may identify the wrong fulcrum"},{order:2,action:`Prepare and execute asymmetric move using ${n}`,timeframe:"Day 5-10",lever:n,expected_effect:"Disproportionate impact through a single, well-targeted intervention",risk:"If the fulcrum doesn't hold, there's no backup in progress"},{order:3,action:"Exploit the opening created by the asymmetric move",timeframe:"Day 10-20",lever:"Exploitation of advantage",expected_effect:"Convert initial disruption into sustained progress toward goal",risk:"Opponents may adapt quickly once they understand the approach"}]}function oc(e,t,n){const r=[];for(const o of t){const s=o.toLowerCase();for(const i of n){const l=i.toLowerCase();(s.includes("military")&&l.includes("military")||s.includes("tax")&&l.includes("tax")||s.includes("force")&&l.includes("force")||s.includes("sanctions")&&l.includes("sanction"))&&r.push(`Strategy "${e}" uses "${i}" which may conflict with red line: "${o}"`)}}return r}function yp(e,t){const n=e.match(/(\d+)\s*(day|week|month|year)/i);if(!n)return e;const r=parseInt(n[1]),o=n[2].toLowerCase();return`${Math.ceil(r*t)} ${o}s`}async function ij(e,t,n,r,o){const s=`${t} [Strategy being tested: ${e.label} — ${e.description}]`,i={id:e.id,label:e.label,description:e.description,projected_outcome:`Goal: ${n.outcome}`,probability:e.success_probability,risk:e.risk,tradeoffs:e.failure_modes.map(h=>h),benefits_stakeholders:e.likely_allies,harms_stakeholders:e.likely_opponents},c=(await Hy(s,r,[i],o)).result,u=c.rounds.length>0?c.rounds[c.rounds.length-1].reactions.reduce((h,x)=>h+x.impact,0)/c.rounds[c.rounds.length-1].reactions.length:0,f=Math.max(0,Math.min(1,(u+1)/2)),d=f>.7,p=[];for(const h of e.red_line_violations)p.push(h);const m=[];for(const h of c.rounds)if(h.emergent_dynamics)for(const x of h.emergent_dynamics)(x.toLowerCase().includes("opposition")||x.toLowerCase().includes("polariz")||x.toLowerCase().includes("coalition risk"))&&m.push(x);const b=c.rounds.length>0?c.rounds[c.rounds.length-1].reactions:[];return{strategy_id:e.id,goal_reached:d,goal_proximity:Number(f.toFixed(2)),steps_to_goal:d?c.rounds.length:"not_reached",stakeholder_reactions:b,unintended_consequences:m,red_lines_crossed:p}}async function aj(e,t){var d,p;const n=e.goal,r=n.available_levers&&n.available_levers.length>0?n.available_levers:ej(e.scenario,t,n),o=tj(e.scenario,n,t,r);let s=[];if((d=e.swarm)!=null&&d.enabled&&t.length>0){const m=o.map(b=>ij(b,e.scenario,n,t,e.swarm));s=await Promise.all(m)}else s=o.map(m=>({strategy_id:m.id,goal_reached:m.success_probability>.5,goal_proximity:m.success_probability,steps_to_goal:m.success_probability>.5?Math.ceil(3/m.success_probability):"not_reached",stakeholder_reactions:[],unintended_consequences:m.risk==="high"?["High-risk strategies may trigger unforeseen opposition"]:[],red_lines_crossed:m.red_line_violations}));const i=[...o].sort((m,b)=>{const h=s.find(N=>N.strategy_id===m.id),x=s.find(N=>N.strategy_id===b.id),y=(h==null?void 0:h.red_lines_crossed.length)??0,v=(x==null?void 0:x.red_lines_crossed.length)??0;if(y>0&&v===0)return 1;if(v>0&&y===0)return-1;const w=(h==null?void 0:h.goal_proximity)??m.success_probability;return((x==null?void 0:x.goal_proximity)??b.success_probability)-w}),l=i[0],c=s.find(m=>m.strategy_id===l.id),u=lj(l,c,n,i),f=i.slice(1).map(m=>{const b=s.find(x=>x.strategy_id===m.id);let h;return((b==null?void 0:b.red_lines_crossed.length)??0)>0?h=`Violates red line: ${b.red_lines_crossed[0]}`:((b==null?void 0:b.goal_proximity)??0)<.3?h=`Low goal proximity (${(((b==null?void 0:b.goal_proximity)??0)*100).toFixed(0)}%)`:h="Lower overall success probability than recommended path",{label:m.label,reason:h}});return{goal:n,strategies:i,swarm_tests:s,recommended_strategy_id:l.id,recommendation_rationale:u,immediate_next_step:((p=l.steps[0])==null?void 0:p.action)??"Begin assessment",rejected_strategies:f}}function lj(e,t,n,r){const o=[];o.push(`"${e.label}" is recommended because it offers the best risk-adjusted path toward "${n.outcome}".`),t!=null&&t.goal_reached?o.push(`Swarm simulation shows this strategy reaching the goal with ${(t.goal_proximity*100).toFixed(0)}% proximity.`):t&&o.push(`Swarm simulation shows ${(t.goal_proximity*100).toFixed(0)}% proximity to the goal — partial success is likely.`),e.red_line_violations.length===0&&o.push("This strategy respects all stated red lines.");const s=r.length-1;return o.push(`${s} alternative ${s===1?"strategy was":"strategies were"} evaluated and ranked lower.`),o.join(" ")}function cj(e,t,n){const r=(t.stakeholders??[]).map(s=>typeof s=="string"?{id:s,disposition:"unknown"}:s),o={version:"1.0",created_at:new Date().toISOString(),title:e,scenario:t.scenario,stakeholders:r,assumptions:t.assumptions??{},constraints:t.constraints??{},signals:n==null?void 0:n.signals,depth:t.depth??"standard",perspective:t.perspective??"strategic_advisor",swarm:t.swarm,tags:n==null?void 0:n.tags,author:n==null?void 0:n.author};return{...o,capsule_hash:Wy(o)}}function uj(e){const t=JSON.stringify(e);return typeof btoa=="function"?btoa(unescape(encodeURIComponent(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):Buffer.from(t,"utf-8").toString("base64url")}function dj(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4;)t+="=";let n;typeof atob=="function"?n=decodeURIComponent(escape(atob(t))):n=Buffer.from(t,"base64").toString("utf-8");const r=JSON.parse(n),{capsule_hash:o,...s}=r;if(Wy(s)!==o)throw new Error("Capsule integrity check failed — data may have been tampered with");return r}function fj(e,t="https://mirotir.com"){const n=uj(e);return`${t}/run#capsule=${n}`}function mj(e){const t=e.indexOf("#capsule=");if(t===-1)return null;const n=e.slice(t+9);return dj(n)}function Wy(e){const t=JSON.stringify(e);let n=0;for(let r=0;r<t.length;r++){const o=t.charCodeAt(r);n=(n<<5)-n+o,n=n&n}return`cap_${Math.abs(n).toString(36)}`}const Cu={strait_of_hormuz:{title:"Strait of Hormuz Closes",scenario:"The Strait of Hormuz is closed due to military conflict. 20% of global oil supply is disrupted. Oil prices spike 40% in 48 hours. Global supply chains begin to fracture.",stakeholders:[{id:"Energy Companies",disposition:"supportive",priorities:["supply security","price stability"]},{id:"Consumers",disposition:"hostile",priorities:["affordable fuel","economic stability"]},{id:"Government",disposition:"neutral",priorities:["national security","economic stability","election impact"]},{id:"Military",disposition:"neutral",priorities:["strategic positioning","force projection"]},{id:"Financial Markets",disposition:"hostile",priorities:["stability","predictability"]},{id:"OPEC",disposition:"unknown",priorities:["market share","price control"]}],assumptions:{severity:"critical",environmental_hostility:"high",time_pressure:"immediate",regulatory_climate:"strict"},constraints:{time_horizon:"30 days",regulatory:["international maritime law","sanctions framework"],risk_tolerance:"conservative"},signals:{oil_price_spike:"40%",shipping_disruption:!0,military_presence:"elevated",diplomatic_channels:"active"},depth:"full",perspective:"strategic_advisor",swarm:{enabled:!0,rounds:5,reaction_model:"mixed"},tags:["geopolitical","energy","crisis","supply-chain"],world:{world_id:"geopolitics_energy",name:"Geopolitics & Energy Crisis",inline_definition:{thesis:"Geopolitical disruptions to energy supply chains create cascading economic and political effects",state_variables:[{id:"oil_supply_disruption",label:"Oil Supply Disruption %",type:"number",range:{min:0,max:100},default_value:20},{id:"military_escalation",label:"Military Escalation Level",type:"enum",enum_values:["posturing","limited_engagement","full_conflict"],default_value:"limited_engagement"},{id:"diplomatic_channels_open",label:"Diplomatic Channels Open",type:"boolean",default_value:!0},{id:"strategic_reserve_release",label:"Strategic Reserve Release %",type:"number",range:{min:0,max:50},default_value:0},{id:"media_hostility",label:"Media Hostility",type:"number",range:{min:0,max:1},default_value:.7}],invariants:[{id:"INV-001",description:"Energy supply disruption > 30% triggers emergency pricing mechanisms",enforceable:!0},{id:"INV-002",description:"Military escalation restricts diplomatic solution space",enforceable:!0},{id:"INV-003",description:"Consumer sentiment inversely correlates with price spikes",enforceable:!0}],gates:[{id:"GATE-001",label:"Market Panic",condition:"oil_supply_disruption > 40",severity:"critical"},{id:"GATE-002",label:"Diplomatic Window Closing",condition:"military_escalation == full_conflict",severity:"critical"}]}}},gas_price_spike:{title:"Gas Prices Hit $5/Gallon",scenario:"US gas prices spike to $5/gallon driven by supply disruption and refinery constraints. Consumer sentiment craters. Midterm elections are 6 months away. EV adoption accelerates but grid infrastructure can't keep up.",stakeholders:[{id:"Consumers",disposition:"hostile",priorities:["affordability","commute costs"]},{id:"Oil Companies",disposition:"supportive",priorities:["margins","market position"]},{id:"Politicians",disposition:"hostile",priorities:["re-election","constituent pressure"]},{id:"EV Manufacturers",disposition:"supportive",priorities:["market share","adoption"]},{id:"Grid Operators",disposition:"neutral",priorities:["reliability","capacity"]},{id:"Trucking Industry",disposition:"hostile",priorities:["operating costs","contracts"]}],assumptions:{severity:"high",environmental_hostility:"high",time_pressure:"urgent",regulatory_climate:"strict"},constraints:{time_horizon:"6 months",regulatory:["EPA","DOE","state fuel regulations"],risk_tolerance:"moderate"},signals:{gas_price:"$5.00/gal",consumer_sentiment:"very_low",ev_demand_spike:"35%",grid_capacity_surplus:"-12%"},depth:"full",perspective:"strategic_advisor",swarm:{enabled:!0,rounds:4,reaction_model:"mixed"},tags:["economic","energy","political","consumer"],world:{world_id:"economic_energy",name:"Economic Energy Shock",inline_definition:{thesis:"Energy price spikes create political, economic, and social cascading effects with EV transition implications",state_variables:[{id:"gas_price",label:"Gas Price ($/gal)",type:"number",range:{min:2,max:10},default_value:5},{id:"consumer_sentiment",label:"Consumer Sentiment",type:"number",range:{min:0,max:1},default_value:.2},{id:"ev_demand_surge",label:"EV Demand Surge %",type:"number",range:{min:0,max:100},default_value:35},{id:"election_proximity_months",label:"Months to Election",type:"number",range:{min:0,max:24},default_value:6},{id:"grid_capacity",label:"Grid Spare Capacity %",type:"number",range:{min:-30,max:30},default_value:-12}],invariants:[{id:"INV-001",description:"Gas price > $4.50 triggers political crisis mode",enforceable:!0},{id:"INV-002",description:"EV demand surge without grid capacity creates secondary crisis",enforceable:!0},{id:"INV-003",description:"Election proximity amplifies political response intensity",enforceable:!0}],gates:[{id:"GATE-001",label:"Political Crisis",condition:"gas_price > 4.5 && election_proximity_months < 12",severity:"critical"},{id:"GATE-002",label:"Grid Failure Risk",condition:"ev_demand_surge > 30 && grid_capacity < 0",severity:"warning"}]}}},ai_regulation_crisis:{title:"Major AI Regulation Passes",scenario:"The EU passes sweeping AI regulation requiring full model transparency, mandatory audits, and liability for AI-generated outputs. US lawmakers signal similar legislation within 12 months. Open-source AI communities face existential compliance questions.",stakeholders:[{id:"AI Companies",disposition:"hostile",priorities:["innovation speed","competitive advantage","IP protection"]},{id:"Regulators",disposition:"supportive",priorities:["public safety","accountability","precedent"]},{id:"Open Source Community",disposition:"hostile",priorities:["freedom","access","collaboration"]},{id:"Enterprise Customers",disposition:"neutral",priorities:["compliance","reliability","cost"]},{id:"Civil Society",disposition:"supportive",priorities:["transparency","fairness","rights"]}],assumptions:{severity:"high",environmental_hostility:"moderate",time_pressure:"low",regulatory_climate:"adversarial"},constraints:{time_horizon:"18 months",regulatory:["EU AI Act","proposed US AI legislation"],risk_tolerance:"moderate"},depth:"full",perspective:"strategic_advisor",swarm:{enabled:!0,rounds:4,reaction_model:"rational"},tags:["ai","regulation","technology","policy"],world:{world_id:"ai_regulation",name:"AI Regulation Landscape",inline_definition:{thesis:"AI regulation creates compliance burdens that reshape competitive dynamics between open and closed AI ecosystems",state_variables:[{id:"regulation_strictness",label:"Regulation Strictness",type:"number",range:{min:0,max:1},default_value:.8},{id:"enforcement_timeline_months",label:"Enforcement Timeline (months)",type:"number",range:{min:3,max:36},default_value:18},{id:"open_source_exemption",label:"Open Source Exemption",type:"boolean",default_value:!1},{id:"us_follows_eu",label:"US Follows EU",type:"boolean",default_value:!0},{id:"compliance_cost_multiplier",label:"Compliance Cost Multiplier",type:"number",range:{min:1,max:10},default_value:3}],invariants:[{id:"INV-001",description:"Strict regulation without open-source exemption eliminates small AI labs",enforceable:!0},{id:"INV-002",description:"Cross-jurisdiction regulation creates compliance arbitrage opportunities",enforceable:!0},{id:"INV-003",description:"Enterprise customers require compliance before adoption",enforceable:!0}],gates:[{id:"GATE-001",label:"Market Consolidation",condition:"compliance_cost_multiplier > 5 && !open_source_exemption",severity:"critical"},{id:"GATE-002",label:"Innovation Flight",condition:"regulation_strictness > 0.7 && !us_follows_eu",severity:"warning"}]}}}};function pj(e,t){var i,l,c,u,f,d;const n=e.scenario.slice(0,40).replace(/[^a-zA-Z0-9]/g,"_").toLowerCase(),r={};if((i=e.assumptions)!=null&&i.severity&&(r.severity={type:"enum",options:["low","moderate","high","critical"],default:e.assumptions.severity,mutable:!0,label:"Severity",description:"Severity of the situation"}),(l=e.assumptions)!=null&&l.environmental_hostility&&(r.environmental_hostility={type:"enum",options:["low","moderate","high"],default:e.assumptions.environmental_hostility,mutable:!0,label:"Environmental Hostility",description:"External environment hostility"}),(c=e.assumptions)!=null&&c.time_pressure&&(r.time_pressure={type:"enum",options:["none","low","moderate","urgent","immediate"],default:e.assumptions.time_pressure,mutable:!0,label:"Time Pressure",description:"Time pressure on decision"}),(u=e.assumptions)!=null&&u.regulatory_climate&&(r.regulatory_climate={type:"enum",options:["permissive","neutral","strict","adversarial"],default:e.assumptions.regulatory_climate,mutable:!0,label:"Regulatory Climate",description:"Regulatory environment"}),t!=null&&t.state_variables)for(const p of t.state_variables)r[p.id]={type:p.type,options:p.enum_values?[...p.enum_values]:void 0,min:(f=p.range)==null?void 0:f.min,max:(d=p.range)==null?void 0:d.max,default:p.default_value,mutable:!0,label:p.label,description:p.label};const o=((t==null?void 0:t.invariants)??[]).map(p=>({id:p.id,label:p.description,enforcement:p.enforceable?"structural":"prompt",mutable:!1})),s=((t==null?void 0:t.gates)??[]).map(p=>({status:hj(p.severity),field:p.id,operator:"==",value:1,color:p.severity==="critical"?"#ef4444":p.severity==="warning"?"#f59e0b":"#22c55e",icon:p.severity==="critical"?"alert-triangle":p.severity==="warning"?"alert-circle":"info"}));return{world:{world_id:`echelon_${n}`,name:e.scenario.slice(0,60),thesis:(t==null?void 0:t.thesis)??`Reasoning world for: ${e.scenario.slice(0,100)}`,version:"1.0.0",runtime_mode:"SIMULATION",default_assumption_profile:"baseline",default_alternative_profile:"stressed",modules:[],players:{thinking_space:!0,experience_space:!1,action_space:!1}},invariants:o,assumptions:{profiles:{baseline:{name:"Baseline",description:"Default assumptions from the scenario",is_default_baseline:!0,parameters:gj(e)},stressed:{name:"Stressed",description:"Worst-case assumption profile",is_default_alternative:!0,parameters:vj()}},parameter_definitions:{}},stateSchema:{variables:r,presets:{}},rules:[],gates:{viability_classification:s.length>0?s:[{status:"STABLE",field:"severity",operator:"==",value:1,color:"#22c55e",icon:"check-circle"}],structural_override:{description:"Echelon governance enforcement",enforcement:"mandatory"},sustainability_threshold:30,collapse_visual:{background:"#1a0000",text:"#ef4444",border:"#7f1d1d",label:"SCENARIO COLLAPSES"}},outcomes:{computed_outcomes:[],comparison_layout:{primary_card:"viability",status_badge:"severity",structural_indicators:[]}},metadata:{format_version:"1.0",created_at:new Date().toISOString(),last_modified:new Date().toISOString(),authoring_method:"manual-authoring"}}}function hj(e){switch(e){case"info":return"STABLE";case"warning":return"COMPRESSED";case"critical":return"CRITICAL"}}function gj(e){var n,r,o,s;const t={};return(n=e.assumptions)!=null&&n.severity&&(t.severity=e.assumptions.severity),(r=e.assumptions)!=null&&r.environmental_hostility&&(t.environmental_hostility=e.assumptions.environmental_hostility),(o=e.assumptions)!=null&&o.time_pressure&&(t.time_pressure=e.assumptions.time_pressure),(s=e.assumptions)!=null&&s.regulatory_climate&&(t.regulatory_climate=e.assumptions.regulatory_climate),t}function vj(){return{severity:"critical",environmental_hostility:"high",time_pressure:"immediate",regulatory_climate:"adversarial"}}function yj(e,t,n){return{status:"ALLOW",reason:"NeuroverseOS guard not loaded — permissive fallback"}}function xj(e,t){return{worldId:e.world.world_id,worldName:e.world.name,profile:"baseline",initialState:{},steps:[],finalState:{},finalViability:"STABLE",collapsed:!1}}function wj(e,t){return{worldId:e.world.world_id,worldName:e.world.name,worldVersion:e.world.version,validatedAt:Date.now(),durationMs:0,summary:{errors:0,warnings:0,info:0,completenessScore:100,invariantCoverage:100,canRun:!0,isHealthy:!0},validationMode:t??"standard",findings:[]}}function bj(e){const t=[];if(t.push({rule_id:e.ruleId??"NV-GUARD",rule:`NeuroverseOS guard evaluation: ${e.status}`,passed:e.status==="ALLOW",detail:e.reason??"Guard evaluation completed"}),e.evidence){const n=e.evidence;if(n.safetyChecks)for(const r of n.safetyChecks)t.push({rule_id:`NV-SAFETY-${r.check}`,rule:`Safety: ${r.check}`,passed:!r.triggered,detail:r.triggered?`Triggered: ${r.evidence??"pattern match"}`:"Passed"});if(n.guardChecks)for(const r of n.guardChecks)t.push({rule_id:`NV-GUARD-${r.guardId}`,rule:r.label??`Guard ${r.guardId}`,passed:!r.triggered,detail:r.triggered?`Triggered: ${r.enforcement??"block"}`:"Passed"});if(n.invariantChecks)for(const r of n.invariantChecks)t.push({rule_id:`NV-INV-${r.invariantId}`,rule:r.label??`Invariant ${r.invariantId}`,passed:r.satisfied,detail:r.satisfied?"Satisfied":"Violated"});if(n.kernelCheck){const r=n.kernelCheck;t.push({rule_id:"NV-KERNEL",rule:"Kernel boundary enforcement",passed:!r.triggered,detail:r.triggered?`Kernel violation: ${r.patternId??"forbidden pattern"}`:"Passed"})}}return t}function Sj(e){const t=e.steps.reduce((r,o)=>r+o.rulesFired,0);let n="none";return e.collapsed||e.finalViability==="CRITICAL"?n="high":e.finalViability==="COMPRESSED"?n="moderate":t>e.steps.length*3&&(n="low"),{viability:e.finalViability,collapsed:e.collapsed,rulesFired:t,collapseRisk:n,stateTrajectory:e.steps.map(r=>r.stateAfter)}}function Nj(e){const t=[];if(t.push(`WORLD_HEALTH: ${e.summary.isHealthy?"HEALTHY":"DEGRADED"} (${e.summary.completenessScore}% complete)`),e.summary.invariantCoverage<100&&t.push(`INVARIANT_COVERAGE: ${e.summary.invariantCoverage}% — ${100-e.summary.invariantCoverage}% of invariants lack guard backing`),e.summary.governanceHealth){const n=e.summary.governanceHealth;t.push(`GOVERNANCE_RISK: ${n.riskLevel} (${n.surfacesCovered}/${n.surfacesTotal} surfaces governed)`)}return e.summary.errors>0&&t.push(`WORLD_ERRORS: ${e.summary.errors} structural issues detected`),t}const kj=[{id:"ECH-001",rule:"Reasoning must be bounded by declared authority level",check:e=>!0,detail:"Authority level: ANALYSIS_ONLY — no execution capability"},{id:"ECH-002",rule:"All reasoning paths must include tradeoff analysis",check:e=>!0,detail:"Path decomposition always generates tradeoffs"},{id:"ECH-003",rule:"Assumption challenges must be generated for caller-provided assumptions",check:e=>!0,detail:"Challenge engine runs on all declared assumptions"},{id:"ECH-004",rule:"No scenario data may be persisted after response",check:e=>!0,detail:"Stateless: request data exists only during processing"},{id:"ECH-005",rule:"Governance trace must be included in every response",check:e=>!0,detail:"Governance trace is non-optional in ReasonResponse"}];function Cj(e,t){const n=[];let r=!0,o,s,i,l,c;const u=[];try{c=pj(e,t),s=yj(e,c,{trace:!0});const d=bj(s);n.push(...d),s.status==="BLOCK"&&n.push({rule_id:"NV-BLOCK",rule:"NeuroverseOS guard issued BLOCK — governance intervention active",passed:!1,detail:`Guard blocked: ${s.reason??"Action blocked by guard"}. Continuing in governed advisory mode.`}),s.status==="PAUSE"&&n.push({rule_id:"NV-PAUSE",rule:"NeuroverseOS guard issued PAUSE",passed:!0,detail:`Guard paused: ${s.reason??"Review recommended"}. Continuing in advisory mode.`})}catch(d){n.push({rule_id:"NV-ERROR",rule:"NeuroverseOS guard evaluation",passed:!0,detail:`Guard evaluation error: ${d instanceof Error?d.message:"unknown"}. Falling back to Echelon-only governance.`})}if(c)try{i=wj(c),n.push({rule_id:"NV-VALIDATE",rule:"NeuroverseOS world validation",passed:i.summary.canRun,detail:`World health: ${i.summary.isHealthy?"HEALTHY":"DEGRADED"} — ${i.summary.completenessScore}% complete, ${i.summary.invariantCoverage}% invariant coverage`});const d=Nj(i);u.push(...d)}catch(d){n.push({rule_id:"NV-VALIDATE-ERROR",rule:"NeuroverseOS world validation",passed:!0,detail:`Validation error: ${d instanceof Error?d.message:"unknown"}`})}let f;if(c)try{l=xj(c,{steps:3}),f=Sj(l),n.push({rule_id:"NV-SIMULATE",rule:"NeuroverseOS deterministic simulation",passed:!l.collapsed,detail:`Viability: ${l.finalViability} — ${l.collapsed?"COLLAPSED":"viable"} after ${l.steps.length} steps, ${f.rulesFired} rules fired`}),l.collapsed&&u.push(`SIMULATION_COLLAPSE: World collapses at step ${l.collapseStep} (rule: ${l.collapseRule??"unknown"})`)}catch(d){n.push({rule_id:"NV-SIMULATE-ERROR",rule:"NeuroverseOS simulation",passed:!0,detail:`Simulation error: ${d instanceof Error?d.message:"unknown"}`})}for(const d of kj){const p=d.check(e);n.push({rule_id:d.id,rule:d.rule,passed:p,detail:d.detail}),p||(r=!1,o=o??`Echelon constitutional violation: ${d.rule}`)}return{checks:n,allowed:r,blockReason:o,guardVerdict:s,validationReport:i,simulationResult:l,world:c,enforcedConstraints:u,governanceSignals:f}}const Ej="0.1.0";function jj(e){if(!e.scenario||e.scenario.trim().length===0)return{valid:!1,error:{code:"INVALID_REQUEST",message:"scenario is required"}};if(e.scenario.trim().length<10)return{valid:!1,error:{code:"SCENARIO_TOO_VAGUE",message:"Scenario must be at least 10 characters. Provide enough context for meaningful reasoning."}};const t=["quick","standard","full","exhaustive"];return e.depth&&!t.includes(e.depth)?{valid:!1,error:{code:"INVALID_REQUEST",message:`Invalid depth "${e.depth}". Must be one of: ${t.join(", ")}`}}:{valid:!0}}function _j(e){return!e||e.length===0?[]:e.map(t=>typeof t=="string"?{id:t,disposition:"unknown"}:t)}function Rj(e){switch(e){case"quick":return 2;case"standard":return 3;case"full":return 5;case"exhaustive":return 8}}function Pj(){const e=Date.now().toString(36),t=Math.random().toString(36).slice(2,8);return`rsn_${e}_${t}`}function Tj(){const e=Date.now().toString(36),t=Math.random().toString(36).slice(2,8);return`gov_${e}_${t}`}function Aj(e,t,n,r){const o=Rj(n),s=[],i=e.toLowerCase(),l=i.includes("strait")||i.includes("war")||i.includes("sanctions")||i.includes("blockade")||i.includes("geopolitical"),c=i.includes("price")||i.includes("inflation")||i.includes("recession")||i.includes("market")||i.includes("gas")||i.includes("oil"),u=i.includes("breach")||i.includes("crisis")||i.includes("attack")||i.includes("failure");for((l||c)&&(s.push({id:"path_immediate_response",label:"Immediate Response",description:"Take decisive action within 24-48 hours to position ahead of market/political reactions",projected_outcome:"First-mover advantage but higher risk of overreaction if situation de-escalates",probability:.6,risk:"moderate",tradeoffs:["Speed vs. accuracy of assessment","Resource commitment before full picture emerges","Potential to signal panic to stakeholders"],benefits_stakeholders:t.filter(f=>f.disposition==="hostile").map(f=>f.id),harms_stakeholders:t.filter(f=>f.disposition==="neutral").map(f=>f.id)}),s.push({id:"path_hedge_and_monitor",label:"Hedge and Monitor",description:"Implement defensive positions while gathering intelligence on how the situation develops",projected_outcome:"Balanced exposure with ability to pivot in either direction",probability:.75,risk:"low",tradeoffs:["May miss optimal timing for decisive action","Hedging costs reduce upside potential","Requires ongoing monitoring infrastructure"],benefits_stakeholders:t.filter(f=>f.disposition!=="hostile").map(f=>f.id)}),o>=3&&s.push({id:"path_opportunistic",label:"Opportunistic Pivot",description:"Identify and exploit opportunities that emerge from the disruption",projected_outcome:"High upside potential if disruption creates market gaps, but requires capital and risk appetite",probability:.4,risk:"high",tradeoffs:["Requires significant capital deployment under uncertainty","Reputational risk of appearing to profit from crisis","Competitive advantage if successful"]})),u&&s.push({id:"path_containment",label:"Contain and Communicate",description:"Prioritize damage containment with transparent stakeholder communication",projected_outcome:"Faster trust recovery but full exposure of extent of issue",probability:.7,risk:"moderate",tradeoffs:["Transparency vs. legal exposure","Speed of communication vs. accuracy","Short-term pain for long-term trust"]});s.length<Math.min(o,2);)s.push({id:`path_${s.length+1}`,label:`Analysis Path ${s.length+1}`,description:`Structured analysis branch ${s.length+1} for the given scenario`,projected_outcome:"Outcome depends on assumptions and constraint satisfaction",probability:.5,risk:"moderate",tradeoffs:["Requires further analysis to fully evaluate"]});return s.slice(0,o)}function Ij(e,t){const n=[],r=e.assumptions;return r!=null&&r.severity&&n.push({assumption:`Severity is "${r.severity}"`,challenge:"Severity assessments made early in a developing situation are frequently revised. Historical data shows initial severity estimates are wrong 40% of the time.",impact_if_wrong:r.severity==="high"||r.severity==="critical"?"If severity is actually lower, you may over-allocate resources and signal panic unnecessarily":"If severity is actually higher, delayed response compounds damage exponentially",severity:"high"}),((r==null?void 0:r.time_pressure)==="urgent"||(r==null?void 0:r.time_pressure)==="immediate")&&n.push({assumption:`Time pressure is "${r.time_pressure}"`,challenge:"Perceived urgency often compresses decision quality. Consider whether the urgency is real (external deadline) or manufactured (internal anxiety).",impact_if_wrong:"Rushing decisions under false urgency leads to commitment to suboptimal paths that are costly to reverse",severity:"moderate"}),(r==null?void 0:r.environmental_hostility)==="high"&&n.push({assumption:"Environment is highly hostile",challenge:"High-hostility assessments can become self-fulfilling. Adversarial framing may close cooperative paths that actually exist.",impact_if_wrong:"Missing diplomatic or cooperative solutions that could resolve the situation at lower cost",severity:"moderate"}),r!=null&&r.regulatory_climate||n.push({assumption:"Regulatory climate not specified (implicitly assumed irrelevant)",challenge:"Most significant scenarios have regulatory dimensions. Ignoring regulatory context often leads to strategies that are technically optimal but legally problematic.",impact_if_wrong:"Strategy may be invalidated by regulatory action, requiring costly pivots",severity:"moderate"}),t.length>0&&t.every(o=>o.disposition!=="hostile")&&n.push({assumption:"No hostile stakeholders identified",challenge:"Every significant scenario has adversarial actors, even if they're not immediately obvious. Consider second-order stakeholders (competitors, media, regulators).",impact_if_wrong:"Blind-sided by opposition that could have been anticipated and planned for",severity:"high"}),n}function Mj(e,t){const n=[];return n.push({id:"outcome_best",label:"Best Case",conditions:"Key assumptions hold, stakeholders react rationally, no secondary shocks",outcome:"Situation resolves with minimal damage. Well-positioned actors gain competitive advantage from demonstrated competence.",likelihood:.2,impact:"positive"}),n.push({id:"outcome_likely",label:"Most Likely",conditions:"Mixed assumption validity, some stakeholder volatility, one secondary complication",outcome:"Moderate disruption requiring 2-4 adjustment cycles. Organizations with pre-planned responses fare significantly better.",likelihood:.5,impact:"negative"}),n.push({id:"outcome_worst",label:"Worst Case",conditions:"Key assumptions fail, cascading stakeholder reactions, multiple secondary shocks",outcome:"Extended disruption with structural changes to the operating environment. Recovery requires fundamental strategy revision.",likelihood:.15,impact:"very_negative"}),(t.depth==="full"||t.depth==="exhaustive")&&n.push({id:"outcome_tail",label:"Tail Risk / Black Swan",conditions:"Scenario triggers cascade effects that fundamentally alter the landscape",outcome:"Paradigm shift. Previous assumptions about the operating environment become obsolete. Winners are those who recognized the shift earliest.",likelihood:.05,impact:"very_negative"}),n}function Oj(e,t,n){const r=[];r.push({priority:1,action:"Validate your highest-severity assumptions before committing resources",rationale:`${t.length} assumptions were challenged. The cost of validating is far lower than the cost of acting on wrong assumptions.`,timeframe:"Immediately (next 2-4 hours)",risk_of_inaction:"Committing to a strategy built on unchecked assumptions compounds error at every step"});const o=[...e].sort((s,i)=>{const l={low:0,moderate:1,high:2,critical:3};return l[s.risk]-l[i.risk]})[0];return o&&r.push({priority:2,action:`Prepare to execute "${o.label}" as your default path while monitoring for signals that warrant pivoting`,rationale:`This path has the best risk-adjusted probability (${(o.probability*100).toFixed(0)}% success, ${o.risk} risk)`,timeframe:"Within 24 hours",dependencies:["Assumption validation (Priority 1)"],risk_of_inaction:"Without a default path, decision paralysis sets in and you lose initiative"}),n.stakeholders&&n.stakeholders.length>0&&r.push({priority:3,action:"Map stakeholder communication sequences — who hears what, when, and from whom",rationale:"Stakeholder reactions are often more damaging than the scenario itself. Controlled communication prevents information cascades.",timeframe:"Within 12 hours",risk_of_inaction:"Stakeholders who learn about the situation from external sources react 3x more negatively"}),r.push({priority:r.length+1,action:"Establish real-time monitoring for the 3-5 signals that would invalidate your chosen path",rationale:"Scenarios evolve. The strategy you choose today may need revision tomorrow. Knowing WHEN to pivot is as important as knowing WHERE to pivot.",timeframe:"Within 48 hours",risk_of_inaction:"Without monitoring triggers, you discover path failure too late to course-correct"}),r}async function Lj(e){var k,j,A,P,O,M,U;const t=Date.now(),n=Pj(),r=jj(e);if(!r.valid)return{status:"error",error:{code:r.error.code,message:r.error.message},reasoning_id:n,timestamp:new Date().toISOString()};const o=e.depth??"standard";e.perspective;const s=_j(e.stakeholders),i=Cj(e),l=i.checks;if(!i.allowed)return{status:"error",error:{code:"GOVERNANCE_VIOLATION",message:`Reasoning blocked by governance: ${i.blockReason??"governance check failed"}`,detail:l.filter(T=>!T.passed).map(T=>T.detail).join("; ")},reasoning_id:n,timestamp:new Date().toISOString()};const c=Aj(Dj(e),s,o),u=Ij(e,s),f=Mj(c,e),d=Oj(c,u,e),p={summary:$j(e,c,u),paths:c,projected_outcomes:f,assumption_challenges:u,recommendations:d,key_uncertainties:Fj(e,c),missing_questions:zj(e,s)};let m;if((k=e.swarm)!=null&&k.enabled&&s.length>0){const T=await Hy(e.scenario,s,c,e.swarm);m=T.result,T.source}const b=e.goal?"goal":e.mode??"explore";let h;b==="goal"&&e.goal&&(h=await aj(e,s));const x=[...Bj(e),...i.enforcedConstraints];let y;if(m){const T=m.rounds.flatMap(z=>z.reactions??[]);if(T.length>0){const z=T.map(L=>L.impact??0),$=z.reduce((L,G)=>L+G,0)/z.length;Math.max(...z.map(L=>Math.abs(L)));const B=z.reduce((L,G)=>L+(G-$)**2,0)/z.length;let E=1-Math.min(1,B*3+Math.max(0,-$));(m.trajectory==="converging"||m.trajectory==="stabilizing")&&(E=Math.min(1,E+.15)),m.trajectory==="escalating"&&(E=Math.max(0,E-.2)),m.trajectory==="diverging"&&(E=Math.max(0,E-.15));const _=x.length;E=Math.min(1,E+_*.02),y=Math.round(Math.max(0,Math.min(100,E*100)))}}let v;if(m){const T=m.rounds.flatMap(z=>z.reactions??[]);if(T.length>0){const z=T.map(_=>_.impact??0),$=z.reduce((_,L)=>_+L,0)/z.length,B=Math.max(...z.map(_=>Math.abs(_)));let E=0;m.trajectory==="escalating"&&(E+=.35),m.trajectory==="diverging"&&(E+=.25),$<-.3&&(E+=.25),B>.7&&(E+=.15),E=Math.min(.95,E),E>.5?v="high":E>.3?v="moderate":E>.1?v="low":v="none"}}const w=i.guardVerdict?{guard_status:i.guardVerdict.status,world_viability:(j=i.governanceSignals)==null?void 0:j.viability,world_collapsed:(A=i.governanceSignals)==null?void 0:A.collapsed,collapse_risk:v??((P=i.governanceSignals)==null?void 0:P.collapseRisk),rules_fired:((O=i.governanceSignals)==null?void 0:O.rulesFired)??x.length,world_health_score:y??((M=i.validationReport)==null?void 0:M.summary.completenessScore),invariant_coverage:(U=i.validationReport)==null?void 0:U.summary.invariantCoverage}:void 0,S={trace_id:Tj(),constitutional_checks:l,authority_level:"ANALYSIS_ONLY",enforced_constraints:x,timestamp:new Date().toISOString(),engine_version:Ej,neuroverse:w},C={processing_time_ms:Date.now()-t,depth_used:o,paths_explored:c.length+((h==null?void 0:h.strategies.length)??0),assumptions_challenged:u.length,timestamp:new Date().toISOString()};return{reasoning_id:n,status:"completed",analysis:p,governance:S,swarm:m,goal_reasoning:h,mode:b,meta:C}}function Dj(e){return e.scenario}function $j(e,t,n){const r=t.length,o=n.length,s=t.filter(i=>i.risk==="high"||i.risk==="critical").length;return`Analyzed ${r} decision paths for this scenario. ${o} of your assumptions were challenged. `+(s>0?`${s} path${s>1?"s":""} carry high or critical risk. `:"No paths carry critical risk. ")+"Recommendation: validate assumptions before committing to a path."}function Fj(e,t){var r,o;const n=[];return n.push("How secondary stakeholders (not yet identified) will react"),n.push("Whether the situation will escalate or de-escalate in the next 48 hours"),(((r=e.assumptions)==null?void 0:r.severity)==="high"||((o=e.assumptions)==null?void 0:o.severity)==="critical")&&n.push("Whether severity assessment is accurate or inflated by recency bias"),t.some(s=>s.probability<.3)&&n.push("Low-probability paths may have outsized impact if they materialize"),n}function zj(e,t){var r,o,s;const n=[];return(r=e.constraints)!=null&&r.time_horizon||n.push("What is your time horizon for this decision?"),(o=e.constraints)!=null&&o.risk_tolerance||n.push("What is your risk tolerance — conservative, moderate, or aggressive?"),t.length===0&&n.push("Who are the key stakeholders affected by this scenario?"),(s=e.assumptions)!=null&&s.regulatory_climate||n.push("What regulatory frameworks apply to this situation?"),n.push("What is your fallback position if your primary strategy fails?"),n.push("Who are your adversaries in this scenario, and what are their incentives?"),n}function Bj(e){var n,r;const t=["ANALYSIS_ONLY: No execution authority — reasoning output is advisory","STATELESS: No scenario data stored after response","GOVERNANCE_TRACED: All reasoning paths auditable"];if((n=e.constraints)!=null&&n.regulatory){const o=Array.isArray(e.constraints.regulatory)?e.constraints.regulatory.join(", "):e.constraints.regulatory;t.push(`REGULATORY: ${o} framework(s) applied`)}return(r=e.constraints)!=null&&r.risk_tolerance&&t.push(`RISK_BOUNDED: ${e.constraints.risk_tolerance} tolerance enforced`),t}const Vj=[{id:"ai_translator",type:"ai",permissions:["translate_input"],constraints:["must_output_valid_schema","no_invention_of_events","confidence_must_be_provided"]},{id:"ai_analyst",type:"ai",permissions:["generate_report","summarize_trace"],constraints:["must_reference_trace","must_include_blocked_actions","must_include_metrics","no_unverifiable_claims","no_speculation_without_flag"]}];class nf{constructor(){Sf(this,"name","deterministic")}async translate(t){const n=[],r=t.toLowerCase();return(r.includes("sell")||r.includes("panic")||r.includes("crash"))&&n.push({type:"market_shock",action:"sell_pressure",impact:-.7,confidence:.6,severity:.8}),(r.includes("buy")||r.includes("rally")||r.includes("recover"))&&n.push({type:"market_recovery",action:"buy_pressure",impact:.5,confidence:.5,severity:.3}),n.length===0&&n.push({type:"unstructured_input",action:"needs_ai_translation",impact:0,confidence:.3,metadata:{raw:t}}),n}async summarize(t){return Gy(t)}}function Gy(e){const{metrics:t,interventions:n,governanceStats:r,rounds:o}=e,s=o.filter(m=>m.interventions.length>0).slice(0,5).map(m=>{const b=[...new Set(m.reactions.map(x=>x.agent))],h=m.interventions.some(x=>x.includes("[BLOCK]"));return{round:m.round,description:m.interventions[0].replace(/^\[.*?\]\s*/,""),agents:b,severity:h?"high":"moderate"}}),i=n.slice(0,10).map(m=>{const b=m.match(/^\[(BLOCK|PAUSE|GATE-\d+)\]\s*(.*?):\s*(.*)/);if(b){const h=b[1];return{type:h==="BLOCK"?"BLOCK":h==="PAUSE"?"PAUSE":h.startsWith("GATE")?"CIRCUIT_BREAKER":"REBALANCE",agent:b[2].trim(),description:b[3].trim()}}return{type:"REBALANCE",agent:"system",description:m}}),l=r.blocks,c=n.length,u=(t.stabilityScore*100).toFixed(0),f=(t.collapseProbability*100).toFixed(0),d=l>0?`Governance engine blocked ${l} high-risk actions and applied ${c} interventions. System stability: ${u}%. Collapse probability held at ${f}%.`:`Governance constraints applied ${c} interventions, maintaining ${u}% system stability with ${f}% collapse risk.`,p=[];return l>2&&p.push("Multiple block events indicate aggressive agent behavior was successfully contained by invariant enforcement."),t.stabilityScore>.6&&p.push("Governance rules maintained system stability above critical thresholds throughout the simulation."),t.maxVolatility>.5&&p.push(`Peak volatility of ${(t.maxVolatility*100).toFixed(0)}% was dampened by circuit breaker gates.`),r.rulesFired>3&&p.push(`${r.rulesFired} world rules fired during deterministic simulation, shaping agent behavior across rounds.`),p.length===0&&p.push("Governance constraints maintained equilibrium with minimal intervention required."),{executiveSummary:d,keyEvents:s,governanceActions:i,metrics:{volatilityReduction:`${(t.maxVolatility*100).toFixed(0)}% peak`,collapseRisk:`${f}%`,stabilityScore:`${u}%`,interventionCount:c,blockedActions:l},counterfactual:c>3?`Without governance constraints, ${l} blocked actions would have proceeded unchecked, likely increasing volatility beyond recovery thresholds.`:void 0,observations:p,generatedBy:"deterministic",governedBy:"NeuroverseOS"}}const Ky=new Map;Ky.set("deterministic",()=>new nf);function Uj(e){const t=e??"deterministic",n=Ky.get(t);return n?n():(console.warn(`AI provider "${t}" not found, falling back to deterministic`),new nf)}async function Hj(e,t,n){var s;const r=[];e.permissions.includes(t)||r.push(`Actor ${e.id} lacks permission for action: ${t}`);const o=await n();if(o&&typeof o=="object"){const i=o;for(const l of e.constraints)l==="must_include_blocked_actions"&&(!i.governanceActions||i.governanceActions.length===0)&&(s=i.metrics)!=null&&s.blockedActions&&i.metrics.blockedActions>0&&r.push("Report missing governance action details despite blocks occurring"),l==="must_include_metrics"&&(i.metrics||r.push("Report missing required metrics section"))}return{result:o,actor:e.id,action:t,governed:!0,trace:{constraints:e.constraints,passed:r.length===0,violations:r}}}const Wj=Object.freeze(Object.defineProperty({__proto__:null,AI_ROLES:Vj,DeterministicProvider:nf,evaluateAIAction:Hj,generateDeterministicReport:Gy,getAIProvider:Uj},Symbol.toStringTag,{value:"Module"}));function Gj(e){return e.includes("hormuz")||e.includes("strait")?"geopolitical":e.includes("gas")||e.includes("price")?"economic":e.includes("ai")||e.includes("regulation")?"regulation":"custom"}function Kj(e){const t={low:20,moderate:40,high:70,critical:90},n={low:20,moderate:50,high:80},r={none:10,low:25,moderate:50,urgent:75,immediate:95},o={permissive:20,neutral:40,strict:70,adversarial:90};return{severity:t[e.severity??"moderate"]??50,environmentalHostility:n[e.environmental_hostility??"moderate"]??50,timePressure:r[e.time_pressure??"moderate"]??50,regulatoryClimate:o[e.regulatory_climate??"neutral"]??50}}function Qj(e){const t=e.severity>=80?"critical":e.severity>=60?"high":e.severity>=35?"moderate":"low",n=e.environmentalHostility>=60?"high":e.environmentalHostility>=35?"moderate":"low",r=e.timePressure>=85?"immediate":e.timePressure>=65?"urgent":e.timePressure>=40?"moderate":e.timePressure>=20?"low":"none",o=e.regulatoryClimate>=80?"adversarial":e.regulatoryClimate>=60?"strict":e.regulatoryClimate>=35?"neutral":"permissive";return{severity:t,environmental_hostility:n,time_pressure:r,regulatory_climate:o}}const Yj=Object.entries(Cu).map(([e,t])=>({id:e,title:t.title,description:t.scenario.slice(0,120)+(t.scenario.length>120?"...":""),tags:[...t.tags??[]],stakeholderCount:t.stakeholders.length,type:Gj(e),defaultSliders:Kj(t.assumptions)}));function Xj(e){return e==="critical"||e==="high"?"high":e==="moderate"?"medium":"low"}function qj(e){var o;const t=e.analysis.paths,r=(o=[...t].sort((s,i)=>{const l={low:0,moderate:1,high:2,critical:3};return l[s.risk]-l[i.risk]})[0])==null?void 0:o.id;return t.map(s=>({name:s.label,description:s.description,probability:Math.round(s.probability*100),riskLevel:Xj(s.risk),tradeoffs:[...s.tradeoffs],recommended:s.id===r}))}function Zj(e){const t=e.analysis.paths.slice(0,3),n=[...new Set([...t.flatMap(i=>[...i.benefits_stakeholders??[],...i.harms_stakeholders??[]])])].slice(0,6),r=t.map(i=>i.label),o=n.length>0?n:["Stakeholder A","Stakeholder B","Stakeholder C"],s=o.map(i=>t.map(l=>{var c,u;return(c=l.benefits_stakeholders)!=null&&c.includes(i)?"positive":(u=l.harms_stakeholders)!=null&&u.includes(i)?"negative":"neutral"}));return{strategies:r,stakeholders:o,reactions:s}}function Jj(e){const t={very_positive:2,positive:4,neutral:5,negative:7,very_negative:9};return e.analysis.projected_outcomes.map(n=>({label:n.label,type:n.label.toLowerCase().includes("best")?"best":n.label.toLowerCase().includes("likely")?"likely":n.label.toLowerCase().includes("worst")?"worst":"tail",conditions:n.conditions,description:n.outcome,likelihood:Math.round(n.likelihood*100),impactRating:t[n.impact]??5}))}function e2(e){return e.analysis.assumption_challenges.map(t=>({assumption:t.assumption,whyItMightFail:t.challenge,whatChanges:t.impact_if_wrong,severity:t.severity==="critical"?"critical":t.severity}))}function t2(e){return e.analysis.recommendations.map(t=>({priority:t.priority,action:t.action,rationale:t.rationale,timeframe:t.timeframe}))}function n2(e){const t=e.governance;if(t)return{traceId:t.trace_id,constitutionalChecks:t.constitutional_checks.map(n=>({ruleId:n.rule_id,rule:n.rule,passed:n.passed,detail:n.detail})),authorityLevel:t.authority_level,enforcedConstraints:[...t.enforced_constraints],timestamp:t.timestamp,engineVersion:t.engine_version,neuroverse:t.neuroverse?{guardStatus:t.neuroverse.guard_status,worldViability:t.neuroverse.world_viability,worldCollapsed:t.neuroverse.world_collapsed,collapseRisk:t.neuroverse.collapse_risk,rulesFired:t.neuroverse.rules_fired,worldHealthScore:t.neuroverse.world_health_score,invariantCoverage:t.neuroverse.invariant_coverage}:void 0}}function r2(e){var p;const t=e.analysis.paths,n=e.analysis.assumption_challenges,r=t.filter(m=>m.risk==="high"||m.risk==="critical").length,o=t.reduce((m,b)=>m+b.probability,0)/Math.max(t.length,1),s=(p=e.governance)==null?void 0:p.neuroverse,i=s==null?void 0:s.world_health_score,l=s==null?void 0:s.collapse_risk;let c="medium",u;const d=o-(l==="high"?.15:l==="moderate"?.08:0);return n.length<=1&&r===0&&d>.6?(c="high",u=`Analysis covers ${t.length} paths with low assumption risk and strong probability signals.`,i&&i<70&&(c="medium",u+=` System stability at ${i}% — moderate uncertainty from simulation dynamics.`)):n.length>=4||r>=2||d<.3?(c="low",u=`High uncertainty: ${n.length} assumptions challenged, ${r} high-risk paths, average probability ${(o*100).toFixed(0)}%.`,l==="high"&&(u+=" Elevated collapse risk detected in simulation.")):(u=`Moderate confidence: ${t.length} paths analyzed, ${n.length} assumptions challenged.`,i?u+=` System stability: ${i}%.`:u+=" Some uncertainty remains."),{level:c,reason:u}}function o2(e,t){var r,o,s,i,l,c;const n=[];return(r=e.assumptions)!=null&&r.severity&&n.push({text:`Severity is ${e.assumptions.severity}`,source:"caller"}),(o=e.assumptions)!=null&&o.time_pressure&&n.push({text:`Time pressure is ${e.assumptions.time_pressure}`,source:"caller"}),(s=e.assumptions)!=null&&s.environmental_hostility&&n.push({text:`Environmental hostility is ${e.assumptions.environmental_hostility}`,source:"caller"}),(i=e.assumptions)!=null&&i.regulatory_climate&&n.push({text:`Regulatory climate is ${e.assumptions.regulatory_climate}`,source:"caller"}),e.stakeholders&&e.stakeholders.length>0&&n.push({text:`${e.stakeholders.length} stakeholders identified with known dispositions`,source:"inferred"}),(l=e.constraints)!=null&&l.time_horizon||n.push({text:"No explicit time horizon — using general framework",source:"default"}),(c=e.constraints)!=null&&c.risk_tolerance||n.push({text:"Risk tolerance not specified — assuming moderate",source:"default"}),n}function s2(e,t){return{paths:qj(e),matrix:Zj(e),outcomes:Jj(e),challenges:e2(e),recommendations:t2(e),governance:n2(e),confidence:r2(e),keyAssumptions:o2(t),goalResult:e.goal_reasoning,mode:e.mode,lastRequest:t}}async function i2(e,t,n){var f;const r=typeof e=="string"?e:((f=Cu[e.id])==null?void 0:f.scenario)??e.description,o=Qj(t),s=typeof e=="object"?e.id:void 0,i=s?Cu[s]:void 0;let l;n!=null&&n.stakeholders&&n.stakeholders.length>0?l=n.stakeholders.map(d=>({id:d.id,disposition:d.disposition})):i!=null&&i.stakeholders&&(l=[...i.stakeholders]);const c={scenario:r,stakeholders:l,assumptions:o,constraints:n!=null&&n.constraints?{time_horizon:n.constraints.timeHorizon||void 0,risk_tolerance:n.constraints.riskTolerance,budget:n.constraints.budget||void 0}:i==null?void 0:i.constraints,depth:(n==null?void 0:n.depth)??"full",perspective:"strategic_advisor",swarm:(i==null?void 0:i.swarm)??{enabled:!0,rounds:3,reaction_model:"mixed"},mode:n==null?void 0:n.mode,goal:n==null?void 0:n.goal},u=await Lj(c);return u.status==="error"?{paths:[],matrix:{strategies:[],stakeholders:[],reactions:[]},outcomes:[],challenges:[],recommendations:[]}:s2(u,c)}function Qy(e){const t=e.trim();if(t.startsWith("{")||t.startsWith("["))try{const n=JSON.parse(t);return a2(n)?"mirofish":"generic_json"}catch{}return l2(t)?"anylogic_csv":c2(t)?"netlogo":u2(t)?"mesa":"freeform_text"}function a2(e){if(typeof e!="object"||e===null)return!1;const t=e;return(Array.isArray(t.agents)||Array.isArray(t.fish)||Array.isArray(t.swarm))&&(t.emergent_behaviors!==void 0||t.emergent_dynamics!==void 0||t.timeline!==void 0||t.simulation!==void 0)}function l2(e){const t=e.split(`
|
|
249
|
-
`).filter(l=>l.trim());if(t.length<2)return!1;const n=t[0];if(!n.includes(","))return!1;const r=n.split(",").map(l=>l.trim()),o=t[1].split(","),s=r.some(l=>/^[a-zA-Z_]/.test(l)),i=o.some(l=>!isNaN(Number(l.trim())));return s&&i&&r.length>=2}function c2(e){const t=e.split(`
|
|
250
|
-
`).filter(i=>i.trim()),n=/^[\w-]+\s*:\s*.+$/,r=/tick|step|round|iteration/i,o=t.filter(i=>n.test(i.trim())).length,s=t.some(i=>r.test(i));return o>=3&&o>=t.length*.5||o>=2&&s}function u2(e){const t=e.split(`
|
|
251
|
-
`).filter(o=>o.trim()),n=/^(?:agent|player|entity)\s+\d+\s*:\s*.+$/i,r=t.filter(o=>n.test(o.trim())).length;return r>=2&&r>=t.length*.3}function d2(e){switch(Qy(e)){case"mirofish":return f2(e);case"netlogo":return m2(e);case"mesa":return p2(e);case"anylogic_csv":return h2(e);case"generic_json":return g2(e);case"freeform_text":return v2(e)}}function f2(e){const t=JSON.parse(e.trim()),n=[],r=[],o=[],s=[],i=[],l=[],c=t.agents||t.fish||t.swarm||[];for(const f of c)n.push({id:f.id||f.name||f.type||`agent_${n.length}`,type:f.type||f.role||"agent",state:f.state||f.status,action:f.reaction||f.action||f.behavior,attributes:Yy(f,["id","name","type","role","state","status","reaction","action","behavior"])}),(f.reaction||f.action)&&r.push({agents:[f.id||f.name||f.type],action:f.reaction||f.action,category:"reaction"});const u=[];if(t.emergent_behaviors)for(const f of Array.isArray(t.emergent_behaviors)?t.emergent_behaviors:[t.emergent_behaviors])u.push(typeof f=="string"?f:JSON.stringify(f));if(t.emergent_dynamics)for(const f of Array.isArray(t.emergent_dynamics)?t.emergent_dynamics:[t.emergent_dynamics])u.push(typeof f=="string"?f:JSON.stringify(f));if(t.timeline&&Array.isArray(t.timeline)){for(const f of t.timeline)if(typeof f=="object"){const{time:d,step:p,round:m,tick:b,...h}=f;i.push({time:d??p??m??b??i.length,state:h})}}if(t.steps&&Array.isArray(t.steps))for(const f of t.steps){const d=f.step??f.round??i.length;if(f.actions&&Array.isArray(f.actions))for(const p of f.actions)r.push({time:d,agents:p.agent?[p.agent]:void 0,action:p.action||p.type||JSON.stringify(p),effect:p.result||p.effect,category:"action"})}for(const[f,d]of Object.entries(t))typeof d=="number"&&!["version","seed","id"].includes(f)&&s.push({name:$r(f),value:d});return{sourceFormat:"mirofish",agents:n,events:r,stateChanges:o,coalitions:l,metrics:s,timeline:i,emergentBehaviors:u.length>0?u:void 0,summary:t.summary||t.description}}function m2(e){const t=e.split(`
|
|
252
|
-
`).filter(l=>l.trim()),n=[],r=[],o=[];let s;for(const l of t){const c=l.trim(),u=c.match(/(?:tick|step|round|iteration)\s*[:#=]?\s*(\d+)/i);if(u){s=parseInt(u[1]);continue}const f=c.match(/^([\w-]+)\s*:\s*(.+)$/);if(f){const p=f[1].trim(),m=f[2].trim(),b=parseFloat(m.replace("%",""));if(isNaN(b))o.push({id:p,type:"entity",state:m});else{const h=m.includes("%");n.push({name:$r(p),value:h?b/100:b,unit:h?"%":void 0}),r.push({variable:p,to:h?b/100:b,time:s})}continue}const d=c.match(/^([\w-]+)\s+([-\d.]+%?)$/);if(d){const p=parseFloat(d[2].replace("%",""));isNaN(p)||n.push({name:$r(d[1]),value:d[2].includes("%")?p/100:p,unit:d[2].includes("%")?"%":void 0})}}const i=/consumer|producer|trader|voter|citizen|firm|bank|government|regulator/i;for(const l of n){const c=l.name.match(i);c&&!o.some(u=>u.type===c[0].toLowerCase())&&o.push({id:c[0].toLowerCase(),type:c[0].toLowerCase(),attributes:{[l.name]:l.value}})}return{sourceFormat:"netlogo",agents:o,events:[],stateChanges:r,coalitions:[],metrics:n,timeline:s!==void 0?[{time:s,state:Object.fromEntries(n.map(l=>[l.name,l.value]))}]:[]}}function p2(e){const t=e.split(`
|
|
253
|
-
`).filter(s=>s.trim()),n=[],r=[],o=new Map;for(const s of t){const i=s.trim(),l=i.match(/^(?:agent|player|entity)\s+(\w+)\s*:\s*(.+)$/i);if(l){const u=l[1],f=l[2].trim();if(o.has(u))o.get(u).action=f;else{const d={id:`agent_${u}`,type:"agent",action:f};o.set(u,d),n.push(d)}r.push({agents:[`agent_${u}`],action:f,category:"action"});continue}const c=i.match(/^([A-Z][\w\s]+?)\s*:\s*(.+)$/);if(c){const u=c[1].trim(),f=c[2].trim();if(!o.has(u)){const d={id:u,type:ja(u),action:f};o.set(u,d),n.push(d)}r.push({agents:[u],action:f,category:"action"})}}return{sourceFormat:"mesa",agents:n,events:r,stateChanges:[],coalitions:[],metrics:[],timeline:[]}}function h2(e){var u;const t=e.split(`
|
|
254
|
-
`).filter(f=>f.trim());if(t.length<2)return y2("anylogic_csv");const n=t[0].split(",").map(f=>f.trim().replace(/^["']|["']$/g,"")),r=[],o=[],s=new Map,i=n.findIndex(f=>/^(time|tick|step|round|t|timestamp|period|year|month|day|date)$/i.test(f));for(let f=1;f<t.length;f++){const d=t[f].split(",").map(b=>b.trim().replace(/^["']|["']$/g,""));if(d.length<n.length)continue;const p=i>=0?isNaN(Number(d[i]))?d[i]:Number(d[i]):f,m={};for(let b=0;b<n.length;b++){if(b===i)continue;const h=d[b],x=Number(h);m[n[b]]=isNaN(x)?h:x,isNaN(x)||(s.has(n[b])||s.set(n[b],[]),s.get(n[b]).push({time:p,value:x}))}r.push({time:p,state:m})}for(const[f,d]of s){const p=d[d.length-1].value,m=d[0].value,b=d.length<2?"stable":p>m*1.05?"rising":p<m*.95?"falling":"stable";o.push({name:$r(f),value:p,trend:b,series:d})}const l=[],c=/consumer|producer|trader|voter|citizen|firm|bank|government|regulator|price|supply|demand/i;for(const f of n)if(f.match(c)){const p=(u=r[r.length-1])==null?void 0:u.state;l.push({id:f,type:ja(f),attributes:p?{value:p[f]}:void 0})}return{sourceFormat:"anylogic_csv",agents:l,events:[],stateChanges:[],coalitions:[],metrics:o,timeline:r}}function g2(e){const t=JSON.parse(e.trim()),n=[],r=[],o=[],s=[],i=[],l=[];function c(u,f=""){if(Array.isArray(u)){if(u.length>0&&typeof u[0]=="object"&&u[0]!==null){const d=u[0];if(d.id||d.name||d.agent||d.type){for(const p of u){const m=p;n.push({id:String(m.id||m.name||m.agent||`${f}_${n.length}`),type:String(m.type||m.role||m.class||"agent"),state:m.state?String(m.state):void 0,action:m.action?String(m.action):m.reaction?String(m.reaction):void 0,attributes:Yy(m,["id","name","agent","type","role","class","state","action","reaction"])})}return}if(d.time||d.step||d.tick){for(const p of u){const m=p,b=m.time??m.step??m.tick??i.length,h={};for(const[x,y]of Object.entries(m))["time","step","tick"].includes(x)||(typeof y=="number"||typeof y=="string"||typeof y=="boolean")&&(h[x]=y);i.push({time:b,state:h})}return}if(d.action||d.event){for(const p of u){const m=p;r.push({agents:m.agent?[String(m.agent)]:m.agents?m.agents:void 0,action:String(m.action||m.event||m.type||"unknown"),effect:m.effect?String(m.effect):m.result?String(m.result):void 0,time:m.time??m.step,category:"action"})}return}}}else if(typeof u=="object"&&u!==null)for(const[d,p]of Object.entries(u))typeof p=="number"?o.push({name:$r(d),value:p}):typeof p=="object"&&c(p,f?`${f}.${d}`:d)}if(typeof t=="object"&&t!==null){const u=t;if(u.agents&&c(u.agents,"agents"),u.events&&c(u.events,"events"),u.timeline&&c(u.timeline,"timeline"),u.coalitions&&Array.isArray(u.coalitions))for(const f of u.coalitions){const d=f;l.push({name:String(d.name||`coalition_${l.length}`),members:Array.isArray(d.members)?d.members.map(String):[],objective:d.objective?String(d.objective):void 0,strength:typeof d.strength=="number"?d.strength:void 0})}for(const[f,d]of Object.entries(u))["agents","events","timeline","coalitions"].includes(f)||(typeof d=="number"?o.push({name:$r(f),value:d}):typeof d=="object"&&d!==null&&c(d,f))}return{sourceFormat:"generic_json",agents:n,events:r,stateChanges:s,coalitions:l,metrics:o,timeline:i,summary:typeof t.summary=="string"?t.summary:void 0}}function v2(e){const t=e.trim(),n=[],r=[],o=[],s=[/(?:agent|player|actor|entity|stakeholder)\s*[:#]?\s*["']?(\w[\w\s]{1,25}?)["']?(?:\n|,|;|\.|$)/gi,/^[-•*]\s*(\w[\w\s]{1,20}?)(?:\s*[-:—])/gm],i=new Set;for(const d of s){let p;for(;(p=d.exec(t))!==null;){const m=p[1].trim();m.length>1&&m.length<25&&!xp(m)&&!i.has(m.toLowerCase())&&(i.add(m.toLowerCase()),n.push({id:m,type:ja(m)}))}}const l=/(\w[\w\s]{1,20}?)\s*(?::|—)\s*(.+?)(?:\n|$)/g;let c;for(;(c=l.exec(t))!==null;){const d=c[1].trim(),p=c[2].trim();!xp(d)&&p.length>2&&(r.push({agents:[d],action:p,category:"action"}),i.has(d.toLowerCase())||(i.add(d.toLowerCase()),n.push({id:d,type:ja(d),action:p})))}const u=/(\w[\w\s]{1,30}?)\s*(?:=|:)\s*([-\d.]+%?)/g;let f;for(;(f=u.exec(t))!==null;){const d=f[1].trim(),p=f[2],m=parseFloat(p.replace("%",""));!isNaN(m)&&d.length>1&&o.push({name:$r(d),value:p.includes("%")?m/100:m,unit:p.includes("%")?"%":void 0})}return{sourceFormat:"freeform_text",agents:n,events:r,stateChanges:[],coalitions:[],metrics:o,timeline:[],summary:t.length>200?t.slice(0,200)+"...":t}}function y2(e){return{sourceFormat:e,agents:[],events:[],stateChanges:[],coalitions:[],metrics:[],timeline:[]}}function $r(e){return e.replace(/[-_]/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase()).trim()}function ja(e){const t=e.toLowerCase();return/consumer|buyer|customer|shopper/.test(t)?"consumer":/producer|supplier|manufacturer|seller/.test(t)?"producer":/government|regulator|fed|agency|authority/.test(t)?"regulator":/firm|company|corp|bank|enterprise/.test(t)?"firm":/trader|investor|speculator|market/.test(t)?"trader":/citizen|voter|public|population/.test(t)?"citizen":/politician|senator|president|leader/.test(t)?"politician":/media|press|journalist/.test(t)?"media":/military|army|defense|navy/.test(t)?"military":"agent"}function xp(e){return new Set(["the","and","for","with","from","that","this","then","but","not","are","was","were","has","have","had","will","would","could","should","may","might","step","round","tick","time","result","output","data"]).has(e.toLowerCase())}function Yy(e,t){const n={};let r=0;for(const[o,s]of Object.entries(e))t.includes(o)||(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&(n[o]=s,r++);return r>0?n:void 0}const Xy={mirofish:"MiroFish",netlogo:"NetLogo",mesa:"Mesa (Python)",anylogic_csv:"AnyLogic / CSV",generic_json:"JSON",freeform_text:"Text"};function x2(e){if(e.agents.length>0)return e.agents.slice(0,8).map(n=>n.id);const t=new Set;for(const n of e.events)if(n.agents)for(const r of n.agents)t.add(r);if(t.size>0)return Array.from(t).slice(0,8);for(const n of e.metrics){const r=n.name.toLowerCase();/consumer|producer|trader|government|firm|citizen/.test(r)&&t.add(n.name)}return t.size>0?Array.from(t).slice(0,8):["Alpha Agent","Beta Agent","Gamma Agent","Delta Agent","Epsilon Agent"]}function w2(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Math.abs(t)}function b2(e){let t=e;return()=>(t=(t*16807+0)%2147483647,t/2147483647)}function S2(e){const t=d2(e),n=t.sourceFormat,r=x2(t),o=w2(e),s=b2(o),i=t.emergentBehaviors&&t.emergentBehaviors.length>0?t.emergentBehaviors.map((x,y)=>({name:x.length>40?x.slice(0,40)+"...":x,description:x,strength:["strong","moderate","weak"][Math.min(y,2)],agents:r.filter(()=>s()>.4)})):N2(r,s),l=t.agents.length>0?t.agents.slice(0,8).map(x=>({agent:x.id,strategy:x.action||x.state||"Adaptive",rationale:x.action?`Agent exhibits "${x.action}" behavior based on simulation data`:"Strategy inferred from simulation context",effectiveness:Math.round(40+s()*55)})):k2(r,s),c=t.coalitions.length>0?t.coalitions.map(x=>({name:x.name,members:x.members,sharedObjective:x.objective||"Coordinated strategy",cohesion:x.strength??Math.round(50+s()*45)})):C2(r,s),u=E2(r,s),f=j2(r,s),d=_2(r,s),p=R2(r,d,s),m=P2(s),b=T2(r,s),h=A2(r,d);return{patterns:i,agentStrategies:l,coalitions:c,powerDynamics:u,equilibrium:f,paths:d,matrix:p,outcomes:m,challenges:b,recommendations:h,detectedFormat:n,formatLabel:Xy[n],normalized:t}}function N2(e,t){const n=[{name:"Convergent Herding",description:"Multiple agents independently converge on similar strategies, creating a dominant behavioral cluster."},{name:"Oscillatory Competition",description:"Agents cycle between cooperative and competitive strategies in a predictable pattern."},{name:"Resource Clustering",description:"Agents concentrate around high-value nodes, creating territorial dynamics."},{name:"Cascade Adoption",description:"Strategy adoption follows a cascade pattern — once critical mass is reached, remaining agents switch rapidly."},{name:"Minority Exploitation",description:"A small group of agents consistently outperforms by exploiting the majority strategy."},{name:"Symmetry Breaking",description:"Initially symmetric agents differentiate into specialized roles over time."},{name:"Delayed Retaliation",description:"Agents employ tit-for-tat with delay, creating cycles of cooperation and defection."}],r=3+Math.floor(t()*3),o=["strong","moderate","weak"];return n.slice(0,r).map(s=>({...s,strength:o[Math.floor(t()*3)],agents:e.filter(()=>t()>.4)}))}function k2(e,t){const n=[{strategy:"Tit-for-Tat",rationale:"Mirrors opponent behavior to incentivize cooperation while punishing defection."},{strategy:"Always Cooperate",rationale:"Maximizes collective welfare at the cost of individual exploitation risk."},{strategy:"Pavlov (Win-Stay, Lose-Shift)",rationale:"Repeats successful strategies and switches after failures — simple but adaptive."},{strategy:"Grim Trigger",rationale:"Cooperates until defected against, then permanently defects — extreme deterrence."},{strategy:"Random Walk",rationale:"Unpredictable strategy prevents exploitation but sacrifices optimization."},{strategy:"Generous Tit-for-Tat",rationale:"Occasionally forgives defection to escape mutual punishment cycles."},{strategy:"Exploitative Defection",rationale:"Systematically defects to extract maximum individual payoff from cooperators."},{strategy:"Adaptive Threshold",rationale:"Adjusts cooperation threshold based on environment — cooperates in friendly environments, defects in hostile ones."}];return e.map(r=>{const o=Math.floor(t()*n.length);return{agent:r,strategy:n[o].strategy,rationale:n[o].rationale,effectiveness:Math.round(40+t()*55)}})}function C2(e,t){if(e.length<3)return[];const n=[],r=["Resource maximization through coordinated strategy","Collective defense against exploitative agents","Market dominance through price coordination","Information sharing for competitive advantage"],o=[...e].sort(()=>t()-.5),s=Math.floor(o.length/2);return n.push({name:"Primary Coalition",members:o.slice(0,s+1),sharedObjective:r[Math.floor(t()*r.length)],cohesion:Math.round(50+t()*45)}),e.length>4&&n.push({name:"Counter-Coalition",members:o.slice(s+1),sharedObjective:r[Math.floor(t()*r.length)],cohesion:Math.round(30+t()*50)}),n}function E2(e,t){const n=["driver","reactor","stabilizer","disruptor"],r={driver:["Sets the strategic direction; other agents respond to this agent's moves.","Primary initiator of action; shapes the competitive landscape."],reactor:["Responds to others' strategies rather than initiating; adaptive but not proactive.","Follows dominant trends; optimizes within established dynamics."],stabilizer:["Acts as a moderating force; dampens oscillations and promotes equilibrium.","Consistently chooses cooperative strategies; anchors the system."],disruptor:["Introduces unpredictability; breaks established patterns and forces adaptation.","High-variance strategy creates opportunities and threats for all agents."]};return e.map(o=>{const s=n[Math.floor(t()*n.length)],i=r[s];return{agent:o,role:s,influence:Math.round(20+t()*75),description:i[Math.floor(t()*i.length)]}})}function j2(e,t){const n=[{type:"Nash Equilibrium",description:"The system has reached a state where no agent can unilaterally improve their outcome by changing strategy. This equilibrium is self-enforcing but may not be globally optimal."},{type:"Pareto Suboptimal Equilibrium",description:"Agents are locked in a stable but collectively suboptimal state. A coordinated deviation could improve all agents' outcomes, but individual incentives prevent it."},{type:"Cyclical Dynamics",description:"No stable equilibrium detected. The system oscillates between states as agents continuously adapt to each other's strategies."},{type:"Mixed Strategy Equilibrium",description:"Agents randomize between strategies with specific probabilities. The equilibrium is maintained through uncertainty rather than fixed strategies."}],r=n[Math.floor(t()*n.length)],o=t()>.4;return{isStable:o,type:r.type,description:r.description,stabilityScore:Math.round(o?55+t()*40:15+t()*35),vulnerabilities:["External shock could push agents to reassess strategies",e.length>3?`Coalition between ${e[0]} and ${e[1]} could destabilize current equilibrium`:"Small agent count increases sensitivity to individual strategy changes","Information asymmetry may be masking true strategic preferences"].slice(0,2+Math.floor(t()*2))}}function _2(e,t){const n=[{name:"Coalition Reinforcement",description:"Strengthen the dominant coalition by aligning incentives and reducing defection risk among members."},{name:"Disruptor Containment",description:"Isolate disruptive agents through coordinated exclusion or counter-strategies."},{name:"Equilibrium Shift",description:"Introduce strategic perturbation to move the system toward a more favorable equilibrium state."},{name:"Cooperation Incentive Design",description:"Restructure payoff matrices to make cooperation individually rational, not just collectively optimal."},{name:"Adaptive Monitoring",description:"Implement continuous strategy monitoring and adjust response in real-time based on agent behavior changes."}];let r=0;const o=n.map((s,i)=>{const l=Math.round(15+t()*30);return r+=l,{...s,probability:l,riskLevel:t()>.6?"high":t()>.3?"medium":"low",tradeoffs:[`May alienate ${e[Math.floor(t()*e.length)]}`,"Requires sustained coordination to maintain effectiveness","Outcome depends on accurate agent behavior modeling"].slice(0,2+Math.floor(t()*2)),recommended:i===0}});return o.forEach(s=>{s.probability=Math.round(s.probability/r*100)}),o}function R2(e,t,n){const r=t.slice(0,3).map(s=>s.name),o=e.map(()=>r.map(()=>{const s=n();return s>.55?"positive":s>.25?"neutral":"negative"}));return{strategies:r,stakeholders:e,reactions:o}}function P2(e){return[{label:"Best Case",type:"best",conditions:"All agents converge on cooperative equilibrium",description:"System achieves globally optimal state; all agents benefit from sustained cooperation.",likelihood:Math.round(10+e()*15),impactRating:Math.round(2+e()*2)},{label:"Most Likely",type:"likely",conditions:"Partial cooperation with persistent free-riding",description:"Dominant coalition maintains advantage while fringe agents exploit cooperative norms.",likelihood:Math.round(35+e()*20),impactRating:Math.round(4+e()*2)},{label:"Worst Case",type:"worst",conditions:"Coalition fracture and competitive spiral",description:"Trust breakdown triggers mutual defection; system degrades to non-cooperative equilibrium.",likelihood:Math.round(10+e()*15),impactRating:Math.round(7+e()*2)},{label:"Tail Risk",type:"tail",conditions:"Emergent adversarial strategy defeats all known counters",description:"Novel agent strategy exploits systemic vulnerability; cascading failures across the agent network.",likelihood:Math.round(2+e()*8),impactRating:Math.round(9+e())}]}function T2(e,t){return[{assumption:"Agents behave rationally",whyItMightFail:"Bounded rationality, information delays, and emergent complexity produce behaviors that deviate from game-theoretic optimality.",whatChanges:"Predictive models may fail; heuristic-based analysis becomes necessary.",severity:"high"},{assumption:"Agent strategies are observable",whyItMightFail:"Agents may employ deceptive signaling, masking true strategies behind observable actions.",whatChanges:"Strategy inference requires deeper behavioral analysis; surface patterns may mislead.",severity:"medium"},{assumption:"The environment is stationary",whyItMightFail:"Payoff structures and constraints may shift during the simulation, invalidating equilibrium analysis.",whatChanges:"Continuous recalibration needed; static equilibrium analysis insufficient.",severity:"high"},{assumption:`${e[0]} will maintain current strategy`,whyItMightFail:"Agents adapt over time; current strategy may be transitional rather than stable.",whatChanges:"Must model strategy evolution, not just current state.",severity:"medium"},{assumption:"Coalition structures are stable",whyItMightFail:"Internal incentive misalignment may cause coalition fracture under pressure.",whatChanges:"Coalition durability should be stress-tested; contingency plans for fracture needed.",severity:"critical"}].slice(0,3+Math.floor(t()*3))}function A2(e,t,n){const r=t.find(o=>o.recommended)||t[0];return[{priority:1,action:`Implement ${r.name}`,rationale:`Highest-probability intervention (${r.probability}%) for steering swarm behavior.`,timeframe:"Immediate"},{priority:2,action:"Monitor coalition stability metrics",rationale:"Early detection of coalition fracture enables preemptive intervention.",timeframe:"Continuous"},{priority:3,action:`Address ${e[e.length-1]} behavior pattern`,rationale:"Outlier agent behavior may indicate either exploitation or innovation; requires assessment.",timeframe:"Within next cycle"},{priority:4,action:"Run sensitivity analysis on payoff structure",rationale:"Small payoff changes may trigger large behavioral shifts; identify critical thresholds.",timeframe:"Before next iteration"}]}const wp="mirotir_theme";function qy(){const[e,t]=g.useState(()=>typeof window<"u"&&localStorage.getItem(wp)||"dark");g.useEffect(()=>{const r=document.documentElement;e==="light"?r.classList.add("light"):r.classList.remove("light"),localStorage.setItem(wp,e)},[e]);const n=g.useCallback(()=>{t(r=>r==="dark"?"light":"dark")},[]);return{theme:e,toggle:n}}const I2="/assets/mirotir-logo-DUexumBH.svg",M2=nl("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ce=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?wN:"button";return a.jsx(i,{className:W(M2({variant:t,size:n,className:e})),ref:s,...o})});Ce.displayName="Button";const O2=({showSimulatedFuture:e,theme:t,onToggleTheme:n,isSimulating:r})=>a.jsx("header",{className:"fixed top-0 left-0 right-0 z-50 border-b border-border bg-background/80 backdrop-blur-md",children:a.jsxs("div",{className:"container mx-auto flex items-center justify-between px-6 py-3",children:[a.jsx("div",{className:"flex items-center gap-3",children:a.jsx("img",{src:I2,alt:"Mirotir",className:"h-14 w-auto"})}),a.jsxs("div",{className:"flex items-center gap-4",children:[(r||e)&&a.jsxs("div",{className:"hidden md:flex items-center gap-2 rounded-full border border-emerald-500/30 bg-emerald-500/10 px-3 py-1.5",children:[a.jsx(ty,{className:"h-3 w-3 text-emerald-400 animate-pulse"}),a.jsx("span",{className:"text-[10px] font-bold uppercase tracking-[0.15em] text-emerald-400",children:"MiroFish"}),a.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-emerald-300/70",children:r?"Streaming":"Live"})]}),n&&a.jsx(Ce,{variant:"ghost",size:"icon",onClick:n,className:"h-9 w-9 rounded-full","aria-label":`Switch to ${t==="dark"?"light":"dark"} mode`,children:t==="dark"?a.jsx(_k,{className:"h-4 w-4 text-muted-foreground hover:text-foreground transition-colors"}):a.jsx(Nk,{className:"h-4 w-4 text-muted-foreground hover:text-foreground transition-colors"})}),a.jsx("div",{className:"hidden text-right md:block",children:e?a.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.2em] text-primary animate-pulse",children:"SIMULATED FUTURE"}):a.jsx("p",{className:"text-xs text-muted-foreground tracking-wider",children:"Explore decisions before reality does"})})]})]})}),L2=({governance:e})=>{const t=e==null?void 0:e.neuroverse;return a.jsx("footer",{className:"border-t border-border py-8",children:a.jsxs("div",{className:"container mx-auto px-6",children:[e&&a.jsxs("div",{className:"mx-auto mb-6 max-w-3xl space-y-3",children:[a.jsx("div",{className:"rounded-lg border border-border bg-card/50 px-5 py-3",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Gi,{className:"h-4 w-4 text-primary"}),a.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[a.jsxs("span",{children:["Authority: ",a.jsx("span",{className:"text-foreground font-medium",children:e.authorityLevel.replace(/_/g," ")})]}),a.jsxs("span",{children:[e.constitutionalChecks.length," rules checked"]}),a.jsxs("span",{children:["Trace: ",a.jsx("span",{className:"font-mono",children:e.traceId.slice(0,12)})]})]})]})}),t&&a.jsx("div",{className:"rounded-lg border border-border bg-card/50 px-5 py-3",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(fk,{className:"h-4 w-4 text-primary"}),a.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[a.jsxs("span",{children:["Governance: ",a.jsx("span",{className:`font-medium ${t.guardStatus==="ALLOW"?"text-emerald-400":t.guardStatus==="BLOCK"?"text-red-400":"text-yellow-400"}`,children:t.guardStatus})]}),t.worldViability&&a.jsxs("span",{children:["Status: ",a.jsx("span",{className:"text-foreground font-medium",children:t.worldViability})]}),t.rulesFired!==void 0&&a.jsxs("span",{children:[t.rulesFired," rules applied"]}),t.collapseRisk&&t.collapseRisk!=="none"&&a.jsxs("span",{children:["System risk: ",a.jsx("span",{className:`font-medium ${t.collapseRisk==="high"?"text-red-400":t.collapseRisk==="moderate"?"text-yellow-400":"text-emerald-400"}`,children:t.collapseRisk})]}),t.worldHealthScore!==void 0&&a.jsxs("span",{children:["Stability: ",t.worldHealthScore,"%"]})]})]})})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("p",{className:"mb-2 text-sm text-muted-foreground",children:"Powered by a governed multi-agent simulation engine"}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"We simulate, enforce rules, and analyze results."})]})]})})},D2={dark:{swarm:"#1B5E7B",reasoning:"#5BC0BE",future:"#ffffff"},light:{swarm:"#134A5E",reasoning:"#2D8B88",future:"#0F3A4A"}},bp=40,Sp=7,Np=3;function sc(e,t,n,r,o){if(n==="reasoning")return{x:e/(o+1)*(r+1),y:t*.5+(Math.random()-.5)*8,vx:.3+Math.random()*.2,vy:(Math.random()-.5)*.1,size:10+Math.random()*3,type:n,opacity:.9};if(n==="future")return{x:e*.75+r*30,y:t*.5+(r-1)*25,vx:.4+Math.random()*.3,vy:(r-1)*.15,size:7+Math.random()*2,type:n,opacity:.7};const s=Math.random()*Math.PI*2,i=40+Math.random()*100;return{x:e*.45+Math.cos(s)*i,y:t*.5+Math.sin(s)*i*.7,vx:(Math.random()-.5)*.5,vy:(Math.random()-.5)*.3,size:6+Math.random()*5,type:n,opacity:.5+Math.random()*.3}}function $2(e,t,n){const{x:r,y:o,size:s,vx:i,vy:l,opacity:c}=t,u=Math.atan2(l,i);e.save(),e.translate(r,o),e.rotate(u),e.globalAlpha=c,e.beginPath(),e.ellipse(0,0,s,s*.6,0,0,Math.PI*2),e.fillStyle=n,e.fill(),e.beginPath(),e.moveTo(-s*.7,-s*.45),e.lineTo(-s*1.4,0),e.lineTo(-s*.7,s*.45),e.closePath(),e.fill(),t.type!=="swarm"&&(e.beginPath(),e.arc(s*.3,-s*.15,s*.12,0,Math.PI*2),e.fillStyle="white",e.fill()),e.restore()}const F2=()=>{const{theme:e}=qy(),t=g.useRef(null),n=g.useRef([]),r=g.useRef(0),[o]=g.useState({width:400,height:320}),s=D2[e];return g.useEffect(()=>{const{width:i,height:l}=o,c=[];for(let p=0;p<bp;p++)c.push(sc(i,l,"swarm",p,bp));for(let p=0;p<Sp;p++)c.push(sc(i,l,"reasoning",p,Sp));for(let p=0;p<Np;p++)c.push(sc(i,l,"future",p,Np));n.current=c;const u=i*.45,f=l*.5;function d(){const p=t.current;if(!p)return;const m=p.getContext("2d");if(m){m.clearRect(0,0,i,l);for(const b of n.current){if(b.type==="swarm"){const x=u-b.x,y=f-b.y,v=Math.sqrt(x*x+y*y),w=60+Math.sin(Date.now()*.001+b.x)*30;b.vx+=x*3e-4,b.vy+=y*3e-4,b.vx+=-y*2e-4,b.vy+=x*2e-4,v<w&&(b.vx-=x*5e-4,b.vy-=y*5e-4),b.vx+=(Math.random()-.5)*.02,b.vy+=(Math.random()-.5)*.02,b.vx*=.99,b.vy*=.99}b.type==="reasoning"&&(b.vy+=(f-b.y)*.01,b.vy*=.95,b.vx=Math.max(.2,b.vx),b.x>i+20&&(b.x=-20)),b.type==="future"&&(b.vx=Math.max(.3,b.vx),b.x>i+20&&(b.x=i*.7,b.y=f+(Math.random()-.5)*50)),b.x+=b.vx,b.y+=b.vy,b.type==="swarm"&&(b.x<10&&(b.vx+=.1),b.x>i-10&&(b.vx-=.1),b.y<10&&(b.vy+=.1),b.y>l-10&&(b.vy-=.1));const h=b.type==="reasoning"?s.reasoning:b.type==="future"?s.future:s.swarm;$2(m,b,h)}r.current=requestAnimationFrame(d)}}return d(),()=>cancelAnimationFrame(r.current)},[o]),a.jsxs("div",{className:"relative",children:[a.jsx("canvas",{ref:t,width:o.width,height:o.height,className:"rounded-xl",style:{maxWidth:"100%",height:"auto"}}),a.jsx("div",{className:"absolute bottom-3 right-3",children:a.jsx("span",{className:"rounded bg-background/60 px-2 py-1 text-[10px] font-mono text-muted-foreground backdrop-blur",children:"LIVE SWARM"})})]})},z2=({onRunScenario:e,onPasteSimulation:t})=>a.jsx("section",{className:"relative overflow-hidden py-20 md:py-32",children:a.jsx("div",{className:"container mx-auto px-6",children:a.jsxs("div",{className:"grid items-center gap-12 md:grid-cols-2",children:[a.jsxs("div",{children:[a.jsxs("h1",{className:"mb-4 text-4xl font-bold tracking-tight text-foreground md:text-6xl lg:text-7xl",children:["Change the rules.",a.jsx("br",{}),a.jsx("span",{className:"text-primary",children:"See why the system changed."})]}),a.jsx("p",{className:"mb-8 max-w-lg text-lg text-muted-foreground md:text-xl",children:"NV-SIM doesn't predict outcomes — it shows how they change when you change the rules."}),a.jsxs("div",{className:"flex flex-wrap gap-4",children:[a.jsxs(Ce,{size:"lg",className:"px-8 py-6 text-base font-semibold tracking-wider",onClick:e,children:[a.jsx(Ck,{className:"mr-2 h-4 w-4"}),"START SIMULATION"]}),a.jsxs(Ce,{size:"lg",variant:"outline",className:"px-8 py-6 text-base font-semibold tracking-wider",onClick:t,children:[a.jsx(yu,{className:"mr-2 h-4 w-4"}),"LOAD DATA"]})]}),a.jsx("p",{className:"mt-8 text-sm font-medium tracking-wider text-muted-foreground",children:"We don't show you what every agent did. We show you what the system became."})]}),a.jsx("div",{className:"flex items-center justify-center",children:a.jsx(F2,{})})]})})}),vt=g.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:W("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));vt.displayName="Input";const Te=g.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:W("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Te.displayName="Card";const Ze=g.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:W("flex flex-col space-y-1.5 p-6",e),...t}));Ze.displayName="CardHeader";const Je=g.forwardRef(({className:e,...t},n)=>a.jsx("h3",{ref:n,className:W("text-2xl font-semibold leading-none tracking-tight",e),...t}));Je.displayName="CardTitle";const B2=g.forwardRef(({className:e,...t},n)=>a.jsx("p",{ref:n,className:W("text-sm text-muted-foreground",e),...t}));B2.displayName="CardDescription";const Ae=g.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:W("p-6 pt-0",e),...t}));Ae.displayName="CardContent";const V2=g.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:W("flex items-center p-6 pt-0",e),...t}));V2.displayName="CardFooter";const U2=nl("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function De({className:e,variant:t,...n}){return a.jsx("div",{className:W(U2({variant:t}),e),...n})}const H2=[{name:"Incremental Path",probability:65,risk:"low",summary:"Gradual domestic production increases paired with strategic reserve releases to stabilize prices over 4–6 months.",drivers:["Strategic petroleum reserve draw-down","Expedited drilling permits","Refinery utilization optimization"],timeline:[{period:"Month 1",action:"Release 30M barrels from SPR",effect:"Prices stabilize at $4.50"},{period:"Month 2-3",action:"Fast-track 200 drilling permits",effect:"Domestic supply signal calms futures market"},{period:"Month 4-6",action:"Refinery optimization + import diversification",effect:"Prices reach $3.20 target zone"}]},{name:"Coalition Path",probability:60,risk:"medium",summary:"Build OPEC+ negotiation coalition with consumer nations to pressure production quota increases.",drivers:["Diplomatic pressure on Saudi Arabia","IEA coordinated release","Consumer nation solidarity bloc"],timeline:[{period:"Month 1",action:"Convene IEA emergency session",effect:"Coordinated 60M barrel release announced"},{period:"Month 2-3",action:"Coalition negotiation with OPEC+",effect:"Production quota increase of 500K bpd"},{period:"Month 4-6",action:"Market stabilization + long-term supply agreements",effect:"Prices settle at $2.90"}]},{name:"Direct Intervention",probability:55,risk:"high",summary:"Executive action to cap prices, mandate refinery output, and impose export restrictions.",drivers:["Emergency price controls","Defense Production Act invocation","Export ban on refined products"],timeline:[{period:"Month 1",action:"Emergency executive order on price caps",effect:"Immediate price relief but market uncertainty"},{period:"Month 2-3",action:"DPA mandates on refinery output",effect:"Supply increases but industry friction grows"},{period:"Month 4-6",action:"Gradual deregulation as supply normalizes",effect:"Prices at $2.80 but market distortions persist"}]}],W2=({onFullAnalysis:e})=>{const[t,n]=g.useState("Gas prices spike to $5/gallon"),[r,o]=g.useState("Stabilize prices under $3 within 6 months"),[s,i]=g.useState(!1),[l,c]=g.useState(null),[u,f]=g.useState(null),d=g.useCallback(()=>{i(!0),c(null),f(null)},[]),p={low:"bg-emerald-500/20 text-emerald-400",medium:"bg-yellow-500/20 text-yellow-400",high:"bg-red-500/20 text-red-400"};return a.jsx("section",{className:"border-t border-border py-16 md:py-24",children:a.jsx("div",{className:"container mx-auto px-6",children:a.jsxs("div",{className:"mx-auto max-w-3xl",children:[a.jsx("h2",{className:"mb-2 text-center text-xs font-bold uppercase tracking-[0.2em] text-primary",children:"TRY IT NOW"}),a.jsx("p",{className:"mb-8 text-center text-muted-foreground",children:"Describe a situation and desired outcome. See what strategies emerge."}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"mb-1.5 block text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Current Situation"}),a.jsx(vt,{value:t,onChange:m=>n(m.target.value),className:"text-sm",placeholder:"What's happening?"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1.5 block text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Desired Outcome"}),a.jsx(vt,{value:r,onChange:m=>o(m.target.value),className:"text-sm",placeholder:"Where do you want to end up?"})]}),a.jsxs("div",{className:"flex gap-3 pt-2",children:[a.jsx(Ce,{className:"px-8 py-5 text-sm font-semibold tracking-wider",onClick:d,children:"FIND SOLUTIONS"}),s&&e&&a.jsxs(Ce,{variant:"outline",className:"px-6 py-5 text-sm font-semibold tracking-wider",onClick:()=>e(t,r),children:["FULL REPORT ",a.jsx(pk,{className:"ml-1.5 h-4 w-4"})]})]})]}),s&&a.jsx("div",{className:"mt-10 space-y-4 animate-in fade-in-0 slide-in-from-bottom-4 duration-500",children:H2.map((m,b)=>a.jsxs(Te,{className:"border-border overflow-hidden",children:[a.jsx(Ze,{className:"pb-3",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(Je,{className:"text-base",children:m.name}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(De,{className:W("text-xs font-mono",p[m.risk]),children:[m.risk," risk"]}),a.jsxs("span",{className:"text-lg font-bold text-primary",children:[m.probability,"%"]})]})]})}),a.jsxs(Ae,{children:[a.jsx("p",{className:"mb-4 text-sm text-muted-foreground",children:m.summary}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsxs(Ce,{size:"sm",variant:"ghost",className:"text-xs",onClick:()=>c(l===b?null:b),children:[a.jsx(Zs,{className:W("mr-1 h-3 w-3 transition-transform",l===b&&"rotate-180")}),"SHOW WHY"]}),a.jsxs(Ce,{size:"sm",variant:"ghost",className:"text-xs",onClick:()=>f(u===b?null:b),children:[a.jsx(Vd,{className:"mr-1 h-3 w-3"}),"TIMELINE"]}),a.jsxs(Ce,{size:"sm",variant:"ghost",className:"text-xs",children:[a.jsx(Ud,{className:"mr-1 h-3 w-3"}),"MODIFY"]})]}),l===b&&a.jsxs("div",{className:"mt-4 rounded-md border border-border bg-muted/30 p-4 animate-in fade-in-0 slide-in-from-top-2",children:[a.jsx("h4",{className:"mb-2 text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Key Drivers"}),a.jsx("ul",{className:"space-y-1.5",children:m.drivers.map((h,x)=>a.jsxs("li",{className:"flex items-start gap-2 text-sm text-foreground",children:[a.jsx("span",{className:"mt-1.5 h-1.5 w-1.5 shrink-0 rounded-full bg-primary"}),h]},x))})]}),u===b&&a.jsx("div",{className:"mt-4 animate-in fade-in-0 slide-in-from-top-2",children:a.jsx("div",{className:"relative ml-3 border-l-2 border-primary/30 pl-6 space-y-4",children:m.timeline.map((h,x)=>a.jsxs("div",{className:"relative",children:[a.jsx("div",{className:"absolute -left-[31px] top-1 h-3 w-3 rounded-full border-2 border-primary bg-background"}),a.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:h.period}),a.jsx("div",{className:"text-sm text-foreground",children:h.action}),a.jsx("div",{className:"text-xs text-muted-foreground",children:h.effect})]},x))})})]})]},b))})]})})})},cl=g.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:W("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));cl.displayName="Textarea";const G2=({onExplain:e,isLoading:t})=>{const[n,r]=g.useState(""),o=g.useMemo(()=>{if(!n.trim()||n.trim().length<10)return null;try{const s=Qy(n);return{format:s,label:Xy[s]}}catch{return null}},[n]);return a.jsx("section",{className:"py-16 md:py-24",children:a.jsx("div",{className:"container mx-auto px-6",children:a.jsxs("div",{className:"mx-auto max-w-3xl text-center",children:[a.jsx("h2",{className:"mb-2 text-xs font-bold uppercase tracking-[0.2em] text-primary",children:"ANALYZE RESULTS"}),a.jsx("h3",{className:"mb-3 text-3xl font-bold tracking-tight text-foreground md:text-4xl",children:"Upload Simulation Data"}),a.jsxs("p",{className:"mb-8 text-muted-foreground",children:["Paste results from any simulation tool — we auto-detect the format.",a.jsx("br",{}),a.jsx("span",{className:"text-xs",children:"JSON, CSV, key-value, or plain text supported."})]}),a.jsxs("div",{className:"relative rounded-lg border border-border bg-card p-1",children:[a.jsx(cl,{placeholder:`Paste simulation results here...
|
|
255
|
-
|
|
256
|
-
Supported formats:
|
|
257
|
-
• JSON (agents, behaviors, metrics)
|
|
258
|
-
• CSV (time series, variable columns)
|
|
259
|
-
• Key-value logs (step: value)
|
|
260
|
-
• Plain text descriptions`,className:"min-h-[200px] resize-none border-0 bg-transparent font-mono text-sm text-foreground placeholder:text-muted-foreground focus-visible:ring-0 focus-visible:ring-offset-0",value:n,onChange:s=>r(s.target.value)}),o&&a.jsx("div",{className:"absolute bottom-3 right-3",children:a.jsxs(De,{variant:"outline",className:"text-[10px] uppercase tracking-wider",children:["Detected: ",o.label]})})]}),a.jsx(Ce,{className:"mt-6 px-10 py-6 text-base font-semibold tracking-wider",onClick:()=>e(n),disabled:!n.trim()||t,children:t?"ANALYZING...":"ANALYZE"})]})})})};var rf="Progress",of=100,[K2,wT]=qt(rf),[Q2,Y2]=K2(rf),Zy=g.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:s=X2,...i}=e;(o||o===0)&&!kp(o)&&console.error(q2(`${o}`,"Progress"));const l=kp(o)?o:of;r!==null&&!Cp(r,l)&&console.error(Z2(`${r}`,"Progress"));const c=Cp(r,l)?r:null,u=_a(c)?s(c,l):void 0;return a.jsx(Q2,{scope:n,value:c,max:l,children:a.jsx(Q.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":_a(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":tx(c,l),"data-value":c??void 0,"data-max":l,...i,ref:t})})});Zy.displayName=rf;var Jy="ProgressIndicator",ex=g.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=Y2(Jy,n);return a.jsx(Q.div,{"data-state":tx(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});ex.displayName=Jy;function X2(e,t){return`${Math.round(e/t*100)}%`}function tx(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function _a(e){return typeof e=="number"}function kp(e){return _a(e)&&!isNaN(e)&&e>0}function Cp(e,t){return _a(e)&&!isNaN(e)&&e<=t&&e>=0}function q2(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${of}\`.`}function Z2(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
261
|
-
- a positive number
|
|
262
|
-
- less than the value passed to \`max\` (or ${of} if no \`max\` prop is set)
|
|
263
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
264
|
-
|
|
265
|
-
Defaulting to \`null\`.`}var nx=Zy,J2=ex;const ls=g.forwardRef(({className:e,value:t,...n},r)=>a.jsx(nx,{ref:r,className:W("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:a.jsx(J2,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));ls.displayName=nx.displayName;const e_={strong:"bg-primary text-primary-foreground",moderate:"bg-secondary text-secondary-foreground",weak:"bg-muted text-muted-foreground"},t_={driver:"bg-primary text-primary-foreground",reactor:"bg-secondary text-secondary-foreground",stabilizer:"bg-accent text-accent-foreground",disruptor:"bg-destructive text-destructive-foreground"},n_=({result:e})=>a.jsxs("section",{className:"space-y-12 py-12",children:[a.jsxs("div",{className:"container mx-auto px-6",children:[a.jsx("h3",{className:"mb-6 text-2xl font-bold tracking-tight text-foreground",children:"Emergent Patterns"}),a.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.patterns.map((t,n)=>a.jsxs(Te,{className:"animate-fade-in-up border-border",style:{animationDelay:`${n*100}ms`},children:[a.jsx(Ze,{className:"pb-3",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(Je,{className:"text-base",children:t.name}),a.jsx(De,{className:e_[t.strength],children:t.strength})]})}),a.jsxs(Ae,{children:[a.jsx("p",{className:"mb-3 text-sm text-muted-foreground",children:t.description}),a.jsx("div",{className:"flex flex-wrap gap-1",children:t.agents.map((r,o)=>a.jsx("span",{className:"rounded-sm bg-muted px-2 py-0.5 text-xs text-muted-foreground",children:r},o))})]})]},n))})]}),a.jsxs("div",{className:"container mx-auto px-6",children:[a.jsx("h3",{className:"mb-6 text-2xl font-bold tracking-tight text-foreground",children:"Dominant Strategies per Agent"}),a.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:e.agentStrategies.map((t,n)=>a.jsx(Te,{className:"animate-fade-in-up border-border",style:{animationDelay:`${n*80}ms`},children:a.jsxs(Ae,{className:"pt-6",children:[a.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[a.jsx("span",{className:"font-semibold text-foreground",children:t.agent}),a.jsxs("span",{className:"text-sm text-primary",children:[t.effectiveness,"% effective"]})]}),a.jsx("p",{className:"mb-1 text-sm font-medium text-foreground",children:t.strategy}),a.jsx("p",{className:"text-xs text-muted-foreground",children:t.rationale}),a.jsx(ls,{value:t.effectiveness,className:"mt-3 h-1.5"})]})},n))})]}),a.jsxs("div",{className:"container mx-auto px-6",children:[a.jsx("h3",{className:"mb-6 text-2xl font-bold tracking-tight text-foreground",children:"Coalition Detection"}),a.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:e.coalitions.map((t,n)=>a.jsxs(Te,{className:"animate-fade-in-up border-border",style:{animationDelay:`${n*100}ms`},children:[a.jsx(Ze,{className:"pb-3",children:a.jsx(Je,{className:"text-base",children:t.name})}),a.jsxs(Ae,{children:[a.jsx("p",{className:"mb-3 text-sm text-muted-foreground",children:t.sharedObjective}),a.jsx("div",{className:"mb-3 flex flex-wrap gap-1.5",children:t.members.map((r,o)=>a.jsx(De,{variant:"outline",className:"text-xs",children:r},o))}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-xs text-muted-foreground",children:"Cohesion"}),a.jsx(ls,{value:t.cohesion,className:"h-1.5 flex-1"}),a.jsxs("span",{className:"text-xs text-primary",children:[t.cohesion,"%"]})]})]})]},n))})]}),a.jsxs("div",{className:"container mx-auto px-6",children:[a.jsx("h3",{className:"mb-6 text-2xl font-bold tracking-tight text-foreground",children:"Power Dynamics"}),a.jsx("div",{className:"grid gap-3 md:grid-cols-2 lg:grid-cols-3",children:e.powerDynamics.map((t,n)=>a.jsx(Te,{className:"animate-fade-in-up border-border",style:{animationDelay:`${n*80}ms`},children:a.jsxs(Ae,{className:"pt-6",children:[a.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[a.jsx("span",{className:"font-semibold text-foreground",children:t.agent}),a.jsx(De,{className:t_[t.role],children:t.role})]}),a.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:t.description}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-xs text-muted-foreground",children:"Influence"}),a.jsx(ls,{value:t.influence,className:"h-1.5 flex-1"}),a.jsxs("span",{className:"text-xs text-primary",children:[t.influence,"%"]})]})]})},n))})]}),a.jsxs("div",{className:"container mx-auto px-6",children:[a.jsx("h3",{className:"mb-6 text-2xl font-bold tracking-tight text-foreground",children:"Equilibrium Analysis"}),a.jsx(Te,{className:"border-border",children:a.jsxs(Ae,{className:"pt-6",children:[a.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[a.jsx(De,{className:e.equilibrium.isStable?"bg-primary text-primary-foreground":"bg-destructive text-destructive-foreground",children:e.equilibrium.isStable?"Stable":"Unstable"}),a.jsx("span",{className:"text-lg font-semibold text-foreground",children:e.equilibrium.type})]}),a.jsx("p",{className:"mb-4 text-sm text-muted-foreground",children:e.equilibrium.description}),a.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[a.jsx("span",{className:"text-sm text-muted-foreground",children:"Stability Score"}),a.jsx(ls,{value:e.equilibrium.stabilityScore,className:"h-2 flex-1"}),a.jsxs("span",{className:"text-sm font-medium text-primary",children:[e.equilibrium.stabilityScore,"%"]})]}),a.jsxs("div",{children:[a.jsx("p",{className:"mb-2 text-sm font-medium text-foreground",children:"Vulnerabilities:"}),a.jsx("ul",{className:"space-y-1",children:e.equilibrium.vulnerabilities.map((t,n)=>a.jsxs("li",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[a.jsx("span",{className:"mt-1.5 h-1.5 w-1.5 shrink-0 rounded-full bg-destructive"}),t]},n))})]})]})})]})]}),Ep=[{label:"Choose Scenario",description:"Pick a preset or describe your own situation",color:"text-muted-foreground"},{label:"Set Rules",description:"Define constraints, limits, and governance rules",color:"text-muted-foreground"},{label:"Run Simulation",description:"Multi-agent simulation with rules applied in real time",color:"text-primary"},{label:"See What Changed",description:"Watch rules block, pause, and reshape agent behavior",color:"text-primary"},{label:"Generate Report",description:"Governed analysis with metrics and counterfactuals",color:"text-primary"}],r_=[{word:"Simulate",description:"Run multi-agent scenarios with real dynamics"},{word:"Govern",description:"Apply rules that reshape outcomes in real time"},{word:"Understand",description:"See exactly what changed and why"}],o_=()=>a.jsx("section",{className:"border-t border-border py-16 md:py-24",children:a.jsxs("div",{className:"container mx-auto px-6",children:[a.jsx("h2",{className:"mb-2 text-center text-xs font-bold uppercase tracking-[0.2em] text-primary",children:"HOW IT WORKS"}),a.jsx("p",{className:"mb-12 text-center text-lg text-muted-foreground",children:"From scenario to insight in five steps"}),a.jsx("div",{className:"mx-auto max-w-sm",children:Ep.map((e,t)=>a.jsxs("div",{children:[a.jsxs("div",{className:"rounded-lg border border-border bg-card px-5 py-4 text-center",children:[a.jsx("div",{className:`text-sm font-bold tracking-wider ${e.color}`,children:e.label}),a.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:e.description})]}),t<Ep.length-1&&a.jsx("div",{className:"flex justify-center py-2",children:a.jsx(mk,{className:"h-4 w-4 text-primary/50"})})]},e.label))}),a.jsx("div",{className:"mx-auto mt-16 grid max-w-3xl gap-8 md:grid-cols-3",children:r_.map(e=>a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"mb-2 text-2xl font-bold tracking-tight text-foreground",children:e.word}),a.jsx("div",{className:"text-sm text-muted-foreground",children:e.description})]},e.word))})]})}),s_=`{
|
|
266
|
-
"actor": "agent_1",
|
|
267
|
-
"action": "panic_sell",
|
|
268
|
-
"world": "trading"
|
|
269
|
-
}`,i_=`{
|
|
270
|
-
"decision": "BLOCK",
|
|
271
|
-
"reason": "Panic selling blocked by governance rule",
|
|
272
|
-
"rule_id": "sim-panic-actions",
|
|
273
|
-
"evidence": { ... },
|
|
274
|
-
"modified_action": null
|
|
275
|
-
}`,a_=`from neuroverse_bridge import evaluate
|
|
276
|
-
|
|
277
|
-
verdict = evaluate(
|
|
278
|
-
actor="agent_1",
|
|
279
|
-
action="panic_sell",
|
|
280
|
-
world="trading"
|
|
281
|
-
)
|
|
282
|
-
|
|
283
|
-
if verdict["decision"] == "BLOCK":
|
|
284
|
-
action = "hold" # action replaced
|
|
285
|
-
elif verdict["decision"] == "MODIFY":
|
|
286
|
-
action = verdict["modified_action"] # constrained
|
|
287
|
-
# ALLOW → proceed`,l_=()=>a.jsx("section",{className:"border-t border-border py-16 md:py-24",children:a.jsxs("div",{className:"container mx-auto px-6",children:[a.jsx("h2",{className:"mb-2 text-center text-xs font-bold uppercase tracking-[0.2em] text-primary",children:"WORKS WITH ANYTHING"}),a.jsx("p",{className:"mb-4 text-center text-lg text-muted-foreground",children:"If your system has actions, you can govern it. One API call."}),a.jsx("p",{className:"mb-12 text-center text-sm text-muted-foreground/70",children:"Runs locally. No cloud. No SDK. No cost."}),a.jsxs("div",{className:"mx-auto max-w-4xl space-y-8",children:[a.jsxs("div",{children:[a.jsx("div",{className:"mb-2 text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Python — 3-line integration"}),a.jsx("pre",{className:"overflow-auto rounded-lg border border-border bg-card p-4 text-xs text-foreground",children:a.jsx("code",{children:a_})})]}),a.jsx("div",{className:"mb-4 rounded-md bg-card border border-border px-4 py-2",children:a.jsx("code",{className:"text-sm font-bold text-primary",children:"POST /api/evaluate"})}),a.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[a.jsxs("div",{children:[a.jsx("div",{className:"mb-2 text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Request"}),a.jsx("pre",{className:"overflow-auto rounded-lg border border-border bg-card p-4 text-xs text-foreground",children:a.jsx("code",{children:s_})})]}),a.jsxs("div",{children:[a.jsx("div",{className:"mb-2 text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Response"}),a.jsx("pre",{className:"overflow-auto rounded-lg border border-border bg-card p-4 text-xs text-foreground",children:a.jsx("code",{children:i_})})]})]}),a.jsxs("div",{className:"grid gap-3 md:grid-cols-3",children:[a.jsxs("div",{className:"rounded-lg border border-red-500/20 bg-red-500/5 p-4 text-center",children:[a.jsx("div",{className:"mb-1 text-sm font-bold text-red-400",children:"BLOCK"}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"Action replaced"})]}),a.jsxs("div",{className:"rounded-lg border border-yellow-500/20 bg-yellow-500/5 p-4 text-center",children:[a.jsx("div",{className:"mb-1 text-sm font-bold text-yellow-400",children:"MODIFY"}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"Action constrained"})]}),a.jsxs("div",{className:"rounded-lg border border-green-500/20 bg-green-500/5 p-4 text-center",children:[a.jsx("div",{className:"mb-1 text-sm font-bold text-green-400",children:"ALLOW"}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"Action proceeds"})]})]}),a.jsx("div",{className:"mt-4 text-center text-xs text-muted-foreground",children:"Fail-open. Stateless. 500ms timeout. Works with any simulator."})]})]})}),c_=[{title:"Gas Price Shock",description:"Crude spikes to $120/barrel. Domestic pump prices exceed $5. Election in 6 months.",tags:["economic","energy","political"]},{title:"AI Regulation Crisis",description:"Major AI safety incident triggers emergency legislation proposals across G7.",tags:["regulation","technology","global"]},{title:"Strait of Hormuz",description:"Iran threatens closure. 20% of global oil transits through the strait.",tags:["geopolitical","energy","military"]},{title:"Taiwan Conflict",description:"PLA military exercises escalate near Taiwan. Semiconductor supply chain at risk.",tags:["geopolitical","supply chain","military"]},{title:"Global Supply Chain Disruption",description:"Major port strike + shipping lane conflict creates cascading delays worldwide.",tags:["economic","logistics","global"]},{title:"Cyber Attack on Banks",description:"Coordinated ransomware hits top 5 banks. Settlements frozen for 48 hours.",tags:["cybersecurity","financial","crisis"]}],u_=({onSelect:e})=>a.jsx("section",{className:"border-t border-border py-16 md:py-24",children:a.jsxs("div",{className:"container mx-auto px-6",children:[a.jsx("h2",{className:"mb-2 text-center text-xs font-bold uppercase tracking-[0.2em] text-primary",children:"EXAMPLE SCENARIOS"}),a.jsx("p",{className:"mb-12 text-center text-lg text-muted-foreground",children:"Click to load a scenario capsule and start exploring"}),a.jsx("div",{className:"mx-auto grid max-w-5xl gap-4 sm:grid-cols-2 lg:grid-cols-3",children:c_.map(t=>a.jsxs(Te,{className:"cursor-pointer border-border transition-all duration-200 hover:border-primary/50 hover:glow-teal",onClick:()=>e(t.title,t.description),children:[a.jsx(Ze,{className:"pb-2",children:a.jsx(Je,{className:"text-base",children:t.title})}),a.jsxs(Ae,{children:[a.jsx("p",{className:"mb-3 text-xs text-muted-foreground leading-relaxed",children:t.description}),a.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.tags.map(n=>a.jsx(De,{variant:"outline",className:"text-[10px] uppercase tracking-wider",children:n},n))})]})]},t.title))})]})}),d_=({onSelectScenario:e,onCustomScenario:t,onCalculate:n,selectedId:r,customText:o,isLoading:s,hasScenario:i})=>a.jsx("section",{className:"py-16 md:py-24",children:a.jsxs("div",{className:"container mx-auto px-6",children:[a.jsxs("div",{className:"mx-auto max-w-4xl text-center",children:[a.jsx("h1",{className:"mb-3 text-3xl font-bold tracking-tight text-foreground md:text-5xl",children:"Choose a scenario."}),a.jsx("p",{className:"mb-12 text-lg text-muted-foreground",children:"Pick a preset or describe your own situation to begin"})]}),a.jsx("div",{className:"mx-auto grid max-w-5xl gap-4 md:grid-cols-3",children:Yj.map(l=>a.jsxs(Te,{className:`cursor-pointer border-border transition-all duration-200 hover:border-primary/50 hover:glow-teal ${r===l.id?"border-primary glow-teal":""}`,onClick:()=>e(l),children:[a.jsx(Ze,{className:"pb-3",children:a.jsx(Je,{className:"text-base leading-tight",children:l.title})}),a.jsxs(Ae,{children:[a.jsx("p",{className:"mb-3 text-xs text-muted-foreground leading-relaxed",children:l.description}),a.jsx("div",{className:"mb-3 flex flex-wrap gap-1.5",children:l.tags.map(c=>a.jsx(De,{variant:"outline",className:"text-[10px] uppercase tracking-wider",children:c},c))}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:[l.stakeholderCount," participants"]})]})]},l.id))}),a.jsxs("div",{className:"mx-auto mt-8 max-w-3xl",children:[a.jsx("div",{className:"rounded-lg border border-border bg-card p-1",children:a.jsx(cl,{placeholder:"Or describe your own situation...",className:"min-h-[100px] resize-none border-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground focus-visible:ring-0 focus-visible:ring-offset-0",value:o,onChange:l=>t(l.target.value)})}),a.jsx("div",{className:"mt-6 text-center",children:a.jsx(Ce,{className:"px-12 py-6 text-base font-semibold tracking-wider",onClick:n,disabled:!i||s,children:s?"RUNNING...":"RUN SIMULATION"})})]})]})});function Ra(e,[t,n]){return Math.min(n,Math.max(t,e))}var f_=g.createContext(void 0);function ul(e){const t=g.useContext(f_);return e||t||"ltr"}function sf(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var rx=["PageUp","PageDown"],ox=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],sx={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Go="Slider",[Eu,m_,p_]=Za(Go),[ix,bT]=qt(Go,[p_]),[h_,dl]=ix(Go),ax=g.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:s=1,orientation:i="horizontal",disabled:l=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[r],value:f,onValueChange:d=()=>{},onValueCommit:p=()=>{},inverted:m=!1,form:b,...h}=e,x=g.useRef(new Set),y=g.useRef(0),w=i==="horizontal"?g_:v_,[S=[],N]=cr({prop:f,defaultProp:u,onChange:O=>{var U;(U=[...x.current][y.current])==null||U.focus(),d(O)}}),C=g.useRef(S);function k(O){const M=S_(S,O);P(O,M)}function j(O){P(O,y.current)}function A(){const O=C.current[y.current];S[y.current]!==O&&p(S)}function P(O,M,{commit:U}={commit:!1}){const T=E_(s),z=j_(Math.round((O-r)/s)*s+r,T),$=Ra(z,[r,o]);N((B=[])=>{const E=w_(B,$,M);if(C_(E,c*s)){y.current=E.indexOf($);const _=String(E)!==String(B);return _&&U&&p(E),_?E:B}else return B})}return a.jsx(h_,{scope:e.__scopeSlider,name:n,disabled:l,min:r,max:o,valueIndexToChangeRef:y,thumbs:x.current,values:S,orientation:i,form:b,children:a.jsx(Eu.Provider,{scope:e.__scopeSlider,children:a.jsx(Eu.Slot,{scope:e.__scopeSlider,children:a.jsx(w,{"aria-disabled":l,"data-disabled":l?"":void 0,...h,ref:t,onPointerDown:K(h.onPointerDown,()=>{l||(C.current=S)}),min:r,max:o,inverted:m,onSlideStart:l?void 0:k,onSlideMove:l?void 0:j,onSlideEnd:l?void 0:A,onHomeKeyDown:()=>!l&&P(r,0,{commit:!0}),onEndKeyDown:()=>!l&&P(o,S.length-1,{commit:!0}),onStepKeyDown:({event:O,direction:M})=>{if(!l){const z=rx.includes(O.key)||O.shiftKey&&ox.includes(O.key)?10:1,$=y.current,B=S[$],E=s*z*M;P(B+E,$,{commit:!0})}}})})})})});ax.displayName=Go;var[lx,cx]=ix(Go,{startEdge:"left",endEdge:"right",size:"width",direction:1}),g_=g.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:s,onSlideStart:i,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...f}=e,[d,p]=g.useState(null),m=ae(t,w=>p(w)),b=g.useRef(void 0),h=ul(o),x=h==="ltr",y=x&&!s||!x&&s;function v(w){const S=b.current||d.getBoundingClientRect(),N=[0,S.width],k=af(N,y?[n,r]:[r,n]);return b.current=S,k(w-S.left)}return a.jsx(lx,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:a.jsx(ux,{dir:h,"data-orientation":"horizontal",...f,ref:m,style:{...f.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const S=v(w.clientX);i==null||i(S)},onSlideMove:w=>{const S=v(w.clientX);l==null||l(S)},onSlideEnd:()=>{b.current=void 0,c==null||c()},onStepKeyDown:w=>{const N=sx[y?"from-left":"from-right"].includes(w.key);u==null||u({event:w,direction:N?-1:1})}})})}),v_=g.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:s,onSlideMove:i,onSlideEnd:l,onStepKeyDown:c,...u}=e,f=g.useRef(null),d=ae(t,f),p=g.useRef(void 0),m=!o;function b(h){const x=p.current||f.current.getBoundingClientRect(),y=[0,x.height],w=af(y,m?[r,n]:[n,r]);return p.current=x,w(h-x.top)}return a.jsx(lx,{scope:e.__scopeSlider,startEdge:m?"bottom":"top",endEdge:m?"top":"bottom",size:"height",direction:m?1:-1,children:a.jsx(ux,{"data-orientation":"vertical",...u,ref:d,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:h=>{const x=b(h.clientY);s==null||s(x)},onSlideMove:h=>{const x=b(h.clientY);i==null||i(x)},onSlideEnd:()=>{p.current=void 0,l==null||l()},onStepKeyDown:h=>{const y=sx[m?"from-bottom":"from-top"].includes(h.key);c==null||c({event:h,direction:y?-1:1})}})})}),ux=g.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:s,onHomeKeyDown:i,onEndKeyDown:l,onStepKeyDown:c,...u}=e,f=dl(Go,n);return a.jsx(Q.span,{...u,ref:t,onKeyDown:K(e.onKeyDown,d=>{d.key==="Home"?(i(d),d.preventDefault()):d.key==="End"?(l(d),d.preventDefault()):rx.concat(ox).includes(d.key)&&(c(d),d.preventDefault())}),onPointerDown:K(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),f.thumbs.has(p)?p.focus():r(d)}),onPointerMove:K(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:K(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),s(d))})})}),dx="SliderTrack",fx=g.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=dl(dx,n);return a.jsx(Q.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});fx.displayName=dx;var ju="SliderRange",mx=g.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=dl(ju,n),s=cx(ju,n),i=g.useRef(null),l=ae(t,i),c=o.values.length,u=o.values.map(p=>gx(p,o.min,o.max)),f=c>1?Math.min(...u):0,d=100-Math.max(...u);return a.jsx(Q.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:l,style:{...e.style,[s.startEdge]:f+"%",[s.endEdge]:d+"%"}})});mx.displayName=ju;var _u="SliderThumb",px=g.forwardRef((e,t)=>{const n=m_(e.__scopeSlider),[r,o]=g.useState(null),s=ae(t,l=>o(l)),i=g.useMemo(()=>r?n().findIndex(l=>l.ref.current===r):-1,[n,r]);return a.jsx(y_,{...e,ref:s,index:i})}),y_=g.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...s}=e,i=dl(_u,n),l=cx(_u,n),[c,u]=g.useState(null),f=ae(t,v=>u(v)),d=c?i.form||!!c.closest("form"):!0,p=Zd(c),m=i.values[r],b=m===void 0?0:gx(m,i.min,i.max),h=b_(r,i.values.length),x=p==null?void 0:p[l.size],y=x?N_(x,b,l.direction):0;return g.useEffect(()=>{if(c)return i.thumbs.add(c),()=>{i.thumbs.delete(c)}},[c,i.thumbs]),a.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${b}% + ${y}px)`},children:[a.jsx(Eu.ItemSlot,{scope:e.__scopeSlider,children:a.jsx(Q.span,{role:"slider","aria-label":e["aria-label"]||h,"aria-valuemin":i.min,"aria-valuenow":m,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...s,ref:f,style:m===void 0?{display:"none"}:e.style,onFocus:K(e.onFocus,()=>{i.valueIndexToChangeRef.current=r})})}),d&&a.jsx(hx,{name:o??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:m},r)]})});px.displayName=_u;var x_="RadioBubbleInput",hx=g.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=g.useRef(null),s=ae(o,r),i=sf(t);return g.useEffect(()=>{const l=o.current;if(!l)return;const c=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&f){const d=new Event("input",{bubbles:!0});f.call(l,t),l.dispatchEvent(d)}},[i,t]),a.jsx(Q.input,{style:{display:"none"},...n,ref:s,defaultValue:t})});hx.displayName=x_;function w_(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,s)=>o-s)}function gx(e,t,n){const s=100/(n-t)*(e-t);return Ra(s,[0,100])}function b_(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function S_(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function N_(e,t,n){const r=e/2,s=af([0,50],[0,r]);return(r-s(t)*n)*n}function k_(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function C_(e,t){if(t>0){const n=k_(e);return Math.min(...n)>=t}return!0}function af(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function E_(e){return(String(e).split(".")[1]||"").length}function j_(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var vx=ax,__=fx,R_=mx,P_=px;const lf=g.forwardRef(({className:e,...t},n)=>a.jsxs(vx,{ref:n,className:W("relative flex w-full touch-none select-none items-center",e),...t,children:[a.jsx(__,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:a.jsx(R_,{className:"absolute h-full bg-primary"})}),a.jsx(P_,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));lf.displayName=vx.displayName;const T_=[{key:"severity",label:"Severity",low:"Low",high:"Critical"},{key:"environmentalHostility",label:"Environmental Hostility",low:"Low",high:"High"},{key:"timePressure",label:"Time Pressure",low:"None",high:"Immediate"},{key:"regulatoryClimate",label:"Regulatory Climate",low:"Permissive",high:"Adversarial"}],A_=({values:e,onChange:t,showRecalculate:n,onRecalculate:r})=>{const o=(s,i)=>{t({...e,[s]:i[0]})};return a.jsxs(Te,{className:"border-border",children:[a.jsx(Ze,{className:"pb-3",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(Je,{className:"text-base",children:"Assumptions"}),n&&a.jsx("button",{onClick:r,className:"pulse-teal rounded-md bg-primary px-4 py-1.5 text-xs font-semibold text-primary-foreground transition-colors hover:bg-primary/90",children:"Re-calculate"})]})}),a.jsx(Ae,{children:a.jsx("div",{className:"space-y-6",children:T_.map(s=>a.jsxs("div",{children:[a.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[a.jsx("label",{className:"text-sm font-medium text-foreground",children:s.label}),a.jsx("span",{className:"text-sm font-mono text-primary",children:e[s.key]})]}),a.jsx(lf,{value:[e[s.key]],onValueChange:i=>o(s.key,i),min:0,max:100,step:1}),a.jsxs("div",{className:"mt-1 flex justify-between",children:[a.jsx("span",{className:"text-xs text-muted-foreground",children:s.low}),a.jsx("span",{className:"text-xs text-muted-foreground",children:s.high})]})]},s.key))})})]})};var ic=0;function I_(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??jp()),document.body.insertAdjacentElement("beforeend",e[1]??jp()),ic++,()=>{ic===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ic--}},[])}function jp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ac="focusScope.autoFocusOnMount",lc="focusScope.autoFocusOnUnmount",_p={bubbles:!1,cancelable:!0},M_="FocusScope",yx=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[l,c]=g.useState(null),u=At(o),f=At(s),d=g.useRef(null),p=ae(t,h=>c(h)),m=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let h=function(w){if(m.paused||!l)return;const S=w.target;l.contains(S)?d.current=S:zn(d.current,{select:!0})},x=function(w){if(m.paused||!l)return;const S=w.relatedTarget;S!==null&&(l.contains(S)||zn(d.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const N of w)N.removedNodes.length>0&&zn(l)};document.addEventListener("focusin",h),document.addEventListener("focusout",x);const v=new MutationObserver(y);return l&&v.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",x),v.disconnect()}}},[r,l,m.paused]),g.useEffect(()=>{if(l){Pp.add(m);const h=document.activeElement;if(!l.contains(h)){const y=new CustomEvent(ac,_p);l.addEventListener(ac,u),l.dispatchEvent(y),y.defaultPrevented||(O_(z_(xx(l)),{select:!0}),document.activeElement===h&&zn(l))}return()=>{l.removeEventListener(ac,u),setTimeout(()=>{const y=new CustomEvent(lc,_p);l.addEventListener(lc,f),l.dispatchEvent(y),y.defaultPrevented||zn(h??document.body,{select:!0}),l.removeEventListener(lc,f),Pp.remove(m)},0)}}},[l,u,f,m]);const b=g.useCallback(h=>{if(!n&&!r||m.paused)return;const x=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,y=document.activeElement;if(x&&y){const v=h.currentTarget,[w,S]=L_(v);w&&S?!h.shiftKey&&y===S?(h.preventDefault(),n&&zn(w,{select:!0})):h.shiftKey&&y===w&&(h.preventDefault(),n&&zn(S,{select:!0})):y===v&&h.preventDefault()}},[n,r,m.paused]);return a.jsx(Q.div,{tabIndex:-1,...i,ref:p,onKeyDown:b})});yx.displayName=M_;function O_(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(zn(r,{select:t}),document.activeElement!==n)return}function L_(e){const t=xx(e),n=Rp(t,e),r=Rp(t.reverse(),e);return[n,r]}function xx(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Rp(e,t){for(const n of e)if(!D_(n,{upTo:t}))return n}function D_(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function $_(e){return e instanceof HTMLInputElement&&"select"in e}function zn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&$_(e)&&t&&e.select()}}var Pp=F_();function F_(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Tp(e,t),e.unshift(t)},remove(t){var n;e=Tp(e,t),(n=e[0])==null||n.resume()}}}function Tp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function z_(e){return e.filter(t=>t.tagName!=="A")}var B_=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Qr=new WeakMap,ji=new WeakMap,_i={},cc=0,wx=function(e){return e&&(e.host||wx(e.parentNode))},V_=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=wx(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},U_=function(e,t,n,r){var o=V_(t,Array.isArray(e)?e:[e]);_i[n]||(_i[n]=new WeakMap);var s=_i[n],i=[],l=new Set,c=new Set(o),u=function(d){!d||l.has(d)||(l.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(p){if(l.has(p))f(p);else try{var m=p.getAttribute(r),b=m!==null&&m!=="false",h=(Qr.get(p)||0)+1,x=(s.get(p)||0)+1;Qr.set(p,h),s.set(p,x),i.push(p),h===1&&b&&ji.set(p,!0),x===1&&p.setAttribute(n,"true"),b||p.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return f(t),l.clear(),cc++,function(){i.forEach(function(d){var p=Qr.get(d)-1,m=s.get(d)-1;Qr.set(d,p),s.set(d,m),p||(ji.has(d)||d.removeAttribute(r),ji.delete(d)),m||d.removeAttribute(n)}),cc--,cc||(Qr=new WeakMap,Qr=new WeakMap,ji=new WeakMap,_i={})}},H_=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=B_(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),U_(r,o,n,"aria-hidden")):function(){return null}},ln=function(){return ln=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ln.apply(this,arguments)};function bx(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function W_(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Qi="right-scroll-bar-position",Yi="width-before-scroll-bar",G_="with-scroll-bars-hidden",K_="--removed-body-scroll-bar-size";function uc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Q_(e,t){var n=g.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Y_=typeof window<"u"?g.useLayoutEffect:g.useEffect,Ap=new WeakMap;function X_(e,t){var n=Q_(null,function(r){return e.forEach(function(o){return uc(o,r)})});return Y_(function(){var r=Ap.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(l){s.has(l)||uc(l,null)}),s.forEach(function(l){o.has(l)||uc(l,i)})}Ap.set(n,e)},[e]),n}function q_(e){return e}function Z_(e,t){t===void 0&&(t=q_);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(l){return l!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(l){return s(l)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var l=n;n=[],l.forEach(s),i=n}var c=function(){var f=i;i=[],f.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),n}}}};return o}function J_(e){e===void 0&&(e={});var t=Z_(null);return t.options=ln({async:!0,ssr:!1},e),t}var Sx=function(e){var t=e.sideCar,n=bx(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return g.createElement(r,ln({},n))};Sx.isSideCarExport=!0;function eR(e,t){return e.useMedium(t),Sx}var Nx=J_(),dc=function(){},fl=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:dc,onWheelCapture:dc,onTouchMoveCapture:dc}),o=r[0],s=r[1],i=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,m=e.noRelative,b=e.noIsolation,h=e.inert,x=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,w=e.gapMode,S=bx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=p,C=X_([n,t]),k=ln(ln({},S),o);return g.createElement(g.Fragment,null,f&&g.createElement(N,{sideCar:Nx,removeScrollBar:u,shards:d,noRelative:m,noIsolation:b,inert:h,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:w}),i?g.cloneElement(g.Children.only(l),ln(ln({},k),{ref:C})):g.createElement(v,ln({},k,{className:c,ref:C}),l))});fl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fl.classNames={fullWidth:Yi,zeroRight:Qi};var tR=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function nR(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=tR();return t&&e.setAttribute("nonce",t),e}function rR(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function oR(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var sR=function(){var e=0,t=null;return{add:function(n){e==0&&(t=nR())&&(rR(t,n),oR(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},iR=function(){var e=sR();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},kx=function(){var e=iR(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},aR={left:0,top:0,right:0,gap:0},fc=function(e){return parseInt(e||"",10)||0},lR=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[fc(n),fc(r),fc(o)]},cR=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return aR;var t=lR(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},uR=kx(),xo="data-scroll-locked",dR=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
288
|
-
.`.concat(G_,` {
|
|
289
|
-
overflow: hidden `).concat(r,`;
|
|
290
|
-
padding-right: `).concat(l,"px ").concat(r,`;
|
|
291
|
-
}
|
|
292
|
-
body[`).concat(xo,`] {
|
|
293
|
-
overflow: hidden `).concat(r,`;
|
|
294
|
-
overscroll-behavior: contain;
|
|
295
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
296
|
-
padding-left: `.concat(o,`px;
|
|
297
|
-
padding-top: `).concat(s,`px;
|
|
298
|
-
padding-right: `).concat(i,`px;
|
|
299
|
-
margin-left:0;
|
|
300
|
-
margin-top:0;
|
|
301
|
-
margin-right: `).concat(l,"px ").concat(r,`;
|
|
302
|
-
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.`).concat(Qi,` {
|
|
306
|
-
right: `).concat(l,"px ").concat(r,`;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.`).concat(Yi,` {
|
|
310
|
-
margin-right: `).concat(l,"px ").concat(r,`;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.`).concat(Qi," .").concat(Qi,` {
|
|
314
|
-
right: 0 `).concat(r,`;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
.`).concat(Yi," .").concat(Yi,` {
|
|
318
|
-
margin-right: 0 `).concat(r,`;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
body[`).concat(xo,`] {
|
|
322
|
-
`).concat(K_,": ").concat(l,`px;
|
|
323
|
-
}
|
|
324
|
-
`)},Ip=function(){var e=parseInt(document.body.getAttribute(xo)||"0",10);return isFinite(e)?e:0},fR=function(){g.useEffect(function(){return document.body.setAttribute(xo,(Ip()+1).toString()),function(){var e=Ip()-1;e<=0?document.body.removeAttribute(xo):document.body.setAttribute(xo,e.toString())}},[])},mR=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;fR();var s=g.useMemo(function(){return cR(o)},[o]);return g.createElement(uR,{styles:dR(s,!t,o,n?"":"!important")})},Ru=!1;if(typeof window<"u")try{var Ri=Object.defineProperty({},"passive",{get:function(){return Ru=!0,!0}});window.addEventListener("test",Ri,Ri),window.removeEventListener("test",Ri,Ri)}catch{Ru=!1}var Yr=Ru?{passive:!1}:!1,pR=function(e){return e.tagName==="TEXTAREA"},Cx=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!pR(e)&&n[t]==="visible")},hR=function(e){return Cx(e,"overflowY")},gR=function(e){return Cx(e,"overflowX")},Mp=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ex(e,r);if(o){var s=jx(e,r),i=s[1],l=s[2];if(i>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},vR=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},yR=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ex=function(e,t){return e==="v"?hR(t):gR(t)},jx=function(e,t){return e==="v"?vR(t):yR(t)},xR=function(e,t){return e==="h"&&t==="rtl"?-1:1},wR=function(e,t,n,r,o){var s=xR(e,window.getComputedStyle(t).direction),i=s*r,l=n.target,c=t.contains(l),u=!1,f=i>0,d=0,p=0;do{if(!l)break;var m=jx(e,l),b=m[0],h=m[1],x=m[2],y=h-x-s*b;(b||y)&&Ex(e,l)&&(d+=y,p+=b);var v=l.parentNode;l=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(f&&(Math.abs(d)<1||!o)||!f&&(Math.abs(p)<1||!o))&&(u=!0),u},Pi=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Op=function(e){return[e.deltaX,e.deltaY]},Lp=function(e){return e&&"current"in e?e.current:e},bR=function(e,t){return e[0]===t[0]&&e[1]===t[1]},SR=function(e){return`
|
|
325
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
326
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
327
|
-
`)},NR=0,Xr=[];function kR(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),o=g.useState(NR++)[0],s=g.useState(kx)[0],i=g.useRef(e);g.useEffect(function(){i.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=W_([e.lockRef.current],(e.shards||[]).map(Lp),!0).filter(Boolean);return h.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=g.useCallback(function(h,x){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var y=Pi(h),v=n.current,w="deltaX"in h?h.deltaX:v[0]-y[0],S="deltaY"in h?h.deltaY:v[1]-y[1],N,C=h.target,k=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in h&&k==="h"&&C.type==="range")return!1;var j=Mp(k,C);if(!j)return!0;if(j?N=k:(N=k==="v"?"h":"v",j=Mp(k,C)),!j)return!1;if(!r.current&&"changedTouches"in h&&(w||S)&&(r.current=N),!N)return!0;var A=r.current||N;return wR(A,x,h,A==="h"?w:S,!0)},[]),c=g.useCallback(function(h){var x=h;if(!(!Xr.length||Xr[Xr.length-1]!==s)){var y="deltaY"in x?Op(x):Pi(x),v=t.current.filter(function(N){return N.name===x.type&&(N.target===x.target||x.target===N.shadowParent)&&bR(N.delta,y)})[0];if(v&&v.should){x.cancelable&&x.preventDefault();return}if(!v){var w=(i.current.shards||[]).map(Lp).filter(Boolean).filter(function(N){return N.contains(x.target)}),S=w.length>0?l(x,w[0]):!i.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),u=g.useCallback(function(h,x,y,v){var w={name:h,delta:x,target:y,should:v,shadowParent:CR(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),f=g.useCallback(function(h){n.current=Pi(h),r.current=void 0},[]),d=g.useCallback(function(h){u(h.type,Op(h),h.target,l(h,e.lockRef.current))},[]),p=g.useCallback(function(h){u(h.type,Pi(h),h.target,l(h,e.lockRef.current))},[]);g.useEffect(function(){return Xr.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Yr),document.addEventListener("touchmove",c,Yr),document.addEventListener("touchstart",f,Yr),function(){Xr=Xr.filter(function(h){return h!==s}),document.removeEventListener("wheel",c,Yr),document.removeEventListener("touchmove",c,Yr),document.removeEventListener("touchstart",f,Yr)}},[]);var m=e.removeScrollBar,b=e.inert;return g.createElement(g.Fragment,null,b?g.createElement(s,{styles:SR(o)}):null,m?g.createElement(mR,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function CR(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ER=eR(Nx,kR);var _x=g.forwardRef(function(e,t){return g.createElement(fl,ln({},e,{ref:t,sideCar:ER}))});_x.classNames=fl.classNames;var jR=[" ","Enter","ArrowUp","ArrowDown"],_R=[" ","Enter"],Fr="Select",[ml,pl,RR]=Za(Fr),[Ko,ST]=qt(Fr,[RR,il]),hl=il(),[PR,hr]=Ko(Fr),[TR,AR]=Ko(Fr),Rx=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:l,onValueChange:c,dir:u,name:f,autoComplete:d,disabled:p,required:m,form:b}=e,h=hl(t),[x,y]=g.useState(null),[v,w]=g.useState(null),[S,N]=g.useState(!1),C=ul(u),[k,j]=cr({prop:r,defaultProp:o??!1,onChange:s,caller:Fr}),[A,P]=cr({prop:i,defaultProp:l,onChange:c,caller:Fr}),O=g.useRef(null),M=x?b||!!x.closest("form"):!0,[U,T]=g.useState(new Set),z=Array.from(U).map($=>$.props.value).join(";");return a.jsx(AE,{...h,children:a.jsxs(PR,{required:m,scope:t,trigger:x,onTriggerChange:y,valueNode:v,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:N,contentId:Uo(),value:A,onValueChange:P,open:k,onOpenChange:j,dir:C,triggerPointerDownPosRef:O,disabled:p,children:[a.jsx(ml.Provider,{scope:t,children:a.jsx(TR,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback($=>{T(B=>new Set(B).add($))},[]),onNativeOptionRemove:g.useCallback($=>{T(B=>{const E=new Set(B);return E.delete($),E})},[]),children:n})}),M?a.jsxs(Jx,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:d,value:A,onChange:$=>P($.target.value),disabled:p,form:b,children:[A===void 0?a.jsx("option",{value:""}):null,Array.from(U)]},z):null]})})};Rx.displayName=Fr;var Px="SelectTrigger",Tx=g.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=hl(n),i=hr(Px,n),l=i.disabled||r,c=ae(t,i.onTriggerChange),u=pl(n),f=g.useRef("touch"),[d,p,m]=t0(h=>{const x=u().filter(w=>!w.disabled),y=x.find(w=>w.value===i.value),v=n0(x,h,y);v!==void 0&&i.onValueChange(v.value)}),b=h=>{l||(i.onOpenChange(!0),m()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return a.jsx(Iy,{asChild:!0,...s,children:a.jsx(Q.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":e0(i.value)?"":void 0,...o,ref:c,onClick:K(o.onClick,h=>{h.currentTarget.focus(),f.current!=="mouse"&&b(h)}),onPointerDown:K(o.onPointerDown,h=>{f.current=h.pointerType;const x=h.target;x.hasPointerCapture(h.pointerId)&&x.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(b(h),h.preventDefault())}),onKeyDown:K(o.onKeyDown,h=>{const x=d.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&p(h.key),!(x&&h.key===" ")&&jR.includes(h.key)&&(b(),h.preventDefault())})})})});Tx.displayName=Px;var Ax="SelectValue",Ix=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...l}=e,c=hr(Ax,n),{onValueNodeHasChildrenChange:u}=c,f=s!==void 0,d=ae(t,c.onValueNodeChange);return Ve(()=>{u(f)},[u,f]),a.jsx(Q.span,{...l,ref:d,style:{pointerEvents:"none"},children:e0(c.value)?a.jsx(a.Fragment,{children:i}):s})});Ix.displayName=Ax;var IR="SelectIcon",Mx=g.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return a.jsx(Q.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Mx.displayName=IR;var MR="SelectPortal",Ox=e=>a.jsx(Dd,{asChild:!0,...e});Ox.displayName=MR;var zr="SelectContent",Lx=g.forwardRef((e,t)=>{const n=hr(zr,e.__scopeSelect),[r,o]=g.useState();if(Ve(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Ur.createPortal(a.jsx(Dx,{scope:e.__scopeSelect,children:a.jsx(ml.Slot,{scope:e.__scopeSelect,children:a.jsx("div",{children:e.children})})}),s):null}return a.jsx($x,{...e,ref:t})});Lx.displayName=zr;var $t=10,[Dx,gr]=Ko(zr),OR="SelectContentImpl",LR=zs("SelectContent.RemoveScroll"),$x=g.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:m,sticky:b,hideWhenDetached:h,avoidCollisions:x,...y}=e,v=hr(zr,n),[w,S]=g.useState(null),[N,C]=g.useState(null),k=ae(t,F=>S(F)),[j,A]=g.useState(null),[P,O]=g.useState(null),M=pl(n),[U,T]=g.useState(!1),z=g.useRef(!1);g.useEffect(()=>{if(w)return H_(w)},[w]),I_();const $=g.useCallback(F=>{const[ce,...Se]=M().map(re=>re.ref.current),[oe]=Se.slice(-1),ne=document.activeElement;for(const re of F)if(re===ne||(re==null||re.scrollIntoView({block:"nearest"}),re===ce&&N&&(N.scrollTop=0),re===oe&&N&&(N.scrollTop=N.scrollHeight),re==null||re.focus(),document.activeElement!==ne))return},[M,N]),B=g.useCallback(()=>$([j,w]),[$,j,w]);g.useEffect(()=>{U&&B()},[U,B]);const{onOpenChange:E,triggerPointerDownPosRef:_}=v;g.useEffect(()=>{if(w){let F={x:0,y:0};const ce=oe=>{var ne,re;F={x:Math.abs(Math.round(oe.pageX)-(((ne=_.current)==null?void 0:ne.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((re=_.current)==null?void 0:re.y)??0))}},Se=oe=>{F.x<=10&&F.y<=10?oe.preventDefault():w.contains(oe.target)||E(!1),document.removeEventListener("pointermove",ce),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",ce),document.addEventListener("pointerup",Se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ce),document.removeEventListener("pointerup",Se,{capture:!0})}}},[w,E,_]),g.useEffect(()=>{const F=()=>E(!1);return window.addEventListener("blur",F),window.addEventListener("resize",F),()=>{window.removeEventListener("blur",F),window.removeEventListener("resize",F)}},[E]);const[L,G]=t0(F=>{const ce=M().filter(ne=>!ne.disabled),Se=ce.find(ne=>ne.ref.current===document.activeElement),oe=n0(ce,F,Se);oe&&setTimeout(()=>oe.ref.current.focus())}),H=g.useCallback((F,ce,Se)=>{const oe=!z.current&&!Se;(v.value!==void 0&&v.value===ce||oe)&&(A(F),oe&&(z.current=!0))},[v.value]),Y=g.useCallback(()=>w==null?void 0:w.focus(),[w]),X=g.useCallback((F,ce,Se)=>{const oe=!z.current&&!Se;(v.value!==void 0&&v.value===ce||oe)&&O(F)},[v.value]),pe=r==="popper"?Pu:Fx,be=pe===Pu?{side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:m,sticky:b,hideWhenDetached:h,avoidCollisions:x}:{};return a.jsx(Dx,{scope:n,content:w,viewport:N,onViewportChange:C,itemRefCallback:H,selectedItem:j,onItemLeave:Y,itemTextRefCallback:X,focusSelectedItem:B,selectedItemText:P,position:r,isPositioned:U,searchRef:L,children:a.jsx(_x,{as:LR,allowPinchZoom:!0,children:a.jsx(yx,{asChild:!0,trapped:v.open,onMountAutoFocus:F=>{F.preventDefault()},onUnmountAutoFocus:K(o,F=>{var ce;(ce=v.trigger)==null||ce.focus({preventScroll:!0}),F.preventDefault()}),children:a.jsx(Ja,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:F=>F.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:a.jsx(pe,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:F=>F.preventDefault(),...y,...be,onPlaced:()=>T(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:K(y.onKeyDown,F=>{const ce=F.ctrlKey||F.altKey||F.metaKey;if(F.key==="Tab"&&F.preventDefault(),!ce&&F.key.length===1&&G(F.key),["ArrowUp","ArrowDown","Home","End"].includes(F.key)){let oe=M().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);if(["ArrowUp","End"].includes(F.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(F.key)){const ne=F.target,re=oe.indexOf(ne);oe=oe.slice(re+1)}setTimeout(()=>$(oe)),F.preventDefault()}})})})})})})});$x.displayName=OR;var DR="SelectItemAlignedPosition",Fx=g.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=hr(zr,n),i=gr(zr,n),[l,c]=g.useState(null),[u,f]=g.useState(null),d=ae(t,k=>f(k)),p=pl(n),m=g.useRef(!1),b=g.useRef(!0),{viewport:h,selectedItem:x,selectedItemText:y,focusSelectedItem:v}=i,w=g.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&u&&h&&x&&y){const k=s.trigger.getBoundingClientRect(),j=u.getBoundingClientRect(),A=s.valueNode.getBoundingClientRect(),P=y.getBoundingClientRect();if(s.dir!=="rtl"){const ne=P.left-j.left,re=A.left-ne,$e=k.left-re,et=k.width+$e,hn=Math.max(et,j.width),Zt=window.innerWidth-$t,gn=Ra(re,[$t,Math.max($t,Zt-hn)]);l.style.minWidth=et+"px",l.style.left=gn+"px"}else{const ne=j.right-P.right,re=window.innerWidth-A.right-ne,$e=window.innerWidth-k.right-re,et=k.width+$e,hn=Math.max(et,j.width),Zt=window.innerWidth-$t,gn=Ra(re,[$t,Math.max($t,Zt-hn)]);l.style.minWidth=et+"px",l.style.right=gn+"px"}const O=p(),M=window.innerHeight-$t*2,U=h.scrollHeight,T=window.getComputedStyle(u),z=parseInt(T.borderTopWidth,10),$=parseInt(T.paddingTop,10),B=parseInt(T.borderBottomWidth,10),E=parseInt(T.paddingBottom,10),_=z+$+U+E+B,L=Math.min(x.offsetHeight*5,_),G=window.getComputedStyle(h),H=parseInt(G.paddingTop,10),Y=parseInt(G.paddingBottom,10),X=k.top+k.height/2-$t,pe=M-X,be=x.offsetHeight/2,F=x.offsetTop+be,ce=z+$+F,Se=_-ce;if(ce<=X){const ne=O.length>0&&x===O[O.length-1].ref.current;l.style.bottom="0px";const re=u.clientHeight-h.offsetTop-h.offsetHeight,$e=Math.max(pe,be+(ne?Y:0)+re+B),et=ce+$e;l.style.height=et+"px"}else{const ne=O.length>0&&x===O[0].ref.current;l.style.top="0px";const $e=Math.max(X,z+h.offsetTop+(ne?H:0)+be)+Se;l.style.height=$e+"px",h.scrollTop=ce-X+h.offsetTop}l.style.margin=`${$t}px 0`,l.style.minHeight=L+"px",l.style.maxHeight=M+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[p,s.trigger,s.valueNode,l,u,h,x,y,s.dir,r]);Ve(()=>w(),[w]);const[S,N]=g.useState();Ve(()=>{u&&N(window.getComputedStyle(u).zIndex)},[u]);const C=g.useCallback(k=>{k&&b.current===!0&&(w(),v==null||v(),b.current=!1)},[w,v]);return a.jsx(FR,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:C,children:a.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:a.jsx(Q.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Fx.displayName=DR;var $R="SelectPopperPosition",Pu=g.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=$t,...s}=e,i=hl(n);return a.jsx(My,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Pu.displayName=$R;var[FR,cf]=Ko(zr,{}),Tu="SelectViewport",zx=g.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=gr(Tu,n),i=cf(Tu,n),l=ae(t,s.onViewportChange),c=g.useRef(0);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),a.jsx(ml.Slot,{scope:n,children:a.jsx(Q.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:K(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&d){const m=Math.abs(c.current-f.scrollTop);if(m>0){const b=window.innerHeight-$t*2,h=parseFloat(d.style.minHeight),x=parseFloat(d.style.height),y=Math.max(h,x);if(y<b){const v=y+m,w=Math.min(b,v),S=v-w;d.style.height=w+"px",d.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});zx.displayName=Tu;var Bx="SelectGroup",[zR,BR]=Ko(Bx),VR=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Uo();return a.jsx(zR,{scope:n,id:o,children:a.jsx(Q.div,{role:"group","aria-labelledby":o,...r,ref:t})})});VR.displayName=Bx;var Vx="SelectLabel",Ux=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=BR(Vx,n);return a.jsx(Q.div,{id:o.id,...r,ref:t})});Ux.displayName=Vx;var Pa="SelectItem",[UR,Hx]=Ko(Pa),Wx=g.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,l=hr(Pa,n),c=gr(Pa,n),u=l.value===r,[f,d]=g.useState(s??""),[p,m]=g.useState(!1),b=ae(t,v=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,v,r,o)}),h=Uo(),x=g.useRef("touch"),y=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return a.jsx(UR,{scope:n,value:r,disabled:o,textId:h,isSelected:u,onItemTextChange:g.useCallback(v=>{d(w=>w||((v==null?void 0:v.textContent)??"").trim())},[]),children:a.jsx(ml.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:a.jsx(Q.div,{role:"option","aria-labelledby":h,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:b,onFocus:K(i.onFocus,()=>m(!0)),onBlur:K(i.onBlur,()=>m(!1)),onClick:K(i.onClick,()=>{x.current!=="mouse"&&y()}),onPointerUp:K(i.onPointerUp,()=>{x.current==="mouse"&&y()}),onPointerDown:K(i.onPointerDown,v=>{x.current=v.pointerType}),onPointerMove:K(i.onPointerMove,v=>{var w;x.current=v.pointerType,o?(w=c.onItemLeave)==null||w.call(c):x.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:K(i.onPointerLeave,v=>{var w;v.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:K(i.onKeyDown,v=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&v.key===" "||(_R.includes(v.key)&&y(),v.key===" "&&v.preventDefault())})})})})});Wx.displayName=Pa;var cs="SelectItemText",Gx=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=hr(cs,n),l=gr(cs,n),c=Hx(cs,n),u=AR(cs,n),[f,d]=g.useState(null),p=ae(t,y=>d(y),c.onItemTextChange,y=>{var v;return(v=l.itemTextRefCallback)==null?void 0:v.call(l,y,c.value,c.disabled)}),m=f==null?void 0:f.textContent,b=g.useMemo(()=>a.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:h,onNativeOptionRemove:x}=u;return Ve(()=>(h(b),()=>x(b)),[h,x,b]),a.jsxs(a.Fragment,{children:[a.jsx(Q.span,{id:c.textId,...s,ref:p}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Ur.createPortal(s.children,i.valueNode):null]})});Gx.displayName=cs;var Kx="SelectItemIndicator",Qx=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Hx(Kx,n).isSelected?a.jsx(Q.span,{"aria-hidden":!0,...r,ref:t}):null});Qx.displayName=Kx;var Au="SelectScrollUpButton",Yx=g.forwardRef((e,t)=>{const n=gr(Au,e.__scopeSelect),r=cf(Au,e.__scopeSelect),[o,s]=g.useState(!1),i=ae(t,r.onScrollButtonChange);return Ve(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;s(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?a.jsx(qx,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});Yx.displayName=Au;var Iu="SelectScrollDownButton",Xx=g.forwardRef((e,t)=>{const n=gr(Iu,e.__scopeSelect),r=cf(Iu,e.__scopeSelect),[o,s]=g.useState(!1),i=ae(t,r.onScrollButtonChange);return Ve(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;s(f)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?a.jsx(qx,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});Xx.displayName=Iu;var qx=g.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=gr("SelectScrollButton",n),i=g.useRef(null),l=pl(n),c=g.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return g.useEffect(()=>()=>c(),[c]),Ve(()=>{var f;const u=l().find(d=>d.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[l]),a.jsx(Q.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:K(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:K(o.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:K(o.onPointerLeave,()=>{c()})})}),HR="SelectSeparator",Zx=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return a.jsx(Q.div,{"aria-hidden":!0,...r,ref:t})});Zx.displayName=HR;var Mu="SelectArrow",WR=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=hl(n),s=hr(Mu,n),i=gr(Mu,n);return s.open&&i.position==="popper"?a.jsx(Oy,{...o,...r,ref:t}):null});WR.displayName=Mu;var GR="SelectBubbleInput",Jx=g.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=g.useRef(null),s=ae(r,o),i=sf(t);return g.useEffect(()=>{const l=o.current;if(!l)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&f){const d=new Event("change",{bubbles:!0});f.call(l,t),l.dispatchEvent(d)}},[i,t]),a.jsx(Q.select,{...n,style:{...Pv,...n.style},ref:s,defaultValue:t})});Jx.displayName=GR;function e0(e){return e===""||e===void 0}function t0(e){const t=At(e),n=g.useRef(""),r=g.useRef(0),o=g.useCallback(i=>{const l=n.current+i;t(l),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),s=g.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function n0(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=KR(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function KR(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var QR=Rx,r0=Tx,YR=Ix,XR=Mx,qR=Ox,o0=Lx,ZR=zx,s0=Ux,i0=Wx,JR=Gx,eP=Qx,a0=Yx,l0=Xx,c0=Zx;const uf=QR,df=YR,gl=g.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(r0,{ref:r,className:W("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,a.jsx(XR,{asChild:!0,children:a.jsx(Zs,{className:"h-4 w-4 opacity-50"})})]}));gl.displayName=r0.displayName;const u0=g.forwardRef(({className:e,...t},n)=>a.jsx(a0,{ref:n,className:W("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(gk,{className:"h-4 w-4"})}));u0.displayName=a0.displayName;const d0=g.forwardRef(({className:e,...t},n)=>a.jsx(l0,{ref:n,className:W("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(Zs,{className:"h-4 w-4"})}));d0.displayName=l0.displayName;const vl=g.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>a.jsx(qR,{children:a.jsxs(o0,{ref:o,className:W("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[a.jsx(u0,{}),a.jsx(ZR,{className:W("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),a.jsx(d0,{})]})}));vl.displayName=o0.displayName;const tP=g.forwardRef(({className:e,...t},n)=>a.jsx(s0,{ref:n,className:W("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));tP.displayName=s0.displayName;const Wt=g.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(i0,{ref:r,className:W("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(eP,{children:a.jsx(Bd,{className:"h-4 w-4"})})}),a.jsx(JR,{children:t})]}));Wt.displayName=i0.displayName;const nP=g.forwardRef(({className:e,...t},n)=>a.jsx(c0,{ref:n,className:W("-mx-1 my-1 h-px bg-muted",e),...t}));nP.displayName=c0.displayName;const rP={hostile:"bg-destructive/20 text-destructive border-destructive/30",neutral:"bg-muted text-muted-foreground border-muted-foreground/30",supportive:"bg-primary/20 text-primary border-primary/30",unknown:"bg-muted text-muted-foreground border-border"},oP=({stakeholders:e,onChange:t})=>{const[n,r]=g.useState(""),[o,s]=g.useState("neutral"),i=()=>{n.trim()&&(t([...e,{id:n.trim(),disposition:o}]),r(""),s("neutral"))},l=c=>{t(e.filter((u,f)=>f!==c))};return a.jsxs(Te,{className:"border-border",children:[a.jsx(Ze,{className:"pb-3",children:a.jsx(Je,{className:"text-base",children:"Participants"})}),a.jsxs(Ae,{children:[a.jsxs("div",{className:"flex gap-2",children:[a.jsx(vt,{placeholder:"Participant name...",value:n,onChange:c=>r(c.target.value),onKeyDown:c=>c.key==="Enter"&&i(),className:"flex-1"}),a.jsxs(uf,{value:o,onValueChange:c=>s(c),children:[a.jsx(gl,{className:"w-[130px]",children:a.jsx(df,{})}),a.jsxs(vl,{children:[a.jsx(Wt,{value:"supportive",children:"Supportive"}),a.jsx(Wt,{value:"neutral",children:"Neutral"}),a.jsx(Wt,{value:"hostile",children:"Hostile"}),a.jsx(Wt,{value:"unknown",children:"Unknown"})]})]}),a.jsx(Ce,{size:"icon",variant:"outline",onClick:i,disabled:!n.trim(),children:a.jsx(Wi,{className:"h-4 w-4"})})]}),e.length>0&&a.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:e.map((c,u)=>a.jsxs(De,{variant:"outline",className:`gap-1.5 pr-1 ${rP[c.disposition]}`,children:[c.id,a.jsxs("span",{className:"text-[10px] opacity-70",children:["(",c.disposition,")"]}),a.jsx("button",{onClick:()=>l(u),className:"ml-0.5 rounded-full p-0.5 hover:bg-background/50",children:a.jsx(ws,{className:"h-3 w-3"})})]},u))})]})]})};var sP="Label",f0=g.forwardRef((e,t)=>a.jsx(Q.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));f0.displayName=sP;var m0=f0;const iP=nl("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),sn=g.forwardRef(({className:e,...t},n)=>a.jsx(m0,{ref:n,className:W(iP(),e),...t}));sn.displayName=m0.displayName;const aP=({values:e,onChange:t})=>a.jsxs(Te,{className:"border-border",children:[a.jsx(Ze,{className:"pb-3",children:a.jsx(Je,{className:"text-base",children:"Rules & Limits"})}),a.jsxs(Ae,{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(sn,{className:"text-xs text-muted-foreground",children:"Time Horizon"}),a.jsx(vt,{placeholder:"e.g. 30 days, 6 months",value:e.timeHorizon,onChange:n=>t({...e,timeHorizon:n.target.value}),className:"mt-1"})]}),a.jsxs("div",{children:[a.jsx(sn,{className:"text-xs text-muted-foreground",children:"Risk Tolerance"}),a.jsxs(uf,{value:e.riskTolerance,onValueChange:n=>t({...e,riskTolerance:n}),children:[a.jsx(gl,{className:"mt-1",children:a.jsx(df,{})}),a.jsxs(vl,{children:[a.jsx(Wt,{value:"conservative",children:"Conservative"}),a.jsx(Wt,{value:"moderate",children:"Moderate"}),a.jsx(Wt,{value:"aggressive",children:"Aggressive"})]})]})]}),a.jsxs("div",{children:[a.jsx(sn,{className:"text-xs text-muted-foreground",children:"Budget"}),a.jsx(vt,{placeholder:"e.g. $10M, Unlimited",value:e.budget,onChange:n=>t({...e,budget:n.target.value}),className:"mt-1"})]})]})]}),lP=[{value:"quick",label:"Quick",description:"2 paths, surface analysis"},{value:"standard",label:"Standard",description:"3 paths, balanced"},{value:"full",label:"Full",description:"5 paths, deep analysis"},{value:"exhaustive",label:"Exhaustive",description:"8 paths, stress tests"}],cP=({value:e,onChange:t})=>a.jsxs(Te,{className:"border-border",children:[a.jsx(Ze,{className:"pb-3",children:a.jsx(Je,{className:"text-base",children:"Analysis Depth"})}),a.jsx(Ae,{children:a.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:lP.map(n=>a.jsxs("button",{onClick:()=>t(n.value),className:`rounded-lg border px-3 py-2.5 text-left transition-all ${e===n.value?"border-primary bg-primary/10 text-foreground":"border-border bg-card text-muted-foreground hover:border-primary/30"}`,children:[a.jsx("p",{className:"text-sm font-medium",children:n.label}),a.jsx("p",{className:"mt-0.5 text-[10px]",children:n.description})]},n.value))})})]}),mc="mirotir_api_key",uP=({onKeyChange:e})=>{const[t,n]=g.useState(""),[r,o]=g.useState(!1),[s,i]=g.useState(!1);g.useEffect(()=>{const u=localStorage.getItem(mc);u&&(n(u),e==null||e(u))},[]);const l=()=>{t.trim()?localStorage.setItem(mc,t.trim()):localStorage.removeItem(mc),e==null||e(t.trim()),i(!0),setTimeout(()=>i(!1),2e3)},c=t.trim().length>0;return a.jsxs("div",{className:"rounded-xl border-2 border-primary/20 bg-card p-5 shadow-md",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[a.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-primary/10",children:a.jsx(bk,{className:"h-4 w-4 text-primary"})}),a.jsx("span",{className:"text-sm font-semibold text-foreground",children:"Your AI Key"}),c&&s&&a.jsx("span",{className:"ml-auto rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-medium text-primary",children:"Saved ✓"})]}),a.jsx("p",{className:"text-xs text-muted-foreground mb-1 ml-10",children:"Powers the analysis with your chosen AI service."}),a.jsxs("p",{className:"text-[10px] text-muted-foreground/70 mb-3 ml-10",children:["Get a key from"," ",a.jsxs("a",{href:"https://platform.openai.com/api-keys",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline inline-flex items-center gap-0.5",children:["OpenAI ",a.jsx(np,{className:"h-2.5 w-2.5"})]})," ","or"," ",a.jsxs("a",{href:"https://aistudio.google.com/apikey",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline inline-flex items-center gap-0.5",children:["Google AI Studio ",a.jsx(np,{className:"h-2.5 w-2.5"})]}),". Stored in your browser only — never sent to our servers."]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsxs("div",{className:"relative flex-1",children:[a.jsx(vt,{type:r?"text":"password",placeholder:"sk-... or AIza...",value:t,onChange:u=>n(u.target.value),onKeyDown:u=>u.key==="Enter"&&l(),className:"pr-9 border-primary/20 focus-visible:ring-primary/30"}),a.jsx("button",{onClick:()=>o(!r),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",children:r?a.jsx(xk,{className:"h-4 w-4"}):a.jsx(ey,{className:"h-4 w-4"})})]}),a.jsx(Ce,{size:"sm",onClick:l,className:"min-w-[60px]",children:s?a.jsx(Bd,{className:"h-4 w-4"}):"Save"})]})]})},dP=({mode:e,onChange:t})=>a.jsxs("div",{className:"flex items-center gap-1 rounded-lg border border-border bg-card p-1",children:[a.jsxs("button",{onClick:()=>t("explore"),className:W("flex-1 rounded-md px-4 py-2 text-sm font-medium transition-all",e==="explore"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[a.jsx("span",{className:"block text-xs opacity-70",children:"EXPLORE"}),a.jsx("span",{className:"block text-[10px]",children:"What might happen?"})]}),a.jsxs("button",{onClick:()=>t("goal"),className:W("flex-1 rounded-md px-4 py-2 text-sm font-medium transition-all",e==="goal"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[a.jsx("span",{className:"block text-xs opacity-70",children:"GOAL"}),a.jsx("span",{className:"block text-[10px]",children:"How do I get here?"})]})]}),fP=({values:e,onChange:t})=>{const[n,r]=g.useState(""),[o,s]=g.useState(""),[i,l]=g.useState(""),c=(f,d,p)=>{d.trim()&&(t({...e,[f]:[...e[f],d.trim()]}),p(""))},u=(f,d)=>{t({...e,[f]:e[f].filter((p,m)=>m!==d)})};return a.jsxs(Te,{className:"border-primary/30 bg-primary/5",children:[a.jsx(Ze,{className:"pb-3",children:a.jsx(Je,{className:"text-base",children:"Goal: How do I get here?"})}),a.jsxs(Ae,{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(sn,{className:"text-xs text-muted-foreground",children:"Desired Outcome"}),a.jsx(cl,{placeholder:"Describe the outcome you want to achieve...",value:e.outcome,onChange:f=>t({...e,outcome:f.target.value}),className:"mt-1 min-h-[60px]"})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx(sn,{className:"text-xs text-muted-foreground",children:"Priority"}),a.jsxs(uf,{value:e.priority,onValueChange:f=>t({...e,priority:f}),children:[a.jsx(gl,{className:"mt-1",children:a.jsx(df,{})}),a.jsxs(vl,{children:[a.jsx(Wt,{value:"preferred",children:"Preferred"}),a.jsx(Wt,{value:"important",children:"Important"}),a.jsx(Wt,{value:"critical",children:"Critical"})]})]})]}),a.jsxs("div",{children:[a.jsx(sn,{className:"text-xs text-muted-foreground",children:"Timeframe"}),a.jsx(vt,{placeholder:"e.g. 30 days",value:e.timeframe,onChange:f=>t({...e,timeframe:f.target.value}),className:"mt-1"})]})]}),a.jsxs("div",{children:[a.jsx(sn,{className:"text-xs text-muted-foreground",children:"Success Criteria"}),a.jsxs("div",{className:"mt-1 flex gap-2",children:[a.jsx(vt,{placeholder:"Measurable condition...",value:n,onChange:f=>r(f.target.value),onKeyDown:f=>f.key==="Enter"&&c("successCriteria",n,r)}),a.jsx("button",{onClick:()=>c("successCriteria",n,r),className:"shrink-0 rounded-md border border-border p-2 hover:bg-muted",children:a.jsx(Wi,{className:"h-4 w-4"})})]}),e.successCriteria.length>0&&a.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:e.successCriteria.map((f,d)=>a.jsxs(De,{variant:"outline",className:"gap-1 pr-1 text-xs",children:[f,a.jsx("button",{onClick:()=>u("successCriteria",d),children:a.jsx(ws,{className:"h-3 w-3"})})]},d))})]}),a.jsxs("div",{children:[a.jsx(sn,{className:"text-xs text-destructive",children:"Red Lines (must NOT happen)"}),a.jsxs("div",{className:"mt-1 flex gap-2",children:[a.jsx(vt,{placeholder:"Hard constraint...",value:o,onChange:f=>s(f.target.value),onKeyDown:f=>f.key==="Enter"&&c("redLines",o,s)}),a.jsx("button",{onClick:()=>c("redLines",o,s),className:"shrink-0 rounded-md border border-destructive/30 p-2 hover:bg-destructive/10",children:a.jsx(Wi,{className:"h-4 w-4 text-destructive"})})]}),e.redLines.length>0&&a.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:e.redLines.map((f,d)=>a.jsxs(De,{variant:"outline",className:"gap-1 pr-1 text-xs border-destructive/30 text-destructive",children:[f,a.jsx("button",{onClick:()=>u("redLines",d),children:a.jsx(ws,{className:"h-3 w-3"})})]},d))})]}),a.jsxs("div",{children:[a.jsx(sn,{className:"text-xs text-muted-foreground",children:"Available Levers"}),a.jsxs("div",{className:"mt-1 flex gap-2",children:[a.jsx(vt,{placeholder:"Tool or resource you can deploy...",value:i,onChange:f=>l(f.target.value),onKeyDown:f=>f.key==="Enter"&&c("availableLevers",i,l)}),a.jsx("button",{onClick:()=>c("availableLevers",i,l),className:"shrink-0 rounded-md border border-border p-2 hover:bg-muted",children:a.jsx(Wi,{className:"h-4 w-4"})})]}),e.availableLevers.length>0&&a.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:e.availableLevers.map((f,d)=>a.jsxs(De,{variant:"outline",className:"gap-1 pr-1 text-xs border-primary/30 text-primary",children:[f,a.jsx("button",{onClick:()=>u("availableLevers",d),children:a.jsx(ws,{className:"h-3 w-3"})})]},d))})]})]})]})},mP={low:"bg-destructive/20 text-destructive border-destructive/30",medium:"bg-warning/20 text-warning border-warning/30",high:"bg-primary/20 text-primary border-primary/30"},pP=({confidence:e})=>{const[t,n]=g.useState(!1);return a.jsxs("div",{className:"inline-block",children:[a.jsxs("button",{onClick:()=>n(!t),className:W("inline-flex items-center gap-1.5 rounded-full border px-3 py-1 text-xs font-medium transition-all",mP[e.level]),children:["Confidence: ",e.level.toUpperCase(),a.jsx(Zs,{className:W("h-3 w-3 transition-transform",t&&"rotate-180")})]}),t&&a.jsx("div",{className:"mt-2 rounded-md border border-border bg-card p-3 text-xs text-muted-foreground animate-in fade-in-0 slide-in-from-top-1",children:e.reason})]})},hP={caller:"bg-primary/20 text-primary",inferred:"bg-warning/20 text-warning",default:"bg-muted text-muted-foreground"},gP=({assumptions:e})=>e.length===0?null:a.jsx("section",{className:"border-t border-border py-8",children:a.jsx("div",{className:"container mx-auto px-6",children:a.jsx("div",{className:"mx-auto max-w-4xl",children:a.jsxs(Te,{className:"border-border",children:[a.jsx(Ze,{className:"pb-3",children:a.jsx(Je,{className:"text-base",children:"Key Assumptions"})}),a.jsx(Ae,{children:a.jsx("ul",{className:"space-y-2",children:e.map((t,n)=>a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx(De,{className:`shrink-0 text-[10px] ${hP[t.source]}`,children:t.source}),a.jsx("span",{className:"text-sm text-foreground",children:t.text})]},n))})})]})})})});var pc="rovingFocusGroup.onEntryFocus",vP={bubbles:!1,cancelable:!0},ei="RovingFocusGroup",[Ou,p0,yP]=Za(ei),[xP,h0]=qt(ei,[yP]),[wP,bP]=xP(ei),g0=g.forwardRef((e,t)=>a.jsx(Ou.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Ou.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(SP,{...e,ref:t})})}));g0.displayName=ei;var SP=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...d}=e,p=g.useRef(null),m=ae(t,p),b=ul(s),[h,x]=cr({prop:i,defaultProp:l??null,onChange:c,caller:ei}),[y,v]=g.useState(!1),w=At(u),S=p0(n),N=g.useRef(!1),[C,k]=g.useState(0);return g.useEffect(()=>{const j=p.current;if(j)return j.addEventListener(pc,w),()=>j.removeEventListener(pc,w)},[w]),a.jsx(wP,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:h,onItemFocus:g.useCallback(j=>x(j),[x]),onItemShiftTab:g.useCallback(()=>v(!0),[]),onFocusableItemAdd:g.useCallback(()=>k(j=>j+1),[]),onFocusableItemRemove:g.useCallback(()=>k(j=>j-1),[]),children:a.jsx(Q.div,{tabIndex:y||C===0?-1:0,"data-orientation":r,...d,ref:m,style:{outline:"none",...e.style},onMouseDown:K(e.onMouseDown,()=>{N.current=!0}),onFocus:K(e.onFocus,j=>{const A=!N.current;if(j.target===j.currentTarget&&A&&!y){const P=new CustomEvent(pc,vP);if(j.currentTarget.dispatchEvent(P),!P.defaultPrevented){const O=S().filter($=>$.focusable),M=O.find($=>$.active),U=O.find($=>$.id===h),z=[M,U,...O].filter(Boolean).map($=>$.ref.current);x0(z,f)}}N.current=!1}),onBlur:K(e.onBlur,()=>v(!1))})})}),v0="RovingFocusGroupItem",y0=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...l}=e,c=Uo(),u=s||c,f=bP(v0,n),d=f.currentTabStopId===u,p=p0(n),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:h}=f;return g.useEffect(()=>{if(r)return m(),()=>b()},[r,m,b]),a.jsx(Ou.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:a.jsx(Q.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:K(e.onMouseDown,x=>{r?f.onItemFocus(u):x.preventDefault()}),onFocus:K(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:K(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=CP(x,f.orientation,f.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let w=p().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")w.reverse();else if(y==="prev"||y==="next"){y==="prev"&&w.reverse();const S=w.indexOf(x.currentTarget);w=f.loop?EP(w,S+1):w.slice(S+1)}setTimeout(()=>x0(w))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:h!=null}):i})})});y0.displayName=v0;var NP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function kP(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function CP(e,t,n){const r=kP(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return NP[r]}function x0(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function EP(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var jP=g0,_P=y0,yl="Tabs",[RP,NT]=qt(yl,[h0]),w0=h0(),[PP,ff]=RP(yl),b0=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:l,activationMode:c="automatic",...u}=e,f=ul(l),[d,p]=cr({prop:r,onChange:o,defaultProp:s??"",caller:yl});return a.jsx(PP,{scope:n,baseId:Uo(),value:d,onValueChange:p,orientation:i,dir:f,activationMode:c,children:a.jsx(Q.div,{dir:f,"data-orientation":i,...u,ref:t})})});b0.displayName=yl;var S0="TabsList",N0=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=ff(S0,n),i=w0(n);return a.jsx(jP,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:r,children:a.jsx(Q.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});N0.displayName=S0;var k0="TabsTrigger",C0=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,i=ff(k0,n),l=w0(n),c=_0(i.baseId,r),u=R0(i.baseId,r),f=r===i.value;return a.jsx(_P,{asChild:!0,...l,focusable:!o,active:f,children:a.jsx(Q.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...s,ref:t,onMouseDown:K(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?i.onValueChange(r):d.preventDefault()}),onKeyDown:K(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(r)}),onFocus:K(e.onFocus,()=>{const d=i.activationMode!=="manual";!f&&!o&&d&&i.onValueChange(r)})})})});C0.displayName=k0;var E0="TabsContent",j0=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...i}=e,l=ff(E0,n),c=_0(l.baseId,r),u=R0(l.baseId,r),f=r===l.value,d=g.useRef(f);return g.useEffect(()=>{const p=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(p)},[]),a.jsx(Xs,{present:o||f,children:({present:p})=>a.jsx(Q.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:p&&s})})});j0.displayName=E0;function _0(e,t){return`${e}-trigger-${t}`}function R0(e,t){return`${e}-content-${t}`}var TP=b0,P0=N0,T0=C0,A0=j0;const I0=TP,mf=g.forwardRef(({className:e,...t},n)=>a.jsx(P0,{ref:n,className:W("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));mf.displayName=P0.displayName;const wo=g.forwardRef(({className:e,...t},n)=>a.jsx(T0,{ref:n,className:W("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...t}));wo.displayName=T0.displayName;const bo=g.forwardRef(({className:e,...t},n)=>a.jsx(A0,{ref:n,className:W("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));bo.displayName=A0.displayName;const M0=g.forwardRef(({className:e,...t},n)=>a.jsx("div",{className:"relative w-full overflow-auto",children:a.jsx("table",{ref:n,className:W("w-full caption-bottom text-sm",e),...t})}));M0.displayName="Table";const O0=g.forwardRef(({className:e,...t},n)=>a.jsx("thead",{ref:n,className:W("[&_tr]:border-b",e),...t}));O0.displayName="TableHeader";const L0=g.forwardRef(({className:e,...t},n)=>a.jsx("tbody",{ref:n,className:W("[&_tr:last-child]:border-0",e),...t}));L0.displayName="TableBody";const AP=g.forwardRef(({className:e,...t},n)=>a.jsx("tfoot",{ref:n,className:W("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));AP.displayName="TableFooter";const Lu=g.forwardRef(({className:e,...t},n)=>a.jsx("tr",{ref:n,className:W("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));Lu.displayName="TableRow";const Du=g.forwardRef(({className:e,...t},n)=>a.jsx("th",{ref:n,className:W("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Du.displayName="TableHead";const $u=g.forwardRef(({className:e,...t},n)=>a.jsx("td",{ref:n,className:W("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));$u.displayName="TableCell";const IP=g.forwardRef(({className:e,...t},n)=>a.jsx("caption",{ref:n,className:W("mt-4 text-sm text-muted-foreground",e),...t}));IP.displayName="TableCaption";const MP={low:"bg-primary text-primary-foreground",medium:"bg-warning text-primary-foreground",high:"bg-destructive text-destructive-foreground"},OP={best:"border-primary/50",likely:"border-secondary",worst:"border-warning",tail:"border-destructive"},LP={best:"text-primary",likely:"text-secondary-foreground",worst:"text-warning",tail:"text-destructive"},Dp={positive:{color:"bg-primary",label:"+"},neutral:{color:"bg-muted-foreground",label:"○"},negative:{color:"bg-destructive",label:"−"}},DP=({result:e})=>a.jsx("section",{className:"border-t border-border py-12",children:a.jsx("div",{className:"container mx-auto px-6",children:a.jsxs(I0,{defaultValue:"paths",className:"mx-auto max-w-5xl",children:[a.jsxs(mf,{className:"mb-8 w-full justify-start",children:[a.jsx(wo,{value:"paths",children:"Reasoning Paths"}),a.jsx(wo,{value:"matrix",children:"Strategy Matrix"}),a.jsx(wo,{value:"outcomes",children:"Projected Outcomes"})]}),a.jsx(bo,{value:"paths",children:a.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:e.paths.map((t,n)=>a.jsxs(Te,{className:`animate-fade-in-up border-border ${t.recommended?"border-primary glow-teal":""}`,style:{animationDelay:`${n*100}ms`},children:[a.jsx(Ze,{className:"pb-3",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs(Je,{className:"text-base",children:[t.name,t.recommended&&a.jsx("span",{className:"ml-2 text-xs font-normal text-primary",children:"★ Recommended"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("span",{className:"text-sm font-mono text-primary",children:[t.probability,"%"]}),a.jsx(De,{className:MP[t.riskLevel],children:t.riskLevel})]})]})}),a.jsxs(Ae,{children:[a.jsx("p",{className:"mb-3 text-sm text-muted-foreground",children:t.description}),a.jsxs("div",{children:[a.jsx("p",{className:"mb-1.5 text-xs font-medium text-foreground",children:"Key Tradeoffs:"}),a.jsx("ul",{className:"space-y-1",children:t.tradeoffs.map((r,o)=>a.jsxs("li",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[a.jsx("span",{className:"mt-1 h-1 w-1 shrink-0 rounded-full bg-muted-foreground"}),r]},o))})]})]})]},n))})}),a.jsx(bo,{value:"matrix",children:a.jsx(Te,{className:"border-border",children:a.jsx(Ae,{className:"pt-6",children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs(M0,{children:[a.jsx(O0,{children:a.jsxs(Lu,{children:[a.jsx(Du,{className:"text-foreground",children:"Stakeholder"}),e.matrix.strategies.map((t,n)=>a.jsx(Du,{className:"text-center text-foreground",children:t},n))]})}),a.jsx(L0,{children:e.matrix.stakeholders.map((t,n)=>a.jsxs(Lu,{children:[a.jsx($u,{className:"font-medium text-foreground",children:t}),e.matrix.reactions[n].map((r,o)=>a.jsx($u,{className:"text-center",children:a.jsxs("div",{className:"flex items-center justify-center gap-1.5",children:[a.jsx("span",{className:`inline-block h-2.5 w-2.5 rounded-full ${Dp[r].color}`}),a.jsx("span",{className:"text-xs text-muted-foreground",children:Dp[r].label})]})},o))]},n))})]})})})})}),a.jsx(bo,{value:"outcomes",children:a.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:e.outcomes.map((t,n)=>a.jsxs(Te,{className:`animate-fade-in-up border-l-4 ${OP[t.type]}`,style:{animationDelay:`${n*100}ms`},children:[a.jsx(Ze,{className:"pb-2",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(Je,{className:"text-base",children:t.label}),a.jsxs("span",{className:`text-sm font-mono ${LP[t.type]}`,children:[t.likelihood,"%"]})]})}),a.jsxs(Ae,{children:[a.jsx("p",{className:"mb-2 text-xs text-muted-foreground italic",children:t.conditions}),a.jsx("p",{className:"mb-3 text-sm text-foreground",children:t.description}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-xs text-muted-foreground",children:"Impact"}),a.jsx("div",{className:"flex gap-0.5",children:Array.from({length:10}).map((r,o)=>a.jsx("div",{className:`h-2 w-2 rounded-sm ${o<t.impactRating?"bg-primary":"bg-muted"}`},o))}),a.jsxs("span",{className:"text-xs font-mono text-primary",children:[t.impactRating,"/10"]})]})]})]},n))})})]})})}),$P={low:"bg-muted text-muted-foreground",medium:"bg-secondary text-secondary-foreground",high:"bg-warning text-primary-foreground",critical:"bg-destructive text-destructive-foreground"},FP=({challenges:e})=>a.jsx("section",{className:"border-t border-border py-12",children:a.jsx("div",{className:"container mx-auto px-6",children:a.jsxs("div",{className:"mx-auto max-w-4xl",children:[a.jsx("h2",{className:"mb-6 text-2xl font-bold tracking-tight text-foreground",children:"Your assumptions were challenged"}),a.jsx("div",{className:"space-y-4",children:e.map((t,n)=>a.jsx(Te,{className:"animate-fade-in-up border-border",style:{animationDelay:`${n*100}ms`},children:a.jsxs(Ae,{className:"pt-6",children:[a.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[a.jsx("h4",{className:"font-semibold text-foreground",children:t.assumption}),a.jsx(De,{className:$P[t.severity],children:t.severity})]}),a.jsxs("div",{className:"space-y-2 text-sm",children:[a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-muted-foreground",children:"Why it might not hold: "}),a.jsx("span",{className:"text-foreground",children:t.whyItMightFail})]}),a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-muted-foreground",children:"What changes if you're wrong: "}),a.jsx("span",{className:"text-foreground",children:t.whatChanges})]})]})]})},n))})]})})}),zP=({recommendations:e})=>a.jsx("section",{className:"border-t border-border py-12",children:a.jsx("div",{className:"container mx-auto px-6",children:a.jsxs("div",{className:"mx-auto max-w-4xl",children:[a.jsx("h2",{className:"mb-6 text-2xl font-bold tracking-tight text-foreground",children:"Recommendations"}),a.jsx("div",{className:"space-y-4",children:e.map((t,n)=>a.jsx(Te,{className:"animate-fade-in-up border-border",style:{animationDelay:`${n*100}ms`},children:a.jsxs(Ae,{className:"flex gap-5 pt-6",children:[a.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary text-lg font-bold text-primary-foreground",children:t.priority}),a.jsxs("div",{className:"flex-1",children:[a.jsx("h4",{className:"mb-1 font-semibold text-foreground",children:t.action}),a.jsx("p",{className:"mb-2 text-sm text-muted-foreground",children:t.rationale}),a.jsx("span",{className:"rounded-sm bg-muted px-2 py-0.5 text-xs text-muted-foreground",children:t.timeframe})]})]})},n))})]})})});var xl="Switch",[BP,kT]=qt(xl),[VP,UP]=BP(xl),D0=g.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:i,disabled:l,value:c="on",onCheckedChange:u,form:f,...d}=e,[p,m]=g.useState(null),b=ae(t,w=>m(w)),h=g.useRef(!1),x=p?f||!!p.closest("form"):!0,[y,v]=cr({prop:o,defaultProp:s??!1,onChange:u,caller:xl});return a.jsxs(VP,{scope:n,checked:y,disabled:l,children:[a.jsx(Q.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":B0(y),"data-disabled":l?"":void 0,disabled:l,value:c,...d,ref:b,onClick:K(e.onClick,w=>{v(S=>!S),x&&(h.current=w.isPropagationStopped(),h.current||w.stopPropagation())})}),x&&a.jsx(z0,{control:p,bubbles:!h.current,name:r,value:c,checked:y,required:i,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});D0.displayName=xl;var $0="SwitchThumb",F0=g.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=UP($0,n);return a.jsx(Q.span,{"data-state":B0(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});F0.displayName=$0;var HP="SwitchBubbleInput",z0=g.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const i=g.useRef(null),l=ae(i,s),c=sf(n),u=Zd(t);return g.useEffect(()=>{const f=i.current;if(!f)return;const d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==n&&m){const b=new Event("click",{bubbles:r});m.call(f,n),f.dispatchEvent(b)}},[c,n,r]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});z0.displayName=HP;function B0(e){return e?"checked":"unchecked"}var V0=D0,WP=F0;const pf=g.forwardRef(({className:e,...t},n)=>a.jsx(V0,{className:W("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:n,children:a.jsx(WP,{className:W("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));pf.displayName=V0.displayName;const GP={low:"bg-primary/20 text-primary",moderate:"bg-warning/20 text-warning",high:"bg-destructive/20 text-destructive",critical:"bg-destructive text-destructive-foreground"},KP=({goalResult:e,onForkStrategy:t})=>{var b;const[n,r]=g.useState(null),[o,s]=g.useState(null),[i,l]=g.useState({}),[c,u]=g.useState({}),f=h=>{r(n===h?null:h)},d=h=>{s(o===h.id?null:h.id);const x={};h.levers_used.forEach(y=>{x[y]=!0}),l(x)},p=h=>{const x=Object.entries(i).filter(([,y])=>y).map(([y])=>y);t==null||t(h,x),s(null)},m=h=>e.swarm_tests.find(x=>x.strategy_id===h);return a.jsx("section",{className:"border-t border-border py-8",children:a.jsx("div",{className:"container mx-auto px-6",children:a.jsxs("div",{className:"mx-auto max-w-5xl",children:[a.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[a.jsx("h2",{className:"text-2xl font-bold tracking-tight text-foreground",children:"Strategy Lab"}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Recommended: ",a.jsx("span",{className:"text-primary font-medium",children:(b=e.strategies.find(h=>h.id===e.recommended_strategy_id))==null?void 0:b.label})]})]}),a.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:e.strategies.map(h=>{const x=m(h.id),y=h.id===e.recommended_strategy_id,v=c[h.id]||"overview";return a.jsxs(Te,{className:W("border-border transition-all",y&&"border-primary glow-teal"),children:[a.jsx(Ze,{className:"pb-2",children:a.jsx("div",{className:"flex items-start justify-between gap-2",children:a.jsxs("div",{children:[a.jsxs(Je,{className:"text-base",children:[h.label,y&&a.jsx("span",{className:"ml-2 text-xs text-primary",children:"★"})]}),a.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[a.jsxs("span",{className:"text-xs font-mono text-primary",children:[(h.success_probability*100).toFixed(0),"% success"]}),a.jsxs(De,{className:GP[h.risk],children:[h.risk," risk"]}),h.red_line_violations.length>0&&a.jsx(De,{variant:"destructive",className:"text-[10px]",children:"RED LINE"})]})]})})}),a.jsxs(Ae,{className:"space-y-3",children:[a.jsx("p",{className:"text-xs text-muted-foreground",children:h.description}),a.jsxs(I0,{value:v,onValueChange:w=>u(S=>({...S,[h.id]:w})),children:[a.jsxs(mf,{className:"h-8 w-full",children:[a.jsx(wo,{value:"overview",className:"text-xs flex-1",children:"Overview"}),a.jsxs(wo,{value:"timeline",className:"text-xs flex-1",children:[a.jsx(Vd,{className:"mr-1 h-3 w-3"}),"Timeline"]})]}),a.jsxs(bo,{value:"overview",className:"mt-3 space-y-2",children:[a.jsxs("div",{className:"text-xs text-muted-foreground",children:[a.jsx("span",{className:"font-medium text-foreground",children:"Levers:"})," ",h.levers_used.join(", ")]}),a.jsxs("div",{className:"text-xs text-muted-foreground",children:[a.jsx("span",{className:"font-medium text-foreground",children:"Timeframe:"})," ",h.estimated_timeframe]}),x&&a.jsxs("div",{className:"text-xs text-muted-foreground",children:[a.jsx("span",{className:"font-medium text-foreground",children:"Swarm result:"})," ",x.goal_reached?"Goal reached":`${(x.goal_proximity*100).toFixed(0)}% proximity`]})]}),a.jsx(bo,{value:"timeline",className:"mt-3",children:a.jsx("div",{className:"relative ml-3 border-l border-border pl-4",children:h.steps.map(w=>a.jsxs("div",{className:"relative mb-4 last:mb-0",children:[a.jsx("div",{className:"absolute -left-[21px] top-1 h-3 w-3 rounded-full border-2 border-primary bg-background"}),a.jsx("p",{className:"text-[10px] text-muted-foreground",children:w.timeframe}),a.jsx("p",{className:"text-xs font-medium text-foreground",children:w.action}),a.jsxs("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:["Lever: ",w.lever," · Effect: ",w.expected_effect]})]},w.order))})})]}),a.jsxs("div",{className:"flex gap-2 pt-1",children:[a.jsxs(Ce,{size:"sm",variant:"outline",className:"text-xs",onClick:()=>f(h.id),children:[a.jsx(ey,{className:"mr-1 h-3 w-3"}),n===h.id?"HIDE":"SHOW WHY"]}),a.jsxs(Ce,{size:"sm",variant:"outline",className:"text-xs",onClick:()=>d(h),children:[a.jsx(Ud,{className:"mr-1 h-3 w-3"}),"FORK STRATEGY"]})]}),n===h.id&&a.jsxs("div",{className:"rounded-md border border-border bg-muted/30 p-3 animate-in fade-in-0 slide-in-from-top-1",children:[a.jsx("h4",{className:"mb-2 text-xs font-semibold text-foreground",children:"Why this strategy?"}),a.jsxs("div",{className:"space-y-2 text-xs text-muted-foreground",children:[a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-foreground",children:"Drivers:"})," ",h.dependencies.join("; ")]}),a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-foreground",children:"Failure modes:"})," ",h.failure_modes.join("; ")]}),h.likely_allies&&h.likely_allies.length>0&&a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-foreground",children:"Allies:"})," ",h.likely_allies.join(", ")]}),h.likely_opponents&&h.likely_opponents.length>0&&a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-foreground",children:"Opponents:"})," ",h.likely_opponents.join(", ")]})]})]}),o===h.id&&a.jsxs("div",{className:"rounded-md border border-primary/30 bg-primary/5 p-3 animate-in fade-in-0 slide-in-from-top-1",children:[a.jsx("h4",{className:"mb-2 text-xs font-semibold text-foreground",children:"Toggle Levers"}),a.jsx("div",{className:"space-y-2",children:h.levers_used.map(w=>a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-xs text-foreground",children:w}),a.jsx(pf,{checked:i[w]??!0,onCheckedChange:S=>l(N=>({...N,[w]:S}))})]},w))}),a.jsx(Ce,{size:"sm",className:"mt-3 w-full text-xs",onClick:()=>p(h.id),children:"RUN NEW PATH"})]})]})]},h.id)})}),a.jsxs("div",{className:"mt-6 rounded-lg border border-border bg-card p-4",children:[a.jsx("p",{className:"text-sm text-foreground",children:e.recommendation_rationale}),a.jsxs("p",{className:"mt-2 text-xs text-primary font-medium",children:["Immediate next step: ",e.immediate_next_step]})]})]})})})},QP=["Key stakeholder defects from coalition","Unexpected regulatory announcement","Media leak reveals strategy details","Major competitor makes aggressive move","Economic shock changes market conditions","New ally emerges with aligned interests"],YP=({strategy:e,onInjectEvent:t,forkedTimeline:n})=>{const[r,o]=g.useState(0),[s,i]=g.useState(""),[l,c]=g.useState(!1),u=e.steps.length-1,f=g.useCallback(()=>{s.trim()&&(t==null||t({atStep:r,event:s.trim()}),i(""))},[s,r,t]);return a.jsx("section",{className:"border-t border-border py-8",children:a.jsx("div",{className:"container mx-auto px-6",children:a.jsxs("div",{className:"mx-auto max-w-4xl",children:[a.jsx("h2",{className:"mb-6 text-2xl font-bold tracking-tight text-foreground",children:"Decision Time Machine"}),a.jsxs(Te,{className:"border-border",children:[a.jsx(Ze,{className:"pb-3",children:a.jsxs(Je,{className:"flex items-center gap-2 text-base",children:[a.jsx(ec,{className:"h-4 w-4 text-primary"}),"Timeline: ",e.label]})}),a.jsxs(Ae,{className:"space-y-6",children:[a.jsxs("div",{className:"relative ml-3 border-l-2 border-border pl-6",children:[e.steps.map((d,p)=>a.jsxs("div",{className:`relative mb-6 last:mb-0 transition-opacity ${n&&p>n.injectedEvent.atStep?"opacity-40":""}`,children:[a.jsx("div",{className:`absolute -left-[29px] top-1 h-4 w-4 rounded-full border-2 ${p===r?"border-primary bg-primary":p<=r?"border-primary bg-background":"border-muted-foreground bg-background"}`}),a.jsx("p",{className:"text-[10px] font-mono text-muted-foreground",children:d.timeframe}),a.jsx("p",{className:"text-sm font-medium text-foreground",children:d.action}),a.jsx("p",{className:"text-xs text-muted-foreground",children:d.expected_effect}),n&&p===n.injectedEvent.atStep&&a.jsxs("div",{className:"mt-2 flex items-start gap-2 rounded border border-warning/30 bg-warning/10 px-3 py-2",children:[a.jsx(ec,{className:"mt-0.5 h-3 w-3 shrink-0 text-warning"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-[10px] font-bold text-warning",children:"EVENT INJECTED"}),a.jsx("p",{className:"text-xs text-foreground",children:n.injectedEvent.event})]})]})]},d.order)),n&&a.jsxs("div",{className:"mt-4 ml-4 border-l-2 border-primary/50 pl-6",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(Ud,{className:"h-4 w-4 text-primary"}),a.jsx("span",{className:"text-xs font-bold text-primary",children:"FORKED TIMELINE"})]}),n.forkedSteps.map((d,p)=>a.jsxs("div",{className:"relative mb-4 last:mb-0",children:[a.jsx("div",{className:"absolute -left-[29px] top-1 h-3 w-3 rounded-full border-2 border-primary/50 bg-background"}),a.jsx("p",{className:"text-[10px] font-mono text-muted-foreground",children:d.timeframe}),a.jsx("p",{className:"text-sm font-medium text-foreground",children:d.action}),a.jsx("p",{className:"text-xs text-muted-foreground",children:d.expected_effect})]},p)),a.jsxs("div",{className:"mt-3 flex gap-3",children:[a.jsxs(De,{variant:"outline",className:n.probabilityDelta>=0?"border-primary/30 text-primary":"border-destructive/30 text-destructive",children:["Success: ",n.probabilityDelta>=0?"+":"",(n.probabilityDelta*100).toFixed(0),"%"]}),a.jsxs(De,{variant:"outline",children:["Risk: ",n.riskDelta]})]})]})]}),a.jsxs("div",{children:[a.jsxs("label",{className:"mb-2 block text-xs font-medium text-muted-foreground",children:["Time Scrubber — Step ",r+1," of ",u+1]}),a.jsx(lf,{value:[r],onValueChange:d=>o(d[0]),min:0,max:u,step:1})]}),a.jsxs("div",{className:"rounded-lg border border-border bg-muted/30 p-4",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(ec,{className:"h-4 w-4 text-warning"}),a.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Inject Event at Step ",r+1]})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(vt,{placeholder:"What happens at this point?",value:s,onChange:d=>i(d.target.value),onKeyDown:d=>d.key==="Enter"&&f()}),a.jsx(Ce,{size:"sm",onClick:f,disabled:!s.trim(),children:"RUN FROM HERE"})]}),a.jsxs(Ce,{size:"sm",variant:"ghost",className:"mt-2 text-xs",onClick:()=>c(!l),children:[a.jsx(Sk,{className:"mr-1 h-3 w-3"}),"SUGGEST EVENTS"]}),l&&a.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5 animate-in fade-in-0",children:QP.map((d,p)=>a.jsx("button",{onClick:()=>{i(d),c(!1)},className:"rounded-full border border-border px-3 py-1 text-[10px] text-muted-foreground hover:border-primary/50 hover:text-foreground transition-colors",children:d},p))})]})]})]})]})})})},XP=({request:e,title:t})=>{const[n,r]=g.useState(null),[o,s]=g.useState(!1),i=g.useCallback(()=>{const c=cj(t,e),u=fj(c);r(u)},[e,t]),l=g.useCallback(async()=>{n&&(await navigator.clipboard.writeText(n),s(!0),setTimeout(()=>s(!1),2e3))},[n]);return a.jsx("div",{className:"inline-flex flex-col items-start gap-2",children:n?a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(vt,{value:n,readOnly:!0,className:"w-[320px] text-xs font-mono",onClick:c=>c.target.select()}),a.jsx(Ce,{size:"icon",variant:"outline",onClick:l,children:o?a.jsx(Bd,{className:"h-4 w-4 text-primary"}):a.jsx(Jv,{className:"h-4 w-4"})})]}):a.jsxs(Ce,{size:"sm",variant:"outline",onClick:i,className:"text-xs",children:[a.jsx(Ek,{className:"mr-1.5 h-3.5 w-3.5"}),"SHARE SCENARIO"]})})};var wl="Collapsible",[qP,CT]=qt(wl),[ZP,hf]=qP(wl),U0=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:i,...l}=e,[c,u]=cr({prop:r,defaultProp:o??!1,onChange:i,caller:wl});return a.jsx(ZP,{scope:n,disabled:s,contentId:Uo(),open:c,onOpenToggle:g.useCallback(()=>u(f=>!f),[u]),children:a.jsx(Q.div,{"data-state":vf(c),"data-disabled":s?"":void 0,...l,ref:t})})});U0.displayName=wl;var H0="CollapsibleTrigger",W0=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=hf(H0,n);return a.jsx(Q.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":vf(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:K(e.onClick,o.onOpenToggle)})});W0.displayName=H0;var gf="CollapsibleContent",G0=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=hf(gf,e.__scopeCollapsible);return a.jsx(Xs,{present:n||o.open,children:({present:s})=>a.jsx(JP,{...r,ref:t,present:s})})});G0.displayName=gf;var JP=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,i=hf(gf,n),[l,c]=g.useState(r),u=g.useRef(null),f=ae(t,u),d=g.useRef(0),p=d.current,m=g.useRef(0),b=m.current,h=i.open||l,x=g.useRef(h),y=g.useRef(void 0);return g.useEffect(()=>{const v=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(v)},[]),Ve(()=>{const v=u.current;if(v){y.current=y.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const w=v.getBoundingClientRect();d.current=w.height,m.current=w.width,x.current||(v.style.transitionDuration=y.current.transitionDuration,v.style.animationName=y.current.animationName),c(r)}},[i.open,r]),a.jsx(Q.div,{"data-state":vf(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...s,ref:f,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:h&&o})});function vf(e){return e?"open":"closed"}var eT=U0;const tT=eT,nT=W0,rT=G0,oT=({governance:e})=>{const[t,n]=g.useState(!1),r=e.constitutionalChecks.every(c=>c.passed),o=e.constitutionalChecks.filter(c=>!c.passed),s=e.neuroverse,i=(s==null?void 0:s.guardStatus)==="BLOCK"||o.length>0,l=(s==null?void 0:s.guardStatus)==="PAUSE";return a.jsx("section",{className:"border-t border-border py-8",children:a.jsx("div",{className:"container mx-auto px-6",children:a.jsxs("div",{className:"mx-auto max-w-4xl space-y-3",children:[(i||l)&&a.jsxs("div",{className:W("rounded-lg border-2 px-5 py-4 flex items-start gap-3",i?"border-red-500/50 bg-red-500/10":"border-yellow-500/50 bg-yellow-500/10"),children:[i?a.jsx(kk,{className:"h-5 w-5 text-red-400 shrink-0 mt-0.5"}):a.jsx(Rk,{className:"h-5 w-5 text-yellow-400 shrink-0 mt-0.5"}),a.jsxs("div",{className:"space-y-2 flex-1",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:W("inline-flex items-center rounded px-2 py-0.5 text-xs font-bold uppercase tracking-wider",i?"bg-red-500/20 text-red-400":"bg-yellow-500/20 text-yellow-400"),children:i?"BLOCK":"PAUSE"}),a.jsx("span",{className:"text-sm font-medium text-foreground",children:"Governance Intervention Active"})]}),o.map(c=>a.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[a.jsxs("span",{className:"font-mono text-xs text-red-400/70 mt-0.5",children:["[",c.ruleId,"]"]}),a.jsx("span",{className:"text-foreground/90",children:c.rule}),c.detail&&a.jsxs("span",{className:"text-muted-foreground",children:["— ",c.detail]})]},c.ruleId)),(s==null?void 0:s.guardStatus)==="BLOCK"&&o.length===0&&a.jsx("p",{className:"text-sm text-foreground/90",children:"Liquidity floor violated — impacts capped by governance rules"}),(s==null?void 0:s.collapseRisk)&&s.collapseRisk!=="none"&&a.jsxs("p",{className:"text-xs text-muted-foreground",children:["System risk: ",a.jsx("span",{className:W("font-medium",s.collapseRisk==="high"?"text-red-400":s.collapseRisk==="moderate"?"text-yellow-400":"text-emerald-400"),children:s.collapseRisk}),s.worldHealthScore!==void 0&&a.jsxs(a.Fragment,{children:[" · Stability: ",s.worldHealthScore,"%"]})]})]})]}),a.jsxs(tT,{open:t,onOpenChange:n,children:[a.jsxs(nT,{className:"flex w-full items-center justify-between rounded-lg border border-border bg-card px-5 py-4 text-left transition-colors hover:bg-muted/50",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[r?a.jsx(Gi,{className:"h-5 w-5 text-primary"}):a.jsx(jk,{className:"h-5 w-5 text-destructive"}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Rules & Constraints"}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:[e.constitutionalChecks.length," rules checked · Status: ",e.authorityLevel.replace(/_/g," "),s&&a.jsxs(a.Fragment,{children:[" · Permission: ",a.jsx("span",{className:W("font-medium",s.guardStatus==="ALLOW"?"text-emerald-400":s.guardStatus==="BLOCK"?"text-red-400":"text-yellow-400"),children:s.guardStatus})]})]})]})]}),a.jsx(Zs,{className:W("h-4 w-4 text-muted-foreground transition-transform duration-200",t&&"rotate-180")})]}),a.jsxs(rT,{className:"mt-3 space-y-4 animate-in fade-in-0 slide-in-from-top-2",children:[a.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[{icon:wk,label:"Request ID",value:e.traceId.slice(0,12)+"…"},{icon:Gi,label:"Permission",value:e.authorityLevel.replace(/_/g," ")},{icon:Vd,label:"Timestamp",value:new Date(e.timestamp).toLocaleTimeString()},{icon:Gi,label:"Version",value:`v${e.engineVersion}`}].map(c=>a.jsxs("div",{className:"rounded-md border border-border bg-card p-3",children:[a.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[a.jsx(c.icon,{className:"h-3 w-3"}),c.label]}),a.jsx("p",{className:"mt-1 text-xs font-medium text-foreground",children:c.value})]},c.label))}),a.jsxs("div",{className:"rounded-lg border border-border bg-card",children:[a.jsx("div",{className:"border-b border-border px-4 py-2.5",children:a.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Safety Rules"})}),a.jsx("div",{className:"divide-y divide-border",children:e.constitutionalChecks.map(c=>a.jsxs("div",{className:"flex items-start gap-3 px-4 py-3",children:[a.jsx("span",{className:W("mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-xs font-bold",c.passed?"bg-primary/20 text-primary":"bg-destructive/20 text-destructive"),children:c.passed?"✓":"✗"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-sm font-medium text-foreground",children:c.rule}),c.detail&&a.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:c.detail}),a.jsx("span",{className:"mt-1 inline-block rounded bg-muted px-1.5 py-0.5 text-[10px] font-mono text-muted-foreground",children:c.ruleId})]})]},c.ruleId))})]}),e.enforcedConstraints.length>0&&a.jsxs("div",{className:"rounded-lg border border-border bg-card p-4",children:[a.jsx("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Active Rules"}),a.jsx("ul",{className:"space-y-1.5",children:e.enforcedConstraints.map((c,u)=>a.jsxs("li",{className:"flex items-start gap-2 text-sm text-foreground",children:[a.jsx("span",{className:"mt-1 h-1.5 w-1.5 shrink-0 rounded-full bg-primary"}),c]},u))})]})]})]})]})})})},sT=({report:e,governance:t,isGenerating:n,aiEnabled:r,provider:o,onGenerate:s,onToggleAI:i})=>{const[l,c]=g.useState(!1),u=()=>{if(!e)return;const d=$p(e);navigator.clipboard.writeText(d),c(!0),setTimeout(()=>c(!1),2e3)},f=()=>{if(!e)return;const d=$p(e),p=new Blob([d],{type:"text/markdown"}),m=URL.createObjectURL(p),b=document.createElement("a");b.href=m,b.download="governed-report.md",b.click(),URL.revokeObjectURL(m)};return a.jsx("section",{className:"border-t border-border py-8",children:a.jsx("div",{className:"container mx-auto px-6",children:a.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(yu,{className:"h-5 w-5 text-primary"}),a.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Governed Report"}),t&&a.jsxs("span",{className:W("inline-flex items-center gap-1 rounded px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",t.trace.passed?"bg-emerald-500/20 text-emerald-400":"bg-yellow-500/20 text-yellow-400"),children:[a.jsx(rp,{className:"h-3 w-3"}),t.trace.passed?"Governed":"Violations"]})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-xs text-muted-foreground",children:"AI Assist"}),a.jsx(pf,{checked:r,onCheckedChange:i})]}),a.jsx(Ce,{variant:"outline",size:"sm",onClick:s,disabled:n,className:"gap-2",children:n?a.jsxs(a.Fragment,{children:[a.jsx(ty,{className:"h-3 w-3 animate-pulse"}),"Generating..."]}):a.jsxs(a.Fragment,{children:[a.jsx(yu,{className:"h-3 w-3"}),"Generate Report"]})})]})]}),e&&a.jsxs("div",{className:"space-y-4 animate-in fade-in-0 slide-in-from-top-2",children:[t&&a.jsx("div",{className:W("rounded-md border px-4 py-3 text-xs",t.trace.passed?"border-emerald-500/30 bg-emerald-500/5":"border-yellow-500/30 bg-yellow-500/5"),children:a.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[a.jsx(rp,{className:"h-3 w-3"}),a.jsxs("span",{children:["Actor: ",a.jsx("span",{className:"text-foreground font-mono",children:t.actor})," · ","Action: ",a.jsx("span",{className:"text-foreground font-mono",children:t.action})," · ","Provider: ",a.jsx("span",{className:"text-foreground font-medium",children:o})," · ","Constraints: ",t.trace.constraints.length," checked",t.trace.violations.length>0&&a.jsxs("span",{className:"text-yellow-400",children:[" · ",t.trace.violations.length," violation(s)"]})]})]})}),a.jsxs("div",{className:"rounded-lg border border-border bg-card p-5",children:[a.jsx("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Executive Summary"}),a.jsx("p",{className:"text-sm text-foreground leading-relaxed",children:e.executiveSummary})]}),a.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.keyEvents.length>0&&a.jsxs("div",{className:"rounded-lg border border-border bg-card p-4",children:[a.jsx("h4",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Key Events"}),a.jsx("div",{className:"space-y-2",children:e.keyEvents.map((d,p)=>a.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[a.jsxs("span",{className:W("mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-[10px] font-bold",d.severity==="critical"?"bg-red-500/20 text-red-400":d.severity==="high"?"bg-orange-500/20 text-orange-400":"bg-yellow-500/20 text-yellow-400"),children:["R",d.round]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-foreground/90",children:d.description}),a.jsx("p",{className:"text-xs text-muted-foreground",children:d.agents.join(", ")})]})]},p))})]}),e.governanceActions.length>0&&a.jsxs("div",{className:"rounded-lg border border-border bg-card p-4",children:[a.jsx("h4",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Governance Actions"}),a.jsx("div",{className:"space-y-2",children:e.governanceActions.map((d,p)=>a.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[a.jsx("span",{className:W("mt-0.5 shrink-0 rounded px-1.5 py-0.5 text-[10px] font-bold uppercase",d.type==="BLOCK"?"bg-red-500/20 text-red-400":d.type==="PAUSE"?"bg-yellow-500/20 text-yellow-400":d.type==="CIRCUIT_BREAKER"?"bg-purple-500/20 text-purple-400":"bg-blue-500/20 text-blue-400"),children:d.type}),a.jsxs("div",{children:[a.jsx("p",{className:"text-foreground/90",children:d.description}),a.jsx("p",{className:"text-xs text-muted-foreground",children:d.agent})]})]},p))})]})]}),a.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-5",children:[{label:"Volatility",value:e.metrics.volatilityReduction},{label:"Collapse Risk",value:e.metrics.collapseRisk},{label:"Stability",value:e.metrics.stabilityScore},{label:"Interventions",value:String(e.metrics.interventionCount)},{label:"Blocked",value:String(e.metrics.blockedActions)}].map(d=>a.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-center",children:[a.jsx("p",{className:"text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:d.label}),a.jsx("p",{className:"mt-1 text-sm font-bold text-foreground",children:d.value})]},d.label))}),e.counterfactual&&a.jsxs("div",{className:"rounded-lg border border-dashed border-yellow-500/30 bg-yellow-500/5 p-4",children:[a.jsx("h4",{className:"mb-1 text-xs font-semibold uppercase tracking-wider text-yellow-400/80",children:"Counterfactual"}),a.jsx("p",{className:"text-sm text-foreground/80 italic",children:e.counterfactual})]}),e.observations.length>0&&a.jsxs("div",{className:"rounded-lg border border-border bg-card p-4",children:[a.jsx("h4",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Observations"}),a.jsx("ul",{className:"space-y-1.5",children:e.observations.map((d,p)=>a.jsxs("li",{className:"flex items-start gap-2 text-sm text-foreground/90",children:[a.jsx("span",{className:"mt-1 h-1.5 w-1.5 shrink-0 rounded-full bg-primary"}),d]},p))})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(Ce,{variant:"ghost",size:"sm",onClick:u,className:"gap-2 text-xs",children:[l?a.jsx(vk,{className:"h-3 w-3 text-emerald-400"}):a.jsx(Jv,{className:"h-3 w-3"}),l?"Copied":"Copy"]}),a.jsxs(Ce,{variant:"ghost",size:"sm",onClick:f,className:"gap-2 text-xs",children:[a.jsx(yk,{className:"h-3 w-3"}),"Download .md"]}),a.jsxs("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["Generated by ",a.jsx("span",{className:"font-medium text-foreground",children:e.generatedBy})," · Governed by ",a.jsx("span",{className:"font-medium text-foreground",children:e.governedBy})]})]})]})]})})})};function $p(e){const t=[];if(t.push(`# Governed Simulation Report
|
|
328
|
-
`),t.push(`> Generated by: ${e.generatedBy} | Governed by: ${e.governedBy}
|
|
329
|
-
`),t.push(`## Executive Summary
|
|
330
|
-
`),t.push(e.executiveSummary+`
|
|
331
|
-
`),e.keyEvents.length>0){t.push(`## Key Events
|
|
332
|
-
`);for(const n of e.keyEvents)t.push(`- **Round ${n.round}** [${n.severity}]: ${n.description} (${n.agents.join(", ")})`);t.push("")}if(e.governanceActions.length>0){t.push(`## Governance Actions
|
|
333
|
-
`);for(const n of e.governanceActions)t.push(`- **[${n.type}]** ${n.agent}: ${n.description}`);t.push("")}if(t.push(`## Metrics
|
|
334
|
-
`),t.push("| Metric | Value |"),t.push("|--------|-------|"),t.push(`| Volatility | ${e.metrics.volatilityReduction} |`),t.push(`| Collapse Risk | ${e.metrics.collapseRisk} |`),t.push(`| Stability | ${e.metrics.stabilityScore} |`),t.push(`| Interventions | ${e.metrics.interventionCount} |`),t.push(`| Blocked Actions | ${e.metrics.blockedActions} |`),t.push(""),e.counterfactual&&(t.push(`## Counterfactual
|
|
335
|
-
`),t.push(`> ${e.counterfactual}
|
|
336
|
-
`)),e.observations.length>0){t.push(`## Observations
|
|
337
|
-
`);for(const n of e.observations)t.push(`- ${n}`);t.push("")}return t.join(`
|
|
338
|
-
`)}const iT=()=>a.jsxs("div",{className:"flex flex-col items-center justify-center py-20",children:[a.jsxs("div",{className:"relative mb-6 h-32 w-64 overflow-hidden rounded-lg border border-border bg-card",children:[[0,1,2].map(e=>a.jsx("div",{className:"absolute left-0 right-0 h-px bg-primary/60 scan-line",style:{animationDelay:`${e*.5}s`}},e)),a.jsx("div",{className:"absolute inset-0 grid grid-cols-8 grid-rows-4 gap-1 p-3",children:Array.from({length:32}).map((e,t)=>a.jsx("div",{className:"rounded-full bg-primary/20 animate-pulse",style:{animationDelay:`${t*50}ms`}},t))})]}),a.jsx("p",{className:"text-sm text-muted-foreground animate-pulse",children:"Building reasoning graph..."})]}),aT=()=>{const[e,t]=g.useState(!1);return g.useEffect(()=>{const n=()=>t(window.scrollY>400);return window.addEventListener("scroll",n,{passive:!0}),()=>window.removeEventListener("scroll",n)},[]),e?a.jsx(Ce,{size:"icon",onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),className:"fixed bottom-6 right-6 z-50 rounded-full shadow-lg glow-teal animate-fade-in","aria-label":"Scroll to top",children:a.jsx(hk,{className:"h-5 w-5"})}):null},lT={severity:50,environmentalHostility:50,timePressure:50,regulatoryClimate:50},cT={timeHorizon:"",riskTolerance:"moderate",budget:""},uT={outcome:"",priority:"important",timeframe:"",successCriteria:[],redLines:[],availableLevers:[]},dT=()=>{const{theme:e,toggle:t}=qy(),n=g.useRef(null),r=g.useRef(null),o=g.useRef(null),[s,i]=g.useState(null),[l,c]=g.useState(""),[u,f]=g.useState(lT),[d,p]=g.useState([]),[m,b]=g.useState(cT),[h,x]=g.useState("full"),[y,v]=g.useState("explore"),[w,S]=g.useState(uT),[N,C]=g.useState(null),[k,j]=g.useState(null),[A,P]=g.useState(!1),[O,M]=g.useState(!1),[U,T]=g.useState(!1),[z,$]=g.useState(null),[B,E]=g.useState(null),[_,L]=g.useState(null),[G,H]=g.useState(!1),[Y,X]=g.useState(!1),[pe,be]=g.useState("deterministic");g.useEffect(()=>{if(window.location.hash.includes("capsule="))try{const ve=mj(window.location.href);ve&&(c(ve.scenario),setTimeout(()=>{var ue;return(ue=n.current)==null?void 0:ue.scrollIntoView({behavior:"smooth"})},300))}catch{}},[]);const F=g.useCallback(()=>{var q;(q=n.current)==null||q.scrollIntoView({behavior:"smooth"})},[]),ce=g.useCallback(()=>{var q;(q=r.current)==null||q.scrollIntoView({behavior:"smooth"})},[]),Se=g.useCallback((q,ve)=>{c(q),v("goal"),S(ue=>({...ue,outcome:ve})),setTimeout(()=>{var ue;return(ue=n.current)==null?void 0:ue.scrollIntoView({behavior:"smooth"})},100)},[]),oe=g.useCallback((q,ve)=>{c(`${q}: ${ve}`),setTimeout(()=>{var ue;return(ue=n.current)==null?void 0:ue.scrollIntoView({behavior:"smooth"})},100)},[]),ne=g.useCallback(q=>{i(q),c(""),f(q.defaultSliders),T(O)},[O]),re=g.useCallback(q=>{c(q),q.trim()&&i(null)},[]),$e=g.useCallback(q=>{f(q),O&&T(!0)},[O]),et=g.useCallback(async()=>{P(!0),T(!1),$(null);try{const q=s||l,ve={stakeholders:d.length>0?d:void 0,constraints:m,depth:h,mode:y,goal:y==="goal"&&w.outcome.trim()?{outcome:w.outcome,priority:w.priority,timeframe:w.timeframe||void 0,success_criteria:w.successCriteria.length>0?w.successCriteria:void 0,red_lines:w.redLines.length>0?w.redLines:void 0,available_levers:w.availableLevers.length>0?w.availableLevers:void 0}:void 0},ue=await i2(q,u,ve);C(ue),M(!0),setTimeout(()=>{var fe;return(fe=o.current)==null?void 0:fe.scrollIntoView({behavior:"smooth",block:"start"})},100)}catch(q){console.error("Reasoning engine error:",q)}finally{P(!1)}},[s,l,u,d,m,h,y,w]),hn=g.useCallback(q=>{P(!0),setTimeout(()=>{const ve=S2(q);j(ve),C(ve),P(!1),setTimeout(()=>{var ue;return(ue=o.current)==null?void 0:ue.scrollIntoView({behavior:"smooth",block:"start"})},100)},2e3)},[]),Zt=g.useCallback((q,ve)=>{if(!(N!=null&&N.goalResult))return;const ue=N.goalResult.strategies.find(kt=>kt.id===q);if(!ue)return;const fe=ue.steps.map(kt=>({...kt,action:ve.includes(kt.lever)?kt.action:`[DISABLED] ${kt.action}`,expected_effect:ve.includes(kt.lever)?kt.expected_effect:"Lever disabled — effect removed from path"})),Nt=ve.length/Math.max(ue.levers_used.length,1);$({originalStrategy:ue,injectedEvent:{atStep:0,event:`Levers modified: ${ve.join(", ")}`},forkedSteps:fe,probabilityDelta:(Nt-1)*ue.success_probability*.3,riskDelta:Nt<.5?"increased":ue.risk})},[N]),gn=g.useCallback(q=>{if(!(N!=null&&N.goalResult))return;const ve=N.goalResult.strategies.find(fe=>fe.id===N.goalResult.recommended_strategy_id);if(!ve)return;const ue=ve.steps.filter(fe=>fe.order>q.atStep+1).map(fe=>({...fe,action:`[ADAPTED] ${fe.action}`,expected_effect:`Modified by event: "${q.event}" — ${fe.expected_effect}`}));ue.length===0&&ue.push({order:q.atStep+2,action:"Reassess strategy in light of new event",timeframe:"Immediate",lever:"Assessment",expected_effect:"Determine whether original path is still viable",risk:"Delay in execution while reassessing"}),$({originalStrategy:ve,injectedEvent:q,forkedSteps:ue,probabilityDelta:-.1-Math.random()*.15,riskDelta:"elevated"})},[N]),vr=g.useCallback(async()=>{var q,ve,ue,fe;if(N){H(!0);try{const{generateGovernedReport:Nt}=await ku(async()=>{const{generateGovernedReport:Jt}=await import("./reportEngine-BfteK4MN.js");return{generateGovernedReport:Jt}},[]),{generateDeterministicReport:kt}=await ku(async()=>{const{generateDeterministicReport:Jt}=await Promise.resolve().then(()=>Wj);return{generateDeterministicReport:Jt}},void 0),he=N.governance,Hr={scenario:l||(s==null?void 0:s.title)||"Simulation",rounds:[],metrics:{avgImpact:-.15,collapseProbability:((q=he==null?void 0:he.neuroverse)==null?void 0:q.collapseRisk)==="high"?.65:.25,stabilityScore:(((ve=he==null?void 0:he.neuroverse)==null?void 0:ve.worldHealthScore)??65)/100,maxVolatility:.45,peakNegativeSentiment:-.5},interventions:(he==null?void 0:he.enforcedConstraints)??[],governanceStats:{totalEvaluations:(he==null?void 0:he.constitutionalChecks.length)??0,blocks:(he==null?void 0:he.constitutionalChecks.filter(Jt=>!Jt.passed).length)??0,pauses:((ue=he==null?void 0:he.neuroverse)==null?void 0:ue.guardStatus)==="PAUSE"?1:0,allows:(he==null?void 0:he.constitutionalChecks.filter(Jt=>Jt.passed).length)??0,rulesFired:((fe=he==null?void 0:he.neuroverse)==null?void 0:fe.rulesFired)??0}},ri=kt(Hr);E(ri),L({result:ri,actor:"ai_analyst",action:"generate_report",governed:!0,trace:{constraints:["must_reference_trace","must_include_blocked_actions","must_include_metrics","no_unverifiable_claims"],passed:!0,violations:[]}}),be(Y?"ai":"deterministic")}catch(Nt){console.error("Report generation failed:",Nt)}finally{H(!1)}}},[N,Y,l,s]),vn=!!(s||l.trim()),ti=vn&&!k,Fe=O&&N&&!A||k&&!A,ni=(s==null?void 0:s.title)||l.slice(0,60)||"Custom Scenario";return a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx(O2,{showSimulatedFuture:!!Fe,theme:e,onToggleTheme:t,isSimulating:A||!!Fe}),a.jsxs("main",{className:"pt-20",children:[a.jsx(z2,{onRunScenario:F,onPasteSimulation:ce}),a.jsx(W2,{onFullAnalysis:Se}),a.jsx(o_,{}),a.jsx("div",{ref:r,children:a.jsx(G2,{onExplain:hn,isLoading:A})}),a.jsx(u_,{onSelect:oe}),a.jsx(l_,{}),a.jsx("div",{ref:n,children:a.jsx(d_,{onSelectScenario:ne,onCustomScenario:re,onCalculate:et,selectedId:(s==null?void 0:s.id)||null,customText:l,isLoading:A,hasScenario:vn})}),ti&&a.jsx("section",{className:"border-t border-border py-8",children:a.jsx("div",{className:"container mx-auto px-6",children:a.jsxs("div",{className:"mx-auto max-w-4xl space-y-6",children:[a.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[a.jsx(dP,{mode:y,onChange:v}),a.jsx(uP,{})]}),y==="goal"&&a.jsx(fP,{values:w,onChange:S}),a.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[a.jsx(oP,{stakeholders:d,onChange:p}),a.jsx(aP,{values:m,onChange:b})]}),a.jsx(cP,{value:h,onChange:x}),a.jsx(A_,{values:u,onChange:$e,showRecalculate:U,onRecalculate:et})]})})}),A&&a.jsx(iT,{}),a.jsx("div",{ref:o}),k&&!A&&a.jsx(n_,{result:k}),Fe&&N&&a.jsx("section",{className:"border-t border-border py-6",children:a.jsx("div",{className:"container mx-auto px-6",children:a.jsx("div",{className:"mx-auto max-w-5xl",children:a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsx("h2",{className:"text-xs font-bold uppercase tracking-[0.2em] text-primary",children:"SIMULATED FUTURE"}),N.confidence&&a.jsx(pP,{confidence:N.confidence})]}),N.lastRequest&&a.jsx(XP,{request:N.lastRequest,title:ni})]})})})}),Fe&&(N==null?void 0:N.keyAssumptions)&&a.jsx(gP,{assumptions:N.keyAssumptions}),Fe&&N&&a.jsx(DP,{result:N}),Fe&&N&&a.jsx(FP,{challenges:N.challenges}),Fe&&N&&a.jsx(zP,{recommendations:N.recommendations}),Fe&&(N==null?void 0:N.goalResult)&&a.jsx(KP,{goalResult:N.goalResult,onForkStrategy:Zt}),Fe&&(N==null?void 0:N.goalResult)&&a.jsx(YP,{strategy:N.goalResult.strategies.find(q=>q.id===N.goalResult.recommended_strategy_id)||N.goalResult.strategies[0],onInjectEvent:gn,forkedTimeline:z}),Fe&&(N==null?void 0:N.governance)&&a.jsx(oT,{governance:N.governance}),Fe&&N&&a.jsx(sT,{report:B,governance:_,isGenerating:G,aiEnabled:Y,provider:pe,onGenerate:vr,onToggleAI:X})]}),a.jsx(aT,{}),a.jsx(L2,{governance:Fe&&(N!=null&&N.governance)?N.governance:void 0})]})},fT=()=>{const e=Nv();return g.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),a.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:a.jsxs("div",{className:"text-center",children:[a.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),a.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),a.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},mT=new K1,pT=()=>a.jsx(Y1,{client:mT,children:a.jsxs(XE,{children:[a.jsx(dC,{}),a.jsx(fN,{}),a.jsx(MS,{children:a.jsxs(TS,{children:[a.jsx(du,{path:"/",element:a.jsx(dT,{})}),a.jsx(du,{path:"*",element:a.jsx(fT,{})})]})})]})});av(document.getElementById("root")).render(a.jsx(pT,{}));export{Vj as A,Gy as a,Hj as e,Uj as g};
|